architecture
modules
fungible
Messages

DeploySystemContracts deploy new instances of the system contracts

Authorized: admin policy group 2.

message MsgDeploySystemContracts {
	string creator = 1;
}

DeployFungibleCoinZRC20 deploys a fungible coin from a connected chains as a ZRC20 on ZetaChain.

If this is a gas coin, the following happens:

  • ZRC20 contract for the coin is deployed
  • contract address of ZRC20 is set as a token address in the system contract
  • ZETA tokens are minted and deposited into the module account
  • setGasZetaPool is called on the system contract to add the information about the pool to the system contract
  • addLiquidityETH is called to add liquidity to the pool

If this is a non-gas coin, the following happens:

  • ZRC20 contract for the coin is deployed
  • The coin is added to the list of foreign coins in the module's state

Authorized: admin policy group 2.

message MsgDeployFungibleCoinZRC20 {
	string creator = 1;
	string ERC20 = 2;
	int64 foreign_chain_id = 3;
	uint32 decimals = 4;
	string name = 5;
	string symbol = 6;
	pkg.coin.CoinType coin_type = 7;
	int64 gas_limit = 8;
}

RemoveForeignCoin removes a coin from the list of foreign coins in the module's state.

Authorized: admin policy group 2.

message MsgRemoveForeignCoin {
	string creator = 1;
	string zrc20_address = 2;
}

UpdateSystemContract updates the system contract

message MsgUpdateSystemContract {
	string creator = 1;
	string new_system_contract_address = 2;
}

UpdateContractBytecode updates the bytecode of a contract from the bytecode of an existing contract Only a ZRC20 contract or the WZeta connector contract can be updated IMPORTANT: the new contract bytecode must have the same storage layout as the old contract bytecode the new contract can add new variable but cannot remove any existing variable

Authozied: admin policy group 2

message MsgUpdateContractBytecode {
	string creator = 1;
	string contract_address = 2;
	string new_code_hash = 3;
}

UpdateZRC20WithdrawFee updates the withdraw fee and gas limit of a zrc20 token

message MsgUpdateZRC20WithdrawFee {
	string creator = 1;
	string zrc20_address = 2;
	string new_withdraw_fee = 6;
	string new_gas_limit = 7;
}

UpdateZRC20LiquidityCap updates the liquidity cap for a ZRC20 token.

Authorized: admin policy group 2.

message MsgUpdateZRC20LiquidityCap {
	string creator = 1;
	string zrc20_address = 2;
	string liquidity_cap = 3;
}

PauseZRC20 pauses a list of ZRC20 tokens Authorized: admin policy group groupEmergency.

message MsgPauseZRC20 {
	string creator = 1;
	string zrc20_addresses = 2;
}

UnpauseZRC20 unpauses the ZRC20 token Authorized: admin policy group groupOperational.

message MsgUnpauseZRC20 {
	string creator = 1;
	string zrc20_addresses = 2;
}

UpdateGatewayContract updates the zevm gateway contract used by the ZetaChain protocol to read inbounds and process outbounds

message MsgUpdateGatewayContract {
	string creator = 1;
	string new_gateway_contract_address = 2;
}