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

[Feature]: predetermined contract address for ExocoreGateway with CREATE2 deployment #5

Open
adu-web3 opened this issue May 30, 2024 · 2 comments

Comments

@adu-web3
Copy link
Collaborator

Description

Currently, ExocoreGatway is deployed in an ordinary manner:

ExocoreGateway exocoreGateway = new ExocoreGateway(endpoint)

And then the address of deployed contract would be registered into Exocore chain native module to be valid sender that forward requests from LayerZero endpoint to native modules. As the contract address of ExocoreGatway needs to be authorized, we'd better have a predetermined address so that we could hardcode it in the genesis of Exocore mainnet and thus no need to register it anymore.

@MaxMustermann2
Copy link
Collaborator

We can use always_use_create_2_factory, like I had mentioned previously. A default factory will need to be deployed and then used. We can set that factory up within the genesis if needed.

@adu-web3
Copy link
Collaborator Author

Sure, I see some EVM-compatible chains like ethereum L2s have system contracts like multi-call or create2 factory, maybe we could follow the same design and take it as system contract(pure contract with unique and dedicated address)

bwhour added a commit that referenced this issue Oct 17, 2024
* rebase main branch code

* rebase main branch code

* rebase main branch code

* add testcase and updatesome code

* add comments

* rebase main branch code

* update genesis

* update btc contract and test case

* add testcase

* update testcase

* rebase to main branch

* rebase main branch and refactor with consensus logic

* add test case

* update testcase

* remove unnecessary delegator/withdrawer parameters on exocoregateway contract

* rename btcTxHash to btcTxTag

* update event

* update test script

* update some types from bytes32 to bytes

* update event type

* optimize the test script

* add read pegoutrequests and setStatus interface for withdraw request

* fix unit test error

* fix unit test error

* remove console log

* add comment for the storage code

* optimize some logic for btc-gateway

* update comment (#5)

* formate code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants