Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save IgorShadurin/850941c5accdf68885dba52dbef017f0 to your computer and use it in GitHub Desktop.
Save IgorShadurin/850941c5accdf68885dba52dbef017f0 to your computer and use it in GitHub Desktop.
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