ETH Price: $2,116.08 (-3.99%)

Contract

0x0B5fA411d7F242d93fcb82a1BF3cf4e9f4DbAA2A
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

1 address found via
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

Advanced mode:
Parent Transaction Hash Method Block
From
To
View All Internal Transactions
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x03d5e3C8...7C1230a9F
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
HelloBridge

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.20;

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {HelloBridgeStore} from "./HelloBridgeStore.sol";

/* -------------------------------------------------------------------------- */
/*                                   errors                                   */
/* -------------------------------------------------------------------------- */

error SignerNotWithdrawSigner();
error NoAmountToWithdraw();
error CannotBridgeToUnsupportedChain();
error Paused();
error NotPaused();
error ZeroAddress();
error InvalidSignature();
error InvalidFeePercentage();
error FeeWalletsNotSet();

///@notice The owner will always be a multisig wallet.

/* -------------------------------------------------------------------------- */
/*                                 HelloBridge                                */
/* -------------------------------------------------------------------------- */
/**
 * @title A cross-chain bridge for HelloToken
 * @author 0xSimon
 * @notice It is recommended to use the provided UI to bridge your tokens from chain A to chain B
 * @dev Assumptions:
 *     - On chains that this contract is deployed to (besides the mainnet), the entire supply of HelloToken will be minted and sent to this contract.
 */
contract HelloBridge is Ownable(msg.sender) {
    /* -------------------------------------------------------------------------- */
    /*                                   events                                   */
    /* -------------------------------------------------------------------------- */
    event Deposit(address indexed sender, uint256 amount, uint256 chainId);
    event Claim(
        address indexed sender,
        uint256 totalDepositedOnOtherChain,
        uint256 otherChainId
    );
    event SupportedChainChanged(uint256 chainID, bool isSupported);
    event SupportedChainsChanged(uint256[] chainIDs, bool isSupported);
    event WithdrawSigner1Changed(address signer);
    event WithdrawSigner2Changed(address signer);
    event PausedChanged(bool depositPaused, bool claimPaused);
    event BridgeStoreChanged(address store);
    event TreasuryWalletChanged(address newTreasuryWallet);
    event StakingPoolWalletChanged(address newStakingPoolWallet);
    event BurnWalletChanged(address newBurnWallet);
    event FeePercentageChanged(uint256 newFeePercentage);
    event FeeCollected(
        address indexed user,
        uint256 totalFeeAmount,
        uint256 burnAmount,
        uint256 stakingAmount,
        uint256 treasuryAmount
    );

    /* -------------------------------------------------------------------------- */
    /*                                  constants                                 */
    /* -------------------------------------------------------------------------- */
    /**
     * @notice The HelloToken contract
     */
    IERC20 public immutable HELLO_TOKEN;
    uint256 private constant MAX_FEE_PERCENTAGE = 500; // 5% max fee
    uint256 private constant BASIS_POINTS = 10000; // For fee calculations

    /* -------------------------------------------------------------------------- */
    /*                                   states                                   */
    /* -------------------------------------------------------------------------- */
    /**
     * @notice The signer providing signatures for claiming tokens on the destination chain
     */
    address public withdrawSigner1;
    address public withdrawSigner2;

    /**
     * @notice Storage contract for deposits and withdrawals numbers
     */
    HelloBridgeStore public store;

    /**
     * @notice A mapping to store which destination chains are supported
     */
    mapping(uint256 => bool) public supportedChains;

    bool public depositPaused;
    bool public claimPaused;

    // Fee related states
    address public treasuryWallet; // 1% goes here
    address public stakingPoolWallet; // 0.5% goes here
    address public burnWallet; // 0.5% goes here
    uint256 public feePercentage; // In basis points (e.g., 200 = 2%)

    /**
     * @notice Deploys the contract and saves the HelloToken contract address
     * @dev `msg.sender` is assigned to the owner, pay attention if this contract is deployed via another contract
     * @param _helloToken The address of HelloToken
     */
    constructor(address _helloToken) {
        HELLO_TOKEN = IERC20(_helloToken);
        feePercentage = 200; // Default 2% fee
        burnWallet = 0x000000000000000000000000000000000000dEaD;
    }

    /* -------------------------------------------------------------------------- */
    /*                                Fee Functions                               */
    /* -------------------------------------------------------------------------- */

    /**
     * @notice Calculates the fee amount for a given total amount
     * @param amount The amount to calculate fee for
     * @return totalFee The total fee amount
     * @return burnAmount The amount to be sent to burn wallet (0.5%)
     * @return stakingAmount The amount to be sent to staking pool (0.5%)
     * @return treasuryAmount The amount to be sent to treasury (1%)
     */
    function calculateFees(
        uint256 amount
    )
        public
        view
        returns (
            uint256 totalFee,
            uint256 burnAmount,
            uint256 stakingAmount,
            uint256 treasuryAmount
        )
    {
        totalFee = (amount * feePercentage) / BASIS_POINTS;

        // Calculate individual fee components:
        // 0.5% to burn, 0.5% to staking, 1% to treasury
        burnAmount = (amount * 50) / BASIS_POINTS; // 0.5%
        stakingAmount = (amount * 50) / BASIS_POINTS; // 0.5%
        treasuryAmount = (amount * 100) / BASIS_POINTS; // 1%

        return (totalFee, burnAmount, stakingAmount, treasuryAmount);
    }

    /**
     * @notice Updates the treasury wallet address
     * @param newTreasuryWallet The new address to collect treasury fees (1%)
     */
    function setTreasuryWallet(address newTreasuryWallet) external onlyOwner {
        if (newTreasuryWallet == address(0)) _revert(ZeroAddress.selector);
        treasuryWallet = newTreasuryWallet;
        emit TreasuryWalletChanged(newTreasuryWallet);
    }

    /**
     * @notice Updates the staking pool wallet address
     * @param newStakingPoolWallet The new address to collect staking pool fees (0.5%)
     */
    function setStakingPoolWallet(
        address newStakingPoolWallet
    ) external onlyOwner {
        if (newStakingPoolWallet == address(0)) _revert(ZeroAddress.selector);
        stakingPoolWallet = newStakingPoolWallet;
        emit StakingPoolWalletChanged(newStakingPoolWallet);
    }

    /**
     * @notice Updates the burn wallet address
     * @param newBurnWallet The new address to send tokens for burning (0.5%)
     */
    function setBurnWallet(address newBurnWallet) external onlyOwner {
        if (newBurnWallet == address(0)) _revert(ZeroAddress.selector);
        burnWallet = newBurnWallet;
        emit BurnWalletChanged(newBurnWallet);
    }

    /* -------------------------------------------------------------------------- */
    /*                              ECDSA Functions                              */
    /* -------------------------------------------------------------------------- */

    /**
     * @dev Recover signer address from a message by using their signature
     * @param hash bytes32 message, the hash is the signed message. What is recovered is the signer address.
     * @param signature bytes signature, the signature is generated using web3.eth.sign()
     */
    function recoverSigner(
        bytes32 hash,
        bytes memory signature
    ) internal pure returns (address) {
        if (signature.length != 65) {
            revert InvalidSignature();
        }

        bytes32 r;
        bytes32 s;
        uint8 v;

        assembly {
            r := mload(add(signature, 32))
            s := mload(add(signature, 64))
            v := byte(0, mload(add(signature, 96)))
        }

        if (
            uint256(s) >
            0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0
        ) {
            revert InvalidSignature();
        }

        if (v != 27 && v != 28) {
            revert InvalidSignature();
        }

        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            revert InvalidSignature();
        }

        return signer;
    }

    /**
     * @dev Returns the hash of a message that can be signed by external wallets.
     * @param message bytes32 message to be signed
     * @return bytes32 The Ethereum signed message hash
     */
    function hashEthSignedMessage(
        bytes32 message
    ) internal pure returns (bytes32) {
        return
            keccak256(
                abi.encodePacked("\x19Ethereum Signed Message:\n32", message)
            );
    }

    /* -------------------------------------------------------------------------- */
    /*                                  external                                  */
    /* -------------------------------------------------------------------------- */
    /**
     * @notice Bridge HelloToken to another chain. HelloToken will be transferred to this contract.
     * @notice Ensure approvals for HelloToken has been set and the destination chain is supported.
     * @param amount Amount of HelloToken to bridge to another chain
     * @param chainId The chain ID of the destination chain
     * @dev Reverts if the destination chain is not supported
     */
    function sendToChain(uint256 amount, uint256 chainId) external {
        if (depositPaused) _revert(Paused.selector);
        if (!supportedChains[chainId])
            _revert(CannotBridgeToUnsupportedChain.selector);

        // Check that all fee wallets are set
        if (
            treasuryWallet == address(0) ||
            stakingPoolWallet == address(0) ||
            burnWallet == address(0)
        ) _revert(FeeWalletsNotSet.selector);

        // Calculate fee distribution
        (
            uint256 totalFee,
            uint256 burnAmount,
            uint256 stakingAmount,
            uint256 treasuryAmount
        ) = calculateFees(amount);
        uint256 netAmount = amount - totalFee;

        // Update state with net amount
        uint256 _currentDeposit = store.totalCrossChainDeposits(
            msg.sender,
            chainId
        );
        store.setTotalCrossChainDeposits(
            msg.sender,
            chainId,
            _currentDeposit + netAmount
        );

        // Transfer tokens - net amount to bridge
        HELLO_TOKEN.transferFrom(msg.sender, address(this), netAmount);

        // Transfer fees to respective destinations
        HELLO_TOKEN.transferFrom(msg.sender, burnWallet, burnAmount);
        HELLO_TOKEN.transferFrom(msg.sender, stakingPoolWallet, stakingAmount);
        HELLO_TOKEN.transferFrom(msg.sender, treasuryWallet, treasuryAmount);

        emit Deposit(msg.sender, netAmount, chainId);
        emit FeeCollected(
            msg.sender,
            totalFee,
            burnAmount,
            stakingAmount,
            treasuryAmount
        );
    }

    /**
     * @notice Claims tokens deposited in the source chain. Two signatures are required.
     * @notice HelloToken will be transferred from this account to the caller.
     * @param totalDepositedOnOtherChain The total amount you have deposited in the source chain
     * @param otherChainId The chain ID of the source chain
     * @param signature1 The first signature for verification
     * @param signature2 The second signature for verification
     * @dev Reverts if there's no amount to claim.
     * @dev Reverts if either signature is invalid
     */
    function claimFromChain(
        uint256 totalDepositedOnOtherChain,
        uint256 otherChainId,
        bytes calldata signature1,
        bytes calldata signature2
    ) external {
        if (claimPaused) _revert(Paused.selector);

        uint256 amountToWithdraw = totalDepositedOnOtherChain -
            store.totalCrossChainWithdrawals(msg.sender, otherChainId);

        if (amountToWithdraw == 0) _revert(NoAmountToWithdraw.selector);

        bytes32 hash = keccak256(
            abi.encodePacked(
                msg.sender,
                totalDepositedOnOtherChain,
                otherChainId,
                block.chainid,
                address(this)
            )
        );

        bytes32 ethSignedHash = hashEthSignedMessage(hash);

        if (recoverSigner(ethSignedHash, signature1) != withdrawSigner1) {
            _revert(SignerNotWithdrawSigner.selector);
        }

        if (recoverSigner(ethSignedHash, signature2) != withdrawSigner2) {
            _revert(SignerNotWithdrawSigner.selector);
        }

        uint256 netAmount = amountToWithdraw;

        store.setTotalCrossChainWithdrawals(
            msg.sender,
            otherChainId,
            totalDepositedOnOtherChain
        );

        // Transfer tokens to user
        HELLO_TOKEN.transfer(msg.sender, netAmount);

        emit Claim(msg.sender, totalDepositedOnOtherChain, otherChainId);
    }

    /* -------------------------------------------------------------------------- */
    /*                                   owners                                   */
    /* -------------------------------------------------------------------------- */
    /**
     * @notice Owner only - Updates the address of the withdrawal signer
     * @param _withdrawSigner Address of the withdrawal signer
     */
    function setWithdrawSigner(address _withdrawSigner) external onlyOwner {
        if (_withdrawSigner == address(0)) {
            _revert(ZeroAddress.selector);
        }
        withdrawSigner1 = _withdrawSigner;
        emit WithdrawSigner1Changed(_withdrawSigner);
    }

    function setWithdrawSigner2(address _withdrawSigner2) external onlyOwner {
        if (_withdrawSigner2 == address(0)) {
            _revert(ZeroAddress.selector);
        }
        withdrawSigner2 = _withdrawSigner2;
        emit WithdrawSigner2Changed(_withdrawSigner2);
    }

    /**
     * @notice Owner only - Updates a supported destination chain
     * @param chainId Chain ID of a destination chain
     * @param isSupported Whether the destination chain is supported
     */
    function setSupportedChain(
        uint256 chainId,
        bool isSupported
    ) external onlyOwner {
        _setSupportedChain(chainId, isSupported);
        emit SupportedChainChanged(chainId, isSupported);
    }

    /**
     * @notice Owner only - Batch update supported destination chains
     * @param chainIds Chain IDs of the destination chains
     * @param isSupported Whether the destination chains are supported
     */
    function setSupportedChains(
        uint256[] calldata chainIds,
        bool isSupported
    ) external onlyOwner {
        for (uint256 i; i < chainIds.length; ) {
            _setSupportedChain(chainIds[i], isSupported);
            unchecked {
                ++i;
            }
        }
        emit SupportedChainsChanged(chainIds, isSupported);
    }

    /**
     * @notice Pause / unpause deposit & claim
     * @param depositPaused_ Whether to pause deposit
     * @param claimPaused_ Whether to pause claim
     */
    function setPaused(
        bool depositPaused_,
        bool claimPaused_
    ) external onlyOwner {
        depositPaused = depositPaused_;
        claimPaused = claimPaused_;
        emit PausedChanged(depositPaused_, claimPaused_);
    }

    function setBridgeStore(address a_) external onlyOwner {
        if (a_ == address(0)) {
            _revert(ZeroAddress.selector);
        }
        store = HelloBridgeStore(a_);
        emit BridgeStoreChanged(a_);
    }

    /**
     * @notice Migrates the bridge contract to another. Tokens in this contract will be transferred to the new contract.
     * @dev The new bridge contract should use the data stored in `store`.
     * @param bridgeAddress Address of the new contract
     */
    function migrateBridge(address bridgeAddress) external onlyOwner {
        if (bridgeAddress == address(0)) {
            _revert(ZeroAddress.selector);
        }
        if (!depositPaused || !claimPaused) {
            _revert(NotPaused.selector);
        }
        HELLO_TOKEN.transfer(
            bridgeAddress,
            HELLO_TOKEN.balanceOf(address(this))
        );
    }

    /* -------------------------------------------------------------------------- */
    /*                                  internal                                  */
    /* -------------------------------------------------------------------------- */
    function _setSupportedChain(uint256 chainId, bool isSupported) internal {
        supportedChains[chainId] = isSupported;
    }

    function _revert(bytes4 selector) internal pure {
        assembly {
            mstore(0x0, selector)
            revert(0x0, 0x04)
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is set to the address provided by the deployer. This can
 * later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-20 standard as defined in the ERC.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the value of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 value) 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 a `value` amount of tokens 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 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 value) external returns (bool);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @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;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.19;

import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";

///@notice The contract is a storage contract for the bridge contract.
///@notice The owner will always be a multisig wallet.

/* -------------------------------------------------------------------------- */
/*                                   errors                                   */
/* -------------------------------------------------------------------------- */
error SignerNotWithdrawSigner();
error NoAmountToWithdraw();
error CannotBridgeToUnsupportedChain();
error Paused();
error NotPaused();
error ZeroAddress();

contract HelloBridgeStore is Ownable(msg.sender) {
    /* -------------------------------------------------------------------------- */
    /*                                   errors                                   */
    /* -------------------------------------------------------------------------- */
    error ErrUnauthorized();
    error ErrZeroAddress();

    /* -------------------------------------------------------------------------- */
    /*                                   events                                   */
    /* -------------------------------------------------------------------------- */
    event BridgeContractChanged(address bridgeContract);

    /* -------------------------------------------------------------------------- */
    /*                                   states                                   */
    /* -------------------------------------------------------------------------- */
    /**
     * @notice A mapping that stores how much HelloToken a user has deposited to bridge to a destination chain
     * @dev Maps from userAddress -> chainID -> amount
     */
    mapping(address => mapping(uint256 => uint256))
        public totalCrossChainDeposits;

    /**
     * @notice A mapping that stores how much HelloToken a user has withdrawn from a destination chain
     * @dev Maps from userAddress -> chainID -> amount
     */
    mapping(address => mapping(uint256 => uint256))
        public totalCrossChainWithdrawals;

    /**
     * @notice The bridge contract associated with this storage contract.
     * This is the only contract authorized to update `totalCrossChainDeposits` & `totalCrossChainWithdrawals`
     */
    address public bridgeContract;

    /* -------------------------------------------------------------------------- */
    /*                                    owner                                   */
    /* -------------------------------------------------------------------------- */
    /**
     * @notice Updates the bridge contract associated with this storage contract
     */
    function setBridgeContract(address b_) external onlyOwner {
        if (b_ == address(0)) {
            revert ErrZeroAddress();
        }

        bridgeContract = b_;

        emit BridgeContractChanged(b_);
    }

    /* -------------------------------------------------------------------------- */
    /*                                  external                                  */
    /* -------------------------------------------------------------------------- */
    /**
     * @notice Updates totalCrossChainDeposits of a user to a destination chain
     * @param address_ The address to update
     * @param chainID_ The destination chainID of the deposit
     * @param amount_ The amount of token deposited
     */
    function setTotalCrossChainDeposits(
        address address_,
        uint256 chainID_,
        uint256 amount_
    ) external {
        if (msg.sender != bridgeContract) {
            revert ErrUnauthorized();
        }

        totalCrossChainDeposits[address_][chainID_] = amount_;
    }

    /**
     * @notice Updates totalCrossChainWithdrawals of a user from a source chain
     * @param address_ The address to update
     * @param chainID_ The source chainID of the withdrawal
     * @param amount_ The amount of token withdrawn
     */
    function setTotalCrossChainWithdrawals(
        address address_,
        uint256 chainID_,
        uint256 amount_
    ) external {
        if (msg.sender != bridgeContract) {
            revert ErrUnauthorized();
        }

        totalCrossChainWithdrawals[address_][chainID_] = amount_;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_helloToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidSignature","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"store","type":"address"}],"name":"BridgeStoreChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newBurnWallet","type":"address"}],"name":"BurnWalletChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"totalDepositedOnOtherChain","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"otherChainId","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"chainId","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"totalFeeAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"burnAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"stakingAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"treasuryAmount","type":"uint256"}],"name":"FeeCollected","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newFeePercentage","type":"uint256"}],"name":"FeePercentageChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"depositPaused","type":"bool"},{"indexed":false,"internalType":"bool","name":"claimPaused","type":"bool"}],"name":"PausedChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newStakingPoolWallet","type":"address"}],"name":"StakingPoolWalletChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"chainID","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isSupported","type":"bool"}],"name":"SupportedChainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"chainIDs","type":"uint256[]"},{"indexed":false,"internalType":"bool","name":"isSupported","type":"bool"}],"name":"SupportedChainsChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newTreasuryWallet","type":"address"}],"name":"TreasuryWalletChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"signer","type":"address"}],"name":"WithdrawSigner1Changed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"signer","type":"address"}],"name":"WithdrawSigner2Changed","type":"event"},{"inputs":[],"name":"HELLO_TOKEN","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"burnWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"calculateFees","outputs":[{"internalType":"uint256","name":"totalFee","type":"uint256"},{"internalType":"uint256","name":"burnAmount","type":"uint256"},{"internalType":"uint256","name":"stakingAmount","type":"uint256"},{"internalType":"uint256","name":"treasuryAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"totalDepositedOnOtherChain","type":"uint256"},{"internalType":"uint256","name":"otherChainId","type":"uint256"},{"internalType":"bytes","name":"signature1","type":"bytes"},{"internalType":"bytes","name":"signature2","type":"bytes"}],"name":"claimFromChain","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"depositPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"bridgeAddress","type":"address"}],"name":"migrateBridge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"chainId","type":"uint256"}],"name":"sendToChain","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"a_","type":"address"}],"name":"setBridgeStore","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newBurnWallet","type":"address"}],"name":"setBurnWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"depositPaused_","type":"bool"},{"internalType":"bool","name":"claimPaused_","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newStakingPoolWallet","type":"address"}],"name":"setStakingPoolWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"bool","name":"isSupported","type":"bool"}],"name":"setSupportedChain","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"chainIds","type":"uint256[]"},{"internalType":"bool","name":"isSupported","type":"bool"}],"name":"setSupportedChains","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newTreasuryWallet","type":"address"}],"name":"setTreasuryWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_withdrawSigner","type":"address"}],"name":"setWithdrawSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_withdrawSigner2","type":"address"}],"name":"setWithdrawSigner2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingPoolWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"store","outputs":[{"internalType":"contract HelloBridgeStore","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"supportedChains","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawSigner1","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawSigner2","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

0x60a060405234801561001057600080fd5b506040516200192238038062001922833981016040819052610031916100db565b338061005757604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6100608161008b565b506001600160a01b031660805260c8600855600780546001600160a01b03191661dead17905561010b565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100ed57600080fd5b81516001600160a01b038116811461010457600080fd5b9392505050565b6080516117d1620001516000396000818161024e015281816105e20152818161067b01528181610713015281816107ab01528181610dda015261118501526117d16000f3fe608060405234801561001057600080fd5b50600436106101a95760003560e01c80636d3d6a91116100f9578063a001ecdd11610097578063ab5e124a11610071578063ab5e124a146103cd578063d7f5b359146103df578063ebc6ff9d146103f2578063f2fde38b1461040557600080fd5b8063a001ecdd14610390578063a717640b146103a7578063a8602fea146103ba57600080fd5b80637ccbfe7c116100d35780637ccbfe7c146103465780638da5cb5b1461035957806391274f681461036a578063975057e71461037d57600080fd5b80636d3d6a9114610318578063711c9a371461032b578063715018a61461033e57600080fd5b8063257f9e7b1161016657806346c6f5f41161014057806346c6f5f41461029c57806352238fdd146102af578063548d496f146102e25780636426be481461030557600080fd5b8063257f9e7b1461024957806326190b47146102705780634626402b1461028357600080fd5b806302befd24146101ae57806306228749146101d057806308eebf90146101fb578063170fe86c146102105780631a82bd59146102235780631c4ba3ed14610236575b600080fd5b6005546101bb9060ff1681565b60405190151581526020015b60405180910390f35b6007546101e3906001600160a01b031681565b6040516001600160a01b0390911681526020016101c7565b61020e61020936600461144f565b610418565b005b6001546101e3906001600160a01b031681565b61020e610231366004611471565b6108be565b61020e610244366004611471565b610939565b6101e37f000000000000000000000000000000000000000000000000000000000000000081565b6006546101e3906001600160a01b031681565b6005546101e3906201000090046001600160a01b031681565b61020e6102aa3660046114af565b6109ad565b6102c26102bd3660046114df565b610a0e565b6040805194855260208501939093529183015260608201526080016101c7565b6101bb6102f03660046114df565b60046020526000908152604090205460ff1681565b61020e6103133660046114f8565b610a86565b6002546101e3906001600160a01b031681565b61020e610339366004611526565b610aea565b61020e610b82565b61020e610354366004611471565b610b96565b6000546001600160a01b03166101e3565b61020e610378366004611471565b610c0a565b6003546101e3906001600160a01b031681565b61039960085481565b6040519081526020016101c7565b61020e6103b5366004611471565b610c7e565b61020e6103c8366004611471565b610cf2565b6005546101bb90610100900460ff1681565b61020e6103ed366004611471565b610d70565b61020e6104003660046115f5565b610eca565b61020e610413366004611471565b611244565b60055460ff1615610433576104336313d0ff5960e31b611287565b60008181526004602052604090205460ff1661045957610459638ebb6aa560e01b611287565b6005546201000090046001600160a01b0316158061048057506006546001600160a01b0316155b8061049457506007546001600160a01b0316155b156104a9576104a963c5b8557560e01b611287565b6000806000806104b886610a0e565b9350935093509350600084876104ce919061168e565b6003546040516374a65b5f60e01b8152336004820152602481018990529192506000916001600160a01b03909116906374a65b5f90604401602060405180830381865afa158015610523573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054791906116a1565b6003549091506001600160a01b0316636de554c4338961056786866116ba565b6040516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091526044820152606401600060405180830381600087803b1580156105b557600080fd5b505af11580156105c9573d6000803e3d6000fd5b50506040516323b872dd60e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001692506323b872dd915061061d903390309087906004016116cd565b6020604051808303816000875af115801561063c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066091906116f1565b506007546040516323b872dd60e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116926323b872dd926106b592339216908a906004016116cd565b6020604051808303816000875af11580156106d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f891906116f1565b506006546040516323b872dd60e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116926323b872dd9261074d923392169089906004016116cd565b6020604051808303816000875af115801561076c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079091906116f1565b506005546040516323b872dd60e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116926323b872dd926107eb923392620100009004169088906004016116cd565b6020604051808303816000875af115801561080a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082e91906116f1565b50604080518381526020810189905233917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15910160405180910390a260408051878152602081018790529081018590526060810184905233907fe5f74c1935f87f5b3c2d5f1529e001ae6fedd21cce61a31cf833e909aff18ae39060800160405180910390a25050505050505050565b6108c6611291565b6001600160a01b0381166108e4576108e463d92e233d60e01b611287565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527f35e0a7f3c10415eb269af79bbcb131563e1339ee9a581b758f73d0fb80c6348b906020015b60405180910390a150565b610941611291565b6001600160a01b03811661095f5761095f63d92e233d60e01b611287565b600780546001600160a01b0319166001600160a01b0383169081179091556040519081527fe253ce77edf5d0a5243820400c2f78cbff85c731730e2189d73e066e8d9278339060200161092e565b6109b5611291565b6000828152600460205260409020805460ff19168215151790556040805183815282151560208201527fcf8759e93af27d52cf10a12579839840971169859bc59799b2691d6d8f4ecced91015b60405180910390a15050565b60008060008061271060085486610a25919061170e565b610a2f9190611725565b9350612710610a3f86603261170e565b610a499190611725565b9250612710610a5986603261170e565b610a639190611725565b9150612710610a7386606461170e565b610a7d9190611725565b90509193509193565b610a8e611291565b60058054821515610100810261ff001986151590811661ffff1990941693909317179092556040805191825260208201929092527fdc08680557789d1cf3e829a8db03ad2cc81a876ec59b82e3405d24d670eb8ecd9101610a02565b610af2611291565b60005b82811015610b4157610b39848483818110610b1257610b12611747565b60209081029290920135600090815260049092525060409020805460ff1916841515179055565b600101610af5565b507fb31e572a57abda47b6e0f162af108af158a4e7c040c6fe90ddbd5e73a224d53c838383604051610b759392919061175d565b60405180910390a1505050565b610b8a611291565b610b9460006112be565b565b610b9e611291565b6001600160a01b038116610bbc57610bbc63d92e233d60e01b611287565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f1b6903c6fde62e8b98c165679268e2ba4468035ee9722f577391b163680d6edd9060200161092e565b610c12611291565b6001600160a01b038116610c3057610c3063d92e233d60e01b611287565b600680546001600160a01b0319166001600160a01b0383169081179091556040519081527f16f546f509a2f5f6611d1f900d0a414b30a09b07a5ec7dd178119bb1ead9e2799060200161092e565b610c86611291565b6001600160a01b038116610ca457610ca463d92e233d60e01b611287565b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527fc4e6d54e106b8070ebd1657aef7ed58a60b804c3f421a1d5d48014e8ab391ca39060200161092e565b610cfa611291565b6001600160a01b038116610d1857610d1863d92e233d60e01b611287565b6005805462010000600160b01b031916620100006001600160a01b038416908102919091179091556040519081527f2551960305e8f85b09658bb3075878e3e3cef37a5f7b5d43261f5e6f36b3d6a49060200161092e565b610d78611291565b6001600160a01b038116610d9657610d9663d92e233d60e01b611287565b60055460ff161580610db05750600554610100900460ff16155b15610dc557610dc5636cd6020160e01b611287565b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb90839083906370a0823190602401602060405180830381865afa158015610e33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5791906116a1565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610ea2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec691906116f1565b5050565b600554610100900460ff1615610eea57610eea6313d0ff5960e31b611287565b600354604051635cbe13f160e11b8152336004820152602481018790526000916001600160a01b03169063b97c27e290604401602060405180830381865afa158015610f3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5e91906116a1565b610f68908861168e565b905080600003610f8257610f82636ac2fea160e01b611287565b6040805133606090811b6bffffffffffffffffffffffff19908116602080850191909152603484018c9052605484018b90524660748501523090921b1660948301528251608881840301815260a8830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060c884015260e4808401829052845180850390910181526101049093019093528151910120600090600154604080516020601f8b018190048102820181019092528981529293506001600160a01b0390911691611075918491908b908b908190840183828082843760009201919091525061130e92505050565b6001600160a01b0316146110935761109363630f5e6360e01b611287565b600254604080516020601f88018190048102820181019092528681526001600160a01b03909216916110e291849190899089908190840183828082843760009201919091525061130e92505050565b6001600160a01b0316146111005761110063630f5e6360e01b611287565b6003546040516397b6cb9160e01b8152336004820152602481018a9052604481018b905284916001600160a01b0316906397b6cb9190606401600060405180830381600087803b15801561115357600080fd5b505af1158015611167573d6000803e3d6000fd5b505060405163a9059cbb60e01b8152336004820152602481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316925063a9059cbb91506044016020604051808303816000875af11580156111d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111fc91906116f1565b50604080518b8152602081018b905233917f34fcbac0073d7c3d388e51312faf357774904998eeb8fca628b9e6f65ee1cbf7910160405180910390a250505050505050505050565b61124c611291565b6001600160a01b03811661127b57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b611284816112be565b50565b8060005260046000fd5b6000546001600160a01b03163314610b945760405163118cdaa760e01b8152336004820152602401611272565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000815160411461133257604051638baa579f60e01b815260040160405180910390fd5b60208201516040830151606084015160001a7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a082111561138557604051638baa579f60e01b815260040160405180910390fd5b8060ff16601b1415801561139d57508060ff16601c14155b156113bb57604051638baa579f60e01b815260040160405180910390fd5b6040805160008082526020820180845289905260ff841692820192909252606081018590526080810184905260019060a0016020604051602081039080840390855afa15801561140f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661144357604051638baa579f60e01b815260040160405180910390fd5b93505050505b92915050565b6000806040838503121561146257600080fd5b50508035926020909101359150565b60006020828403121561148357600080fd5b81356001600160a01b038116811461149a57600080fd5b9392505050565b801515811461128457600080fd5b600080604083850312156114c257600080fd5b8235915060208301356114d4816114a1565b809150509250929050565b6000602082840312156114f157600080fd5b5035919050565b6000806040838503121561150b57600080fd5b8235611516816114a1565b915060208301356114d4816114a1565b60008060006040848603121561153b57600080fd5b833567ffffffffffffffff8082111561155357600080fd5b818601915086601f83011261156757600080fd5b81358181111561157657600080fd5b8760208260051b850101111561158b57600080fd5b602092830195509350508401356115a1816114a1565b809150509250925092565b60008083601f8401126115be57600080fd5b50813567ffffffffffffffff8111156115d657600080fd5b6020830191508360208285010111156115ee57600080fd5b9250929050565b6000806000806000806080878903121561160e57600080fd5b8635955060208701359450604087013567ffffffffffffffff8082111561163457600080fd5b6116408a838b016115ac565b9096509450606089013591508082111561165957600080fd5b5061166689828a016115ac565b979a9699509497509295939492505050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561144957611449611678565b6000602082840312156116b357600080fd5b5051919050565b8082018082111561144957611449611678565b6001600160a01b039384168152919092166020820152604081019190915260600190565b60006020828403121561170357600080fd5b815161149a816114a1565b808202811582820484141761144957611449611678565b60008261174257634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b6040808252810183905260006001600160fb1b0384111561177d57600080fd5b8360051b80866060850137921515602083015250016060019291505056fea26469706673582212200b1b4898eef1f4bdbe234ae4c3a12e31006ede69c44df8f98c5057dfb047089364736f6c634300081400330000000000000000000000000f1cbed8efa0e012adbccb1638d0ab0147d5ac00

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101a95760003560e01c80636d3d6a91116100f9578063a001ecdd11610097578063ab5e124a11610071578063ab5e124a146103cd578063d7f5b359146103df578063ebc6ff9d146103f2578063f2fde38b1461040557600080fd5b8063a001ecdd14610390578063a717640b146103a7578063a8602fea146103ba57600080fd5b80637ccbfe7c116100d35780637ccbfe7c146103465780638da5cb5b1461035957806391274f681461036a578063975057e71461037d57600080fd5b80636d3d6a9114610318578063711c9a371461032b578063715018a61461033e57600080fd5b8063257f9e7b1161016657806346c6f5f41161014057806346c6f5f41461029c57806352238fdd146102af578063548d496f146102e25780636426be481461030557600080fd5b8063257f9e7b1461024957806326190b47146102705780634626402b1461028357600080fd5b806302befd24146101ae57806306228749146101d057806308eebf90146101fb578063170fe86c146102105780631a82bd59146102235780631c4ba3ed14610236575b600080fd5b6005546101bb9060ff1681565b60405190151581526020015b60405180910390f35b6007546101e3906001600160a01b031681565b6040516001600160a01b0390911681526020016101c7565b61020e61020936600461144f565b610418565b005b6001546101e3906001600160a01b031681565b61020e610231366004611471565b6108be565b61020e610244366004611471565b610939565b6101e37f0000000000000000000000000f1cbed8efa0e012adbccb1638d0ab0147d5ac0081565b6006546101e3906001600160a01b031681565b6005546101e3906201000090046001600160a01b031681565b61020e6102aa3660046114af565b6109ad565b6102c26102bd3660046114df565b610a0e565b6040805194855260208501939093529183015260608201526080016101c7565b6101bb6102f03660046114df565b60046020526000908152604090205460ff1681565b61020e6103133660046114f8565b610a86565b6002546101e3906001600160a01b031681565b61020e610339366004611526565b610aea565b61020e610b82565b61020e610354366004611471565b610b96565b6000546001600160a01b03166101e3565b61020e610378366004611471565b610c0a565b6003546101e3906001600160a01b031681565b61039960085481565b6040519081526020016101c7565b61020e6103b5366004611471565b610c7e565b61020e6103c8366004611471565b610cf2565b6005546101bb90610100900460ff1681565b61020e6103ed366004611471565b610d70565b61020e6104003660046115f5565b610eca565b61020e610413366004611471565b611244565b60055460ff1615610433576104336313d0ff5960e31b611287565b60008181526004602052604090205460ff1661045957610459638ebb6aa560e01b611287565b6005546201000090046001600160a01b0316158061048057506006546001600160a01b0316155b8061049457506007546001600160a01b0316155b156104a9576104a963c5b8557560e01b611287565b6000806000806104b886610a0e565b9350935093509350600084876104ce919061168e565b6003546040516374a65b5f60e01b8152336004820152602481018990529192506000916001600160a01b03909116906374a65b5f90604401602060405180830381865afa158015610523573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054791906116a1565b6003549091506001600160a01b0316636de554c4338961056786866116ba565b6040516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091526044820152606401600060405180830381600087803b1580156105b557600080fd5b505af11580156105c9573d6000803e3d6000fd5b50506040516323b872dd60e01b81526001600160a01b037f0000000000000000000000000f1cbed8efa0e012adbccb1638d0ab0147d5ac001692506323b872dd915061061d903390309087906004016116cd565b6020604051808303816000875af115801561063c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066091906116f1565b506007546040516323b872dd60e01b81526001600160a01b037f0000000000000000000000000f1cbed8efa0e012adbccb1638d0ab0147d5ac008116926323b872dd926106b592339216908a906004016116cd565b6020604051808303816000875af11580156106d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f891906116f1565b506006546040516323b872dd60e01b81526001600160a01b037f0000000000000000000000000f1cbed8efa0e012adbccb1638d0ab0147d5ac008116926323b872dd9261074d923392169089906004016116cd565b6020604051808303816000875af115801561076c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079091906116f1565b506005546040516323b872dd60e01b81526001600160a01b037f0000000000000000000000000f1cbed8efa0e012adbccb1638d0ab0147d5ac008116926323b872dd926107eb923392620100009004169088906004016116cd565b6020604051808303816000875af115801561080a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082e91906116f1565b50604080518381526020810189905233917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15910160405180910390a260408051878152602081018790529081018590526060810184905233907fe5f74c1935f87f5b3c2d5f1529e001ae6fedd21cce61a31cf833e909aff18ae39060800160405180910390a25050505050505050565b6108c6611291565b6001600160a01b0381166108e4576108e463d92e233d60e01b611287565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527f35e0a7f3c10415eb269af79bbcb131563e1339ee9a581b758f73d0fb80c6348b906020015b60405180910390a150565b610941611291565b6001600160a01b03811661095f5761095f63d92e233d60e01b611287565b600780546001600160a01b0319166001600160a01b0383169081179091556040519081527fe253ce77edf5d0a5243820400c2f78cbff85c731730e2189d73e066e8d9278339060200161092e565b6109b5611291565b6000828152600460205260409020805460ff19168215151790556040805183815282151560208201527fcf8759e93af27d52cf10a12579839840971169859bc59799b2691d6d8f4ecced91015b60405180910390a15050565b60008060008061271060085486610a25919061170e565b610a2f9190611725565b9350612710610a3f86603261170e565b610a499190611725565b9250612710610a5986603261170e565b610a639190611725565b9150612710610a7386606461170e565b610a7d9190611725565b90509193509193565b610a8e611291565b60058054821515610100810261ff001986151590811661ffff1990941693909317179092556040805191825260208201929092527fdc08680557789d1cf3e829a8db03ad2cc81a876ec59b82e3405d24d670eb8ecd9101610a02565b610af2611291565b60005b82811015610b4157610b39848483818110610b1257610b12611747565b60209081029290920135600090815260049092525060409020805460ff1916841515179055565b600101610af5565b507fb31e572a57abda47b6e0f162af108af158a4e7c040c6fe90ddbd5e73a224d53c838383604051610b759392919061175d565b60405180910390a1505050565b610b8a611291565b610b9460006112be565b565b610b9e611291565b6001600160a01b038116610bbc57610bbc63d92e233d60e01b611287565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f1b6903c6fde62e8b98c165679268e2ba4468035ee9722f577391b163680d6edd9060200161092e565b610c12611291565b6001600160a01b038116610c3057610c3063d92e233d60e01b611287565b600680546001600160a01b0319166001600160a01b0383169081179091556040519081527f16f546f509a2f5f6611d1f900d0a414b30a09b07a5ec7dd178119bb1ead9e2799060200161092e565b610c86611291565b6001600160a01b038116610ca457610ca463d92e233d60e01b611287565b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527fc4e6d54e106b8070ebd1657aef7ed58a60b804c3f421a1d5d48014e8ab391ca39060200161092e565b610cfa611291565b6001600160a01b038116610d1857610d1863d92e233d60e01b611287565b6005805462010000600160b01b031916620100006001600160a01b038416908102919091179091556040519081527f2551960305e8f85b09658bb3075878e3e3cef37a5f7b5d43261f5e6f36b3d6a49060200161092e565b610d78611291565b6001600160a01b038116610d9657610d9663d92e233d60e01b611287565b60055460ff161580610db05750600554610100900460ff16155b15610dc557610dc5636cd6020160e01b611287565b6040516370a0823160e01b81523060048201527f0000000000000000000000000f1cbed8efa0e012adbccb1638d0ab0147d5ac006001600160a01b03169063a9059cbb90839083906370a0823190602401602060405180830381865afa158015610e33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5791906116a1565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610ea2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec691906116f1565b5050565b600554610100900460ff1615610eea57610eea6313d0ff5960e31b611287565b600354604051635cbe13f160e11b8152336004820152602481018790526000916001600160a01b03169063b97c27e290604401602060405180830381865afa158015610f3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5e91906116a1565b610f68908861168e565b905080600003610f8257610f82636ac2fea160e01b611287565b6040805133606090811b6bffffffffffffffffffffffff19908116602080850191909152603484018c9052605484018b90524660748501523090921b1660948301528251608881840301815260a8830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060c884015260e4808401829052845180850390910181526101049093019093528151910120600090600154604080516020601f8b018190048102820181019092528981529293506001600160a01b0390911691611075918491908b908b908190840183828082843760009201919091525061130e92505050565b6001600160a01b0316146110935761109363630f5e6360e01b611287565b600254604080516020601f88018190048102820181019092528681526001600160a01b03909216916110e291849190899089908190840183828082843760009201919091525061130e92505050565b6001600160a01b0316146111005761110063630f5e6360e01b611287565b6003546040516397b6cb9160e01b8152336004820152602481018a9052604481018b905284916001600160a01b0316906397b6cb9190606401600060405180830381600087803b15801561115357600080fd5b505af1158015611167573d6000803e3d6000fd5b505060405163a9059cbb60e01b8152336004820152602481018490527f0000000000000000000000000f1cbed8efa0e012adbccb1638d0ab0147d5ac006001600160a01b0316925063a9059cbb91506044016020604051808303816000875af11580156111d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111fc91906116f1565b50604080518b8152602081018b905233917f34fcbac0073d7c3d388e51312faf357774904998eeb8fca628b9e6f65ee1cbf7910160405180910390a250505050505050505050565b61124c611291565b6001600160a01b03811661127b57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b611284816112be565b50565b8060005260046000fd5b6000546001600160a01b03163314610b945760405163118cdaa760e01b8152336004820152602401611272565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000815160411461133257604051638baa579f60e01b815260040160405180910390fd5b60208201516040830151606084015160001a7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a082111561138557604051638baa579f60e01b815260040160405180910390fd5b8060ff16601b1415801561139d57508060ff16601c14155b156113bb57604051638baa579f60e01b815260040160405180910390fd5b6040805160008082526020820180845289905260ff841692820192909252606081018590526080810184905260019060a0016020604051602081039080840390855afa15801561140f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661144357604051638baa579f60e01b815260040160405180910390fd5b93505050505b92915050565b6000806040838503121561146257600080fd5b50508035926020909101359150565b60006020828403121561148357600080fd5b81356001600160a01b038116811461149a57600080fd5b9392505050565b801515811461128457600080fd5b600080604083850312156114c257600080fd5b8235915060208301356114d4816114a1565b809150509250929050565b6000602082840312156114f157600080fd5b5035919050565b6000806040838503121561150b57600080fd5b8235611516816114a1565b915060208301356114d4816114a1565b60008060006040848603121561153b57600080fd5b833567ffffffffffffffff8082111561155357600080fd5b818601915086601f83011261156757600080fd5b81358181111561157657600080fd5b8760208260051b850101111561158b57600080fd5b602092830195509350508401356115a1816114a1565b809150509250925092565b60008083601f8401126115be57600080fd5b50813567ffffffffffffffff8111156115d657600080fd5b6020830191508360208285010111156115ee57600080fd5b9250929050565b6000806000806000806080878903121561160e57600080fd5b8635955060208701359450604087013567ffffffffffffffff8082111561163457600080fd5b6116408a838b016115ac565b9096509450606089013591508082111561165957600080fd5b5061166689828a016115ac565b979a9699509497509295939492505050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561144957611449611678565b6000602082840312156116b357600080fd5b5051919050565b8082018082111561144957611449611678565b6001600160a01b039384168152919092166020820152604081019190915260600190565b60006020828403121561170357600080fd5b815161149a816114a1565b808202811582820484141761144957611449611678565b60008261174257634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b6040808252810183905260006001600160fb1b0384111561177d57600080fd5b8360051b80866060850137921515602083015250016060019291505056fea26469706673582212200b1b4898eef1f4bdbe234ae4c3a12e31006ede69c44df8f98c5057dfb047089364736f6c63430008140033

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

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.