Created
July 21, 2019 12:35
-
-
Save IgorShadurin/850941c5accdf68885dba52dbef017f0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const wvs = 10 ** 8; | |
describe('Spin wheel test suite', async function () { | |
this.timeout(100000); | |
before(async function () { | |
await setupAccounts( | |
{ | |
player1: 2 * wvs, | |
wallet: 1 * wvs | |
}); | |
const script = compile(file('spin-wheel.ride')); | |
const ssTx = setScript({script}, accounts.wallet); | |
await broadcast(ssTx); | |
await waitForTx(ssTx.id); | |
console.log('Script has been set'); | |
}); | |
it('Bet', async function () { | |
const iTxFoo = invokeScript({ | |
dApp: address(accounts.wallet), | |
call: { | |
function: "bet", | |
args: [ | |
{ | |
type: "integer", | |
value: 2 | |
} | |
] | |
}, | |
payment: [ | |
{ | |
amount: 100500000, | |
assetId: null | |
} | |
] | |
}, accounts.player1); | |
await broadcast(iTxFoo); | |
await waitForTx(iTxFoo.id); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment