blindbox-sdk
Advanced tools
Comparing version 0.3.6 to 0.3.7
{ | ||
"name": "blindbox-sdk", | ||
"version": "0.3.6", | ||
"version": "0.3.7", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "author": "Lucklyric", |
@@ -28,2 +28,3 @@ ## SDK Package | ||
RiverBoxClient, | ||
RiverBoxExClient, | ||
ContractBuyResult, | ||
@@ -33,4 +34,6 @@ ContractFuseResult, | ||
ContractDealDetail, | ||
riverBoxExProvider, | ||
} from "blindbox-sdk"; | ||
const RIVERBOX_CONTRACT_ADDRESS = "0x0f522004467899fcbde46d3dec324e8f3238db14"; // v 0.2.0 contract deployed on BSC-Testnet | ||
const RIVERBOX_EX_CONTRACT_ADDRESS = "0xA54eB5997260aeE8BC6b572B7CCdb599bad27280"; // v 0.1.0 exchange contract deployed on BSC-Testnet | ||
function App() { | ||
@@ -49,8 +52,7 @@ const [sym, setSym] = React.useState(""); | ||
const client: RiverBoxClient = riverBoxProvider(false); | ||
// const client : IClient = riverBoxProvider( | ||
// false // mock = true or false | ||
// ); | ||
const exClient: RiverBoxExClient = riverBoxExProvider(false); | ||
// call read only methods | ||
client.connectProvider(RIVERBOX_CONTRACT_ADDRESS, provider); | ||
exClient.connectProvider(RIVERBOX_EX_CONTRACT_ADDRESS, provider); | ||
@@ -91,2 +93,7 @@ try { | ||
console.log("currentPaidBoxes:", currentPaidBoxes.toString()); | ||
// post a deal | ||
const tokenId = ret.newTokenIds[0]; | ||
const postDealResult = await exClient.connectSigner(signer).postDeal(tokenId, currentPrice.mul(2)) | ||
console.log(postDealResult); | ||
} catch (error) { | ||
@@ -93,0 +100,0 @@ console.log(error); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
910577
393