Set the development environment up for Proxy Colonies #2929
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR updates the CDapp dev environment to a place where the development of proxy colonies using Wormhole could begin to take place on it.
Testing
NB These instructions are liable to change, especially as the development of the contracts continue. If they don't appear to be working for you, reach out to Alex or Daniel
npm run dev
The dev environment will spin up as normal, with new additions:
network-remote
andnetwork-remote-2
. These have the same contracts deployed to them (i.e. the bridging contracts required, theProxyColonyNetwork
with theProxyColony
resolver deployed, and even a test gnosis safe (if that becomes relevant again)). They have chain Ids of265669101
and265669102
. The difference between them is an operational one - on the one with chain ID265669101
, the relayer will pay gas fees for the bridging transactions. The same is not true on the chain with chain ID265669102
. Their providers are bound to ports8546
and8547
.wormhole-relayer
container. This monitors the bridging contracts on all relevant chains, and passes messages between them as appropriate.You can deploy a proxy colony by running
npm run hardhat
and executing the following:You will see output looking something like the following in the window where you ran
npm run dev
:You will have have a proxy colony on that chain at the same address as the metacolony.
If you instead:
You will get:
The VAA is signed, but the relayer is not broadcasting the transaction. In practice, we will get the signed VAA ourselves from some API and broadcast it ourselves on the correct chain; hopefully by the time we wish to implement that I will be able to provide an endpoint that can be used; if that has not happened by the time you're thinking about implementing that flow, again, go should at me or Daniel to get on it.
The current state of the contracts in the network hash provided here lets you:
Go have a look at the relevant Network PR for more details. Hopefully the changes to
IColony.sol
in conjunction with the tests will answer most questions you have.Generally speaking, any function that took a
tokenAddress
before should now take achainId
and atokenAddress
in that order - so for example, moving funds between pots or setting expenditure payouts. Yes, that is a lot of functions, but there's no way around it - atokenAddress
is no longer a unique identifier for a contract.This doesn't need merging anytime soon - no need for people to be running more containers than they need to be. Indeed, I could see this being a separate
dev
command, similar to the:all
that already exists, but for now, this is sufficient.