Skip to content

Commit

Permalink
fix(samples): peginWitUserData amounts, use asset instead
Browse files Browse the repository at this point in the history
  • Loading branch information
gitmp01 committed Nov 6, 2024
1 parent c769386 commit f7a77cf
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 70 deletions.
38 changes: 21 additions & 17 deletions cpp/test/samples/evm-metadata.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

72 changes: 19 additions & 53 deletions cpp/test/samples/evm-operations.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { toBeHex, zeroPadValue, parseUnits } = require('ethers')
const { no0x } = require('../utils/bytes-utils')
const { no } = require('../utils/bytes-utils')

const evmTopicZero =
'66756e6473206172652073616675207361667520736166752073616675202e2e'
Expand All @@ -8,64 +8,30 @@ const evmAdapter =

const evmOperationSamples = {
pegin: {
blockId: no0x(
zeroPadValue(
'0x7e21ba208ea2a072bad2d011dbc3a9f870c574a66203d84bde926fcf85756d78',
32,
),
),
txId: no0x(
zeroPadValue(
'0x2e3704b180feda25af9dfe50793e292fd99d644aa505c3d170fa69407091dbd3',
32,
),
),
blockId: '7e21ba208ea2a072bad2d011dbc3a9f870c574a66203d84bde926fcf85756d78',
txId: '2e3704b180feda25af9dfe50793e292fd99d644aa505c3d170fa69407091dbd3',
nonce: 0,
token: no0x(
zeroPadValue(toBeHex('0x810090f35dfa6b18b5eb59d298e2a2443a2811e2'), 32),
),
originChainId: no0x(zeroPadValue('0x01', 32)), // EVM mainnet chain id
destinationChainId: no0x(
zeroPadValue(
'0xaca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906',
32,
),
), // EOS chain id
amount: parseUnits('5.87190615', 18).toString(),
sender: no0x(
zeroPadValue('0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', 32),
),
token: '000000000000000000000000810090f35dfa6b18b5eb59d298e2a2443a2811e2',
originChainId:
'0000000000000000000000000000000000000000000000000000000000000001', // EVM mainnet chain id
destinationChainId:
'aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906', // EOS chain id
amount: '5.87190615 XTST',
sender: '000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266',
recipient: 'eosrecipient',
data: '',
},
peginWithUserData: {
blockId: no0x(
zeroPadValue(
'0x8111e4e5e8ce115304d00d3947de97fb4ab73e0e3a3348cc86bae22d36f3572f',
32,
),
),
txId: no0x(
zeroPadValue(
'0xf48d3b1b5ffe7149db8edf667ffc90c5b0035ab143fb2031156a4326f1c00049',
32,
),
),
blockId: '8111e4e5e8ce115304d00d3947de97fb4ab73e0e3a3348cc86bae22d36f3572f',
txId: 'f48d3b1b5ffe7149db8edf667ffc90c5b0035ab143fb2031156a4326f1c00049',
nonce: 1,
token: no0x(
zeroPadValue(toBeHex('0x810090f35DFA6B18b5EB59d298e2A2443a2811E2'), 32),
),
originChainId: no0x(zeroPadValue('0x01', 32)), // ETH chain id
destinationChainId: no0x(
zeroPadValue(
'0xaca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906',
32,
),
), // EOS chain id
amount: parseUnits('0.9974995655625', 18).toString(),
sender: no0x(
zeroPadValue('0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', 32),
),
token: '000000000000000000000000810090f35dfa6b18b5eb59d298e2a2443a2811e2',
originChainId:
'0000000000000000000000000000000000000000000000000000000000000001', // ETH chain id
destinationChainId:
'aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906', // EOS chain id
amount: '0.99749956 XTST',
sender: '000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266',
recipient: 'eosrecipient',
data: '12345abcdefc0de1337f',
},
Expand Down

0 comments on commit f7a77cf

Please sign in to comment.