Skip to content

Hardhat test are failing due to error CodeRejectedΒ #182

@Nebuliane

Description

@Nebuliane

πŸ”„ Reproduction Steps

  1. Clone the scc testing repo and enter the dragonswap-sei-native-oracle-adapter folder. Install dependencies.
  2. Change hardhat.config.ts to enable evm target for network.hardhat & network.local: polkadot: { target: "evm" }
  3. Run the tests: npx hardhat test

πŸ€” Expected Behavior

The 5 tests should execute and all pass. The tests correctly execute and pass when polkadot: false or polkadot: { target: "pvm" }

😯 Current Behavior

Currently, the tests fail with the following error message: ProviderError: Runtime error: Pallet error: Revive::CodeRejected. See also log.

This is the entire error-message for the first test case:

1) SeiNativeOracleAdapter
       Exchange Rates
         should get correct exchange rate for usei:
     ProviderError: Runtime error: Pallet error: Revive::CodeRejected
      at HttpProvider.request (/home/runner/_work/scc-testing/scc-testing/dragonswap-sei-native-oracle-adapter/node_modules/hardhat/src/internal/core/providers/http.ts:116:21)
      at processTicksAndRejections (node:internal/process/task_queues:105:5)
      at deployFixture (/home/runner/_work/scc-testing/scc-testing/dragonswap-sei-native-oracle-adapter/test/SeiNativeOracleAdapter.test.js:31:5)
      at loadFixture (/home/runner/_work/scc-testing/scc-testing/dragonswap-sei-native-oracle-adapter/node_modules/@nomicfoundation/hardhat-network-helpers/src/loadFixture.ts:59:18)
      at Context.<anonymous> (/home/runner/_work/scc-testing/scc-testing/dragonswap-sei-native-oracle-adapter/test/SeiNativeOracleAdapter.test.js:50:31)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions