Hi IC Devs,
I am trying to mint ckETH on the local replica. Is it possible to use the Hardhat node to use local ETH with the minter canister? If not should we use the same cksepoliaETH helper smart contract to mint on local replica?
Thanks.
Hi @0x4d5a
Is it possible to use the Hardhat node to use local ETH with the minter canister?
That won’t work out of the box because the ckETH minter uses hard-coded JSON-RPC providers to interact with the Ethereum blockchain via HTTPs outcalls. So if you want to go that route, you would need to change those providers accordingly (HTTPs outcalls should work with localhost).
If not should we use the same cksepoliaETH helper smart contract to mint on local replica?
You can use the same helper smart contract on Sepolia on your local minter; however, note that your local minter will have a different tECDSA key pair and therefore a different Ethereum address than the ckSepoliaETH minter where the funds are automatically transferred to by the helper smart contract.
That means that your local minter will see the events of the helper smart contract and mint the corresponding tokens on your local ledger, but it won’t be able to process withdrawals since its Ethereum address will not have any funds to it. To unblock this, you would need to transfer the require amount of Sepolia ETH to your local minter Ethereum address before doing any withdrawal.
Alternatively, you could deploy (for example via remix) your own copy of the helper smart contract, where upon instantiation you could pass your local minter address so that the deposited funds are transferred to the correct address.
I hope this helps you a bit. Don’t hesitate to let me know if you have further questions.