ETH Price: $1,847.01 (-0.14%)
Gas: 63 Gwei
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multi Chain

Multichain Addresses

0 address found via
Transaction Hash
Method
Block
From
To
Value
0x60c06040157579672022-10-16 3:23:11235 days 15 hrs ago1665890591IN
 Create: FPValidator
0 ETH0.0161792814.01596254

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FPValidator

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 30000 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity Multiple files format)

File 2 of 6: FPValidator.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity 0.7.6;
pragma abicoder v2;

import "./LayerZeroPacket.sol";
import "./ILayerZeroValidationLibrary.sol";
import "./IValidationLibraryHelperV2.sol";

interface IStargate {
    // Stargate objects for abi encoding / decoding
    struct SwapObj {
        uint amount;
        uint eqFee;
        uint eqReward;
        uint lpFee;
        uint protocolFee;
        uint lkbRemove;
    }

    struct CreditObj {
        uint credits;
        uint idealBalance;
    }
}

contract FPValidator is ILayerZeroValidationLibrary, IValidationLibraryHelperV2 {
    uint8 public proofType = 2;
    uint8 public utilsVersion = 1;

    address public immutable stargateBridgeAddress;
    address public immutable stargateTokenAddress;

    constructor(address _stargateBridgeAddress, address _stargateTokenAddress) {
        stargateBridgeAddress = _stargateBridgeAddress;
        stargateTokenAddress = _stargateTokenAddress;
    }

    function validateProof(bytes32 _packetHash, bytes calldata _transactionProof, uint _remoteAddressSize) external view override returns (LayerZeroPacket.Packet memory packet) {
        require(_remoteAddressSize > 0, "ProofLib: invalid address size");
        // _transactionProof = srcUlnAddress (32 bytes) + lzPacket
        require(_transactionProof.length > 32 && keccak256(_transactionProof) == _packetHash, "ProofLib: invalid transaction proof");

        bytes memory ulnAddressBytes = bytes(_transactionProof[0:32]);
        bytes32 ulnAddress;
        assembly {
            ulnAddress := mload(add(ulnAddressBytes, 32))
        }
        packet = LayerZeroPacket.getPacketV3(_transactionProof[32:], _remoteAddressSize, ulnAddress);

        if (packet.dstAddress == stargateBridgeAddress) packet.payload = _secureStgPayload(packet.payload);
        if (packet.dstAddress == stargateTokenAddress) packet.payload = _secureStgTokenPayload(packet.payload);

        return packet;
    }

    function _secureStgTokenPayload(bytes memory _payload) internal pure returns (bytes memory) {
        (bytes memory toAddressBytes, uint qty) = abi.decode(_payload, (bytes, uint));

        address toAddress = address(0);
        if (toAddressBytes.length > 0) {
            assembly {
                toAddress := mload(add(toAddressBytes, 20))
            }
        }

        if (toAddress == address(0)) {
            address deadAddress = address(0x000000000000000000000000000000000000dEaD);
            bytes memory newToAddressBytes = abi.encodePacked(deadAddress);
            return abi.encode(newToAddressBytes, qty);
        }

        // default to return the original payload
        return _payload;
    }

    function _secureStgPayload(bytes memory _payload) internal view returns (bytes memory) {
        // functionType is uint8 even though the encoding will take up the side of uint256
        uint8 functionType;
        assembly {
            functionType := mload(add(_payload, 32))
        }

        // TYPE_SWAP_REMOTE == 1 && only if the payload has a payload
        // only swapRemote inside of stargate can call sgReceive on an user supplied to address
        // thus we do not care about the other type functions even if the toAddress is overly long.
        if (functionType == 1) {
            // decode the _payload with its types
            (, uint srcPoolId, uint dstPoolId, uint dstGasForCall, IStargate.CreditObj memory c, IStargate.SwapObj memory s, bytes memory toAddressBytes, bytes memory contractCallPayload) = abi.decode(_payload, (uint8, uint, uint, uint, IStargate.CreditObj, IStargate.SwapObj, bytes, bytes));

            // if contractCallPayload.length > 0 need to check if the to address is a contract or not
            if (contractCallPayload.length > 0) {
                // otherwise, need to check if the payload can be delivered to the toAddress
                address toAddress = address(0);
                if (toAddressBytes.length > 0) {
                    assembly {
                        toAddress := mload(add(toAddressBytes, 20))
                    }
                }

                // check if the toAddress is a contract. We are not concerned about addresses that pretend to be wallets. because worst case we just delete their payload if being malicious
                // we can guarantee that if a size > 0, then the contract is definitely a contract address in this context
                uint size;
                assembly {
                    size := extcodesize(toAddress)
                }

                if (size == 0) {
                    // size == 0 indicates its not a contract, payload wont be delivered
                    // secure the _payload to make sure funds can be delivered to the toAddress
                    bytes memory newToAddressBytes = abi.encodePacked(toAddress);
                    bytes memory securePayload = abi.encode(functionType, srcPoolId, dstPoolId, dstGasForCall, c, s, newToAddressBytes, bytes(""));
                    return securePayload;
                }
            }
        }

        // default to return the original payload
        return _payload;
    }

    function secureStgTokenPayload(bytes memory _payload) external pure returns (bytes memory) {
        return _secureStgTokenPayload(_payload);
    }

    function secureStgPayload(bytes memory _payload) external view returns (bytes memory) {
        return _secureStgPayload(_payload);
    }

    function getUtilsVersion() external view override returns (uint8) {
        return utilsVersion;
    }

    function getProofType() external view override returns (uint8) {
        return proofType;
    }

    function getVerifyLog(bytes32, uint[] calldata, uint, bytes[] calldata proof) external pure override returns (ULNLog memory log) {}

    function getPacket(bytes memory data, uint sizeOfSrcAddress, bytes32 ulnAddress) external pure override returns (LayerZeroPacket.Packet memory) {
        return LayerZeroPacket.getPacketV3(data, sizeOfSrcAddress, ulnAddress);
    }
}

File 1 of 6: Buffer.sol
// SPDX-License-Identifier: BUSL-1.1

// https://github.com/ensdomains/buffer

pragma solidity ^0.7.0;

/**
 * @dev A library for working with mutable byte buffers in Solidity.
 *
 * Byte buffers are mutable and expandable, and provide a variety of primitives
 * for writing to them. At any time you can fetch a bytes object containing the
 * current contents of the buffer. The bytes object should not be stored between
 * operations, as it may change due to resizing of the buffer.
 */
library Buffer {
    /**
     * @dev Represents a mutable buffer. Buffers have a current value (buf) and
     *      a capacity. The capacity may be longer than the current value, in
     *      which case it can be extended without the need to allocate more memory.
     */
    struct buffer {
        bytes buf;
        uint capacity;
    }

    /**
     * @dev Initializes a buffer with an initial capacity.a co
     * @param buf The buffer to initialize.
     * @param capacity The number of bytes of space to allocate the buffer.
     * @return The buffer, for chaining.
     */
    function init(buffer memory buf, uint capacity) internal pure returns (buffer memory) {
        if (capacity % 32 != 0) {
            capacity += 32 - (capacity % 32);
        }
        // Allocate space for the buffer data
        buf.capacity = capacity;
        assembly {
            let ptr := mload(0x40)
            mstore(buf, ptr)
            mstore(ptr, 0)
            mstore(0x40, add(32, add(ptr, capacity)))
        }
        return buf;
    }


    /**
     * @dev Writes a byte string to a buffer. Resizes if doing so would exceed
     *      the capacity of the buffer.
     * @param buf The buffer to append to.
     * @param off The start offset to write to.
     * @param rawData The data to append.
     * @param len The number of bytes to copy.
     * @return The original buffer, for chaining.
     */
    function writeRawBytes(
        buffer memory buf,
        uint off,
        bytes memory rawData,
        uint offData,
        uint len
    ) internal pure returns (buffer memory) {
        if (off + len > buf.capacity) {
            resize(buf, max(buf.capacity, len + off) * 2);
        }

        uint dest;
        uint src;
        assembly {
            // Memory address of the buffer data
            let bufptr := mload(buf)
            // Length of existing buffer data
            let buflen := mload(bufptr)
            // Start address = buffer address + offset + sizeof(buffer length)
            dest := add(add(bufptr, 32), off)
            // Update buffer length if we're extending it
            if gt(add(len, off), buflen) {
                mstore(bufptr, add(len, off))
            }
            src := add(rawData, offData)
        }

        // Copy word-length chunks while possible
        for (; len >= 32; len -= 32) {
            assembly {
                mstore(dest, mload(src))
            }
            dest += 32;
            src += 32;
        }

        // Copy remaining bytes
        uint mask = 256**(32 - len) - 1;
        assembly {
            let srcpart := and(mload(src), not(mask))
            let destpart := and(mload(dest), mask)
            mstore(dest, or(destpart, srcpart))
        }

        return buf;
    }

    /**
     * @dev Writes a byte string to a buffer. Resizes if doing so would exceed
     *      the capacity of the buffer.
     * @param buf The buffer to append to.
     * @param off The start offset to write to.
     * @param data The data to append.
     * @param len The number of bytes to copy.
     * @return The original buffer, for chaining.
     */
    function write(buffer memory buf, uint off, bytes memory data, uint len) internal pure returns (buffer memory) {
        require(len <= data.length);

        if (off + len > buf.capacity) {
            resize(buf, max(buf.capacity, len + off) * 2);
        }

        uint dest;
        uint src;
        assembly {
        // Memory address of the buffer data
            let bufptr := mload(buf)
        // Length of existing buffer data
            let buflen := mload(bufptr)
        // Start address = buffer address + offset + sizeof(buffer length)
            dest := add(add(bufptr, 32), off)
        // Update buffer length if we're extending it
            if gt(add(len, off), buflen) {
                mstore(bufptr, add(len, off))
            }
            src := add(data, 32)
        }

        // Copy word-length chunks while possible
        for (; len >= 32; len -= 32) {
            assembly {
                mstore(dest, mload(src))
            }
            dest += 32;
            src += 32;
        }

        // Copy remaining bytes
        uint mask = 256**(32 - len) - 1;
        assembly {
            let srcpart := and(mload(src), not(mask))
            let destpart := and(mload(dest), mask)
            mstore(dest, or(destpart, srcpart))
        }

        return buf;
    }

    function append(buffer memory buf, bytes memory data) internal pure returns (buffer memory) {
        return write(buf, buf.buf.length, data, data.length);
    }

    function resize(buffer memory buf, uint capacity) private pure {
        bytes memory oldbuf = buf.buf;
        init(buf, capacity);
        append(buf, oldbuf);
    }

    function max(uint a, uint b) private pure returns (uint) {
        if (a > b) {
            return a;
        }
        return b;
    }
}

File 3 of 6: ILayerZeroValidationLibrary.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity >=0.7.0;
pragma abicoder v2;

import "./LayerZeroPacket.sol";

interface ILayerZeroValidationLibrary {
    function validateProof(bytes32 blockData, bytes calldata _data, uint _remoteAddressSize) external returns (LayerZeroPacket.Packet memory packet);
}

File 4 of 6: IValidationLibraryHelperV2.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity >=0.7.0;
pragma abicoder v2;

import "./LayerZeroPacket.sol";

interface IValidationLibraryHelperV2 {
    struct ULNLog {
        bytes32 contractAddress;
        bytes32 topicZeroSig;
        bytes data;
    }

    function getVerifyLog(bytes32 hashRoot, uint[] calldata receiptSlotIndex, uint logIndex, bytes[] calldata proof) external pure returns (ULNLog memory);

    function getPacket(bytes calldata data, uint sizeOfSrcAddress, bytes32 ulnAddress) external pure returns (LayerZeroPacket.Packet memory);

    function getUtilsVersion() external view returns (uint8);

    function getProofType() external view returns (uint8);
}

File 5 of 6: LayerZeroPacket.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity 0.7.6;

import "./Buffer.sol";
import "./SafeMath.sol";

