Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance EVM upgradeability #66

Closed
sisyphusSmiling opened this issue May 2, 2024 · 0 comments · Fixed by #67
Closed

Enhance EVM upgradeability #66

sisyphusSmiling opened this issue May 2, 2024 · 0 comments · Fixed by #67

Comments

@sisyphusSmiling
Copy link
Contributor

Issue To Be Solved

Currently, FlowBridgeFactory.sol contains both the state pertaining to associations between deployed EVM contracts and relevant Cadence type identifiers as well as deployment logic to define bridged Cadence-native assets. Supported assets in EVM are limited to ERC20 and ERC721, but future feature requirements may entail supporting additional standards. In it's current form, this contract is not very upgradeable and may limit future extensibility.

Proposed Solution

Parse out the functionality of this contract such that the state and functionality are decoupled in a manner that would allow new ERCs to be added while maintaining all the same functionality as present. The coordinating COA owner should be able to deploy an EVM contract, passing identifying information about the related Cadence asset, query for deployed contract associations as well as add support to enable the deployment of new ERCs.

Based on initial conversations with @ramtinms this likely means moving the associations to a "registry" contract of some kind, and adding the notion of a set of "deployer" contracts. Calls to what is now the FlowBridgeFactory will route to the appropriate "deployer" based on given parameters which means the factory will act as a proxy, routing/delegating calls to the relevant
"deployer". This pattern should allow the deployment of future "deployer" contracts which are tasked with deploying a new ERC and the setting of a deployment signature (say deployERCX) to deployed contract address, of course restricted in access to the bridge COA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant