zeta-chain / protocol-contracts

Protocol contracts implementing the core logic of the protocol, deployed on ZetaChain and on connected chains
MIT License
70 stars 58 forks source link

Wrapping up local dev environment to make it available to external parties #224

Closed lumtis closed 1 month ago

lumtis commented 4 months ago

Local dev environment has been implemented to https://github.com/zeta-chain/protocol-contracts/pull/202

The goal of this issue is to wrap up the current environment to make it already promotable and usable for external devs.

cc @fadeev if you have any inputs

fadeev commented 4 months ago

https://github.com/zeta-chain/protocol-contracts/issues/225

fadeev commented 4 months ago

I propose we:

Ideally, all the helpers in the toolkit work with localnet, but that may be a larger refactoring.

As a quick workaround, we can modify the deploy and interact task to accept custom system contract/gateway addresses.

fadeev commented 4 months ago

Localnet is designed for the new architecture with Gateway.

What if we introduced npx hardhat universal that generates a universal app template that is compatible with localnet as well as testnet/mainnet when it's shipped.

lumtis commented 4 months ago

I agree on the idea to have the functionality available published on NPM and not having to clone this repo. I think as a first step we could introduce a read me here to provide some info to test the contract

that is compatible with localnet as well as testnet/mainnet when it's shipped.

What do you mean by compatible, the app is scaffolded with a script to deploy the smart contract to the localnet, and to a live network?

fadeev commented 4 months ago

@lumtis I mean the current npx hardhat omnichain generates a contract and HH tasks for interacting with the contract using TSS and custody contract. We can keep it right now, because that's how it works on the live network.

I propose adding npx hardhat universal that is compatible with Gateway and will eventually replace the omnichain command. Since Gateway is not on testnet yet, this will also be an opportunity to make the deploy/interact tasks compatible with localnet.

lumtis commented 1 month ago

We now have localnet