Skip to content

benjizhai/ckicp-ethereum-contracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ckicp-ethereum-contracts

Ethereum contracts for ckICP

Description

Ethereum contracts to be owned by the ckICP main canister on ICP via tECDSA.

Functionalities

  • ERC20 tokens of ICP on Ethereum
  • Only the ckICP canister can mint
  • Anyone can burn ckICP on ETH to get ICP on the IC blockchain
  • EIP-2612

Toolchain

https://github.com/foundry-rs/foundry

Deterministic Deployment

  1. Run foundryup and install the foundry toolchain.
  2. Replace the 0x04 with the minter's Ethereum address in script/CkIcp.s.sol in line new CkIcp{salt: bytes32(uint256(1))}(address(0x04));.
  3. Register an Etherscan account and export ETHERSCAN_API_KEY.
  4. For mainnet deployment: change eth_rpc_url and chain_id in foundry.toml.
  5. Run forge script script/CkIcp.s.sol -v --private-key $DEPLOYER_SK --broadcast --etherscan-api-key $ETHERSCAN_API_KEY --verify.
  6. The Airdrop.sol does not need a deterministic address and can be deployed using forge create --private-key $DEPLOYER_SK src/Airdrop.sol:Airdrop --etherscan-api-key $ETHERSCAN_API_KEY --verify.
  7. Commit broadcast/CkIcp.s.sol/{chain_id}/*.json back to this repo.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published