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

Gateway: token deployer storage + upgrade #86

Closed
wants to merge 1 commit into from

Conversation

re1ro
Copy link
Member

@re1ro re1ro commented Apr 13, 2022

  • Removed immutable TOKEN_DEPLOYER_IMPLEMENTATION
  • Added KEY_TOKEN_DEPLOYER_IMPLEMENTATION storage slot
  • Changed proxy constructor and added upgradeTokenDeployer method
  • Problem: AxelarGatewayMultisig contract code size exceeds 24576 bytes

@re1ro re1ro self-assigned this Apr 13, 2022
@re1ro re1ro marked this pull request as draft April 13, 2022 22:50
@@ -12,9 +12,17 @@ contract AxelarGatewayProxy is EternalStorage {
/// @dev Storage slot with the address of the current factory. `keccak256('eip1967.proxy.implementation') - 1`.
bytes32 internal constant KEY_IMPLEMENTATION =
bytes32(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc);

constructor(address gatewayImplementation, bytes memory params) {
/// @dev Storage slot with the address of the current token deployer. `bytes32(uint256(keccak256('eip1967.proxy.token.deployer')) - 1)`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like the idea of having proxy knowing how implementation is done. Specifically here, we are making the proxy aware that there's such a thing as token deployer which is what the implementation cares about. The proxy should only deal with implementation instead of getting involved into this kind of implementation details.

@re1ro
Copy link
Member Author

re1ro commented May 19, 2022

Closing due the contract size bloat

@re1ro re1ro closed this May 19, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants