zeta-chain / localnet

ZetaChain's local dev environment with connected EVM chains.
https://www.zetachain.com/docs/developers/tutorials/localnet/
MIT License
8 stars 3 forks source link

Handle ZRC-20 tokens #10

Closed fadeev closed 3 months ago

fadeev commented 3 months ago

Right now localnet depends on test contract for ZRC-20 tokens:

https://github.com/zeta-chain/localnet/blob/30d4f20b135297bbc268d87ff067fd9dc4949d13/packages/localnet/src/index.ts#L269

The idea is to be able to use localnet not with a specific test contract, but with any example contract.

Ideally, the localnet environment simulates the real testnet and allows the gateway to accept ERC-20 tokens, and mints ZRC-20 tokens (like ZetaChain would) and sends them to a universal contract.

I think we can deploy a test ERC-20 as part of protocol contracts in localnet and just handle minting of ZRC-20s.

It should also be possible to send ETH and get ZRC-20 ETH.

The test case can be an example contract here:

https://github.com/zeta-chain/example-contracts/pull/189

fadeev commented 3 months ago

@skosito