Skip to content

Commit

Permalink
Fix live tests by setting static gas coins
Browse files Browse the repository at this point in the history
  • Loading branch information
manolisliolios committed Oct 16, 2024
1 parent 8cd847b commit 1c56aea
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sdk/test/live.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ describe('it should work on live networks', () => {
it('should work on mainnet', async () => {
const res = await e2eLiveNetworkDryRunFlow('mainnet');

console.log(res);

expect(res.effects.status.status).toEqual('success');
});

Expand Down
18 changes: 18 additions & 0 deletions sdk/test/pre-built.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,24 @@ export const e2eLiveNetworkDryRunFlow = async (network: 'mainnet' | 'testnet') =

tx.setSender(sender);

if (network === 'mainnet') {
tx.setGasPayment([
{
objectId: '0xc7fcf957faeb0cdd9809b2ab43e0a8bf7a945cfdac13e8cba527261fecefa4dd',
version: '86466933',
digest: '2F8iuFVJm55J96FnJ99Th493D254BaJkUccbwz5rHFDc',
},
]);
} else if (network === 'testnet') {
tx.setGasPayment([
{
objectId: '0xeb709b97ca3e87e385d019ccb7da4a9bd99f9405f9b0d692f21c9d2e5714f27a',
version: '169261602',
digest: 'HJehhEV1N8rqjjHbwDgjeCZJkHPRavMmihTvyTJme2rA',
},
]);
}

return client.dryRunTransactionBlock({
transactionBlock: await tx.build({
client,
Expand Down

0 comments on commit 1c56aea

Please sign in to comment.