Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kosecki123 opened this issue Oct 20, 2022 · 0 comments

Comments

@kosecki123
Copy link
Member

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant