Skip to content

Unable to execute transaction using CeloProvider and Hardhat local node #1

Description

@kosecki123

Setup

yarn local

You should see standard output from the hardhat deployment and printed accounts:

Nothing to compile
deploying "ERC20" (tx: 0x8866793fdebf43451687ae56e8f7daac66897938e80f22da9952c7b2de0c82f7)...: deployed at 0x5FbDB2315678afecb367f032d93F642f64180aa3 with 418496 gas
Started HTTP and WebSocket JSON-RPC server at http://127.0.0.1:8545/

Accounts
========

WARNING: These accounts, and their private keys, are publicly known.
Any funds sent to them on Mainnet or any other live network WILL BE LOST.

Account #0: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 (10000 ETH)
Private Key: 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
...

Test 1

PK=<paste here the private key from listing above> CONTRACT=<paste here the address of deployed contract> node scripts/transfer_ethers_celo_provider.js

For me using PK and CONTACT above I would execute:

PK=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 CONTRACT=0x5FbDB2315678afecb367f032d93F642f64180aa3 node scripts/transfer_ethers_celo_provider.js

The output should have an error containing:

data: {
      message: 'Error: Invalid transaction. Only expecting 6 values (for unsigned tx) or 9 values (for signed tx).'
    }

Now, executing same transaction but using vanilla ether.providers.JsonRpcProvider as implemented in scripts/transfer_ethers.js ends without any issues.

PK=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 CONTRACT=0x5FbDB2315678afecb367f032d93F642f64180aa3 node scripts/transfer_ethers.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions