-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Executable): adding GMP Express Executable (#17)
* fix(ci): upgrading actions * feature(Upgradable): 2 step ownership transfer * refactor(test): var names * feature(Upgradable): 2 step * chore(npm): version bump * feat(Executable): new GMP Express Executable (#19) * feature(executable): GMP Express * fix(build): copy artifacts * fix(deployAndInitContractConstant): increasing gas limit * feat(GMPExpress): permission-less express calls * fix(ExpressRegistry): using msg.sender * refactor(SafeTransfer): using SafeTransfer library for IERC20 * refactor(interfaces): removed unused imports * fix(Express): constructor params validation * fix(ExpressProxy): token validation * fix(ExpressExecutable): removing Upgradable from ExpressExecutable * feat(interfaces): updating the interfaces
- Loading branch information
Showing
38 changed files
with
1,225 additions
and
891 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity ^0.8.0; | ||
|
||
import { IAxelarGateway } from '../interfaces/IAxelarGateway.sol'; | ||
import { IERC20 } from '../interfaces/IERC20.sol'; | ||
import { IAxelarExecutable } from '../interfaces/IAxelarExecutable.sol'; | ||
|
||
abstract contract ExpressExecutable is IAxelarExecutable { | ||
error NotSelf(); | ||
|
||
IAxelarGateway public immutable gateway; | ||
|
||
constructor(address gateway_) { | ||
if (gateway_ == address(0)) revert InvalidAddress(); | ||
|
||
gateway = IAxelarGateway(gateway_); | ||
} | ||
|
||
/// @notice this function is shadowed by the proxy and can be called only internally | ||
function execute( | ||
bytes32, | ||
string calldata sourceChain, | ||
string calldata sourceAddress, | ||
bytes calldata payload | ||
) external { | ||
_execute(sourceChain, sourceAddress, payload); | ||
} | ||
|
||
/// @notice this function is shadowed by the proxy and can be called only internally | ||
function executeWithToken( | ||
bytes32, | ||
string calldata sourceChain, | ||
string calldata sourceAddress, | ||
bytes calldata payload, | ||
string calldata tokenSymbol, | ||
uint256 amount | ||
) external { | ||
_executeWithToken(sourceChain, sourceAddress, payload, tokenSymbol, amount); | ||
} | ||
|
||
function _execute( | ||
string calldata sourceChain, | ||
string calldata sourceAddress, | ||
bytes calldata payload | ||
) internal virtual {} | ||
|
||
function _executeWithToken( | ||
string calldata sourceChain, | ||
string calldata sourceAddress, | ||
bytes calldata payload, | ||
string calldata tokenSymbol, | ||
uint256 amount | ||
) internal virtual {} | ||
} |
Oops, something went wrong.