Generate bytecode for predeployment of ERC20 smart contracts in Acala.
Run yarn
to install dependencies.
To generate bytecode, run yarn run generate-bytecode
.
The generated bytecode JSON file would be ./resources/bytecodes.json
.
The token list for ERC20 smart contracts is in ./resources/acala_tokens.json
and ./resources/karura_tokens.json
. symbol and address are needed for each token, for instance:
{
"symbol": "ACA",
"address": "0x0000000000000000000100000000000000000000"
}
All of the tokens and predeployed system contracts have generated code in ./contracts/utils/AcalaAddress.sol
and ./contracts/utils/AcalaAddress.js
for Acala, ./contracts/utils/KaruraAddress.sol
and ./contracts/utils/KaruraAddress.js
for Karura, we can use it directly.
These ERC20 contracts make native and cross-chain tokens available inside Acala EVM.
- Mirrored Token contract address:
ADDRESS.ACA
,ADDRESS.AUSD
...(./contracts/utils/AcalaAddress.sol
or./contracts/utils/KaruraAddress.sol
) - Docs contracts/docs/token/Token.md
These contracts make other chain-native functionalities available in Acala EVM.
- EVM contract address:
ADDRESS.EVM
- Docs contracts/docs/evm/EVM.md
- Oracle contract address:
ADDRESS.ORACLE
- Docs contracts/docs/oracle/Oracle.md
- ScheduleCall contract address:
ADDRESS.SCHEDULE
- Docs contracts/docs/schdule/Schdule.md
- DEX contract address:
ADDRESS.DEX
- Docs contracts/docs/dex/DEX.md
- Homa contract address:
ADDRESS.HOMA
- Docs contracts/docs/homa/Homa.md
- EVMAccounts contract address:
ADDRESS.EVM_ACCOUNTS
- Docs contracts/docs/evm-accounts/EVMAccounts.md
- Honzon contract address:
ADDRESS.HONZON
- Docs contracts/docs/honzon/Honzon.md
- Incentives contract address:
ADDRESS.INCENTIVES
- Docs contracts/docs/incentives/Incentives.md
- StableAsset contract address:
ADDRESS.STABLE_ASSET
- Docs contracts/docs/stable-asset/StableAsset.md
- Xtokens contract address:
ADDRESS.XTOKENS
- Docs contracts/docs/xtokens/Xtokens.md
These contracts will make Acala's DeFi primitives (stablecoin, staking derivative, and DeX) available in Acala EVM.
npx hardhat run scripts/deploy.ts --network karuraTestnet
npx hardhat verify --network karuraTestnet 0xc5d131D410B15890dAF6F517475C6FB9D0c758DA