Overview
ETH Balance
0 ETH
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 11,707 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Send Token | 119090937 | 624 days ago | IN | 0 ETH | 0.00009534 | ||||
Pause | 119089715 | 624 days ago | IN | 0 ETH | 0.00004506 | ||||
Deposit Transact... | 119077815 | 624 days ago | IN | 0.04 ETH | 0.00006067 | ||||
Send Token | 119057512 | 624 days ago | IN | 0 ETH | 0.00006216 | ||||
Send Token | 119053142 | 624 days ago | IN | 0 ETH | 0.00006212 | ||||
Send Token | 119051540 | 624 days ago | IN | 0 ETH | 0.00005953 | ||||
Deposit Transact... | 119051465 | 624 days ago | IN | 0.26152779 ETH | 0.00004211 | ||||
Send Token | 119051155 | 624 days ago | IN | 0 ETH | 0.00005953 | ||||
Deposit Transact... | 119050806 | 624 days ago | IN | 0.004 ETH | 0.00004187 | ||||
Deposit Transact... | 119050475 | 624 days ago | IN | 0.062 ETH | 0.00004187 | ||||
Deposit Transact... | 119048208 | 624 days ago | IN | 0.0686 ETH | 0.00004283 | ||||
Deposit Transact... | 119048186 | 624 days ago | IN | 0.0101 ETH | 0.00004283 | ||||
Deposit Transact... | 119047743 | 624 days ago | IN | 0.0033 ETH | 0.00004283 | ||||
Send Token | 119046899 | 624 days ago | IN | 0 ETH | 0.00006189 | ||||
Send Token | 119044969 | 624 days ago | IN | 0 ETH | 0.00005792 | ||||
Send Token | 119044908 | 624 days ago | IN | 0 ETH | 0.00005792 | ||||
Send Token | 119044334 | 624 days ago | IN | 0 ETH | 0.00005513 | ||||
Deposit Transact... | 119044090 | 624 days ago | IN | 0.01615 ETH | 0.0000371 | ||||
Deposit Transact... | 119043843 | 624 days ago | IN | 0.3 ETH | 0.00003732 | ||||
Deposit Transact... | 119043698 | 624 days ago | IN | 0.001 ETH | 0.0000371 | ||||
Send Token | 119043679 | 624 days ago | IN | 0 ETH | 0.00005513 | ||||
Deposit Transact... | 119042692 | 624 days ago | IN | 0.0072 ETH | 0.00004176 | ||||
Deposit Transact... | 119040792 | 624 days ago | IN | 0.0181 ETH | 0.00004174 | ||||
Send Token | 119039875 | 624 days ago | IN | 0 ETH | 0.00005937 | ||||
Send Token | 119039302 | 624 days ago | IN | 0 ETH | 0.00005754 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
119090937 | 624 days ago | 0.04 ETH | ||||
119057512 | 624 days ago | 1.75840742 ETH | ||||
119053142 | 624 days ago | 2 ETH | ||||
119051540 | 624 days ago | 0.03016 ETH | ||||
119051155 | 624 days ago | 0.522795 ETH | ||||
119046899 | 624 days ago | 0.00956 ETH | ||||
119044969 | 624 days ago | 0.03916 ETH | ||||
119044908 | 624 days ago | 0.2379962 ETH | ||||
119044334 | 624 days ago | 0.06242859 ETH | ||||
119043679 | 624 days ago | 0.07744 ETH | ||||
119039875 | 624 days ago | 0.363467 ETH | ||||
119039302 | 624 days ago | 0.00916 ETH | ||||
119036715 | 624 days ago | 0.01224 ETH | ||||
119036230 | 624 days ago | 0.03494713 ETH | ||||
119032379 | 624 days ago | 0.14937 ETH | ||||
119030261 | 624 days ago | 0.52568282 ETH | ||||
119029732 | 624 days ago | 0.612417 ETH | ||||
119023948 | 624 days ago | 0.02624 ETH | ||||
119023653 | 624 days ago | 0.09944 ETH | ||||
119023156 | 624 days ago | 0.00944 ETH | ||||
119021203 | 624 days ago | 0.20224733 ETH | ||||
119020487 | 624 days ago | 1.24475 ETH | ||||
119020461 | 624 days ago | 1.29454 ETH | ||||
119017510 | 624 days ago | 0.9958 ETH | ||||
119017368 | 624 days ago | 0.9958 ETH |
Loading...
Loading
Contract Name:
BridgePortal
Compiler Version
v0.8.16+commit.07a7930e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; import "../libraries/chain/Chain.sol"; import "../libraries/utils/ReentrancyGuard.sol"; import "../libraries/token/IERC20.sol"; import "../libraries/token/SafeERC20.sol"; import "../libraries/utils/Address.sol"; import "../access/Governable.sol"; contract BridgePortal is ReentrancyGuard, Governable { using SafeERC20 for IERC20; using Address for address payable; /** * @notice Determines if cross domain messaging is paused. When set to true, * withdrawals are paused. This may be removed in the future. */ bool public paused; bool public isInitialized = false; uint256 public targetChainId; mapping (uint256 => bool) public depositIdToStatus; event TransactionDeposited( address indexed from, address indexed to, uint256 amount, uint256 targetChainId ); /** * @notice Emitted when the pause is triggered. * * @param account Address of the account triggering the pause. */ event Paused(address account); /** * @notice Emitted when the pause is lifted. * * @param account Address of the account triggering the unpause. */ event Unpaused(address account); event SendTokenEvent(address indexed receiver, uint256 amount, uint256 depositId); /** * @notice Reverts when paused. */ modifier whenNotPaused() { require(paused == false, "paused"); _; } constructor(uint256 _targetChainId) { targetChainId = _targetChainId; } function initialize(bool _paused) external onlyGov { require(!isInitialized, "already initialized"); isInitialized = true; paused = _paused; } function pause() external onlyGov { paused = true; emit Paused(msg.sender); } /** * @notice Unpause deposits and withdrawals. */ function unpause() external onlyGov { paused = false; emit Unpaused(msg.sender); } receive() external payable { require(paused == false, "paused"); _depositTransaction(msg.sender, msg.sender, msg.value); } /** * @notice Accepts ETH value without triggering a deposit to L2. This function mainly exists * for the sake of the migration between the legacy Optimism system and Bedrock. */ function donateETH() external payable nonReentrant { // Intentionally empty. } function depositTransaction(address _to) external payable whenNotPaused { _depositTransaction(msg.sender, _to, msg.value); } function _depositTransaction( address _from, address _to, uint256 _value ) private nonReentrant { // Emit a TransactionDeposited event so that the rollup node can derive a deposit // transaction for this deposit. emit TransactionDeposited(_from, _to, _value, targetChainId); } // to help users who accidentally send their tokens to this contract function withdrawToken(address _token, address _account, uint256 _amount) external onlyGov nonReentrant { IERC20(_token).safeTransfer(_account, _amount); } function sendToken(address payable _receiver, uint256 _outAmount, uint256 _depositId) external onlyGov nonReentrant { require(depositIdToStatus[_depositId] == false, "depositId already processed"); require(_outAmount > 0, "invalid _outAmount"); require(_receiver != address(0), "invalid _receiver"); require(_outAmount <= address(this).balance, "_outAmount large than contract balance"); require(_receiver != address(this), "can not send eth to myself"); depositIdToStatus[_depositId] = true; _receiver.sendValue(_outAmount); emit SendTokenEvent(_receiver, _outAmount, _depositId); } function balanceOf() external view returns (uint256) { return address(this).balance; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract Governable { address public gov; constructor() { gov = msg.sender; } modifier onlyGov() { require(msg.sender == gov, "Governable: forbidden"); _; } function setGov(address _gov) external onlyGov { gov = _gov; } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; import "./ArbSys.sol"; // @title Chain // @dev Wrap the calls to retrieve chain variables to handle differences // between chain implementations library Chain { uint256 constant public ARBITRUM_CHAIN_ID = 42161; uint256 constant public ARBITRUM_GOERLI_CHAIN_ID = 421613; ArbSys constant public arbSys = ArbSys(address(100)); // @dev return the current block's timestamp // @return the current block's timestamp function currentTimestamp() internal view returns (uint256) { return block.timestamp; } // @dev return the current block's number // @return the current block's number function currentBlockNumber() internal view returns (uint256) { if (block.chainid == ARBITRUM_CHAIN_ID || block.chainid == ARBITRUM_GOERLI_CHAIN_ID) { return arbSys.arbBlockNumber(); } return block.number; } // @dev return the current block's hash // @return the current block's hash function getBlockHash(uint256 blockNumber) internal view returns (bytes32) { if (block.chainid == ARBITRUM_CHAIN_ID || block.chainid == ARBITRUM_GOERLI_CHAIN_ID) { return arbSys.arbBlockHash(blockNumber); } return blockhash(blockNumber); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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 `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount) external returns (bool); /** * @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); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC20.sol"; import "../math/SafeMath.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 SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } 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' // solhint-disable-next-line max-line-length 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)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @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"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @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 * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 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://diligence.consensys.net/posts/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.5.11/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"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (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 functionCall(target, data, "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"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(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) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.3._ */ 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.3._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // 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 // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor () { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; // @title ArbSys // @dev Globally available variables for Arbitrum may have both an L1 and an L2 // value, the ArbSys interface is used to retrieve the L2 value interface ArbSys { function arbBlockNumber() external view returns (uint256); function arbBlockHash(uint256 blockNumber) external view returns (bytes32); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } }
{ "viaIR": true, "optimizer": { "enabled": true, "runs": 200, "details": { "constantOptimizer": true } }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"uint256","name":"_targetChainId","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"depositId","type":"uint256"}],"name":"SendTokenEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"targetChainId","type":"uint256"}],"name":"TransactionDeposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"depositIdToStatus","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"depositTransaction","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"donateETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"gov","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isInitialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_outAmount","type":"uint256"},{"internalType":"uint256","name":"_depositId","type":"uint256"}],"name":"sendToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gov","type":"address"}],"name":"setGov","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"targetChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60803461007057601f610d0938819003918201601f19168301916001600160401b03831184841017610075578084926020946040528339810103126100705751600160008190558054600161ff0160a01b0319163360ff60a81b1916179055600255604051610c7d908161008c8239f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe60806040526004361015610023575b361561001957600080fd5b610021610747565b005b60003560e01c806301e336671461013b57806312d43a5114610132578063146ffb2614610129578063392e53cd146101205780633f4ba83a14610117578063542570c41461010e578063587faab6146101055780635c975abb146100fc578063722713f7146100f35780638456cb59146100ea5780638855626f146100e15780638b4c40b0146100d8578063cfad57a2146100cf5763d53a822f0361000e576100ca610630565b61000e565b506100ca6105da565b506100ca6105b2565b506100ca610580565b506100ca610519565b506100ca6104fc565b506100ca6104d5565b506100ca6103d2565b506100ca61034c565b506100ca6102eb565b506100ca6102c4565b506100ca6102a5565b506100ca61027b565b506100ca61015a565b6001600160a01b0381160361015557565b600080fd5b50346101555760603660031901126101555760043561017881610144565b6102426024359161018883610144565b6001546001600160a01b039182916101a390831633146106ce565b600094859283926101b86002855414156107a8565b60028455169060405194602086019163a9059cbb60e01b83521660248601526044356044860152604485526101ec8561080b565b82604051956101fa87610834565b602087527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65646020880152610230843b15156108c7565b51925af161023c610913565b9061097a565b80518061025a575b826102556001600055565b604051f35b8160208061026f936102749501019101610850565b610868565b388061024a565b5034610155576000366003190112610155576001546040516001600160a01b039091168152602090f35b5034610155576000366003190112610155576020600254604051908152f35b503461015557600036600319011261015557602060ff60015460a81c166040519015158152f35b503461015557600036600319011261015557600154610314336001600160a01b038316146106ce565b60ff60a01b19166001556040513381527f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa90602090a1005b5060203660031901126101555760043561036581610144565b61037760ff60015460a01c1615610712565b610386600260005414156107a8565b6002546040805134815260208101929092526001600160a01b03929092169133917f2aa8f9abed75681b023937cf8da0760ba2ee375bab79e0323e43ae92f5a14fe89190a36001600055005b5034610155576060366003190112610155576004356103f081610144565b7f915add543f3289f412ccbeede40bd1427515fe0bfbd3b0c83de2d4b112062ebf602435604435906104bb8160018060a01b03610432816001541633146106ce565b610441600260005414156107a8565b600260005584600052600360205261046160ff60406000205416156109f5565b61046c821515610a41565b86169561047a871515610a82565b61048647831115610ac2565b61049230881415610b1d565b6104b66104a9866000526003602052604060002090565b805460ff19166001179055565b610b69565b604080519182526020820192909252a26100216001600055565b503461015557600036600319011261015557602060ff60015460a01c166040519015158152f35b503461015557600036600319011261015557602047604051908152f35b503461015557600036600319011261015557600154610542336001600160a01b038316146106ce565b60ff60a01b1916600160a01b176001556040513381527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25890602090a1005b5034610155576020366003190112610155576004356000526003602052602060ff604060002054166040519015158152f35b506000806003193601126105d7576105ce6002825414156107a8565b60018155604051f35b80fd5b5034610155576020366003190112610155576004356105f881610144565b600154906001600160a01b039061061233838516146106ce565b6001600160a01b0319909216911617600155005b8015150361015557565b50346101555760203660031901126101555760043561064e81610626565b60015490610666336001600160a01b038416146106ce565b60ff8260a81c166106935761ffff60a01b1990911690151560a01b60ff60a01b1617600160a81b17600155005b60405162461bcd60e51b8152602060048201526013602482015272185b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606490fd5b156106d557565b60405162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b6044820152606490fd5b1561071957565b60405162461bcd60e51b81526020600482015260066024820152651c185d5cd95960d21b6044820152606490fd5b61075960ff60015460a01c1615610712565b610768600260005414156107a8565b600254604080513481526020810192909252339182917f2aa8f9abed75681b023937cf8da0760ba2ee375bab79e0323e43ae92f5a14fe891a36001600055565b156107af57565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b50634e487b7160e01b600052604160045260246000fd5b6080810190811067ffffffffffffffff82111761082757604052565b61082f6107f4565b604052565b6040810190811067ffffffffffffffff82111761082757604052565b90816020910312610155575161086581610626565b90565b1561086f57565b60405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608490fd5b156108ce57565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b3d156109755767ffffffffffffffff903d828111610968575b60405192601f8201601f19908116603f011684019081118482101761095b575b60405282523d6000602084013e565b6109636107f4565b61094c565b6109706107f4565b61092c565b606090565b90919015610986575090565b8151156109965750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b8285106109dc575050604492506000838284010152601f80199101168101030190fd5b84810182015186860160440152938101938593506109b9565b156109fc57565b60405162461bcd60e51b815260206004820152601b60248201527f6465706f736974496420616c72656164792070726f63657373656400000000006044820152606490fd5b15610a4857565b60405162461bcd60e51b81526020600482015260126024820152711a5b9d985b1a590817dbdd5d105b5bdd5b9d60721b6044820152606490fd5b15610a8957565b60405162461bcd60e51b815260206004820152601160248201527034b73b30b634b2102fb932b1b2b4bb32b960791b6044820152606490fd5b15610ac957565b60405162461bcd60e51b815260206004820152602660248201527f5f6f7574416d6f756e74206c61726765207468616e20636f6e74726163742062604482015265616c616e636560d01b6064820152608490fd5b15610b2457565b60405162461bcd60e51b815260206004820152601a60248201527f63616e206e6f742073656e642065746820746f206d7973656c660000000000006044820152606490fd5b814710610c02576040516000928392839291906001600160a01b03165af1610b8f610913565b5015610b9757565b60405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608490fd5b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606490fdfea2646970667358221220134155c75caa74b04c8c6fda357b722eca48de4a5a99f354e9c14e2f7ffd563c64736f6c634300081000330000000000000000000000000000000000000000000000000000000000002105
Deployed Bytecode
0x60806040526004361015610023575b361561001957600080fd5b610021610747565b005b60003560e01c806301e336671461013b57806312d43a5114610132578063146ffb2614610129578063392e53cd146101205780633f4ba83a14610117578063542570c41461010e578063587faab6146101055780635c975abb146100fc578063722713f7146100f35780638456cb59146100ea5780638855626f146100e15780638b4c40b0146100d8578063cfad57a2146100cf5763d53a822f0361000e576100ca610630565b61000e565b506100ca6105da565b506100ca6105b2565b506100ca610580565b506100ca610519565b506100ca6104fc565b506100ca6104d5565b506100ca6103d2565b506100ca61034c565b506100ca6102eb565b506100ca6102c4565b506100ca6102a5565b506100ca61027b565b506100ca61015a565b6001600160a01b0381160361015557565b600080fd5b50346101555760603660031901126101555760043561017881610144565b6102426024359161018883610144565b6001546001600160a01b039182916101a390831633146106ce565b600094859283926101b86002855414156107a8565b60028455169060405194602086019163a9059cbb60e01b83521660248601526044356044860152604485526101ec8561080b565b82604051956101fa87610834565b602087527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65646020880152610230843b15156108c7565b51925af161023c610913565b9061097a565b80518061025a575b826102556001600055565b604051f35b8160208061026f936102749501019101610850565b610868565b388061024a565b5034610155576000366003190112610155576001546040516001600160a01b039091168152602090f35b5034610155576000366003190112610155576020600254604051908152f35b503461015557600036600319011261015557602060ff60015460a81c166040519015158152f35b503461015557600036600319011261015557600154610314336001600160a01b038316146106ce565b60ff60a01b19166001556040513381527f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa90602090a1005b5060203660031901126101555760043561036581610144565b61037760ff60015460a01c1615610712565b610386600260005414156107a8565b6002546040805134815260208101929092526001600160a01b03929092169133917f2aa8f9abed75681b023937cf8da0760ba2ee375bab79e0323e43ae92f5a14fe89190a36001600055005b5034610155576060366003190112610155576004356103f081610144565b7f915add543f3289f412ccbeede40bd1427515fe0bfbd3b0c83de2d4b112062ebf602435604435906104bb8160018060a01b03610432816001541633146106ce565b610441600260005414156107a8565b600260005584600052600360205261046160ff60406000205416156109f5565b61046c821515610a41565b86169561047a871515610a82565b61048647831115610ac2565b61049230881415610b1d565b6104b66104a9866000526003602052604060002090565b805460ff19166001179055565b610b69565b604080519182526020820192909252a26100216001600055565b503461015557600036600319011261015557602060ff60015460a01c166040519015158152f35b503461015557600036600319011261015557602047604051908152f35b503461015557600036600319011261015557600154610542336001600160a01b038316146106ce565b60ff60a01b1916600160a01b176001556040513381527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25890602090a1005b5034610155576020366003190112610155576004356000526003602052602060ff604060002054166040519015158152f35b506000806003193601126105d7576105ce6002825414156107a8565b60018155604051f35b80fd5b5034610155576020366003190112610155576004356105f881610144565b600154906001600160a01b039061061233838516146106ce565b6001600160a01b0319909216911617600155005b8015150361015557565b50346101555760203660031901126101555760043561064e81610626565b60015490610666336001600160a01b038416146106ce565b60ff8260a81c166106935761ffff60a01b1990911690151560a01b60ff60a01b1617600160a81b17600155005b60405162461bcd60e51b8152602060048201526013602482015272185b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606490fd5b156106d557565b60405162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b6044820152606490fd5b1561071957565b60405162461bcd60e51b81526020600482015260066024820152651c185d5cd95960d21b6044820152606490fd5b61075960ff60015460a01c1615610712565b610768600260005414156107a8565b600254604080513481526020810192909252339182917f2aa8f9abed75681b023937cf8da0760ba2ee375bab79e0323e43ae92f5a14fe891a36001600055565b156107af57565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b50634e487b7160e01b600052604160045260246000fd5b6080810190811067ffffffffffffffff82111761082757604052565b61082f6107f4565b604052565b6040810190811067ffffffffffffffff82111761082757604052565b90816020910312610155575161086581610626565b90565b1561086f57565b60405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608490fd5b156108ce57565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b3d156109755767ffffffffffffffff903d828111610968575b60405192601f8201601f19908116603f011684019081118482101761095b575b60405282523d6000602084013e565b6109636107f4565b61094c565b6109706107f4565b61092c565b606090565b90919015610986575090565b8151156109965750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b8285106109dc575050604492506000838284010152601f80199101168101030190fd5b84810182015186860160440152938101938593506109b9565b156109fc57565b60405162461bcd60e51b815260206004820152601b60248201527f6465706f736974496420616c72656164792070726f63657373656400000000006044820152606490fd5b15610a4857565b60405162461bcd60e51b81526020600482015260126024820152711a5b9d985b1a590817dbdd5d105b5bdd5b9d60721b6044820152606490fd5b15610a8957565b60405162461bcd60e51b815260206004820152601160248201527034b73b30b634b2102fb932b1b2b4bb32b960791b6044820152606490fd5b15610ac957565b60405162461bcd60e51b815260206004820152602660248201527f5f6f7574416d6f756e74206c61726765207468616e20636f6e74726163742062604482015265616c616e636560d01b6064820152608490fd5b15610b2457565b60405162461bcd60e51b815260206004820152601a60248201527f63616e206e6f742073656e642065746820746f206d7973656c660000000000006044820152606490fd5b814710610c02576040516000928392839291906001600160a01b03165af1610b8f610913565b5015610b9757565b60405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608490fd5b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606490fdfea2646970667358221220134155c75caa74b04c8c6fda357b722eca48de4a5a99f354e9c14e2f7ffd563c64736f6c63430008100033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000002105
-----Decoded View---------------
Arg [0] : _targetChainId (uint256): 8453
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000002105
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $1,807.26 | 0.25 | $451.82 |
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.