Skip to content

Commit

Permalink
update values & use estimation
Browse files Browse the repository at this point in the history
  • Loading branch information
pLabarta committed Sep 27, 2024
1 parent 8f63aab commit 485c44f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ describeSuite({
args: [0],
account: BALTATHAR_ADDRESS,
});
expect(estimatedGas).toMatchInlineSnapshot(`171662n`);
expect(estimatedGas).toMatchInlineSnapshot(`687763n`);

const rawTxn = await context.writePrecompile!({
precompileName: "Randomness",
functionName: "fulfillRequest",
args: [0],
gas: estimatedGas,
rawTxOnly: true,
gas: 280576n, // Taken from fullfillReceipt inline snapshot
privateKey: BALTATHAR_PRIVATE_KEY,
});

Expand Down Expand Up @@ -175,11 +175,11 @@ describeSuite({
).to.be.true;
expect(
(await context.polkadotJs().query.system.account(charleth.address)).data.free.toBigInt() >
DEFAULT_GENESIS_BALANCE
DEFAULT_GENESIS_BALANCE
).to.be.false;
expect(
(await context.polkadotJs().query.system.account(dorothy.address)).data.free.toBigInt() >
DEFAULT_GENESIS_BALANCE
DEFAULT_GENESIS_BALANCE
).to.be.true;
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ describeSuite({
args: [0],
});

expect(estimatedGas).toMatchInlineSnapshot(`171514n`);
expect(estimatedGas).toMatchInlineSnapshot(`677344n`);

const rawTxn = await context.writePrecompile!({
precompileName: "Randomness",
functionName: "fulfillRequest",
args: [0],
gas: 280576n, // Taken from fullfillReceipt inline snapshot
gas: estimatedGas,
rawTxOnly: true,
});
const { result } = await context.createBlock(rawTxn);
Expand Down

0 comments on commit 485c44f

Please sign in to comment.