Skip to content

Commit

Permalink
feat: renamed FixedProxy (#23)
Browse files Browse the repository at this point in the history
* fix(ExpressProxyDeployer): ExpressProxy constructor params

* refactor(FixedProxy): renaming

* chore(package): version bump

* chore(package): version bump
  • Loading branch information
re1ro authored Feb 15, 2023
1 parent d1ea278 commit f1aafa8
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion contracts/express/ExpressProxyDeployer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,13 @@ contract ExpressProxyDeployer is IExpressProxyDeployer {
}

/// @dev delegatecall to this function to deploy a proxy from a host contract
/// @dev payable is for compatibility to delegate from payable functions
function deployExpressProxy(
bytes32 deploySalt,
address implementationAddress,
address owner,
bytes memory setupParams
) external returns (address proxyAddress) {
) external payable returns (address proxyAddress) {
proxyAddress = Create3.deploy(
deploySalt,
abi.encodePacked(
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IExpressProxyDeployer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ interface IExpressProxyDeployer {
address implementationAddress,
address owner,
bytes memory setupParams
) external returns (address);
) external payable returns (address);
}
2 changes: 1 addition & 1 deletion contracts/upgradable/BaseProxy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pragma solidity ^0.8.0;
import { IProxy } from '../interfaces/IProxy.sol';
import { IUpgradable } from '../interfaces/IUpgradable.sol';

contract BaseProxy is IProxy {
abstract contract BaseProxy is IProxy {
// bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)
bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
// keccak256('owner')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.0;

import { IProxy } from '../interfaces/IProxy.sol';

contract ThinProxy is IProxy {
contract FixedProxy is IProxy {
address public immutable implementation;

constructor(address implementationAddress) {
Expand Down
2 changes: 1 addition & 1 deletion contracts/upgradable/InitProxy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ contract InitProxy is BaseProxy, IInitProxy {
if (params.length != 0) {
// solhint-disable-next-line avoid-low-level-calls
(bool success, ) = implementationAddress.delegatecall(
abi.encodeWithSelector(BaseProxy.setup.selector, params)
abi.encodeWithSelector(IUpgradable.setup.selector, params)
);
if (!success) revert SetupFailed();
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/upgradable/Proxy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ contract Proxy is BaseProxy {
if (setupParams.length != 0) {
// solhint-disable-next-line avoid-low-level-calls
(bool success, ) = implementationAddress.delegatecall(
abi.encodeWithSelector(BaseProxy.setup.selector, setupParams)
abi.encodeWithSelector(IUpgradable.setup.selector, setupParams)
);
if (!success) revert SetupFailed();
}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@axelar-network/axelar-gmp-sdk-solidity",
"version": "3.1.1",
"version": "3.2.0",
"description": "Solidity GMP SDK and utilities provided by Axelar for cross-chain development",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit f1aafa8

Please sign in to comment.