library LayerZeroPacket {
    using Buffer for Buffer.buffer;
    using SafeMath for uint;

    struct Packet {
        uint16 srcChainId;
        uint16 dstChainId;
        uint64 nonce;
        address dstAddress;
        bytes srcAddress;
        bytes32 ulnAddress;
        bytes payload;
    }

    function getPacket(
        bytes memory data,
        uint16 srcChain,
        uint sizeOfSrcAddress,
        bytes32 ulnAddress
    ) internal pure returns (LayerZeroPacket.Packet memory) {
        uint16 dstChainId;
        address dstAddress;
        uint size;
        uint64 nonce;

        // The log consists of the destination chain id and then a bytes payload
        //      0--------------------------------------------31
        // 0   |  total bytes size
        // 32  |  destination chain id
        // 64  |  bytes offset
        // 96  |  bytes array size
        // 128 |  payload
        assembly {
            dstChainId := mload(add(data, 32))
            size := mload(add(data, 96)) /// size of the byte array
            nonce := mload(add(data, 104)) // offset to convert to uint64  128  is index -24
            dstAddress := mload(add(data, sub(add(128, sizeOfSrcAddress), 4))) // offset to convert to address 12 -8
        }

        Buffer.buffer memory srcAddressBuffer;
        srcAddressBuffer.init(sizeOfSrcAddress);
        srcAddressBuffer.writeRawBytes(0, data, 136, sizeOfSrcAddress); // 128 + 8

        uint payloadSize = size.sub(28).sub(sizeOfSrcAddress);
        Buffer.buffer memory payloadBuffer;
        payloadBuffer.init(payloadSize);
        payloadBuffer.writeRawBytes(0, data, sizeOfSrcAddress.add(156), payloadSize); // 148 + 8
        return LayerZeroPacket.Packet(srcChain, dstChainId, nonce, dstAddress, srcAddressBuffer.buf, ulnAddress, payloadBuffer.buf);
    }

    function getPacketV2(
        bytes memory data,
        uint sizeOfSrcAddress,
        bytes32 ulnAddress
    ) internal pure returns (LayerZeroPacket.Packet memory) {
        // packet def: abi.encodePacked(nonce, srcChain, srcAddress, dstChain, dstAddress, payload);
        // data def: abi.encode(packet) = offset(32) + length(32) + packet
        //              if from EVM
        // 0 - 31       0 - 31          |  total bytes size
        // 32 - 63      32 - 63         |  location
        // 64 - 95      64 - 95         |  size of the packet
        // 96 - 103     96 - 103        |  nonce
        // 104 - 105    104 - 105       |  srcChainId
        // 106 - P      106 - 125       |  srcAddress, where P = 106 + sizeOfSrcAddress - 1,
        // P+1 - P+2    126 - 127       |  dstChainId
        // P+3 - P+22   128 - 147       |  dstAddress
        // P+23 - END   148 - END       |  payload

        // decode the packet
        uint256 realSize;
        uint64 nonce;
        uint16 srcChain;
        uint16 dstChain;
        address dstAddress;
        assembly {
            realSize := mload(add(data, 64))
            nonce := mload(add(data, 72)) // 104 - 32
            srcChain := mload(add(data, 74)) // 106 - 32
            dstChain := mload(add(data, add(76, sizeOfSrcAddress))) // P + 3 - 32 = 105 + size + 3 - 32 = 76 + size
            dstAddress := mload(add(data, add(96, sizeOfSrcAddress))) // P + 23 - 32 = 105 + size + 23 - 32 = 96 + size
        }

        require(srcChain != 0, "LayerZeroPacket: invalid packet");

        Buffer.buffer memory srcAddressBuffer;
        srcAddressBuffer.init(sizeOfSrcAddress);
        srcAddressBuffer.writeRawBytes(0, data, 106, sizeOfSrcAddress);

        uint nonPayloadSize = sizeOfSrcAddress.add(32);// 2 + 2 + 8 + 20, 32 + 20 = 52 if sizeOfSrcAddress == 20
        uint payloadSize = realSize.sub(nonPayloadSize);
        Buffer.buffer memory payloadBuffer;
        payloadBuffer.init(payloadSize);
        payloadBuffer.writeRawBytes(0, data, nonPayloadSize.add(96), payloadSize);

        return LayerZeroPacket.Packet(srcChain, dstChain, nonce, dstAddress, srcAddressBuffer.buf, ulnAddress, payloadBuffer.buf);
    }

    function getPacketV3(
        bytes memory data,
        uint sizeOfSrcAddress,
        bytes32 ulnAddress
    ) internal pure returns (LayerZeroPacket.Packet memory) {
        // data def: abi.encodePacked(nonce, srcChain, srcAddress, dstChain, dstAddress, payload);
        //              if from EVM
        // 0 - 31       0 - 31          |  total bytes size
        // 32 - 39      32 - 39         |  nonce
        // 40 - 41      40 - 41         |  srcChainId
        // 42 - P       42 - 61         |  srcAddress, where P = 41 + sizeOfSrcAddress,
        // P+1 - P+2    62 - 63         |  dstChainId
        // P+3 - P+22   64 - 83         |  dstAddress
        // P+23 - END   84 - END        |  payload

        // decode the packet
        uint256 realSize = data.length;
        uint nonPayloadSize = sizeOfSrcAddress.add(32);// 2 + 2 + 8 + 20, 32 + 20 = 52 if sizeOfSrcAddress == 20
        require(realSize >= nonPayloadSize, "LayerZeroPacket: invalid packet");
        uint payloadSize = realSize - nonPayloadSize;

        uint64 nonce;
        uint16 srcChain;
        uint16 dstChain;
        address dstAddress;
        assembly {
            nonce := mload(add(data, 8)) // 40 - 32
            srcChain := mload(add(data, 10)) // 42 - 32
            dstChain := mload(add(data, add(12, sizeOfSrcAddress))) // P + 3 - 32 = 41 + size + 3 - 32 = 12 + size
            dstAddress := mload(add(data, add(32, sizeOfSrcAddress))) // P + 23 - 32 = 41 + size + 23 - 32 = 32 + size
        }

        require(srcChain != 0, "LayerZeroPacket: invalid packet");

        Buffer.buffer memory srcAddressBuffer;
        srcAddressBuffer.init(sizeOfSrcAddress);
        srcAddressBuffer.writeRawBytes(0, data, 42, sizeOfSrcAddress);

        Buffer.buffer memory payloadBuffer;
        if (payloadSize > 0) {
            payloadBuffer.init(payloadSize);
            payloadBuffer.writeRawBytes(0, data, nonPayloadSize.add(32), payloadSize);
        }

        return LayerZeroPacket.Packet(srcChain, dstChain, nonce, dstAddress, srcAddressBuffer.buf, ulnAddress, payloadBuffer.buf);
    }
}

File 6 of 6: SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.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, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, 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) {
        // 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);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @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) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @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) {
        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, reverting 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) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting 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) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * 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);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * 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);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * 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;
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_stargateBridgeAddress","type":"address"},{"internalType":"address","name":"_stargateTokenAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"sizeOfSrcAddress","type":"uint256"},{"internalType":"bytes32","name":"ulnAddress","type":"bytes32"}],"name":"getPacket","outputs":[{"components":[{"internalType":"uint16","name":"srcChainId","type":"uint16"},{"internalType":"uint16","name":"dstChainId","type":"uint16"},{"internalType":"uint64","name":"nonce","type":"uint64"},{"internalType":"address","name":"dstAddress","type":"address"},{"internalType":"bytes","name":"srcAddress","type":"bytes"},{"internalType":"bytes32","name":"ulnAddress","type":"bytes32"},{"internalType":"bytes","name":"payload","type":"bytes"}],"internalType":"struct LayerZeroPacket.Packet","name":"","type":"tuple"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getProofType","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getUtilsVersion","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes[]","name":"proof","type":"bytes[]"}],"name":"getVerifyLog","outputs":[{"components":[{"internalType":"bytes32","name":"contractAddress","type":"bytes32"},{"internalType":"bytes32","name":"topicZeroSig","type":"bytes32"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct IValidationLibraryHelperV2.ULNLog","name":"log","type":"tuple"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"proofType","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"secureStgPayload","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"secureStgTokenPayload","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"stargateBridgeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stargateTokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"utilsVersion","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_packetHash","type":"bytes32"},{"internalType":"bytes","name":"_transactionProof","type":"bytes"},{"internalType":"uint256","name":"_remoteAddressSize","type":"uint256"}],"name":"validateProof","outputs":[{"components":[{"internalType":"uint16","name":"srcChainId","type":"uint16"},{"internalType":"uint16","name":"dstChainId","type":"uint16"},{"internalType":"uint64","name":"nonce","type":"uint64"},{"internalType":"address","name":"dstAddress","type":"address"},{"internalType":"bytes","name":"srcAddress","type":"bytes"},{"internalType":"bytes32","name":"ulnAddress","type":"bytes32"},{"internalType":"bytes","name":"payload","type":"bytes"}],"internalType":"struct LayerZeroPacket.Packet","name":"packet","type":"tuple"}],"stateMutability":"view","type":"function"}]

