Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions modules/sdk-coin-vet/test/resources/vet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ export const SPONSORED_NFT_TRANSACTION =
export const STAKING_TRANSACTION =
'0xf901032788015d55fcf2457e7c40f866f864941856c533ac2d94340aaa8544d35a5c1d4a21dee7880de0b6b3a7640000b844d8da3bbf0000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000181808265848083094c53c101b882efcb9ea88e908d1a142db96c1b44dd056ea194f1ad45670c100a8c52348cc7b20387741260ebe7fe9b7594f96693c88662fa60edba5992332728222b0bdd8a30008535368bd901319eb4513d16bebc428dc8454d32a19eeb76372849a6134ebbba79f1eeceea1f6546574b945c05489222cb451f5b0e2901b0c687b750e833aeb800';

export const STAKE_CLAUSE_TRANSACTION =
'0xf8e3278801618b7b1354c4ca40f845f843941ec1d168574603ec35b9d229843b7c2b44bcb770880de0b6b3a7640000a4604f2177000000000000000000000000000000000000000000000000000000000000000881808305fd5a808307b278c101b882b380970580d957b8e7989aa9aa9281e57245fa3835cb2aaae6475b4062bb4f1c2dd2ca694df6503d5dfd654579130b3484bee75420247cf8f6b6b4b76b7939f101db6e6cef5a27375274741f3c0aba4be13a9e086337c3290866afe049efcdaa2d3227c9e12b52627c4d71f5b667821f9d33adcc4c97fdc28b93c34013d32e242300';

export const DELEGATION_TRANSACTION =
'0xf8fb278801618aa3e0a55fc940f85ef85c947240e3bc0d26431512d5b67dbd26d199205bffe880b8443207555d00000000000000000000000000000000000000000000000000000000000187690000000000000000000000000000000000000000000000000000000000000001818082e43a808306af07c101b882fb8030f6e2ef6563ff3b0e7e2a2292c1db5fc41c7ab9f598bad370c5cfd3dc32286ae8d709e941c0312c8cd33a3505156b44d1639c73980ffa66bc72f37820f2001c0e6b6e76a6a4d806c377a0a279053eb6ea4356bd235f4396585bb071d70f992c639d45c53431a3c1493a52a136203905e42c671dd384ee5f5ead0a70cb607001';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ describe('VET Delegation Transaction', function () {
toJson.gasPriceCoef.should.equal(128);
toJson.expiration.should.equal(64);
toJson.chainTag.should.equal(39);
// in delegate txn, nftTokenId indicates the tokenId
toJson.nftTokenId?.should.equal(tokenId);
toJson.autorenew?.should.equal(true);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,17 +237,18 @@ describe('VET Staking Transaction', function () {
});

it('should build a signed tx and validate its toJson', async function () {
const txBuilder = factory.from(testData.STAKING_TRANSACTION);
const txBuilder = factory.from(testData.STAKE_CLAUSE_TRANSACTION);
const tx = txBuilder.transaction as StakeClauseTransaction;
const toJson = tx.toJson();
toJson.id.should.equal('0x99325b39cd04bd1821f6f6af7b679c247e6425a4eb95eb429fa8dff477298d0e');
toJson.stakingContractAddress?.should.equal('0x1856c533ac2d94340aaa8544d35a5c1d4a21dee7');
toJson.id.should.equal('0x2f96e4c16d70bd3e2dabec29a07eb3d6066691ba5b812d6e897676f6ebc0a798');
toJson.stakingContractAddress?.should.equal('0x1ec1d168574603ec35b9d229843b7c2b44bcb770');
toJson.amountToStake?.should.equal('0xde0b6b3a7640000');
toJson.nonce.should.equal('609363');
toJson.gas.should.equal(25988);
toJson.nonce.should.equal('504440');
toJson.gas.should.equal(392538);
toJson.gasPriceCoef.should.equal(128);
toJson.expiration.should.equal(64);
toJson.chainTag.should.equal(39);
// in stake txn, nftTokenId indicates the levelId
toJson.nftTokenId?.should.equal(8);
});
});
Expand Down