Source Code
Overview
HYPE Balance
HYPE Value
$0.00Latest 25 from a total of 9,995 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Direct Fulfill | 25477200 | 5 hrs ago | IN | 0 HYPE | 0.00010524 | ||||
| Fulfill With ERC... | 25469738 | 7 hrs ago | IN | 0 HYPE | 0.00020954 | ||||
| Fulfill With ERC... | 25435418 | 16 hrs ago | IN | 0 HYPE | 0.00065918 | ||||
| Direct Fulfill | 25428165 | 18 hrs ago | IN | 0 HYPE | 0.00011401 | ||||
| Fulfill With ERC... | 25416447 | 22 hrs ago | IN | 0 HYPE | 0.0003658 | ||||
| Direct Fulfill | 25416350 | 22 hrs ago | IN | 0 HYPE | 0.00005489 | ||||
| Direct Fulfill | 25409674 | 23 hrs ago | IN | 0 HYPE | 0.00021805 | ||||
| Direct Fulfill | 25373570 | 33 hrs ago | IN | 0 HYPE | 0.00005167 | ||||
| Direct Fulfill | 25372406 | 34 hrs ago | IN | 0 HYPE | 0.00004744 | ||||
| Fulfill With ERC... | 25369394 | 34 hrs ago | IN | 0 HYPE | 0.00011563 | ||||
| Fulfill With ERC... | 25362244 | 36 hrs ago | IN | 0 HYPE | 0.00043681 | ||||
| Fulfill With ERC... | 25353463 | 39 hrs ago | IN | 0 HYPE | 0.00025805 | ||||
| Direct Fulfill | 25346190 | 41 hrs ago | IN | 0 HYPE | 0.00021229 | ||||
| Fulfill With ERC... | 25342002 | 42 hrs ago | IN | 0 HYPE | 0.00022446 | ||||
| Fulfill With ERC... | 25331738 | 45 hrs ago | IN | 0 HYPE | 0.00010386 | ||||
| Direct Fulfill | 25291074 | 2 days ago | IN | 0 HYPE | 0.0010024 | ||||
| Fulfill With ERC... | 25278679 | 2 days ago | IN | 0 HYPE | 0.00009386 | ||||
| Fulfill With ERC... | 25251178 | 2 days ago | IN | 0 HYPE | 0.00034395 | ||||
| Direct Fulfill | 25234719 | 2 days ago | IN | 0 HYPE | 0.00010115 | ||||
| Fulfill With ERC... | 25227896 | 3 days ago | IN | 0 HYPE | 0.00011994 | ||||
| Fulfill With ERC... | 25201402 | 3 days ago | IN | 0 HYPE | 0.00009827 | ||||
| Fulfill With ERC... | 25154104 | 3 days ago | IN | 0 HYPE | 0.00030353 | ||||
| Direct Fulfill | 25115725 | 4 days ago | IN | 0 HYPE | 0.00055329 | ||||
| Fulfill With ERC... | 25113837 | 4 days ago | IN | 0 HYPE | 0.00080509 | ||||
| Fulfill With ERC... | 25100477 | 4 days ago | IN | 0 HYPE | 0.0005811 |
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 25469738 | 7 hrs ago | 4.40195293 HYPE | ||||
| 25469738 | 7 hrs ago | 4.40195293 HYPE | ||||
| 25435418 | 16 hrs ago | 0.41112855 HYPE | ||||
| 25435418 | 16 hrs ago | 0.41112855 HYPE | ||||
| 25416447 | 22 hrs ago | 4.22568659 HYPE | ||||
| 25416447 | 22 hrs ago | 4.22568659 HYPE | ||||
| 25369394 | 34 hrs ago | 0.3748727 HYPE | ||||
| 25369394 | 34 hrs ago | 0.3748727 HYPE | ||||
| 25362244 | 36 hrs ago | 2.34223107 HYPE | ||||
| 25362244 | 36 hrs ago | 2.34223107 HYPE | ||||
| 25353463 | 39 hrs ago | 0.13073359 HYPE | ||||
| 25353463 | 39 hrs ago | 0.13073359 HYPE | ||||
| 25342002 | 42 hrs ago | 0.19516988 HYPE | ||||
| 25342002 | 42 hrs ago | 0.19516988 HYPE | ||||
| 25331738 | 45 hrs ago | 0.28069747 HYPE | ||||
| 25331738 | 45 hrs ago | 0.28069747 HYPE | ||||
| 25278679 | 2 days ago | 12.34473701 HYPE | ||||
| 25278679 | 2 days ago | 12.34473701 HYPE | ||||
| 25251178 | 2 days ago | 0.13671866 HYPE | ||||
| 25251178 | 2 days ago | 0.13671866 HYPE | ||||
| 25154104 | 3 days ago | 2.22740061 HYPE | ||||
| 25154104 | 3 days ago | 2.22740061 HYPE | ||||
| 25113837 | 4 days ago | 0.99717909 HYPE | ||||
| 25113837 | 4 days ago | 0.99717909 HYPE | ||||
| 25094645 | 4 days ago | 5.18891518 HYPE |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
FulfillHelper
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 800 runs
Other Settings:
istanbul EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./interfaces/IFeeManager.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
contract FulfillHelper {
using SafeERC20 for IERC20;
address public guardian;
address public nextGuardian;
mapping(address => bool) public swapProtocols;
mapping(address => bool) public mayanProtocols;
error UnsupportedProtocol();
struct PermitParams {
uint256 value;
uint256 deadline;
uint8 v;
bytes32 r;
bytes32 s;
}
constructor(address _guardian, address[] memory _swapProtocols, address[] memory _mayanProtocols) {
guardian = _guardian;
for (uint256 i = 0; i < _swapProtocols.length; i++) {
swapProtocols[_swapProtocols[i]] = true;
}
for (uint256 i = 0; i < _mayanProtocols.length; i++) {
mayanProtocols[_mayanProtocols[i]] = true;
}
}
function directFulfill(
address tokenIn,
uint256 amountIn,
address mayanProtocol,
bytes calldata mayanData,
PermitParams calldata permitParams
) external payable {
if (!mayanProtocols[mayanProtocol]) {
revert UnsupportedProtocol();
}
pullTokenIn(tokenIn, amountIn, permitParams);
maxApproveIfNeeded(tokenIn, mayanProtocol, amountIn);
(bool success, bytes memory returnedData) = mayanProtocol.call{value: msg.value}(mayanData);
require(success, string(returnedData));
}
function fulfillWithEth(
uint256 amountIn,
address fulfillToken,
address swapProtocol,
bytes calldata swapData,
address mayanProtocol,
bytes calldata mayanData
) external payable {
if (!swapProtocols[swapProtocol] || !mayanProtocols[mayanProtocol]) {
revert UnsupportedProtocol();
}
require(fulfillToken != address(0), 'Invalid fulfill token');
require(msg.value >= amountIn, 'Insufficient input value');
uint256 fulfillAmount = IERC20(fulfillToken).balanceOf(address(this));
(bool success, bytes memory returnedData) = swapProtocol.call{value: amountIn}(swapData);
require(success, string(returnedData));
fulfillAmount = IERC20(fulfillToken).balanceOf(address(this)) - fulfillAmount;
bytes memory modifiedData = replaceFulfillAmount(mayanData, fulfillAmount);
maxApproveIfNeeded(fulfillToken, mayanProtocol, fulfillAmount);
(success, returnedData) = mayanProtocol.call{value: msg.value - amountIn}(modifiedData);
require(success, string(returnedData));
}
function fulfillWithERC20(
address tokenIn,
uint256 amountIn,
address fulfillToken,
address swapProtocol,
bytes calldata swapData,
address mayanProtocol,
bytes calldata mayanData,
PermitParams calldata permitParams
) external payable {
if (!swapProtocols[swapProtocol] || !mayanProtocols[mayanProtocol]) {
revert UnsupportedProtocol();
}
uint256 amountBefore = IERC20(tokenIn).balanceOf(address(this));
pullTokenIn(tokenIn, amountIn, permitParams);
maxApproveIfNeeded(tokenIn, swapProtocol, amountIn);
uint256 fulfillAmount;
if (fulfillToken == address(0)) {
fulfillAmount = address(this).balance;
} else {
fulfillAmount = IERC20(fulfillToken).balanceOf(address(this));
}
(bool success, bytes memory returnedData) = swapProtocol.call(swapData);
require(success, string(returnedData));
transferBackRemaining(tokenIn, amountBefore);
if (fulfillToken == address(0)) {
fulfillAmount = address(this).balance - fulfillAmount;
} else {
fulfillAmount = IERC20(fulfillToken).balanceOf(address(this)) - fulfillAmount;
}
bytes memory modifiedData = replaceFulfillAmount(mayanData, fulfillAmount);
if (fulfillToken == address(0)) {
(success, returnedData) = mayanProtocol.call{value: msg.value + fulfillAmount}(modifiedData);
require(success, string(returnedData));
} else {
maxApproveIfNeeded(fulfillToken, mayanProtocol, fulfillAmount);
(success, returnedData) = mayanProtocol.call{value: msg.value}(modifiedData);
require(success, string(returnedData));
}
}
function replaceFulfillAmount(bytes calldata mayanData, uint256 fulfillAmount) internal pure returns(bytes memory) {
require(mayanData.length >= 36, "Mayan data too short");
bytes memory modifiedData = new bytes(mayanData.length);
// Copy the function selector
for (uint i = 0; i < 4; i++) {
modifiedData[i] = mayanData[i];
}
// Encode the amount and place it into the modified call data
// Starting from byte 4 to byte 35 (32 bytes for uint256)
bytes memory encodedAmount = abi.encode(fulfillAmount);
for (uint i = 0; i < 32; i++) {
modifiedData[i + 4] = encodedAmount[i];
}
// Copy the rest of the original data after the first argument
for (uint i = 36; i < mayanData.length; i++) {
modifiedData[i] = mayanData[i];
}
return modifiedData;
}
function transferBackRemaining(address token, uint256 amountBefore) internal {
uint256 remaining = IERC20(token).balanceOf(address(this));
if (remaining > amountBefore) {
IERC20(token).safeTransfer(msg.sender, remaining - amountBefore);
}
}
function maxApproveIfNeeded(address tokenAddr, address spender, uint256 amount) internal {
IERC20 token = IERC20(tokenAddr);
uint256 currentAllowance = token.allowance(address(this), spender);
if (currentAllowance < amount) {
token.safeApprove(spender, 0);
token.safeApprove(spender, type(uint256).max);
}
}
function pullTokenIn(
address tokenIn,
uint256 amountIn,
PermitParams calldata permitParams
) internal {
uint256 allowance = IERC20(tokenIn).allowance(msg.sender, address(this));
if (allowance < amountIn) {
execPermit(tokenIn, msg.sender, permitParams);
}
IERC20(tokenIn).safeTransferFrom(msg.sender, address(this), amountIn);
}
function execPermit(
address token,
address owner,
PermitParams calldata permitParams
) internal {
IERC20Permit(token).permit(
owner,
address(this),
permitParams.value,
permitParams.deadline,
permitParams.v,
permitParams.r,
permitParams.s
);
}
function rescueToken(address token, uint256 amount, address to) public {
require(msg.sender == guardian, 'only guardian');
IERC20(token).safeTransfer(to, amount);
}
function rescueEth(uint256 amount, address payable to) public {
require(msg.sender == guardian, 'only guardian');
require(to != address(0), 'transfer to the zero address');
(bool success, ) = payable(to).call{value: amount}('');
require(success, 'payment failed');
}
function changeGuardian(address newGuardian) public {
require(msg.sender == guardian, 'only guardian');
nextGuardian = newGuardian;
}
function claimGuardian() public {
require(msg.sender == nextGuardian, 'only next guardian');
guardian = nextGuardian;
}
function setSwapProtocol(address swapProtocol, bool enabled) public {
require(msg.sender == guardian, 'only guardian');
swapProtocols[swapProtocol] = enabled;
}
function setMayanProtocol(address mayanProtocol, bool enabled) public {
require(msg.sender == guardian, 'only guardian');
mayanProtocols[mayanProtocol] = enabled;
}
receive() external payable {}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IFeeManager {
function calcProtocolBps(
uint64 amountIn,
address tokenIn,
bytes32 tokenOut,
uint16 destChain,
uint8 referrerBps
) external view returns (uint8);
function feeCollector() external view returns (address);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/IERC20Permit.sol";
import "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
* Revert on invalid signature.
*/
function safePermit(
IERC20Permit token,
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) internal {
uint256 nonceBefore = token.nonces(owner);
token.permit(owner, spender, value, deadline, v, r, s);
uint256 nonceAfter = token.nonces(owner);
require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*
* This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
// and not revert is the subcall reverts.
(bool success, bytes memory returndata) = address(token).call(data);
return
success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}{
"remappings": [
"@openzeppelin/=node_modules/@openzeppelin/",
"eth-gas-reporter/=node_modules/eth-gas-reporter/",
"hardhat/=node_modules/hardhat/"
],
"optimizer": {
"enabled": true,
"runs": 800
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs"
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "istanbul",
"viaIR": false
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_guardian","type":"address"},{"internalType":"address[]","name":"_swapProtocols","type":"address[]"},{"internalType":"address[]","name":"_mayanProtocols","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"UnsupportedProtocol","type":"error"},{"inputs":[{"internalType":"address","name":"newGuardian","type":"address"}],"name":"changeGuardian","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimGuardian","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"mayanProtocol","type":"address"},{"internalType":"bytes","name":"mayanData","type":"bytes"},{"components":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct FulfillHelper.PermitParams","name":"permitParams","type":"tuple"}],"name":"directFulfill","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"fulfillToken","type":"address"},{"internalType":"address","name":"swapProtocol","type":"address"},{"internalType":"bytes","name":"swapData","type":"bytes"},{"internalType":"address","name":"mayanProtocol","type":"address"},{"internalType":"bytes","name":"mayanData","type":"bytes"},{"components":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct FulfillHelper.PermitParams","name":"permitParams","type":"tuple"}],"name":"fulfillWithERC20","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"fulfillToken","type":"address"},{"internalType":"address","name":"swapProtocol","type":"address"},{"internalType":"bytes","name":"swapData","type":"bytes"},{"internalType":"address","name":"mayanProtocol","type":"address"},{"internalType":"bytes","name":"mayanData","type":"bytes"}],"name":"fulfillWithEth","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"guardian","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mayanProtocols","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextGuardian","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address payable","name":"to","type":"address"}],"name":"rescueEth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"rescueToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"mayanProtocol","type":"address"},{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setMayanProtocol","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"swapProtocol","type":"address"},{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setSwapProtocol","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"swapProtocols","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
60806040523480156200001157600080fd5b5060405162001fd638038062001fd683398101604081905262000034916200021b565b600080546001600160a01b0319166001600160a01b0385161781555b8251811015620000c8576001600260008584815181106200008157634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580620000bf8162000295565b91505062000050565b5060005b81518110156200014457600160036000848481518110620000fd57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806200013b8162000295565b915050620000cc565b50505050620002d3565b80516001600160a01b03811681146200016657600080fd5b919050565b600082601f8301126200017c578081fd5b815160206001600160401b03808311156200019b576200019b620002bd565b8260051b604051601f19603f83011681018181108482111715620001c357620001c3620002bd565b60405284815283810192508684018288018501891015620001e2578687fd5b8692505b858310156200020f57620001fa816200014e565b845292840192600192909201918401620001e6565b50979650505050505050565b60008060006060848603121562000230578283fd5b6200023b846200014e565b60208501519093506001600160401b038082111562000258578384fd5b62000266878388016200016b565b935060408601519150808211156200027c578283fd5b506200028b868287016200016b565b9150509250925092565b6000600019821415620002b657634e487b7160e01b81526011600452602481fd5b5060010190565b634e487b7160e01b600052604160045260246000fd5b611cf380620002e36000396000f3fe6080604052600436106100d65760003560e01c80637fc920eb1161007f578063b25ea8fb11610059578063b25ea8fb1461021c578063bc127b881461023c578063f8a67a621461024f578063ffe805411461026f57600080fd5b80637fc920eb1461019c578063a44382fe146101bc578063af56ca03146101dc57600080fd5b8063459656ee116100b0578063459656ee146101545780634818e84d146101695780636befa3a51461018957600080fd5b80631c5cf072146100e25780632fcb4f04146100f7578063452a93201461011757600080fd5b366100dd57005b600080fd5b6100f56100f0366004611adb565b61029f565b005b34801561010357600080fd5b506100f5610112366004611890565b6105e2565b34801561012357600080fd5b50600054610137906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561016057600080fd5b506100f561065b565b34801561017557600080fd5b50600154610137906001600160a01b031681565b6100f5610197366004611a01565b6106e6565b3480156101a857600080fd5b506100f56101b73660046118b3565b6107c5565b3480156101c857600080fd5b506100f56101d73660046118b3565b61083a565b3480156101e857600080fd5b5061020c6101f7366004611890565b60036020526000908152604090205460ff1681565b604051901515815260200161014b565b34801561022857600080fd5b506100f5610237366004611ab7565b6108af565b6100f561024a36600461192c565b6109f7565b34801561025b57600080fd5b506100f561026a3660046118eb565b610df7565b34801561027b57600080fd5b5061020c61028a366004611890565b60026020526000908152604090205460ff1681565b6001600160a01b03861660009081526002602052604090205460ff1615806102e057506001600160a01b03831660009081526003602052604090205460ff16155b156102fe5760405163743f26e160e01b815260040160405180910390fd5b6001600160a01b0387166103595760405162461bcd60e51b815260206004820152601560248201527f496e76616c69642066756c66696c6c20746f6b656e000000000000000000000060448201526064015b60405180910390fd5b873410156103a95760405162461bcd60e51b815260206004820152601860248201527f496e73756666696369656e7420696e7075742076616c756500000000000000006044820152606401610350565b6040516370a0823160e01b81523060048201526000906001600160a01b038916906370a082319060240160206040518083038186803b1580156103eb57600080fd5b505afa1580156103ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104239190611a9f565b9050600080886001600160a01b03168b8989604051610443929190611bac565b60006040518083038185875af1925050503d8060008114610480576040519150601f19603f3d011682016040523d82523d6000602084013e610485565b606091505b50915091508181906104aa5760405162461bcd60e51b81526004016103509190611bd8565b506040516370a0823160e01b815230600482015283906001600160a01b038c16906370a082319060240160206040518083038186803b1580156104ec57600080fd5b505afa158015610500573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105249190611a9f565b61052e9190611c23565b9250600061053d868686610e55565b905061054a8b88866110d4565b6001600160a01b03871661055e8d34611c23565b8260405161056c9190611bbc565b60006040518083038185875af1925050503d80600081146105a9576040519150601f19603f3d011682016040523d82523d6000602084013e6105ae565b606091505b50909350915081836105d35760405162461bcd60e51b81526004016103509190611bd8565b50505050505050505050505050565b6000546001600160a01b0316331461062c5760405162461bcd60e51b815260206004820152600d60248201526c37b7363c9033bab0b93234b0b760991b6044820152606401610350565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6001546001600160a01b031633146106b55760405162461bcd60e51b815260206004820152601260248201527f6f6e6c79206e65787420677561726469616e00000000000000000000000000006044820152606401610350565b6001546000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909216919091179055565b6001600160a01b03841660009081526003602052604090205460ff1661071f5760405163743f26e160e01b815260040160405180910390fd5b61072a868683611194565b6107358685876110d4565b600080856001600160a01b0316348686604051610753929190611bac565b60006040518083038185875af1925050503d8060008114610790576040519150601f19603f3d011682016040523d82523d6000602084013e610795565b606091505b50915091508181906107ba5760405162461bcd60e51b81526004016103509190611bd8565b505050505050505050565b6000546001600160a01b0316331461080f5760405162461bcd60e51b815260206004820152600d60248201526c37b7363c9033bab0b93234b0b760991b6044820152606401610350565b6001600160a01b03919091166000908152600260205260409020805460ff1916911515919091179055565b6000546001600160a01b031633146108845760405162461bcd60e51b815260206004820152600d60248201526c37b7363c9033bab0b93234b0b760991b6044820152606401610350565b6001600160a01b03919091166000908152600360205260409020805460ff1916911515919091179055565b6000546001600160a01b031633146108f95760405162461bcd60e51b815260206004820152600d60248201526c37b7363c9033bab0b93234b0b760991b6044820152606401610350565b6001600160a01b03811661094f5760405162461bcd60e51b815260206004820152601c60248201527f7472616e7366657220746f20746865207a65726f2061646472657373000000006044820152606401610350565b6000816001600160a01b03168360405160006040518083038185875af1925050503d806000811461099c576040519150601f19603f3d011682016040523d82523d6000602084013e6109a1565b606091505b50509050806109f25760405162461bcd60e51b815260206004820152600e60248201527f7061796d656e74206661696c65640000000000000000000000000000000000006044820152606401610350565b505050565b6001600160a01b03871660009081526002602052604090205460ff161580610a3857506001600160a01b03841660009081526003602052604090205460ff16155b15610a565760405163743f26e160e01b815260040160405180910390fd5b6040516370a0823160e01b81523060048201526000906001600160a01b038c16906370a082319060240160206040518083038186803b158015610a9857600080fd5b505afa158015610aac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad09190611a9f565b9050610add8b8b84611194565b610ae88b898c6110d4565b60006001600160a01b038a16610aff575047610b79565b6040516370a0823160e01b81523060048201526001600160a01b038b16906370a082319060240160206040518083038186803b158015610b3e57600080fd5b505afa158015610b52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b769190611a9f565b90505b6000808a6001600160a01b03168a8a604051610b96929190611bac565b6000604051808303816000865af19150503d8060008114610bd3576040519150601f19603f3d011682016040523d82523d6000602084013e610bd8565b606091505b5091509150818190610bfd5760405162461bcd60e51b81526004016103509190611bd8565b50610c088e85611244565b6001600160a01b038c16610c2757610c208347611c23565b9250610cad565b6040516370a0823160e01b815230600482015283906001600160a01b038e16906370a082319060240160206040518083038186803b158015610c6857600080fd5b505afa158015610c7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca09190611a9f565b610caa9190611c23565b92505b6000610cba888886610e55565b90506001600160a01b038d16610d59576001600160a01b038916610cde8534611c0b565b82604051610cec9190611bbc565b60006040518083038185875af1925050503d8060008114610d29576040519150601f19603f3d011682016040523d82523d6000602084013e610d2e565b606091505b5090935091508183610d535760405162461bcd60e51b81526004016103509190611bd8565b50610de6565b610d648d8a866110d4565b886001600160a01b03163482604051610d7d9190611bbc565b60006040518083038185875af1925050503d8060008114610dba576040519150601f19603f3d011682016040523d82523d6000602084013e610dbf565b606091505b5090935091508183610de45760405162461bcd60e51b81526004016103509190611bd8565b505b505050505050505050505050505050565b6000546001600160a01b03163314610e415760405162461bcd60e51b815260206004820152600d60248201526c37b7363c9033bab0b93234b0b760991b6044820152606401610350565b6109f26001600160a01b03841682846112e3565b60606024831015610ea85760405162461bcd60e51b815260206004820152601460248201527f4d6179616e206461746120746f6f2073686f72740000000000000000000000006044820152606401610350565b60008367ffffffffffffffff811115610ed157634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015610efb576020820181803683370190505b50905060005b6004811015610f7d57858582818110610f2a57634e487b7160e01b600052603260045260246000fd5b9050013560f81c60f81b828281518110610f5457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535080610f7581611c66565b915050610f01565b50600083604051602001610f9391815260200190565b604051602081830303815290604052905060005b602081101561104a57818181518110610fd057634e487b7160e01b600052603260045260246000fd5b01602001517fff000000000000000000000000000000000000000000000000000000000000001683611003836004611c0b565b8151811061102157634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053508061104281611c66565b915050610fa7565b5060245b858110156110c95786868281811061107657634e487b7160e01b600052603260045260246000fd5b9050013560f81c60f81b8382815181106110a057634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350806110c181611c66565b91505061104e565b509095945050505050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152849160009183169063dd62ed3e9060440160206040518083038186803b15801561112057600080fd5b505afa158015611134573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111589190611a9f565b90508281101561118d576111776001600160a01b038316856000611373565b61118d6001600160a01b03831685600019611373565b5050505050565b604051636eb1769f60e11b81523360048201523060248201526000906001600160a01b0385169063dd62ed3e9060440160206040518083038186803b1580156111dc57600080fd5b505afa1580156111f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112149190611a9f565b9050828110156112295761122984338461149e565b61123e6001600160a01b03851633308661156e565b50505050565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a082319060240160206040518083038186803b15801561128657600080fd5b505afa15801561129a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112be9190611a9f565b9050818111156109f2576109f2336112d68484611c23565b6001600160a01b03861691905b6040516001600160a01b0383166024820152604481018290526109f290849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526115a6565b8015806113fc5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b1580156113c257600080fd5b505afa1580156113d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113fa9190611a9f565b155b61146e5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401610350565b6040516001600160a01b0383166024820152604481018290526109f290849063095ea7b360e01b9060640161130f565b6001600160a01b03831663d505accf8330843560208601356114c66060880160408901611b8b565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e088901b1681526001600160a01b0395861660048201529490931660248501526044840191909152606483015260ff166084820152606084013560a4820152608084013560c482015260e401600060405180830381600087803b15801561155157600080fd5b505af1158015611565573d6000803e3d6000fd5b50505050505050565b6040516001600160a01b038085166024830152831660448201526064810182905261123e9085906323b872dd60e01b9060840161130f565b60006115fb826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661168e9092919063ffffffff16565b905080516000148061161c57508080602001905181019061161c9190611a83565b6109f25760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610350565b606061169d84846000856116a5565b949350505050565b60608247101561171d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610350565b600080866001600160a01b031685876040516117399190611bbc565b60006040518083038185875af1925050503d8060008114611776576040519150601f19603f3d011682016040523d82523d6000602084013e61177b565b606091505b509150915061178c87838387611797565b979650505050505050565b606083156118035782516117fc576001600160a01b0385163b6117fc5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610350565b508161169d565b61169d83838151156118185781518083602001fd5b8060405162461bcd60e51b81526004016103509190611bd8565b60008083601f840112611843578182fd5b50813567ffffffffffffffff81111561185a578182fd5b60208301915083602082850101111561187257600080fd5b9250929050565b600060a0828403121561188a578081fd5b50919050565b6000602082840312156118a1578081fd5b81356118ac81611c97565b9392505050565b600080604083850312156118c5578081fd5b82356118d081611c97565b915060208301356118e081611caf565b809150509250929050565b6000806000606084860312156118ff578081fd5b833561190a81611c97565b925060208401359150604084013561192181611c97565b809150509250925092565b6000806000806000806000806000806101808b8d03121561194b578586fd5b8a3561195681611c97565b995060208b0135985060408b013561196d81611c97565b975060608b013561197d81611c97565b965060808b013567ffffffffffffffff80821115611999578788fd5b6119a58e838f01611832565b909850965060a08d013591506119ba82611c97565b90945060c08c013590808211156119cf578485fd5b506119dc8d828e01611832565b90945092506119f090508c60e08d01611879565b90509295989b9194979a5092959850565b6000806000806000806101208789031215611a1a578182fd5b8635611a2581611c97565b9550602087013594506040870135611a3c81611c97565b9350606087013567ffffffffffffffff811115611a57578283fd5b611a6389828a01611832565b9094509250611a7790508860808901611879565b90509295509295509295565b600060208284031215611a94578081fd5b81516118ac81611caf565b600060208284031215611ab0578081fd5b5051919050565b60008060408385031215611ac9578182fd5b8235915060208301356118e081611c97565b60008060008060008060008060c0898b031215611af6578384fd5b883597506020890135611b0881611c97565b96506040890135611b1881611c97565b9550606089013567ffffffffffffffff80821115611b34578586fd5b611b408c838d01611832565b909750955060808b01359150611b5582611c97565b90935060a08a01359080821115611b6a578384fd5b50611b778b828c01611832565b999c989b5096995094979396929594505050565b600060208284031215611b9c578081fd5b813560ff811681146118ac578182fd5b8183823760009101908152919050565b60008251611bce818460208701611c3a565b9190910192915050565b6020815260008251806020840152611bf7816040850160208701611c3a565b601f01601f19169190910160400192915050565b60008219821115611c1e57611c1e611c81565b500190565b600082821015611c3557611c35611c81565b500390565b60005b83811015611c55578181015183820152602001611c3d565b8381111561123e5750506000910152565b6000600019821415611c7a57611c7a611c81565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114611cac57600080fd5b50565b8015158114611cac57600080fdfea2646970667358221220538f90a0564ddf76322f29af40916a4a78420a05edfa1d130a57742e4f9ad67e64736f6c63430008040033000000000000000000000000933e3922e04d47a466e60a20e486b372b64f1ea8000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000744489ee3d540777a66f2cf297479745e0852f7a0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c38e4e6a15593f908255214653d3d947ca1c2338
Deployed Bytecode
0x6080604052600436106100d65760003560e01c80637fc920eb1161007f578063b25ea8fb11610059578063b25ea8fb1461021c578063bc127b881461023c578063f8a67a621461024f578063ffe805411461026f57600080fd5b80637fc920eb1461019c578063a44382fe146101bc578063af56ca03146101dc57600080fd5b8063459656ee116100b0578063459656ee146101545780634818e84d146101695780636befa3a51461018957600080fd5b80631c5cf072146100e25780632fcb4f04146100f7578063452a93201461011757600080fd5b366100dd57005b600080fd5b6100f56100f0366004611adb565b61029f565b005b34801561010357600080fd5b506100f5610112366004611890565b6105e2565b34801561012357600080fd5b50600054610137906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561016057600080fd5b506100f561065b565b34801561017557600080fd5b50600154610137906001600160a01b031681565b6100f5610197366004611a01565b6106e6565b3480156101a857600080fd5b506100f56101b73660046118b3565b6107c5565b3480156101c857600080fd5b506100f56101d73660046118b3565b61083a565b3480156101e857600080fd5b5061020c6101f7366004611890565b60036020526000908152604090205460ff1681565b604051901515815260200161014b565b34801561022857600080fd5b506100f5610237366004611ab7565b6108af565b6100f561024a36600461192c565b6109f7565b34801561025b57600080fd5b506100f561026a3660046118eb565b610df7565b34801561027b57600080fd5b5061020c61028a366004611890565b60026020526000908152604090205460ff1681565b6001600160a01b03861660009081526002602052604090205460ff1615806102e057506001600160a01b03831660009081526003602052604090205460ff16155b156102fe5760405163743f26e160e01b815260040160405180910390fd5b6001600160a01b0387166103595760405162461bcd60e51b815260206004820152601560248201527f496e76616c69642066756c66696c6c20746f6b656e000000000000000000000060448201526064015b60405180910390fd5b873410156103a95760405162461bcd60e51b815260206004820152601860248201527f496e73756666696369656e7420696e7075742076616c756500000000000000006044820152606401610350565b6040516370a0823160e01b81523060048201526000906001600160a01b038916906370a082319060240160206040518083038186803b1580156103eb57600080fd5b505afa1580156103ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104239190611a9f565b9050600080886001600160a01b03168b8989604051610443929190611bac565b60006040518083038185875af1925050503d8060008114610480576040519150601f19603f3d011682016040523d82523d6000602084013e610485565b606091505b50915091508181906104aa5760405162461bcd60e51b81526004016103509190611bd8565b506040516370a0823160e01b815230600482015283906001600160a01b038c16906370a082319060240160206040518083038186803b1580156104ec57600080fd5b505afa158015610500573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105249190611a9f565b61052e9190611c23565b9250600061053d868686610e55565b905061054a8b88866110d4565b6001600160a01b03871661055e8d34611c23565b8260405161056c9190611bbc565b60006040518083038185875af1925050503d80600081146105a9576040519150601f19603f3d011682016040523d82523d6000602084013e6105ae565b606091505b50909350915081836105d35760405162461bcd60e51b81526004016103509190611bd8565b50505050505050505050505050565b6000546001600160a01b0316331461062c5760405162461bcd60e51b815260206004820152600d60248201526c37b7363c9033bab0b93234b0b760991b6044820152606401610350565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6001546001600160a01b031633146106b55760405162461bcd60e51b815260206004820152601260248201527f6f6e6c79206e65787420677561726469616e00000000000000000000000000006044820152606401610350565b6001546000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909216919091179055565b6001600160a01b03841660009081526003602052604090205460ff1661071f5760405163743f26e160e01b815260040160405180910390fd5b61072a868683611194565b6107358685876110d4565b600080856001600160a01b0316348686604051610753929190611bac565b60006040518083038185875af1925050503d8060008114610790576040519150601f19603f3d011682016040523d82523d6000602084013e610795565b606091505b50915091508181906107ba5760405162461bcd60e51b81526004016103509190611bd8565b505050505050505050565b6000546001600160a01b0316331461080f5760405162461bcd60e51b815260206004820152600d60248201526c37b7363c9033bab0b93234b0b760991b6044820152606401610350565b6001600160a01b03919091166000908152600260205260409020805460ff1916911515919091179055565b6000546001600160a01b031633146108845760405162461bcd60e51b815260206004820152600d60248201526c37b7363c9033bab0b93234b0b760991b6044820152606401610350565b6001600160a01b03919091166000908152600360205260409020805460ff1916911515919091179055565b6000546001600160a01b031633146108f95760405162461bcd60e51b815260206004820152600d60248201526c37b7363c9033bab0b93234b0b760991b6044820152606401610350565b6001600160a01b03811661094f5760405162461bcd60e51b815260206004820152601c60248201527f7472616e7366657220746f20746865207a65726f2061646472657373000000006044820152606401610350565b6000816001600160a01b03168360405160006040518083038185875af1925050503d806000811461099c576040519150601f19603f3d011682016040523d82523d6000602084013e6109a1565b606091505b50509050806109f25760405162461bcd60e51b815260206004820152600e60248201527f7061796d656e74206661696c65640000000000000000000000000000000000006044820152606401610350565b505050565b6001600160a01b03871660009081526002602052604090205460ff161580610a3857506001600160a01b03841660009081526003602052604090205460ff16155b15610a565760405163743f26e160e01b815260040160405180910390fd5b6040516370a0823160e01b81523060048201526000906001600160a01b038c16906370a082319060240160206040518083038186803b158015610a9857600080fd5b505afa158015610aac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad09190611a9f565b9050610add8b8b84611194565b610ae88b898c6110d4565b60006001600160a01b038a16610aff575047610b79565b6040516370a0823160e01b81523060048201526001600160a01b038b16906370a082319060240160206040518083038186803b158015610b3e57600080fd5b505afa158015610b52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b769190611a9f565b90505b6000808a6001600160a01b03168a8a604051610b96929190611bac565b6000604051808303816000865af19150503d8060008114610bd3576040519150601f19603f3d011682016040523d82523d6000602084013e610bd8565b606091505b5091509150818190610bfd5760405162461bcd60e51b81526004016103509190611bd8565b50610c088e85611244565b6001600160a01b038c16610c2757610c208347611c23565b9250610cad565b6040516370a0823160e01b815230600482015283906001600160a01b038e16906370a082319060240160206040518083038186803b158015610c6857600080fd5b505afa158015610c7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca09190611a9f565b610caa9190611c23565b92505b6000610cba888886610e55565b90506001600160a01b038d16610d59576001600160a01b038916610cde8534611c0b565b82604051610cec9190611bbc565b60006040518083038185875af1925050503d8060008114610d29576040519150601f19603f3d011682016040523d82523d6000602084013e610d2e565b606091505b5090935091508183610d535760405162461bcd60e51b81526004016103509190611bd8565b50610de6565b610d648d8a866110d4565b886001600160a01b03163482604051610d7d9190611bbc565b60006040518083038185875af1925050503d8060008114610dba576040519150601f19603f3d011682016040523d82523d6000602084013e610dbf565b606091505b5090935091508183610de45760405162461bcd60e51b81526004016103509190611bd8565b505b505050505050505050505050505050565b6000546001600160a01b03163314610e415760405162461bcd60e51b815260206004820152600d60248201526c37b7363c9033bab0b93234b0b760991b6044820152606401610350565b6109f26001600160a01b03841682846112e3565b60606024831015610ea85760405162461bcd60e51b815260206004820152601460248201527f4d6179616e206461746120746f6f2073686f72740000000000000000000000006044820152606401610350565b60008367ffffffffffffffff811115610ed157634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015610efb576020820181803683370190505b50905060005b6004811015610f7d57858582818110610f2a57634e487b7160e01b600052603260045260246000fd5b9050013560f81c60f81b828281518110610f5457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535080610f7581611c66565b915050610f01565b50600083604051602001610f9391815260200190565b604051602081830303815290604052905060005b602081101561104a57818181518110610fd057634e487b7160e01b600052603260045260246000fd5b01602001517fff000000000000000000000000000000000000000000000000000000000000001683611003836004611c0b565b8151811061102157634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053508061104281611c66565b915050610fa7565b5060245b858110156110c95786868281811061107657634e487b7160e01b600052603260045260246000fd5b9050013560f81c60f81b8382815181106110a057634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350806110c181611c66565b91505061104e565b509095945050505050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152849160009183169063dd62ed3e9060440160206040518083038186803b15801561112057600080fd5b505afa158015611134573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111589190611a9f565b90508281101561118d576111776001600160a01b038316856000611373565b61118d6001600160a01b03831685600019611373565b5050505050565b604051636eb1769f60e11b81523360048201523060248201526000906001600160a01b0385169063dd62ed3e9060440160206040518083038186803b1580156111dc57600080fd5b505afa1580156111f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112149190611a9f565b9050828110156112295761122984338461149e565b61123e6001600160a01b03851633308661156e565b50505050565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a082319060240160206040518083038186803b15801561128657600080fd5b505afa15801561129a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112be9190611a9f565b9050818111156109f2576109f2336112d68484611c23565b6001600160a01b03861691905b6040516001600160a01b0383166024820152604481018290526109f290849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526115a6565b8015806113fc5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b1580156113c257600080fd5b505afa1580156113d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113fa9190611a9f565b155b61146e5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401610350565b6040516001600160a01b0383166024820152604481018290526109f290849063095ea7b360e01b9060640161130f565b6001600160a01b03831663d505accf8330843560208601356114c66060880160408901611b8b565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e088901b1681526001600160a01b0395861660048201529490931660248501526044840191909152606483015260ff166084820152606084013560a4820152608084013560c482015260e401600060405180830381600087803b15801561155157600080fd5b505af1158015611565573d6000803e3d6000fd5b50505050505050565b6040516001600160a01b038085166024830152831660448201526064810182905261123e9085906323b872dd60e01b9060840161130f565b60006115fb826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661168e9092919063ffffffff16565b905080516000148061161c57508080602001905181019061161c9190611a83565b6109f25760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610350565b606061169d84846000856116a5565b949350505050565b60608247101561171d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610350565b600080866001600160a01b031685876040516117399190611bbc565b60006040518083038185875af1925050503d8060008114611776576040519150601f19603f3d011682016040523d82523d6000602084013e61177b565b606091505b509150915061178c87838387611797565b979650505050505050565b606083156118035782516117fc576001600160a01b0385163b6117fc5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610350565b508161169d565b61169d83838151156118185781518083602001fd5b8060405162461bcd60e51b81526004016103509190611bd8565b60008083601f840112611843578182fd5b50813567ffffffffffffffff81111561185a578182fd5b60208301915083602082850101111561187257600080fd5b9250929050565b600060a0828403121561188a578081fd5b50919050565b6000602082840312156118a1578081fd5b81356118ac81611c97565b9392505050565b600080604083850312156118c5578081fd5b82356118d081611c97565b915060208301356118e081611caf565b809150509250929050565b6000806000606084860312156118ff578081fd5b833561190a81611c97565b925060208401359150604084013561192181611c97565b809150509250925092565b6000806000806000806000806000806101808b8d03121561194b578586fd5b8a3561195681611c97565b995060208b0135985060408b013561196d81611c97565b975060608b013561197d81611c97565b965060808b013567ffffffffffffffff80821115611999578788fd5b6119a58e838f01611832565b909850965060a08d013591506119ba82611c97565b90945060c08c013590808211156119cf578485fd5b506119dc8d828e01611832565b90945092506119f090508c60e08d01611879565b90509295989b9194979a5092959850565b6000806000806000806101208789031215611a1a578182fd5b8635611a2581611c97565b9550602087013594506040870135611a3c81611c97565b9350606087013567ffffffffffffffff811115611a57578283fd5b611a6389828a01611832565b9094509250611a7790508860808901611879565b90509295509295509295565b600060208284031215611a94578081fd5b81516118ac81611caf565b600060208284031215611ab0578081fd5b5051919050565b60008060408385031215611ac9578182fd5b8235915060208301356118e081611c97565b60008060008060008060008060c0898b031215611af6578384fd5b883597506020890135611b0881611c97565b96506040890135611b1881611c97565b9550606089013567ffffffffffffffff80821115611b34578586fd5b611b408c838d01611832565b909750955060808b01359150611b5582611c97565b90935060a08a01359080821115611b6a578384fd5b50611b778b828c01611832565b999c989b5096995094979396929594505050565b600060208284031215611b9c578081fd5b813560ff811681146118ac578182fd5b8183823760009101908152919050565b60008251611bce818460208701611c3a565b9190910192915050565b6020815260008251806020840152611bf7816040850160208701611c3a565b601f01601f19169190910160400192915050565b60008219821115611c1e57611c1e611c81565b500190565b600082821015611c3557611c35611c81565b500390565b60005b83811015611c55578181015183820152602001611c3d565b8381111561123e5750506000910152565b6000600019821415611c7a57611c7a611c81565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114611cac57600080fd5b50565b8015158114611cac57600080fdfea2646970667358221220538f90a0564ddf76322f29af40916a4a78420a05edfa1d130a57742e4f9ad67e64736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000933e3922e04d47a466e60a20e486b372b64f1ea8000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000744489ee3d540777a66f2cf297479745e0852f7a0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c38e4e6a15593f908255214653d3d947ca1c2338
-----Decoded View---------------
Arg [0] : _guardian (address): 0x933E3922E04d47a466e60A20e486b372B64F1Ea8
Arg [1] : _swapProtocols (address[]): 0x744489Ee3d540777A66f2cf297479745e0852f7A
Arg [2] : _mayanProtocols (address[]): 0xC38e4e6A15593f908255214653d3D947CA1c2338
-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 000000000000000000000000933e3922e04d47a466e60a20e486b372b64f1ea8
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [4] : 000000000000000000000000744489ee3d540777a66f2cf297479745e0852f7a
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [6] : 000000000000000000000000c38e4e6a15593f908255214653d3d947ca1c2338
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$1.73
Net Worth in HYPE
Token Allocations
USDT
35.03%
WBTC
33.01%
$ALPHA
31.95%
Multichain Portfolio | 35 Chains
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.