60c06040526000805461ff001960ff199091166002171661010017905534801561002857600080fd5b5060405161146738038061146783398101604081905261004791610081565b6001600160601b0319606092831b8116608052911b1660a0526100b3565b80516001600160a01b038116811461007c57600080fd5b919050565b60008060408385031215610093578182fd5b61009c83610065565b91506100aa60208401610065565b90509250929050565b60805160601c60a05160601c6113816100e6600039806103dc528061045f525080610200528061037152506113816000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80636348d26911610081578063d633ad611161005b578063d633ad6114610184578063e965c1921461018c578063ea455df914610194576100c9565b80636348d269146101545780639bcd850f14610169578063b71e0f7114610171576100c9565b80632ff20449116100b25780632ff204491461010c57806347713b391461012c5780635711c2a814610134576100c9565b806305af5d35146100ce5780630f222e65146100ec575b600080fd5b6100d66101a7565b6040516100e391906111e3565b60405180910390f35b6100ff6100fa366004610cfa565b6101b0565b6040516100e391906111b4565b61011f61011a366004610e6f565b6101c2565b6040516100e39190611106565b6100d66101dd565b610147610142366004610df7565b6101eb565b6040516100e3919061103d565b61015c6101fe565b6040516100e3919061101c565b6100d6610222565b61011f61017f366004610d7a565b61022b565b6100d661044f565b61015c61045d565b6101476101a2366004610df7565b610481565b60005460ff1681565b6101b8610aeb565b9695505050505050565b6101ca610b0a565b6101d584848461048c565b949350505050565b600054610100900460ff1681565b60606101f682610666565b90505b919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60005460ff1690565b610233610b0a565b60008211610276576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161026d906110cf565b60405180910390fd5b60208311801561029c575084848460405161029292919061100c565b6040518091039020145b6102d2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161026d90611072565b60006102e160208286886112f7565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505060208083015192935061036d915061032f908790818a6112f7565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525088925085915061048c9050565b92507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16836060015173ffffffffffffffffffffffffffffffffffffffff1614156103da576103d48360c00151610666565b60c08401525b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16836060015173ffffffffffffffffffffffffffffffffffffffff1614156104455761043f8360c00151610787565b60c08401525b5050949350505050565b600054610100900460ff1690565b7f000000000000000000000000000000000000000000000000000000000000000081565b60606101f682610787565b610494610b0a565b835160006104a3856020610831565b90508082101561051457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f4c617965725a65726f5061636b65743a20696e76616c6964207061636b657400604482015290519081900360640190fd5b6008860151600a870151868801600c8101516020909101518486039392919061ffff83166105a357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f4c617965725a65726f5061636b65743a20696e76616c6964207061636b657400604482015290519081900360640190fd5b6105ab610b48565b6105b5818c6108ae565b506105c58160008e602a8f6108e8565b506105ce610b48565b86156105fc576105de81886108ae565b506105fa60008e6105f08b6020610831565b849291908b6108e8565b505b6040805160e08101825261ffff968716815294909516602085015267ffffffffffffffff9095169383019390935273ffffffffffffffffffffffffffffffffffffffff1660608201529051608082015260a08101879052905160c082015293505050509392505050565b6020810151606090600160ff82161415610780576000806000806000806000898060200190518101906106999190610ebb565b975097509750975097509750975050600081511115610778578151600090156106c3575060148201515b803b80610775576000826040516020016106dd9190610fdc565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815260208381018352600080855292519194509192610733928f928f928f928f928f928f928b92016111f1565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190529c506101f99b505050505050505050505050565b50505b505050505050505b5090919050565b6060600080838060200190518101906107a09190610e2a565b91509150600080835111156107b6575060148201515b73ffffffffffffffffffffffffffffffffffffffff81166108285760405161dead906000906107e9908390602001610fdc565b6040516020818303038152906040529050808460405160200161080d929190611050565b604051602081830303815290604052955050505050506101f9565b50929392505050565b6000828201838110156108a557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b6108b6610b48565b60208206156108cb5760208206602003820191505b506020828101829052604080518085526000815290920101905290565b6108f0610b48565b8560200151828601111561091a5761091a8661091288602001518886016109c2565b6002026109d9565b6000808751805188602083010193508089870111156109395788860182525b5050508484015b6020841061097d57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09093019260209182019101610940565b5181517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60208690036101000a01908116901991909116179052508495945050505050565b6000818311156109d35750816108a8565b50919050565b81516109e583836108ae565b506109f083826109f6565b50505050565b6109fe610b48565b6108a583846000015151848551610a13610b48565b8251821115610a2157600080fd5b84602001518285011115610a4357610a438561091287602001518786016109c2565b600080865180518760208301019350808887011115610a625787860182525b505050602084015b60208410610aa757805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09093019260209182019101610a6a565b5181517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60208690036101000a019081169019919091161790525083949350505050565b6040805160608082018352600080835260208301529181019190915290565b6040805160e08101825260008082526020820181905291810182905260608082018390526080820181905260a082019290925260c081019190915290565b604051806040016040528060608152602001600081525090565b60008083601f840112610b73578081fd5b50813567ffffffffffffffff811115610b8a578182fd5b6020830191508360208083028501011115610ba457600080fd5b9250929050565b600082601f830112610bbb578081fd5b8135610bce610bc9826112b7565b611293565b818152846020838601011115610be2578283fd5b816020850160208301379081016020019190915292915050565b600082601f830112610c0c578081fd5b8151610c1a610bc9826112b7565b818152846020838601011115610c2e578283fd5b6101d582602083016020870161131f565b600060408284031215610c50578081fd5b6040516040810181811067ffffffffffffffff82111715610c6d57fe5b604052825181526020928301519281019290925250919050565b600060c08284031215610c98578081fd5b60405160c0810181811067ffffffffffffffff82111715610cb557fe5b8060405250809150825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a08201525092915050565b60008060008060008060808789031215610d12578182fd5b86359550602087013567ffffffffffffffff80821115610d30578384fd5b610d3c8a838b01610b62565b9097509550604089013594506060890135915080821115610d5b578384fd5b50610d6889828a01610b62565b979a9699509497509295939492505050565b60008060008060608587031215610d8f578384fd5b84359350602085013567ffffffffffffffff80821115610dad578485fd5b818701915087601f830112610dc0578485fd5b813581811115610dce578586fd5b886020828501011115610ddf578586fd5b95986020929092019750949560400135945092505050565b600060208284031215610e08578081fd5b813567ffffffffffffffff811115610e1e578182fd5b6101d584828501610bab565b60008060408385031215610e3c578182fd5b825167ffffffffffffffff811115610e52578283fd5b610e5e85828601610bfc565b925050602083015190509250929050565b600080600060608486031215610e83578283fd5b833567ffffffffffffffff811115610e99578384fd5b610ea586828701610bab565b9660208601359650604090950135949350505050565b6000806000806000806000806101c0898b031215610ed7578182fd5b885160ff81168114610ee7578283fd5b80985050602089015196506040890151955060608901519450610f0d8a60808b01610c3f565b9350610f1c8a60c08b01610c87565b925061018089015167ffffffffffffffff80821115610f39578384fd5b610f458c838d01610bfc565b93506101a08b0151915080821115610f5b578283fd5b50610f688b828c01610bfc565b9150509295985092959890939650565b73ffffffffffffffffffffffffffffffffffffffff169052565b60008151808452610faa81602086016020860161131f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016815260140190565b6000828483379101908152919050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b6000602082526108a56020830184610f92565b6000604082526110636040830185610f92565b90508260208301529392505050565b60208082526023908201527f50726f6f664c69623a20696e76616c6964207472616e73616374696f6e20707260408201527f6f6f660000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601e908201527f50726f6f664c69623a20696e76616c696420616464726573732073697a650000604082015260600190565b60006020825261ffff8084511660208401528060208501511660408401525067ffffffffffffffff6040840151166060830152606083015161114b6080840182610f78565b50608083015160e060a0840152611166610100840182610f92565b905060a084015160c084015260c08401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08483030160e08501526111ab8282610f92565b95945050505050565b600060208252825160208301526020830151604083015260408301516060808401526101d56080840182610f92565b60ff91909116815260200190565b60006101c060ff8b16835289602084015288604084015287606084015286516080840152602087015160a0840152855160c0840152602086015160e084015260408601516101008401526060860151610120840152608086015161014084015260a08601516101608401528061018084015261126f81840186610f92565b90508281036101a08401526112848185610f92565b9b9a5050505050505050505050565b60405181810167ffffffffffffffff811182821017156112af57fe5b604052919050565b600067ffffffffffffffff8211156112cb57fe5b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60008085851115611306578182fd5b83861115611312578182fd5b5050820193919092039150565b60005b8381101561133a578181015183820152602001611322565b838111156109f0575050600091015256fea26469706673582212200b4f78e34b5688581d76fe7d274a93eea70ee98c0e3d891e92de726f9917bed364736f6c63430007060033000000000000000000000000296f55f8fb28e498b858d0bcda06d955b2cb3f97000000000000000000000000af5191b0de278c7286d6c7cc6ab6bb8a73ba2cd6

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000296f55f8fb28e498b858d0bcda06d955b2cb3f97000000000000000000000000af5191b0de278c7286d6c7cc6ab6bb8a73ba2cd6

-----Decoded View---------------
Arg [0] : _stargateBridgeAddress (address): 0x296F55F8Fb28E498B858d0BcDA06D955B2Cb3f97
Arg [1] : _stargateTokenAddress (address): 0xAf5191B0De278C7286d6C7CC6ab6BB8A73bA2Cd6

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000296f55f8fb28e498b858d0bcda06d955b2cb3f97
Arg [1] : 000000000000000000000000af5191b0de278c7286d6c7cc6ab6bb8a73ba2cd6


Deployed ByteCode Sourcemap

519:5524:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;605:26;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;5673:131;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;5810:231::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;637:29::-;;;:::i;5320:137::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;673:46::-;;;:::i;:::-;;;;;;;:::i;5571:96::-;;;:::i;975:990::-;;;;;;:::i;:::-;;:::i;5463:102::-;;;:::i;725:45::-;;;:::i;5167:147::-;;;;;;:::i;:::-;;:::i;605:26::-;;;;;;:::o;5673:131::-;5783:17;;:::i;:::-;5673:131;;;;;;;;:::o;5810:231::-;5923:29;;:::i;:::-;5971:63;5999:4;6005:16;6023:10;5971:27;:63::i;:::-;5964:70;5810:231;-1:-1:-1;;;;5810:231:1:o;637:29::-;;;;;;;;;:::o;5320:137::-;5392:12;5423:27;5441:8;5423:17;:27::i;:::-;5416:34;;5320:137;;;;:::o;673:46::-;;;:::o;5571:96::-;5627:5;5651:9;;;5571:96;:::o;975:990::-;1110:36;;:::i;:::-;1187:1;1166:18;:22;1158:65;;;;;;;;;;;;:::i;:::-;;;;;;;;;1335:2;1308:29;;:76;;;;;1373:11;1351:17;;1341:28;;;;;;;:::i;:::-;;;;;;;;:43;1308:76;1300:124;;;;;;;;;;;;:::i;:::-;1435:28;1472:23;1492:2;1435:28;1472:17;;:23;:::i;:::-;1435:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1598:2:1;1577:24;;;1571:31;1435:61;;-1:-1:-1;1630:83:1;;-1:-1:-1;1658:22:1;;:17;;;;:22;:::i;:::-;1630:83;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1682:18:1;;-1:-1:-1;1702:10:1;;-1:-1:-1;1630:27:1;;-1:-1:-1;1630:83:1:i;:::-;1621:92;;1749:21;1728:42;;:6;:17;;;:42;;;1724:98;;;1789:33;1807:6;:14;;;1789:17;:33::i;:::-;1772:14;;;:50;1724:98;1857:20;1836:41;;:6;:17;;;:41;;;1832:102;;;1896:38;1919:6;:14;;;1896:22;:38::i;:::-;1879:14;;;:55;1832:102;1945:13;;975:990;;;;;;:::o;5463:102::-;5522:5;5546:12;;;;;;;5463:102::o;725:45::-;;;:::o;5167:147::-;5244:12;5275:32;5298:8;5275:22;:32::i;4145:2094:4:-;4281:29;;:::i;:::-;4916:11;;4897:16;4959:24;:16;4980:2;4959:20;:24::i;:::-;4937:46;;5070:14;5058:8;:26;;5050:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5333:1;5323:12;;5317:19;5388:2;5378:13;;5372:20;5434:36;;;5448:2;5434:36;;5428:43;5565:2;5551:36;;;5545:43;5149:25;;;;5317:19;5372:20;5428:43;5665:13;;;5657:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5725:37;;:::i;:::-;5772:39;:16;5794;5772:21;:39::i;:::-;-1:-1:-1;5821:61:4;:16;5852:1;5855:4;5861:2;5865:16;5821:30;:61::i;:::-;;5893:34;;:::i;:::-;5941:15;;5937:164;;5972:31;:13;5991:11;5972:18;:31::i;:::-;-1:-1:-1;6017:73:4;6045:1;6048:4;6054:22;:14;6073:2;6054:18;:22::i;:::-;6017:13;;:73;;6078:11;6017:27;:73::i;:::-;;5937:164;6118:114;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6180:20;;6118:114;;;;;;;;;;6214:17;;6118:114;;;;;-1:-1:-1;;;;4145:2094:4;;;;;:::o;2696:2465:1:-;2971:2;2957:17;;2951:24;2769:12;;3281:1;3265:17;;;;3261:1818;;;3351:14;3367;3383:18;3403:28;3433:26;3461:27;3490:32;3537:8;3526:101;;;;;;;;;;;;:::i;:::-;3348:279;;;;;;;;;;;;;;;3777:1;3748:19;:26;:30;3744:1325;;;3943:21;;3891:17;;3943:25;3939:171;;-1:-1:-1;4066:2:1;4046:23;;4040:30;4001:91;4506:22;;4568:9;4564:491;;4786:30;4836:9;4819:27;;;;;;;;:::i;:::-;;;;;;;;;;;;4984:9;;;;;4868:26;4984:9;;;4897:97;;4819:27;;-1:-1:-1;4868:26:1;;4897:97;;4908:12;;4922:9;;4933;;4944:13;;4959:1;;4962;;4819:27;;4897:97;;:::i;:::-;;;;;;;;;;;;;;;-1:-1:-1;5016:20:1;;-1:-1:-1;;;;;;;;;;;;5016:20:1;4564:491;3744:1325;;;3261:1818;;;;;;;;-1:-1:-1;5146:8:1;;2696:2465;-1:-1:-1;2696:2465:1:o;1971:719::-;2049:12;2074:27;2103:8;2126;2115:35;;;;;;;;;;;;:::i;:::-;2073:77;;;;2161:17;2229:1;2205:14;:21;:25;2201:139;;;-1:-1:-1;2312:2:1;2292:23;;2286:30;2255:75;2354:23;;;2350:258;;2513:29;;2423:42;;2393:19;;2513:29;;2423:42;;2513:29;;;:::i;:::-;;;;;;;;;;;;;2480:62;;2574:17;2593:3;2563:34;;;;;;;;;:::i;:::-;;;;;;;;;;;;;2556:41;;;;;;;;;2350:258;-1:-1:-1;2675:8:1;;1971:719;-1:-1:-1;;;1971:719:1:o;2682:175:5:-;2740:7;2771:5;;;2794:6;;;;2786:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2849:1;-1:-1:-1;2682:175:5;;;;;:::o;1076:456:0:-;1147:13;;:::i;:::-;1187:2;1176:8;:13;:18;1172:81;;1239:2;1228:8;:13;1222:2;:20;1210:32;;;;1172:81;-1:-1:-1;1308:12:0;;;;:23;;;1381:4;1375:11;;1399:16;;;-1:-1:-1;1428:14:0;;1476:18;;;1468:27;1455:41;;1308:12;1076:456::o;1904:1366::-;2071:13;;:::i;:::-;2112:3;:12;;;2106:3;2100;:9;:24;2096:100;;;2140:45;2147:3;2152:28;2156:3;:12;;;2176:3;2170;:9;2152:3;:28::i;:::-;2183:1;2152:32;2140:6;:45::i;:::-;2206:9;2225:8;2335:3;2329:10;2418:6;2412:13;2546:3;2541:2;2533:6;2529:15;2525:25;2517:33;;2642:6;2636:3;2631;2627:13;2624:25;2621:2;;;2692:3;2687;2683:13;2675:6;2668:29;2621:2;-1:-1:-1;;;2731:21:0;;;2822:165;2836:2;2829:3;:9;2822:165;;2905:10;;2892:24;;2840:9;;;;;2951:2;2943:10;;;;2967:9;2822:165;;;3112:10;3167:11;;3041:19;3047:2;:8;;;3041:3;:15;:19;3163:22;;;3124:9;;3108:26;;;;3211:21;3198:35;;-1:-1:-1;3260:3:0;1904:1366;;;;;;;:::o;5293:135::-;5344:4;5368:1;5364;:5;5360:44;;;-1:-1:-1;5392:1:0;5385:8;;5360:44;-1:-1:-1;5420:1:0;5293:135;-1:-1:-1;5293:135:0:o;5120:167::-;5215:7;;5232:19;5215:3;5242:8;5232:4;:19::i;:::-;;5261;5268:3;5273:6;5261;:19::i;:::-;;5120:167;;;:::o;4953:161::-;5030:13;;:::i;:::-;5062:45;5068:3;5073;:7;;;:14;5089:4;5095;:11;3734:13;;:::i;:::-;3774:4;:11;3767:3;:18;;3759:27;;;;;;3813:3;:12;;;3807:3;3801;:9;:24;3797:100;;;3841:45;3848:3;3853:28;3857:3;:12;;;3877:3;3871;:9;3853:3;:28::i;3841:45::-;3907:9;3926:8;4032:3;4026:10;4111:6;4105:13;4235:3;4230:2;4222:6;4218:15;4214:25;4206:33;;4327:6;4321:3;4316;4312:13;4309:25;4306:2;;;4377:3;4372;4368:13;4360:6;4353:29;4306:2;-1:-1:-1;;;4426:2:0;4416:13;;4499:165;4513:2;4506:3;:9;4499:165;;4582:10;;4569:24;;4517:9;;;;;4628:2;4620:10;;;;4644:9;4499:165;;;4789:10;4844:11;;4718:19;4724:2;:8;;;4718:3;:15;:19;4840:22;;;4801:9;;4785:26;;;;4888:21;4875:35;;-1:-1:-1;4937:3:0;3638:1309;;;;;;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;:::o;14:407:6:-;;;154:3;147:4;139:6;135:17;131:27;121:2;;177:6;169;162:22;121:2;-1:-1:-1;205:20:6;;248:18;237:30;;234:2;;;287:8;277;270:26;234:2;331:4;323:6;319:17;307:29;;394:3;387:4;379;371:6;367:17;359:6;355:30;351:41;348:50;345:2;;;411:1;408;401:12;345:2;111:310;;;;;:::o;426:485::-;;523:3;516:4;508:6;504:17;500:27;490:2;;545:5;538;531:20;490:2;585:6;572:20;616:49;631:33;661:2;631:33;:::i;:::-;616:49;:::i;:::-;690:2;681:7;674:19;736:3;729:4;724:2;716:6;712:15;708:26;705:35;702:2;;;757:5;750;743:20;702:2;826;819:4;811:6;807:17;800:4;791:7;787:18;774:55;849:16;;;867:4;845:27;838:42;;;;853:7;480:431;-1:-1:-1;;480:431:6:o;916:447::-;;1024:3;1017:4;1009:6;1005:17;1001:27;991:2;;1046:5;1039;1032:20;991:2;1079:6;1073:13;1110:49;1125:33;1155:2;1125:33;:::i;1110:49::-;1184:2;1175:7;1168:19;1230:3;1223:4;1218:2;1210:6;1206:15;1202:26;1199:35;1196:2;;;1251:5;1244;1237:20;1196:2;1268:64;1329:2;1322:4;1313:7;1309:18;1302:4;1294:6;1290:17;1268:64;:::i;1368:477::-;;1486:4;1474:9;1469:3;1465:19;1461:30;1458:2;;;1508:5;1501;1494:20;1458:2;1545:4;1539:11;1589:4;1581:6;1577:17;1660:6;1648:10;1645:22;1624:18;1612:10;1609:34;1606:62;1603:2;;;1671:9;1603:2;1698:4;1691:24;1763:16;;1748:32;;1834:2;1819:18;;;1813:25;1796:15;;;1789:50;;;;-1:-1:-1;1733:6:6;1448:397;-1:-1:-1;1448:397:6:o;1850:711::-;;1966:4;1954:9;1949:3;1945:19;1941:30;1938:2;;;1988:5;1981;1974:20;1938:2;2025;2019:9;2067:4;2059:6;2055:17;2138:6;2126:10;2123:22;2102:18;2090:10;2087:34;2084:62;2081:2;;;2149:9;2081:2;2180:10;2176:2;2169:22;;2209:6;2200:15;;2245:9;2239:16;2231:6;2224:32;2310:2;2299:9;2295:18;2289:25;2284:2;2276:6;2272:15;2265:50;2369:2;2358:9;2354:18;2348:25;2343:2;2335:6;2331:15;2324:50;2428:2;2417:9;2413:18;2407:25;2402:2;2394:6;2390:15;2383:50;2488:3;2477:9;2473:19;2467:26;2461:3;2453:6;2449:16;2442:52;2549:3;2538:9;2534:19;2528:26;2522:3;2514:6;2510:16;2503:52;;1928:633;;;;:::o;2566:977::-;;;;;;;2810:3;2798:9;2789:7;2785:23;2781:33;2778:2;;;2832:6;2824;2817:22;2778:2;2873:9;2860:23;2850:33;;2934:2;2923:9;2919:18;2906:32;2957:18;2998:2;2990:6;2987:14;2984:2;;;3019:6;3011;3004:22;2984:2;3063:83;3138:7;3129:6;3118:9;3114:22;3063:83;:::i;:::-;3165:8;;-1:-1:-1;3037:109:6;-1:-1:-1;3247:2:6;3232:18;;3219:32;;-1:-1:-1;3304:2:6;3289:18;;3276:32;;-1:-1:-1;3320:16:6;;;3317:2;;;3354:6;3346;3339:22;3317:2;;3398:85;3475:7;3464:8;3453:9;3449:24;3398:85;:::i;:::-;2768:775;;;;-1:-1:-1;2768:775:6;;-1:-1:-1;2768:775:6;;3502:8;;2768:775;-1:-1:-1;;;2768:775:6:o;3548:777::-;;;;;3713:2;3701:9;3692:7;3688:23;3684:32;3681:2;;;3734:6;3726;3719:22;3681:2;3775:9;3762:23;3752:33;;3836:2;3825:9;3821:18;3808:32;3859:18;3900:2;3892:6;3889:14;3886:2;;;3921:6;3913;3906:22;3886:2;3964:6;3953:9;3949:22;3939:32;;4009:7;4002:4;3998:2;3994:13;3990:27;3980:2;;4036:6;4028;4021:22;3980:2;4081;4068:16;4107:2;4099:6;4096:14;4093:2;;;4128:6;4120;4113:22;4093:2;4178:7;4173:2;4164:6;4160:2;4156:15;4152:24;4149:37;4146:2;;;4204:6;4196;4189:22;4146:2;3671:654;;4240:2;4232:11;;;;;-1:-1:-1;4262:6:6;;4315:2;4300:18;4287:32;;-1:-1:-1;3671:654:6;-1:-1:-1;;;3671:654:6:o;4330:342::-;;4451:2;4439:9;4430:7;4426:23;4422:32;4419:2;;;4472:6;4464;4457:22;4419:2;4517:9;4504:23;4550:18;4542:6;4539:30;4536:2;;;4587:6;4579;4572:22;4536:2;4615:51;4658:7;4649:6;4638:9;4634:22;4615:51;:::i;4677:418::-;;;4826:2;4814:9;4805:7;4801:23;4797:32;4794:2;;;4847:6;4839;4832:22;4794:2;4885:9;4879:16;4918:18;4910:6;4907:30;4904:2;;;4955:6;4947;4940:22;4904:2;4983:62;5037:7;5028:6;5017:9;5013:22;4983:62;:::i;:::-;4973:72;;;5085:2;5074:9;5070:18;5064:25;5054:35;;4784:311;;;;;:::o;5100:478::-;;;;5255:2;5243:9;5234:7;5230:23;5226:32;5223:2;;;5276:6;5268;5261:22;5223:2;5321:9;5308:23;5354:18;5346:6;5343:30;5340:2;;;5391:6;5383;5376:22;5340:2;5419:51;5462:7;5453:6;5442:9;5438:22;5419:51;:::i;:::-;5409:61;5517:2;5502:18;;5489:32;;-1:-1:-1;5568:2:6;5553:18;;;5540:32;;5213:365;-1:-1:-1;;;;5213:365:6:o;5583:1200::-;;;;;;;;;5891:3;5879:9;5870:7;5866:23;5862:33;5859:2;;;5913:6;5905;5898:22;5859:2;5950:9;5944:16;6000:4;5993:5;5989:16;5982:5;5979:27;5969:2;;6025:6;6017;6010:22;5969:2;6053:5;6043:15;;;6098:2;6087:9;6083:18;6077:25;6067:35;;6142:2;6131:9;6127:18;6121:25;6111:35;;6186:2;6175:9;6171:18;6165:25;6155:35;;6209:71;6272:7;6266:3;6255:9;6251:19;6209:71;:::i;:::-;6199:81;;6299:69;6360:7;6354:3;6343:9;6339:19;6299:69;:::i;:::-;6289:79;;6412:3;6401:9;6397:19;6391:26;6436:18;6477:2;6469:6;6466:14;6463:2;;;6498:6;6490;6483:22;6463:2;6526:62;6580:7;6571:6;6560:9;6556:22;6526:62;:::i;:::-;6516:72;;6634:3;6623:9;6619:19;6613:26;6597:42;;6664:2;6654:8;6651:16;6648:2;;;6685:6;6677;6670:22;6648:2;;6713:64;6769:7;6758:8;6747:9;6743:24;6713:64;:::i;:::-;6703:74;;;5849:934;;;;;;;;;;;:::o;6788:129::-;6867:42;6856:54;6844:67;;6834:83::o;6922:318::-;;7003:5;6997:12;7030:6;7025:3;7018:19;7046:63;7102:6;7095:4;7090:3;7086:14;7079:4;7072:5;7068:16;7046:63;:::i;:::-;7154:2;7142:15;7159:66;7138:88;7129:98;;;;7229:4;7125:109;;6973:267;-1:-1:-1;;6973:267:6:o;7245:264::-;7394:2;7390:15;;;;7407:66;7386:88;7374:101;;7500:2;7491:12;;7364:145::o;7514:273::-;;7697:6;7689;7684:3;7671:33;7723:16;;7748:15;;;7723:16;7661:126;-1:-1:-1;7661:126:6:o;7792:226::-;7968:42;7956:55;;;;7938:74;;7926:2;7911:18;;7893:125::o;8023:219::-;;8170:2;8159:9;8152:21;8190:46;8232:2;8221:9;8217:18;8209:6;8190:46;:::i;8247:290::-;;8422:2;8411:9;8404:21;8442:46;8484:2;8473:9;8469:18;8461:6;8442:46;:::i;:::-;8434:54;;8524:6;8519:2;8508:9;8504:18;8497:34;8394:143;;;;;:::o;8542:399::-;8744:2;8726:21;;;8783:2;8763:18;;;8756:30;8822:34;8817:2;8802:18;;8795:62;8893:5;8888:2;8873:18;;8866:33;8931:3;8916:19;;8716:225::o;8946:354::-;9148:2;9130:21;;;9187:2;9167:18;;;9160:30;9226:32;9221:2;9206:18;;9199:60;9291:2;9276:18;;9120:180::o;9305:1017::-;;9480:2;9469:9;9462:21;9502:6;9563:2;9554:6;9548:13;9544:22;9539:2;9528:9;9524:18;9517:50;9631:2;9625;9617:6;9613:15;9607:22;9603:31;9598:2;9587:9;9583:18;9576:59;;9699:18;9693:2;9685:6;9681:15;9675:22;9671:47;9666:2;9655:9;9651:18;9644:75;9766:2;9758:6;9754:15;9748:22;9779:55;9829:3;9818:9;9814:19;9800:12;9779:55;:::i;:::-;;9883:3;9875:6;9871:16;9865:23;9925:4;9919:3;9908:9;9904:19;9897:33;9953:55;10003:3;9992:9;9988:19;9972:14;9953:55;:::i;:::-;9939:69;;10063:3;10055:6;10051:16;10045:23;10039:3;10028:9;10024:19;10017:52;10118:3;10110:6;10106:16;10100:23;10189:66;10177:9;10169:6;10165:22;10161:95;10154:4;10143:9;10139:20;10132:125;10274:42;10309:6;10293:14;10274:42;:::i;:::-;10266:50;9452:870;-1:-1:-1;;;;;9452:870:6:o;10327:457::-;;10502:2;10491:9;10484:21;10547:6;10541:13;10536:2;10525:9;10521:18;10514:41;10609:2;10601:6;10597:15;10591:22;10586:2;10575:9;10571:18;10564:50;10661:2;10653:6;10649:15;10643:22;10703:4;10696;10685:9;10681:20;10674:34;10725:53;10773:3;10762:9;10758:19;10744:12;10725:53;:::i;10789:184::-;10961:4;10949:17;;;;10931:36;;10919:2;10904:18;;10886:87::o;10978:1316::-;;11427:3;11469:4;11461:6;11457:17;11446:9;11439:36;11511:6;11506:2;11495:9;11491:18;11484:34;11554:6;11549:2;11538:9;11534:18;11527:34;11597:6;11592:2;11581:9;11577:18;11570:34;11647:6;11641:13;11635:3;11624:9;11620:19;11613:42;11710:2;11702:6;11698:15;11692:22;11686:3;11675:9;11671:19;11664:51;11758:6;11752:13;11746:3;11735:9;11731:19;11724:42;11821:2;11813:6;11809:15;11803:22;11797:3;11786:9;11782:19;11775:51;11881:2;11873:6;11869:15;11863:22;11857:3;11846:9;11842:19;11835:51;11941:2;11933:6;11929:15;11923:22;11917:3;11906:9;11902:19;11895:51;12001:3;11993:6;11989:16;11983:23;11977:3;11966:9;11962:19;11955:52;12062:3;12054:6;12050:16;12044:23;12038:3;12027:9;12023:19;12016:52;12105:2;12099:3;12088:9;12084:19;12077:31;12131:46;12173:2;12162:9;12158:18;12150:6;12131:46;:::i;:::-;12117:60;;12226:9;12218:6;12214:22;12208:3;12197:9;12193:19;12186:51;12254:34;12281:6;12273;12254:34;:::i;:::-;12246:42;11407:887;-1:-1:-1;;;;;;;;;;;11407:887:6:o;12299:242::-;12369:2;12363:9;12399:17;;;12446:18;12431:34;;12467:22;;;12428:62;12425:2;;;12493:9;12425:2;12520;12513:22;12343:198;;-1:-1:-1;12343:198:6:o;12546:240::-;;12629:18;12621:6;12618:30;12615:2;;;12651:9;12615:2;-1:-1:-1;12699:4:6;12687:17;12706:66;12683:90;12775:4;12679:101;;12605:181::o;12791:363::-;;;12949:8;12937:10;12934:24;12931:2;;;12979:9;12968;12961:28;12931:2;13016:6;13006:8;13003:20;13000:2;;;13044:9;13033;13026:28;13000:2;-1:-1:-1;;13078:23:6;;;13123:25;;;;;-1:-1:-1;12921:233:6:o;13159:258::-;13231:1;13241:113;13255:6;13252:1;13249:13;13241:113;;;13331:11;;;13325:18;13312:11;;;13305:39;13277:2;13270:10;13241:113;;;13372:6;13369:1;13366:13;13363:2;;;-1:-1:-1;;13407:1:6;13389:16;;13382:27;13212:205::o

Swarm Source

ipfs://0b4f78e34b5688581d76fe7d274a93eea70ee98c0e3d891e92de726f9917bed3

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.

Validator Index Block Amount
View All Withdrawals

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.