Source Code
Latest 25 from a total of 28 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Register Remote ... | 24970431 | 378 days ago | IN | 0 ETH | 0.00000157 | ||||
| Register Remote ... | 19960032 | 494 days ago | IN | 0 ETH | 0.00000073 | ||||
| Register Remote ... | 17703410 | 546 days ago | IN | 0 ETH | 0.00000076 | ||||
| Register Remote ... | 17702301 | 546 days ago | IN | 0 ETH | 0.0000008 | ||||
| Register Remote ... | 17269197 | 556 days ago | IN | 0 ETH | 0.00000103 | ||||
| Register Remote ... | 16155473 | 582 days ago | IN | 0 ETH | 0.00000027 | ||||
| Register Remote ... | 16155008 | 582 days ago | IN | 0 ETH | 0.00000027 | ||||
| Register Remote ... | 15333157 | 601 days ago | IN | 0 ETH | 0.00000031 | ||||
| Register Remote ... | 14284227 | 625 days ago | IN | 0 ETH | 0.00000404 | ||||
| Register Remote ... | 14149802 | 628 days ago | IN | 0 ETH | 0.00001039 | ||||
| Register Remote ... | 13254572 | 649 days ago | IN | 0 ETH | 0.00000123 | ||||
| Register Remote ... | 13205073 | 650 days ago | IN | 0 ETH | 0.00000696 | ||||
| Register Remote ... | 13202970 | 650 days ago | IN | 0 ETH | 0.00000916 | ||||
| Register Remote ... | 13083006 | 653 days ago | IN | 0 ETH | 0.0000024 | ||||
| Register Remote ... | 12952250 | 656 days ago | IN | 0 ETH | 0.00000897 | ||||
| Register Remote ... | 12951301 | 656 days ago | IN | 0 ETH | 0.00000738 | ||||
| Register Remote ... | 12093721 | 676 days ago | IN | 0 ETH | 0.00013605 | ||||
| Register Remote ... | 12093639 | 676 days ago | IN | 0 ETH | 0.00005252 | ||||
| Register Remote ... | 12093536 | 676 days ago | IN | 0 ETH | 0.00005596 | ||||
| Register Remote ... | 11393718 | 692 days ago | IN | 0 ETH | 0.00020675 | ||||
| Register Remote ... | 11138579 | 698 days ago | IN | 0 ETH | 0.00009502 | ||||
| Register Remote ... | 11138560 | 698 days ago | IN | 0 ETH | 0.00009119 | ||||
| Register Remote ... | 11138541 | 698 days ago | IN | 0 ETH | 0.00009943 | ||||
| Register Remote ... | 11138441 | 698 days ago | IN | 0 ETH | 0.00009832 | ||||
| Set Bridge Execu... | 11132375 | 698 days ago | IN | 0 ETH | 0.00009807 |
Latest 25 internal transactions (View All)
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 31094583 | 236 days ago | 0.00052087 ETH | ||||
| 31094583 | 236 days ago | 0.00052087 ETH | ||||
| 30812333 | 242 days ago | 0.00107041 ETH | ||||
| 30812333 | 242 days ago | 0.00107041 ETH | ||||
| 30792445 | 243 days ago | 0.01885418 ETH | ||||
| 30792445 | 243 days ago | 0.01885418 ETH | ||||
| 30792313 | 243 days ago | 0.05653285 ETH | ||||
| 30792313 | 243 days ago | 0.05653285 ETH | ||||
| 30761172 | 244 days ago | 0.01729611 ETH | ||||
| 30761172 | 244 days ago | 0.01729611 ETH | ||||
| 30572023 | 248 days ago | 0.01025332 ETH | ||||
| 30572023 | 248 days ago | 0.01025332 ETH | ||||
| 30380244 | 252 days ago | 0.00016397 ETH | ||||
| 30380244 | 252 days ago | 0.00016397 ETH | ||||
| 30312769 | 254 days ago | 0.01954144 ETH | ||||
| 30312769 | 254 days ago | 0.01954144 ETH | ||||
| 30312690 | 254 days ago | 0.07811683 ETH | ||||
| 30312690 | 254 days ago | 0.07811683 ETH | ||||
| 30305951 | 254 days ago | 0.00004337 ETH | ||||
| 30305951 | 254 days ago | 0.00004337 ETH | ||||
| 30212804 | 256 days ago | 0.00182998 ETH | ||||
| 30212804 | 256 days ago | 0.00182998 ETH | ||||
| 30183686 | 257 days ago | 0.0114102 ETH | ||||
| 30183686 | 257 days ago | 0.0114102 ETH | ||||
| 30127835 | 258 days ago | 0.00071766 ETH |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
DecentBridgeAdapter
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import {IERC20} from "forge-std/interfaces/IERC20.sol";
import {IUTB} from "../interfaces/IUTB.sol";
import {IBridgeAdapter} from "../interfaces/IBridgeAdapter.sol";
import {SwapInstructions} from "../CommonTypes.sol";
import {SwapParams} from "../swappers/SwapParams.sol";
import {IDecentEthRouter} from "decent-bridge/src/interfaces/IDecentEthRouter.sol";
import {BaseAdapter} from "./BaseAdapter.sol";
contract DecentBridgeAdapter is BaseAdapter, IBridgeAdapter {
uint8 public constant BRIDGE_ID = 0;
mapping(uint256 => address) public destinationBridgeAdapter;
IDecentEthRouter public router;
mapping(uint256 => uint16) lzIdLookup;
mapping(uint16 => uint256) chainIdLookup;
bool gasIsEth;
address bridgeToken;
constructor(bool _gasIsEth, address _bridgeToken) BaseAdapter() {
gasIsEth = _gasIsEth;
bridgeToken = _bridgeToken;
}
function setRouter(address _router) public onlyAdmin {
router = IDecentEthRouter(payable(_router));
}
function getId() public pure returns (uint8) {
return BRIDGE_ID;
}
function registerRemoteBridgeAdapter(
uint256 dstChainId,
uint16 dstLzId,
address decentBridgeAdapter
) public onlyAdmin {
lzIdLookup[dstChainId] = dstLzId;
chainIdLookup[dstLzId] = dstChainId;
destinationBridgeAdapter[dstChainId] = decentBridgeAdapter;
}
function estimateFees(
SwapInstructions memory postBridge,
uint256 dstChainId,
address target,
uint64 dstGas,
bytes memory payload
) public view returns (uint nativeFee, uint zroFee) {
SwapParams memory swapParams = abi.decode(
postBridge.swapPayload,
(SwapParams)
);
return
router.estimateSendAndCallFee(
router.MT_ETH_TRANSFER_WITH_PAYLOAD(),
lzIdLookup[dstChainId],
target,
msg.sender,
swapParams.amountIn,
dstGas,
false,
payload
);
}
function getBridgeToken(
bytes calldata /*additionalArgs*/
) external view returns (address) {
return bridgeToken;
}
function getBridgedAmount(
uint256 amt2Bridge,
address /*preBridgeToken*/,
address /*postBridgeToken*/,
bytes calldata /*additionalArgs*/
) external pure returns (uint256) {
return amt2Bridge;
}
function bridge(
uint256 amt2Bridge,
SwapInstructions memory postBridge,
uint256 dstChainId,
address target,
address paymentOperator,
bytes memory payload,
bytes calldata additionalArgs,
address refund
) public payable onlyUtb returns (bytes memory bridgePayload) {
if (destinationBridgeAdapter[dstChainId] == address(0)) revert NoDstBridge();
uint64 dstGas = abi.decode(additionalArgs, (uint64));
bridgePayload = abi.encodeCall(
this.receiveFromBridge,
(postBridge, target, paymentOperator, payload, refund)
);
SwapParams memory swapParams = abi.decode(
postBridge.swapPayload,
(SwapParams)
);
if (!gasIsEth) {
IERC20(bridgeToken).transferFrom(
msg.sender,
address(this),
amt2Bridge
);
IERC20(bridgeToken).approve(address(router), amt2Bridge);
}
router.bridgeWithPayload{value: msg.value}(
lzIdLookup[dstChainId],
destinationBridgeAdapter[dstChainId],
refund,
swapParams.amountIn,
false,
dstGas,
bridgePayload
);
}
function receiveFromBridge(
SwapInstructions memory postBridge,
address target,
address paymentOperator,
bytes memory payload,
address refund
) public onlyExecutor {
SwapParams memory swapParams = abi.decode(
postBridge.swapPayload,
(SwapParams)
);
IERC20(swapParams.tokenIn).transferFrom(
msg.sender,
address(this),
swapParams.amountIn
);
IERC20(swapParams.tokenIn).approve(utb, swapParams.amountIn);
IUTB(utb).receiveFromBridge(
postBridge,
target,
paymentOperator,
payload,
refund,
BRIDGE_ID
);
}
receive() external payable {}
fallback() external payable {}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.2;
/// @dev Interface of the ERC20 standard as defined in the EIP.
/// @dev This includes the optional name, symbol, and decimals metadata.
interface IERC20 {
/// @dev Emitted when `value` tokens are moved from one account (`from`) to another (`to`).
event Transfer(address indexed from, address indexed to, uint256 value);
/// @dev Emitted when the allowance of a `spender` for an `owner` is set, where `value`
/// is the new allowance.
event Approval(address indexed owner, address indexed spender, uint256 value);
/// @notice Returns the amount of tokens in existence.
function totalSupply() external view returns (uint256);
/// @notice Returns the amount of tokens owned by `account`.
function balanceOf(address account) external view returns (uint256);
/// @notice Moves `amount` tokens from the caller's account to `to`.
function transfer(address to, uint256 amount) external returns (bool);
/// @notice Returns the remaining number of tokens that `spender` is allowed
/// to spend on behalf of `owner`
function allowance(address owner, address spender) external view returns (uint256);
/// @notice Sets `amount` as the allowance of `spender` over the caller's tokens.
/// @dev Be aware of front-running risks: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
function approve(address spender, uint256 amount) external returns (bool);
/// @notice Moves `amount` tokens from `from` to `to` using the allowance mechanism.
/// `amount` is then deducted from the caller's allowance.
function transferFrom(address from, address to, uint256 amount) external returns (bool);
/// @notice Returns the name of the token.
function name() external view returns (string memory);
/// @notice Returns the symbol of the token.
function symbol() external view returns (string memory);
/// @notice Returns the decimals places of the token.
function decimals() external view returns (uint8);
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import {SwapInstructions, FeeData, BridgeInstructions, SwapAndExecuteInstructions} from "../CommonTypes.sol";
interface IUTB {
event Swapped();
event BridgeCalled();
event RecievedFromBridge();
/// @notice Thrown when protocol fees cannot be collected
error ProtocolFeeCannotBeFetched();
/// @notice Thrown when UTB is paused
error UTBPaused();
/// @notice Thrown when not enough native is passed for swap
error NotEnoughNative();
/// @notice Thrown when receive from bridge is not called from a bridge adapter
error OnlyBridgeAdapter();
/**
* @dev Swaps currency from the incoming to the outgoing token and executes a transaction with payment.
* @param instructions The token swap data and payment transaction payload.
* @param feeData The bridge fee in native, as well as utb fee tokens and amounts.
* @param signature The ECDSA signature to verify the fee structure.
*/
function swapAndExecute(
SwapAndExecuteInstructions memory instructions,
FeeData memory feeData,
bytes memory signature
) external payable;
/**
* @dev Bridges funds in native or ERC20 and a payment transaction payload to the destination chain
* @param instructions The bridge data, token swap data, and payment transaction payload.
* @param feeData The bridge fee in native, as well as utb fee tokens and amounts.
* @param signature The ECDSA signature to verify the fee structure.
*/
function bridgeAndExecute(
BridgeInstructions memory instructions,
FeeData memory feeData,
bytes memory signature
) external payable returns (bytes memory);
/**
* @dev Receives funds from the bridge adapter, executes a swap, and executes a payment transaction.
* @param postBridge The swapper ID and calldata to execute a swap.
* @param target The address of the target contract for the payment transaction.
* @param paymentOperator The operator address for payment transfers requiring ERC20 approvals.
* @param payload The calldata to execute the payment transaction.
* @param refund The account receiving any refunds, typically the EOA which initiated the transaction.
*/
function receiveFromBridge(
SwapInstructions memory postBridge,
address target,
address paymentOperator,
bytes memory payload,
address refund,
uint8 bridgeId
) external payable;
/**
* @dev Registers and maps a bridge adapter to a bridge adapter ID.
* @param bridge The address of the bridge adapter.
*/
function registerBridge(address bridge) external;
/**
* @dev Registers and maps a swapper to a swapper ID.
* @param swapper The address of the swapper.
*/
function registerSwapper(address swapper) external;
function setExecutor(address _executor) external;
function setFeeManager(address _feeManager) external;
function setWrapped(address _wrapped) external;
}pragma solidity ^0.8.0;
import {SwapInstructions} from "../CommonTypes.sol";
interface IBridgeAdapter {
error NoDstBridge();
function getId() external returns (uint8);
function getBridgeToken(
bytes calldata additionalArgs
) external returns (address);
function getBridgedAmount(
uint256 amt2Bridge,
address preBridgeToken,
address postBridgeToken,
bytes calldata additionalArgs
) external returns (uint256);
function bridge(
uint256 amt2Bridge,
SwapInstructions memory postBridge,
uint256 dstChainId,
address target,
address paymentOperator,
bytes memory payload,
bytes calldata additionalArgs,
address refund
) external payable returns (bytes memory);
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
struct SwapInstructions {
uint8 swapperId;
bytes swapPayload;
}
struct FeeData {
bytes4 appId;
bytes4 affiliateId;
uint bridgeFee;
Fee[] appFees;
}
struct Fee {
address recipient;
address token;
uint amount;
}
struct SwapAndExecuteInstructions {
SwapInstructions swapInstructions;
address target;
address paymentOperator;
address refund;
bytes payload;
}
struct BridgeInstructions {
SwapInstructions preBridge;
SwapInstructions postBridge;
uint8 bridgeId;
uint256 dstChainId;
address target;
address paymentOperator;
address refund;
bytes payload;
bytes additionalArgs;
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
library SwapDirection {
uint8 constant EXACT_IN = 0;
uint8 constant EXACT_OUT = 1;
}
struct SwapParams {
uint256 amountIn;
uint256 amountOut;
address tokenIn;
address tokenOut;
uint8 direction;
// if direction is exactAmountIn
// then amount out will be the minimum amount out
// if direction is exactAmountOutA
// then amount in is maximum amount in
bytes path;
}pragma solidity ^0.8.0;
interface IDecentEthRouter {
event ReceivedDecentEth(
uint8 msgType,
uint16 _srcChainId,
address from,
address _to,
uint amount,
bytes payload
);
error OnlyLzApp();
error OnlyEthChain();
error OnlyBridgeOperator();
error NotEnoughReserves();
error InsufficientBalance();
function MT_ETH_TRANSFER() external view returns (uint8);
function MT_ETH_TRANSFER_WITH_PAYLOAD() external view returns (uint8);
/**
* @dev Sets dcntEth to the router
* @param _addr The address of the deployed DcntEth token
*/
function registerDcntEth(address _addr) external;
/**
* @dev Adds a destination bridge for the bridge
* @param _dstChainId The lz chainId
* @param _routerAddress The router address on the dst chain
*/
function addDestinationBridge(
uint16 _dstChainId,
address _routerAddress
) external;
function estimateSendAndCallFee(
uint8 msgType,
uint16 _dstChainId,
address _toAddress,
address _refundAddress,
uint _amount,
uint64 _dstGasForCall,
bool deliverEth,
bytes memory payload
) external view returns (uint nativeFee, uint zroFee);
/**
* @param _dstChainId lz endpoint
* @param _toAddress the destination address (i.e. dst bridge)
* @param _refundAddress the refund address
* @param _amount the amount being bridged
* @param deliverEth if false, delivers WETH
* @param _dstGasForCall the amount of dst gas
* @param additionalPayload contains the refundAddress, zroPaymentAddress, and adapterParams
*/
function bridgeWithPayload(
uint16 _dstChainId,
address _toAddress,
address _refundAddress,
uint _amount,
bool deliverEth,
uint64 _dstGasForCall,
bytes memory additionalPayload
) external payable;
/**
* @param _dstChainId lz endpoint
* @param _toAddress destination address
* @param _refundAddress the address to be refunded
* @param _amount the amount being bridge
* @param _dstGasForCall the amount of dst gas
* @param deliverEth if false, delivers WETH
*/
function bridge(
uint16 _dstChainId,
address _toAddress,
address _refundAddress,
uint _amount,
uint64 _dstGasForCall,
bool deliverEth // if false, delivers WETH
) external payable;
/**
* @dev allows users to redeem their dcntEth for ETH
* @param amount the amount to be redeemed
*/
function redeemEth(uint256 amount) external;
/**
* @dev allows users to redeem their dcntEth for WETH
* @param amount the amount to be redeemed
*/
function redeemWeth(uint256 amount) external;
/**
* @dev adds bridge liquidity by paying ETH
*/
function addLiquidityEth() external payable;
/**
* @dev withdraws a users bridge liquidity for ETH
* @param amount the amount to be redeemed
*/
function removeLiquidityEth(uint256 amount) external;
/**
* @dev adds bridge liquidity by providing WETH
* @param amount the amount to be added
*/
function addLiquidityWeth(uint256 amount) external payable;
/**
* @dev withdraws a users bridge liquidity for WETH
* @param amount the amount to be redeemed
*/
function removeLiquidityWeth(uint256 amount) external;
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import {UTBOwned} from "../UTBOwned.sol";
contract BaseAdapter is UTBOwned {
address public bridgeExecutor;
constructor() UTBOwned() {}
error OnlyExecutor();
modifier onlyExecutor() {
if (msg.sender != address(bridgeExecutor)) revert OnlyExecutor();
_;
}
function setBridgeExecutor(address _executor) public onlyAdmin {
bridgeExecutor = _executor;
}
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import {Roles} from "decent-bridge/src/utils/Roles.sol";
contract UTBOwned is Roles {
address payable utb;
constructor() Roles(msg.sender) {}
/**
* @dev Limit access to the approved UTB.
*/
modifier onlyUtb() {
require(msg.sender == utb, "Only utb");
_;
}
/**
* @dev Sets the approved UTB.
* @param _utb The address of the UTB.
*/
function setUtb(address _utb) public onlyAdmin {
utb = payable(_utb);
}
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";
abstract contract Roles is AccessControl {
constructor(address admin) {
_grantRole(DEFAULT_ADMIN_ROLE, admin);
}
modifier onlyAdmin() {
require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "Only admin");
_;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)
pragma solidity ^0.8.0;
import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";
/**
* @dev Contract module that allows children to implement role-based access
* control mechanisms. This is a lightweight version that doesn't allow enumerating role
* members except through off-chain means by accessing the contract event logs. Some
* applications may benefit from on-chain enumerability, for those cases see
* {AccessControlEnumerable}.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```solidity
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
* ```
*
* Roles can be used to represent a set of permissions. To restrict access to a
* function call, use {hasRole}:
*
* ```solidity
* function foo() public {
* require(hasRole(MY_ROLE, msg.sender));
* ...
* }
* ```
*
* Roles can be granted and revoked dynamically via the {grantRole} and
* {revokeRole} functions. Each role has an associated admin role, and only
* accounts that have a role's admin role can call {grantRole} and {revokeRole}.
*
* By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
* that only accounts with this role will be able to grant or revoke other
* roles. More complex role relationships can be created by using
* {_setRoleAdmin}.
*
* WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
* grant and revoke this role. Extra precautions should be taken to secure
* accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}
* to enforce additional security measures for this role.
*/
abstract contract AccessControl is Context, IAccessControl, ERC165 {
struct RoleData {
mapping(address => bool) members;
bytes32 adminRole;
}
mapping(bytes32 => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @dev Modifier that checks that an account has a specific role. Reverts
* with a standardized message including the required role.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*
* _Available since v4.1._
*/
modifier onlyRole(bytes32 role) {
_checkRole(role);
_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
return _roles[role].members[account];
}
/**
* @dev Revert with a standard message if `_msgSender()` is missing `role`.
* Overriding this function changes the behavior of the {onlyRole} modifier.
*
* Format of the revert message is described in {_checkRole}.
*
* _Available since v4.6._
*/
function _checkRole(bytes32 role) internal view virtual {
_checkRole(role, _msgSender());
}
/**
* @dev Revert with a standard message if `account` is missing `role`.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*/
function _checkRole(bytes32 role, address account) internal view virtual {
if (!hasRole(role, account)) {
revert(
string(
abi.encodePacked(
"AccessControl: account ",
Strings.toHexString(account),
" is missing role ",
Strings.toHexString(uint256(role), 32)
)
)
);
}
}
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
return _roles[role].adminRole;
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*
* May emit a {RoleGranted} event.
*/
function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_grantRole(role, account);
}
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*
* May emit a {RoleRevoked} event.
*/
function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_revokeRole(role, account);
}
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been revoked `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*
* May emit a {RoleRevoked} event.
*/
function renounceRole(bytes32 role, address account) public virtual override {
require(account == _msgSender(), "AccessControl: can only renounce roles for self");
_revokeRole(role, account);
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event. Note that unlike {grantRole}, this function doesn't perform any
* checks on the calling account.
*
* May emit a {RoleGranted} event.
*
* [WARNING]
* ====
* This function should only be called from the constructor when setting
* up the initial roles for the system.
*
* Using this function in any other way is effectively circumventing the admin
* system imposed by {AccessControl}.
* ====
*
* NOTE: This function is deprecated in favor of {_grantRole}.
*/
function _setupRole(bytes32 role, address account) internal virtual {
_grantRole(role, account);
}
/**
* @dev Sets `adminRole` as ``role``'s admin role.
*
* Emits a {RoleAdminChanged} event.
*/
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
bytes32 previousAdminRole = getRoleAdmin(role);
_roles[role].adminRole = adminRole;
emit RoleAdminChanged(role, previousAdminRole, adminRole);
}
/**
* @dev Grants `role` to `account`.
*
* Internal function without access restriction.
*
* May emit a {RoleGranted} event.
*/
function _grantRole(bytes32 role, address account) internal virtual {
if (!hasRole(role, account)) {
_roles[role].members[account] = true;
emit RoleGranted(role, account, _msgSender());
}
}
/**
* @dev Revokes `role` from `account`.
*
* Internal function without access restriction.
*
* May emit a {RoleRevoked} event.
*/
function _revokeRole(bytes32 role, address account) internal virtual {
if (hasRole(role, account)) {
_roles[role].members[account] = false;
emit RoleRevoked(role, account, _msgSender());
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)
pragma solidity ^0.8.0;
/**
* @dev External interface of AccessControl declared to support ERC165 detection.
*/
interface IAccessControl {
/**
* @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
*
* `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
* {RoleAdminChanged} not being emitted signaling this.
*
* _Available since v3.1._
*/
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
/**
* @dev Emitted when `account` is granted `role`.
*
* `sender` is the account that originated the contract call, an admin role
* bearer except when using {AccessControl-_setupRole}.
*/
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Emitted when `account` is revoked `role`.
*
* `sender` is the account that originated the contract call:
* - if using `revokeRole`, it is the admin role bearer
* - if using `renounceRole`, it is the role bearer (i.e. `account`)
*/
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) external view returns (bool);
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {AccessControl-_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) external view returns (bytes32);
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been granted `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/
function renounceRole(bytes32 role, address account) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)
pragma solidity ^0.8.0;
import "./math/Math.sol";
import "./math/SignedMath.sol";
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
unchecked {
uint256 length = Math.log10(value) + 1;
string memory buffer = new string(length);
uint256 ptr;
/// @solidity memory-safe-assembly
assembly {
ptr := add(buffer, add(32, length))
}
while (true) {
ptr--;
/// @solidity memory-safe-assembly
assembly {
mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
}
value /= 10;
if (value == 0) break;
}
return buffer;
}
}
/**
* @dev Converts a `int256` to its ASCII `string` decimal representation.
*/
function toString(int256 value) internal pure returns (string memory) {
return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value))));
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
unchecked {
return toHexString(value, Math.log256(value) + 1);
}
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
}
/**
* @dev Returns true if the two strings are equal.
*/
function equal(string memory a, string memory b) internal pure returns (bool) {
return keccak256(bytes(a)) == keccak256(bytes(b));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
import "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)
pragma solidity ^0.8.0;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
enum Rounding {
Down, // Toward negative infinity
Up, // Toward infinity
Zero // Toward zero
}
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow.
return (a & b) + (a ^ b) / 2;
}
/**
* @dev Returns the ceiling of the division of two numbers.
*
* This differs from standard division with `/` in that it rounds up instead
* of rounding down.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b - 1) / b can overflow on addition, so we distribute.
return a == 0 ? 0 : (a - 1) / b + 1;
}
/**
* @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
* @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
* with further edits by Uniswap Labs also under MIT license.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
unchecked {
// 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
// use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
// variables such that product = prod1 * 2^256 + prod0.
uint256 prod0; // Least significant 256 bits of the product
uint256 prod1; // Most significant 256 bits of the product
assembly {
let mm := mulmod(x, y, not(0))
prod0 := mul(x, y)
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
// Handle non-overflow cases, 256 by 256 division.
if (prod1 == 0) {
// Solidity will revert if denominator == 0, unlike the div opcode on its own.
// The surrounding unchecked block does not change this fact.
// See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
return prod0 / denominator;
}
// Make sure the result is less than 2^256. Also prevents denominator == 0.
require(denominator > prod1, "Math: mulDiv overflow");
///////////////////////////////////////////////
// 512 by 256 division.
///////////////////////////////////////////////
// Make division exact by subtracting the remainder from [prod1 prod0].
uint256 remainder;
assembly {
// Compute remainder using mulmod.
remainder := mulmod(x, y, denominator)
// Subtract 256 bit number from 512 bit number.
prod1 := sub(prod1, gt(remainder, prod0))
prod0 := sub(prod0, remainder)
}
// Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
// See https://cs.stackexchange.com/q/138556/92363.
// Does not overflow because the denominator cannot be zero at this stage in the function.
uint256 twos = denominator & (~denominator + 1);
assembly {
// Divide denominator by twos.
denominator := div(denominator, twos)
// Divide [prod1 prod0] by twos.
prod0 := div(prod0, twos)
// Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
twos := add(div(sub(0, twos), twos), 1)
}
// Shift in bits from prod1 into prod0.
prod0 |= prod1 * twos;
// Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
// that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
// four bits. That is, denominator * inv = 1 mod 2^4.
uint256 inverse = (3 * denominator) ^ 2;
// Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
// in modular arithmetic, doubling the correct bits in each step.
inverse *= 2 - denominator * inverse; // inverse mod 2^8
inverse *= 2 - denominator * inverse; // inverse mod 2^16
inverse *= 2 - denominator * inverse; // inverse mod 2^32
inverse *= 2 - denominator * inverse; // inverse mod 2^64
inverse *= 2 - denominator * inverse; // inverse mod 2^128
inverse *= 2 - denominator * inverse; // inverse mod 2^256
// Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
// This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
// less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
// is no longer required.
result = prod0 * inverse;
return result;
}
}
/**
* @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
uint256 result = mulDiv(x, y, denominator);
if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
result += 1;
}
return result;
}
/**
* @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
*
* Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
*/
function sqrt(uint256 a) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
// For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
//
// We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
// `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
//
// This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
// → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
// → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
//
// Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
uint256 result = 1 << (log2(a) >> 1);
// At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
// since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
// every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
// into the expected uint128 result.
unchecked {
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
return min(result, a / result);
}
}
/**
* @notice Calculates sqrt(a), following the selected rounding direction.
*/
function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = sqrt(a);
return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
}
}
/**
* @dev Return the log in base 2, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 128;
}
if (value >> 64 > 0) {
value >>= 64;
result += 64;
}
if (value >> 32 > 0) {
value >>= 32;
result += 32;
}
if (value >> 16 > 0) {
value >>= 16;
result += 16;
}
if (value >> 8 > 0) {
value >>= 8;
result += 8;
}
if (value >> 4 > 0) {
value >>= 4;
result += 4;
}
if (value >> 2 > 0) {
value >>= 2;
result += 2;
}
if (value >> 1 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 2, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log2(value);
return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 10, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >= 10 ** 64) {
value /= 10 ** 64;
result += 64;
}
if (value >= 10 ** 32) {
value /= 10 ** 32;
result += 32;
}
if (value >= 10 ** 16) {
value /= 10 ** 16;
result += 16;
}
if (value >= 10 ** 8) {
value /= 10 ** 8;
result += 8;
}
if (value >= 10 ** 4) {
value /= 10 ** 4;
result += 4;
}
if (value >= 10 ** 2) {
value /= 10 ** 2;
result += 2;
}
if (value >= 10 ** 1) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 256, rounded down, of a positive value.
* Returns 0 if given 0.
*
* Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
*/
function log256(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 16;
}
if (value >> 64 > 0) {
value >>= 64;
result += 8;
}
if (value >> 32 > 0) {
value >>= 32;
result += 4;
}
if (value >> 16 > 0) {
value >>= 16;
result += 2;
}
if (value >> 8 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 256, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)
pragma solidity ^0.8.0;
/**
* @dev Standard signed math utilities missing in the Solidity language.
*/
library SignedMath {
/**
* @dev Returns the largest of two signed numbers.
*/
function max(int256 a, int256 b) internal pure returns (int256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two signed numbers.
*/
function min(int256 a, int256 b) internal pure returns (int256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two signed numbers without overflow.
* The result is rounded towards zero.
*/
function average(int256 a, int256 b) internal pure returns (int256) {
// Formula from the book "Hacker's Delight"
int256 x = (a & b) + ((a ^ b) >> 1);
return x + (int256(uint256(x) >> 255) & (a ^ b));
}
/**
* @dev Returns the absolute unsigned value of a signed value.
*/
function abs(int256 n) internal pure returns (uint256) {
unchecked {
// must be unchecked in order to support `n = type(int256).min`
return uint256(n >= 0 ? n : -n);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}{
"remappings": [
"forge-std/=lib/forge-std/src/",
"solmate/=lib/solmate/src/",
"@uniswap/v3-periphery/=lib/v3-periphery/",
"@uniswap/v3-core/=lib/v3-core/",
"@uniswap/swap-contracts/=lib/swap-router-contracts/contracts/",
"decent-bridge/=lib/decent-bridge/",
"better-deployer/=lib/decent-bridge/lib/better-deployer/src/",
"forge-toolkit/=lib/forge-toolkit/src/",
"openzeppelin-contracts/=lib/decent-bridge/lib/openzeppelin-contracts/contracts/",
"solidity-examples/=lib/solidity-examples/contracts/",
"@openzeppelin/=lib/decent-bridge/lib/openzeppelin-contracts/",
"@openzeppelin/contracts/=lib/decent-bridge/lib/openzeppelin-contracts/contracts/",
"LayerZero/=lib/forge-toolkit/lib/LayerZero/contracts/",
"ds-test/=lib/forge-std/lib/ds-test/src/",
"erc4626-tests/=lib/decent-bridge/lib/openzeppelin-contracts/lib/erc4626-tests/",
"openzeppelin/=lib/decent-bridge/lib/openzeppelin-contracts/contracts/",
"solidity-stringutils/=lib/decent-bridge/lib/solidity-stringutils/",
"swap-router-contracts/=lib/swap-router-contracts/contracts/",
"v3-core/=lib/v3-core/",
"v3-periphery/=lib/v3-periphery/contracts/",
"lib/forge-std:ds-test/=lib/decent-bridge/lib/forge-std/lib/ds-test/src/",
"lib/openzeppelin-contracts:ds-test/=lib/decent-bridge/lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
"lib/openzeppelin-contracts:erc4626-tests/=lib/decent-bridge/lib/openzeppelin-contracts/lib/erc4626-tests/",
"lib/openzeppelin-contracts:forge-std/=lib/decent-bridge/lib/openzeppelin-contracts/lib/forge-std/src/",
"lib/openzeppelin-contracts:openzeppelin/=lib/decent-bridge/lib/openzeppelin-contracts/contracts/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "paris",
"viaIR": false,
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"bool","name":"_gasIsEth","type":"bool"},{"internalType":"address","name":"_bridgeToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"NoDstBridge","type":"error"},{"inputs":[],"name":"OnlyExecutor","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"BRIDGE_ID","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amt2Bridge","type":"uint256"},{"components":[{"internalType":"uint8","name":"swapperId","type":"uint8"},{"internalType":"bytes","name":"swapPayload","type":"bytes"}],"internalType":"struct SwapInstructions","name":"postBridge","type":"tuple"},{"internalType":"uint256","name":"dstChainId","type":"uint256"},{"internalType":"address","name":"target","type":"address"},{"internalType":"address","name":"paymentOperator","type":"address"},{"internalType":"bytes","name":"payload","type":"bytes"},{"internalType":"bytes","name":"additionalArgs","type":"bytes"},{"internalType":"address","name":"refund","type":"address"}],"name":"bridge","outputs":[{"internalType":"bytes","name":"bridgePayload","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"bridgeExecutor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"destinationBridgeAdapter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint8","name":"swapperId","type":"uint8"},{"internalType":"bytes","name":"swapPayload","type":"bytes"}],"internalType":"struct SwapInstructions","name":"postBridge","type":"tuple"},{"internalType":"uint256","name":"dstChainId","type":"uint256"},{"internalType":"address","name":"target","type":"address"},{"internalType":"uint64","name":"dstGas","type":"uint64"},{"internalType":"bytes","name":"payload","type":"bytes"}],"name":"estimateFees","outputs":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"zroFee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"}],"name":"getBridgeToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amt2Bridge","type":"uint256"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"getBridgedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getId","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint8","name":"swapperId","type":"uint8"},{"internalType":"bytes","name":"swapPayload","type":"bytes"}],"internalType":"struct SwapInstructions","name":"postBridge","type":"tuple"},{"internalType":"address","name":"target","type":"address"},{"internalType":"address","name":"paymentOperator","type":"address"},{"internalType":"bytes","name":"payload","type":"bytes"},{"internalType":"address","name":"refund","type":"address"}],"name":"receiveFromBridge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"dstChainId","type":"uint256"},{"internalType":"uint16","name":"dstLzId","type":"uint16"},{"internalType":"address","name":"decentBridgeAdapter","type":"address"}],"name":"registerRemoteBridgeAdapter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"contract IDecentEthRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_executor","type":"address"}],"name":"setBridgeExecutor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_router","type":"address"}],"name":"setRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_utb","type":"address"}],"name":"setUtb","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
60806040523480156200001157600080fd5b5060405162001b2938038062001b29833981016040819052620000349162000120565b33620000426000826200007f565b50600780546001600160a81b031916921515610100600160a81b031916929092176101006001600160a01b0392909216919091021790556200016e565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166200011c576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620000db3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600080604083850312156200013457600080fd5b825180151581146200014557600080fd5b60208401519092506001600160a01b03811681146200016357600080fd5b809150509250929050565b6119ab806200017e6000396000f3fe6080604052600436106101225760003560e01c8063a217fddf116100a5578063c41a77631161006c578063c41a77631461036e578063cba25e4b1461038e578063d37ea4e4146103ae578063d547741f146103ce578063eb33ca7d146103ee578063f887ea401461042357005b8063a217fddf146102ce578063af4482af146102e3578063b1d456bf146102f8578063b5bcae4414610318578063c0d786551461034e57005b80634dee98c1116100e95780634dee98c1146102285780635d1ca6311461024857806391d148541461026a5780639a43334c1461028a578063a10bab0b146102ae57005b806301ffc9a71461012b5780631c624af514610160578063248a9ca3146101aa5780632f2ff15d146101e857806336568abe1461020857005b3661012957005b005b34801561013757600080fd5b5061014b610146366004610f61565b610443565b60405190151581526020015b60405180910390f35b34801561016c57600080fd5b5061019261017b366004610fd3565b60075461010090046001600160a01b031692915050565b6040516001600160a01b039091168152602001610157565b3480156101b657600080fd5b506101da6101c5366004611014565b60009081526020819052604090206001015490565b604051908152602001610157565b3480156101f457600080fd5b50610129610203366004611052565b61047a565b34801561021457600080fd5b50610129610223366004611052565b6104a4565b61023b6102363660046111f5565b610527565b6040516101579190611318565b34801561025457600080fd5b5060005b60405160ff9091168152602001610157565b34801561027657600080fd5b5061014b610285366004611052565b6107d5565b34801561029657600080fd5b506101da6102a536600461132b565b50929392505050565b3480156102ba57600080fd5b50600254610192906001600160a01b031681565b3480156102da57600080fd5b506101da600081565b3480156102ef57600080fd5b50610258600081565b34801561030457600080fd5b5061012961031336600461139d565b6107fe565b34801561032457600080fd5b50610192610333366004611014565b6003602052600090815260409020546001600160a01b031681565b34801561035a57600080fd5b5061012961036936600461139d565b610847565b34801561037a57600080fd5b506101296103893660046113ba565b610890565b34801561039a57600080fd5b506101296103a936600461139d565b610a4c565b3480156103ba57600080fd5b506101296103c936600461145b565b610a95565b3480156103da57600080fd5b506101296103e9366004611052565b610b16565b3480156103fa57600080fd5b5061040e6104093660046114bb565b610b3b565b60408051928352602083019190915201610157565b34801561042f57600080fd5b50600454610192906001600160a01b031681565b60006001600160e01b03198216637965db0b60e01b148061047457506301ffc9a760e01b6001600160e01b03198316145b92915050565b60008281526020819052604090206001015461049581610c5e565b61049f8383610c6b565b505050565b6001600160a01b03811633146105195760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6105238282610cef565b5050565b6001546060906001600160a01b0316331461056f5760405162461bcd60e51b815260206004820152600860248201526727b7363c903aba3160c11b6044820152606401610510565b6000888152600360205260409020546001600160a01b03166105a457604051632e2f6d5960e11b815260040160405180910390fd5b60006105b28486018661154e565b9050306001600160a01b031663c41a77638b8a8a8a886040516024016105dc959493929190611593565b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050915060008a60200151806020019051810190610625919061162b565b60075490915060ff16610737576007546040516323b872dd60e01b8152336004820152306024820152604481018e90526101009091046001600160a01b0316906323b872dd906064016020604051808303816000875af115801561068d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b191906116e4565b506007546004805460405163095ea7b360e01b81526001600160a01b0391821692810192909252602482018f90526101009092049091169063095ea7b3906044016020604051808303816000875af1158015610711573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073591906116e4565b505b6004805460008c81526005602090815260408083205460039092528083205486519151630e7006f760e31b81526001600160a01b039586169663738037b89634966107949661ffff169594909116938d9390928c918e9101611706565b6000604051808303818588803b1580156107ad57600080fd5b505af11580156107c1573d6000803e3d6000fd5b505050505050509998505050505050505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6108096000336107d5565b6108255760405162461bcd60e51b815260040161051090611767565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6108526000336107d5565b61086e5760405162461bcd60e51b815260040161051090611767565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031633146108bb57604051633fdb5f0160e11b815260040160405180910390fd5b600085602001518060200190518101906108d5919061162b565b604081810151825191516323b872dd60e01b815233600482015230602482015260448101929092529192506001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015610934573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095891906116e4565b506040818101516001548351925163095ea7b360e01b81526001600160a01b0391821660048201526024810193909352169063095ea7b3906044016020604051808303816000875af11580156109b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109d691906116e4565b50600154604051633c7aee0560e21b81526001600160a01b039091169063f1ebb81490610a12908990899089908990899060009060040161178b565b600060405180830381600087803b158015610a2c57600080fd5b505af1158015610a40573d6000803e3d6000fd5b50505050505050505050565b610a576000336107d5565b610a735760405162461bcd60e51b815260040161051090611767565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b610aa06000336107d5565b610abc5760405162461bcd60e51b815260040161051090611767565b6000838152600560209081526040808320805461ffff191661ffff969096169586179055938252600681528382208590559381526003909352912080546001600160a01b0319166001600160a01b03909216919091179055565b600082815260208190526040902060010154610b3181610c5e565b61049f8383610cef565b60008060008760200151806020019051810190610b58919061162b565b60048054604080516355a3bfa360e11b815290519394506001600160a01b03909116926395b167d892849263ab477f4692818301926020928290030181865afa158015610ba9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bcd91906117e5565b60008a81526005602052604080822054865191516001600160e01b031960e087901b168152610c0f949361ffff909216928d9233928e91908e90600401611802565b6040805180830381865afa158015610c2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4f919061186f565b92509250509550959350505050565b610c688133610d54565b50565b610c7582826107d5565b610523576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610cab3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b610cf982826107d5565b15610523576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b610d5e82826107d5565b61052357610d6b81610dad565b610d76836020610dbf565b604051602001610d87929190611893565b60408051601f198184030181529082905262461bcd60e51b825261051091600401611318565b60606104746001600160a01b03831660145b60606000610dce83600261191e565b610dd9906002611935565b6001600160401b03811115610df057610df0611082565b6040519080825280601f01601f191660200182016040528015610e1a576020820181803683370190505b509050600360fc1b81600081518110610e3557610e35611948565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610e6457610e64611948565b60200101906001600160f81b031916908160001a9053506000610e8884600261191e565b610e93906001611935565b90505b6001811115610f0b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610ec757610ec7611948565b1a60f81b828281518110610edd57610edd611948565b60200101906001600160f81b031916908160001a90535060049490941c93610f048161195e565b9050610e96565b508315610f5a5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610510565b9392505050565b600060208284031215610f7357600080fd5b81356001600160e01b031981168114610f5a57600080fd5b60008083601f840112610f9d57600080fd5b5081356001600160401b03811115610fb457600080fd5b602083019150836020828501011115610fcc57600080fd5b9250929050565b60008060208385031215610fe657600080fd5b82356001600160401b03811115610ffc57600080fd5b61100885828601610f8b565b90969095509350505050565b60006020828403121561102657600080fd5b5035919050565b6001600160a01b0381168114610c6857600080fd5b803561104d8161102d565b919050565b6000806040838503121561106557600080fd5b8235915060208301356110778161102d565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60405160c081016001600160401b03811182821017156110ba576110ba611082565b60405290565b604051601f8201601f191681016001600160401b03811182821017156110e8576110e8611082565b604052919050565b60ff81168114610c6857600080fd5b60006001600160401b0382111561111857611118611082565b50601f01601f191660200190565b600082601f83011261113757600080fd5b813561114a611145826110ff565b6110c0565b81815284602083860101111561115f57600080fd5b816020850160208301376000918101602001919091529392505050565b60006040828403121561118e57600080fd5b604051604081016001600160401b0382821081831117156111b1576111b1611082565b81604052829350843591506111c5826110f0565b908252602084013590808211156111db57600080fd5b506111e885828601611126565b6020830152505092915050565b60008060008060008060008060006101008a8c03121561121457600080fd5b8935985060208a01356001600160401b038082111561123257600080fd5b61123e8d838e0161117c565b995060408c0135985061125360608d01611042565b975061126160808d01611042565b965060a08c013591508082111561127757600080fd5b6112838d838e01611126565b955060c08c013591508082111561129957600080fd5b506112a68c828d01610f8b565b90945092506112b9905060e08b01611042565b90509295985092959850929598565b60005b838110156112e35781810151838201526020016112cb565b50506000910152565b600081518084526113048160208601602086016112c8565b601f01601f19169290920160200192915050565b602081526000610f5a60208301846112ec565b60008060008060006080868803121561134357600080fd5b8535945060208601356113558161102d565b935060408601356113658161102d565b925060608601356001600160401b0381111561138057600080fd5b61138c88828901610f8b565b969995985093965092949392505050565b6000602082840312156113af57600080fd5b8135610f5a8161102d565b600080600080600060a086880312156113d257600080fd5b85356001600160401b03808211156113e957600080fd5b6113f589838a0161117c565b9650602088013591506114078261102d565b9094506040870135906114198261102d565b9093506060870135908082111561142f57600080fd5b5061143c88828901611126565b925050608086013561144d8161102d565b809150509295509295909350565b60008060006060848603121561147057600080fd5b83359250602084013561ffff8116811461148957600080fd5b915060408401356114998161102d565b809150509250925092565b80356001600160401b038116811461104d57600080fd5b600080600080600060a086880312156114d357600080fd5b85356001600160401b03808211156114ea57600080fd5b6114f689838a0161117c565b9650602088013595506040880135915061150f8261102d565b81945061151e606089016114a4565b9350608088013591508082111561153457600080fd5b5061154188828901611126565b9150509295509295909350565b60006020828403121561156057600080fd5b610f5a826114a4565b60ff8151168252600060208201516040602085015261158b60408501826112ec565b949350505050565b60a0815260006115a660a0830188611569565b6001600160a01b038781166020850152868116604085015283820360608501526115d082876112ec565b9250808516608085015250509695505050505050565b600082601f8301126115f757600080fd5b8151611605611145826110ff565b81815284602083860101111561161a57600080fd5b61158b8260208301602087016112c8565b60006020828403121561163d57600080fd5b81516001600160401b038082111561165457600080fd5b9083019060c0828603121561166857600080fd5b611670611098565b8251815260208301516020820152604083015161168c8161102d565b6040820152606083015161169f8161102d565b606082015260808301516116b2816110f0565b608082015260a0830151828111156116c957600080fd5b6116d5878286016115e6565b60a08301525095945050505050565b6000602082840312156116f657600080fd5b81518015158114610f5a57600080fd5b61ffff881681526001600160a01b038781166020830152861660408201526060810185905283151560808201526001600160401b03831660a082015260e060c0820181905260009061175a908301846112ec565b9998505050505050505050565b6020808252600a908201526927b7363c9030b236b4b760b11b604082015260600190565b60c08152600061179e60c0830189611569565b6001600160a01b038881166020850152878116604085015283820360608501526117c882886112ec565b95166080840152505060ff9190911660a090910152949350505050565b6000602082840312156117f757600080fd5b8151610f5a816110f0565b60ff8916815261ffff881660208201526001600160a01b03878116604083015286166060820152608081018590526001600160401b03841660a082015282151560c082015261010060e08201819052600090611860838201856112ec565b9b9a5050505050505050505050565b6000806040838503121561188257600080fd5b505080516020909101519092909150565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516118cb8160178501602088016112c8565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516118fc8160288401602088016112c8565b01602801949350505050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761047457610474611908565b8082018082111561047457610474611908565b634e487b7160e01b600052603260045260246000fd5b60008161196d5761196d611908565b50600019019056fea2646970667358221220fe1d029ae9037eefebbf8db86198d30a406227b96bba581dff61281f64ecf2d364736f6c6343000814003300000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106101225760003560e01c8063a217fddf116100a5578063c41a77631161006c578063c41a77631461036e578063cba25e4b1461038e578063d37ea4e4146103ae578063d547741f146103ce578063eb33ca7d146103ee578063f887ea401461042357005b8063a217fddf146102ce578063af4482af146102e3578063b1d456bf146102f8578063b5bcae4414610318578063c0d786551461034e57005b80634dee98c1116100e95780634dee98c1146102285780635d1ca6311461024857806391d148541461026a5780639a43334c1461028a578063a10bab0b146102ae57005b806301ffc9a71461012b5780631c624af514610160578063248a9ca3146101aa5780632f2ff15d146101e857806336568abe1461020857005b3661012957005b005b34801561013757600080fd5b5061014b610146366004610f61565b610443565b60405190151581526020015b60405180910390f35b34801561016c57600080fd5b5061019261017b366004610fd3565b60075461010090046001600160a01b031692915050565b6040516001600160a01b039091168152602001610157565b3480156101b657600080fd5b506101da6101c5366004611014565b60009081526020819052604090206001015490565b604051908152602001610157565b3480156101f457600080fd5b50610129610203366004611052565b61047a565b34801561021457600080fd5b50610129610223366004611052565b6104a4565b61023b6102363660046111f5565b610527565b6040516101579190611318565b34801561025457600080fd5b5060005b60405160ff9091168152602001610157565b34801561027657600080fd5b5061014b610285366004611052565b6107d5565b34801561029657600080fd5b506101da6102a536600461132b565b50929392505050565b3480156102ba57600080fd5b50600254610192906001600160a01b031681565b3480156102da57600080fd5b506101da600081565b3480156102ef57600080fd5b50610258600081565b34801561030457600080fd5b5061012961031336600461139d565b6107fe565b34801561032457600080fd5b50610192610333366004611014565b6003602052600090815260409020546001600160a01b031681565b34801561035a57600080fd5b5061012961036936600461139d565b610847565b34801561037a57600080fd5b506101296103893660046113ba565b610890565b34801561039a57600080fd5b506101296103a936600461139d565b610a4c565b3480156103ba57600080fd5b506101296103c936600461145b565b610a95565b3480156103da57600080fd5b506101296103e9366004611052565b610b16565b3480156103fa57600080fd5b5061040e6104093660046114bb565b610b3b565b60408051928352602083019190915201610157565b34801561042f57600080fd5b50600454610192906001600160a01b031681565b60006001600160e01b03198216637965db0b60e01b148061047457506301ffc9a760e01b6001600160e01b03198316145b92915050565b60008281526020819052604090206001015461049581610c5e565b61049f8383610c6b565b505050565b6001600160a01b03811633146105195760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6105238282610cef565b5050565b6001546060906001600160a01b0316331461056f5760405162461bcd60e51b815260206004820152600860248201526727b7363c903aba3160c11b6044820152606401610510565b6000888152600360205260409020546001600160a01b03166105a457604051632e2f6d5960e11b815260040160405180910390fd5b60006105b28486018661154e565b9050306001600160a01b031663c41a77638b8a8a8a886040516024016105dc959493929190611593565b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050915060008a60200151806020019051810190610625919061162b565b60075490915060ff16610737576007546040516323b872dd60e01b8152336004820152306024820152604481018e90526101009091046001600160a01b0316906323b872dd906064016020604051808303816000875af115801561068d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b191906116e4565b506007546004805460405163095ea7b360e01b81526001600160a01b0391821692810192909252602482018f90526101009092049091169063095ea7b3906044016020604051808303816000875af1158015610711573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073591906116e4565b505b6004805460008c81526005602090815260408083205460039092528083205486519151630e7006f760e31b81526001600160a01b039586169663738037b89634966107949661ffff169594909116938d9390928c918e9101611706565b6000604051808303818588803b1580156107ad57600080fd5b505af11580156107c1573d6000803e3d6000fd5b505050505050509998505050505050505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6108096000336107d5565b6108255760405162461bcd60e51b815260040161051090611767565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6108526000336107d5565b61086e5760405162461bcd60e51b815260040161051090611767565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031633146108bb57604051633fdb5f0160e11b815260040160405180910390fd5b600085602001518060200190518101906108d5919061162b565b604081810151825191516323b872dd60e01b815233600482015230602482015260448101929092529192506001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015610934573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095891906116e4565b506040818101516001548351925163095ea7b360e01b81526001600160a01b0391821660048201526024810193909352169063095ea7b3906044016020604051808303816000875af11580156109b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109d691906116e4565b50600154604051633c7aee0560e21b81526001600160a01b039091169063f1ebb81490610a12908990899089908990899060009060040161178b565b600060405180830381600087803b158015610a2c57600080fd5b505af1158015610a40573d6000803e3d6000fd5b50505050505050505050565b610a576000336107d5565b610a735760405162461bcd60e51b815260040161051090611767565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b610aa06000336107d5565b610abc5760405162461bcd60e51b815260040161051090611767565b6000838152600560209081526040808320805461ffff191661ffff969096169586179055938252600681528382208590559381526003909352912080546001600160a01b0319166001600160a01b03909216919091179055565b600082815260208190526040902060010154610b3181610c5e565b61049f8383610cef565b60008060008760200151806020019051810190610b58919061162b565b60048054604080516355a3bfa360e11b815290519394506001600160a01b03909116926395b167d892849263ab477f4692818301926020928290030181865afa158015610ba9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bcd91906117e5565b60008a81526005602052604080822054865191516001600160e01b031960e087901b168152610c0f949361ffff909216928d9233928e91908e90600401611802565b6040805180830381865afa158015610c2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4f919061186f565b92509250509550959350505050565b610c688133610d54565b50565b610c7582826107d5565b610523576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610cab3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b610cf982826107d5565b15610523576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b610d5e82826107d5565b61052357610d6b81610dad565b610d76836020610dbf565b604051602001610d87929190611893565b60408051601f198184030181529082905262461bcd60e51b825261051091600401611318565b60606104746001600160a01b03831660145b60606000610dce83600261191e565b610dd9906002611935565b6001600160401b03811115610df057610df0611082565b6040519080825280601f01601f191660200182016040528015610e1a576020820181803683370190505b509050600360fc1b81600081518110610e3557610e35611948565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610e6457610e64611948565b60200101906001600160f81b031916908160001a9053506000610e8884600261191e565b610e93906001611935565b90505b6001811115610f0b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610ec757610ec7611948565b1a60f81b828281518110610edd57610edd611948565b60200101906001600160f81b031916908160001a90535060049490941c93610f048161195e565b9050610e96565b508315610f5a5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610510565b9392505050565b600060208284031215610f7357600080fd5b81356001600160e01b031981168114610f5a57600080fd5b60008083601f840112610f9d57600080fd5b5081356001600160401b03811115610fb457600080fd5b602083019150836020828501011115610fcc57600080fd5b9250929050565b60008060208385031215610fe657600080fd5b82356001600160401b03811115610ffc57600080fd5b61100885828601610f8b565b90969095509350505050565b60006020828403121561102657600080fd5b5035919050565b6001600160a01b0381168114610c6857600080fd5b803561104d8161102d565b919050565b6000806040838503121561106557600080fd5b8235915060208301356110778161102d565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60405160c081016001600160401b03811182821017156110ba576110ba611082565b60405290565b604051601f8201601f191681016001600160401b03811182821017156110e8576110e8611082565b604052919050565b60ff81168114610c6857600080fd5b60006001600160401b0382111561111857611118611082565b50601f01601f191660200190565b600082601f83011261113757600080fd5b813561114a611145826110ff565b6110c0565b81815284602083860101111561115f57600080fd5b816020850160208301376000918101602001919091529392505050565b60006040828403121561118e57600080fd5b604051604081016001600160401b0382821081831117156111b1576111b1611082565b81604052829350843591506111c5826110f0565b908252602084013590808211156111db57600080fd5b506111e885828601611126565b6020830152505092915050565b60008060008060008060008060006101008a8c03121561121457600080fd5b8935985060208a01356001600160401b038082111561123257600080fd5b61123e8d838e0161117c565b995060408c0135985061125360608d01611042565b975061126160808d01611042565b965060a08c013591508082111561127757600080fd5b6112838d838e01611126565b955060c08c013591508082111561129957600080fd5b506112a68c828d01610f8b565b90945092506112b9905060e08b01611042565b90509295985092959850929598565b60005b838110156112e35781810151838201526020016112cb565b50506000910152565b600081518084526113048160208601602086016112c8565b601f01601f19169290920160200192915050565b602081526000610f5a60208301846112ec565b60008060008060006080868803121561134357600080fd5b8535945060208601356113558161102d565b935060408601356113658161102d565b925060608601356001600160401b0381111561138057600080fd5b61138c88828901610f8b565b969995985093965092949392505050565b6000602082840312156113af57600080fd5b8135610f5a8161102d565b600080600080600060a086880312156113d257600080fd5b85356001600160401b03808211156113e957600080fd5b6113f589838a0161117c565b9650602088013591506114078261102d565b9094506040870135906114198261102d565b9093506060870135908082111561142f57600080fd5b5061143c88828901611126565b925050608086013561144d8161102d565b809150509295509295909350565b60008060006060848603121561147057600080fd5b83359250602084013561ffff8116811461148957600080fd5b915060408401356114998161102d565b809150509250925092565b80356001600160401b038116811461104d57600080fd5b600080600080600060a086880312156114d357600080fd5b85356001600160401b03808211156114ea57600080fd5b6114f689838a0161117c565b9650602088013595506040880135915061150f8261102d565b81945061151e606089016114a4565b9350608088013591508082111561153457600080fd5b5061154188828901611126565b9150509295509295909350565b60006020828403121561156057600080fd5b610f5a826114a4565b60ff8151168252600060208201516040602085015261158b60408501826112ec565b949350505050565b60a0815260006115a660a0830188611569565b6001600160a01b038781166020850152868116604085015283820360608501526115d082876112ec565b9250808516608085015250509695505050505050565b600082601f8301126115f757600080fd5b8151611605611145826110ff565b81815284602083860101111561161a57600080fd5b61158b8260208301602087016112c8565b60006020828403121561163d57600080fd5b81516001600160401b038082111561165457600080fd5b9083019060c0828603121561166857600080fd5b611670611098565b8251815260208301516020820152604083015161168c8161102d565b6040820152606083015161169f8161102d565b606082015260808301516116b2816110f0565b608082015260a0830151828111156116c957600080fd5b6116d5878286016115e6565b60a08301525095945050505050565b6000602082840312156116f657600080fd5b81518015158114610f5a57600080fd5b61ffff881681526001600160a01b038781166020830152861660408201526060810185905283151560808201526001600160401b03831660a082015260e060c0820181905260009061175a908301846112ec565b9998505050505050505050565b6020808252600a908201526927b7363c9030b236b4b760b11b604082015260600190565b60c08152600061179e60c0830189611569565b6001600160a01b038881166020850152878116604085015283820360608501526117c882886112ec565b95166080840152505060ff9190911660a090910152949350505050565b6000602082840312156117f757600080fd5b8151610f5a816110f0565b60ff8916815261ffff881660208201526001600160a01b03878116604083015286166060820152608081018590526001600160401b03841660a082015282151560c082015261010060e08201819052600090611860838201856112ec565b9b9a5050505050505050505050565b6000806040838503121561188257600080fd5b505080516020909101519092909150565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516118cb8160178501602088016112c8565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516118fc8160288401602088016112c8565b01602801949350505050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761047457610474611908565b8082018082111561047457610474611908565b634e487b7160e01b600052603260045260246000fd5b60008161196d5761196d611908565b50600019019056fea2646970667358221220fe1d029ae9037eefebbf8db86198d30a406227b96bba581dff61281f64ecf2d364736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _gasIsEth (bool): True
Arg [1] : _bridgeToken (address): 0x0000000000000000000000000000000000000000
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
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.