Skip to content

Axelar "should deploy with native value passed to the constructor" #202

@0xRVE

Description

@0xRVE
git clone [email protected]:paritytech/polkadot-sdk.git
ln -s ./polkadot-sdk ~/polkadot-sdk
git clone [email protected]:paritytech/contracts-boilerplate.git
cd contracts-boilerplate
source scripts/node-env.sh
tmux new
dev-node build
eth-rpc build
revive_dev_stack

new terminal
make sure const usePolkavm = false in scc-testing/axelar-gmp-sdk-solidity/hardhat.config.js.

git clone [email protected]:paritytech/scc-testing.git
cd scc-testing/axelar-gmp-sdk-solidity
yarn install
yarn hardhat test --network localNode --grep 'native' test/deploy/Create2Deployer.js

result:

  0 passing (184ms)
  1 failing

  1) Create2Deployer
       deploy
         should deploy with native value passed to the constructor:

      AssertionError: expected 10000000000000010 to equal 10. The numerical values of the given "ethers.BigNumber" and "number" inputs were compared, and they differed.
      + expected - actual

      -10000000000000010
      +10

      at Context.<anonymous> (test/deploy/Create2Deployer.js:97:75)
      at processTicksAndRejections (node:internal/process/task_queues:105:5)

Reason for this failure:
dev-node has an existential balance of 10_000_000_000_000_000 wei. The test uses ethers.provider.getBalance to uery the balance of the contract which calls total_balance on the dev-node.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions