Sepolia Testnet

Contract

0xCa71342cB02714374e61e400f172FF003497B2c2

Overview

ETH Balance

0 ETH

Multichain Info

N/A
Transaction Hash
Method
Block
From
To
Value
Set Context55526832024-03-24 18:09:3664 days ago1711303776IN
0xCa71342c...03497B2c2
0 ETH0.000078581.61652892
Claim And Set Co...55064772024-03-17 19:20:4871 days ago1710703248IN
0xCa71342c...03497B2c2
0 ETH0.000598423.74353662
0x6080604055064552024-03-17 19:16:0071 days ago1710702960IN
 Create: OffchainTunnel
0 ETH0.0032093.35349614

Advanced mode:
Parent Transaction Hash Block From To Value
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OffchainTunnel

Compiler Version
v0.8.24+commit.e11b9ed9

Optimization Enabled:
Yes with 420 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 3 : OffchainTunnel.sol
/// @author raffy.eth
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";

// https://eips.ethereum.org/EIPS/eip-3668
error OffchainLookup(address from, string[] urls, bytes request, bytes4 callback, bytes carry);

contract OffchainTunnel is IERC165 {

	error CCIPReadExpired(uint256 t);
	error CCIPReadUntrusted(address signed, address expect);
	error NoContext();
	error SelectorTaken();
	
	function supportsInterface(bytes4 x) external pure returns (bool) {
		return x == type(IERC165).interfaceId || x == this.call.selector;
	}

	function slotForContext(address a, uint256 i) internal pure returns (uint256) {
		return uint256(keccak256(abi.encodePacked(a, i)));
	}
	function slotForSelector(bytes4 x) public pure returns (uint256) {
		unchecked {
			return uint32(x) + 0x43c1d5eecd9e2f1153d9601994bca098d280c2a03f477e74cb5ae37db570bc67; // https://adraffy.github.io/keccak.js/test/demo.html
		}
	}


	function setContext(address signer, string calldata endpoint, uint96 index) public {
		setTiny(slotForContext(msg.sender, index), abi.encode(signer, endpoint));
	}
	function getContext(address owner, uint96 index) external view returns (address signer, string memory endpoint) {
		bytes memory v = getTiny(slotForContext(owner, index));
		if (v.length != 0) (signer, endpoint) = abi.decode(v, (address, string)); 
	}
	function contextForSelector(bytes4 selector) external view returns (address signer, string memory endpoint) {
		uint256 slot = slotForSelector(selector);
		uint256 cptr;
		assembly { cptr := sload(slot) }
		if (cptr != 0) {
			bytes memory v = getTiny(cptr);
			if (v.length != 0) {
				(signer, endpoint) = abi.decode(v, (address, string)); 
			}
		}
	}

	function claimAndSetContext(bytes4 selector, address signer, string calldata endpoint, uint96 index) external {		
		setContext(signer, endpoint, index);
		claim(selector, index);
	}
	function claim(bytes4 selector, uint256 index) public {
		uint256 slot = slotForSelector(selector);
		uint256 cptr;
		assembly { cptr := sload(slot) }
		if (cptr != 0) revert SelectorTaken();
		cptr = slotForContext(msg.sender, index);
		assembly { sstore(slot, cptr) }
	}

	fallback(bytes calldata) external returns (bytes memory) {
		uint256 slot = slotForSelector(msg.sig);
		uint256 cptr;
		assembly { cptr := sload(slot) }
		if (cptr == 0) revert NoContext();
		bytes memory v = getTiny(cptr);
		if (v.length == 0) revert NoContext();
		(address signer, string memory url) = abi.decode(v, (address, string));
		call(signer, url, msg.data);
	}
	function call(address signer, string memory endpoint, bytes memory request) public view returns (bytes memory) {
		string[] memory urls = new string[](1);
		urls[0] = endpoint;
		revert OffchainLookup(address(this), urls, request, this.callback.selector, abi.encode(request, signer));
	}
	function callback(bytes calldata ccip, bytes calldata carry) external view returns (bytes memory) {
		(bytes memory sig, uint64 expires, bytes memory response) = abi.decode(ccip, (bytes, uint64, bytes));
		if (expires < block.timestamp) revert CCIPReadExpired(expires);
		(bytes memory request, address signer) = abi.decode(carry, (bytes, address));
		bytes32 hash = keccak256(abi.encodePacked(address(this), expires, keccak256(request), keccak256(response)));
		address signed = ECDSA.recover(hash, sig);
		if (signed != signer) revert CCIPReadUntrusted(signed, signer);
		assembly { return(add(response, 32), mload(response)) }
	}

	// ************************************************************
	// TinyKV.sol: https://github.com/adraffy/TinyKV.sol

	// header: first 4 bytes
	// [00000000_00000000000000000000000000000000000000000000000000000000] // null (0 slot)
	// [00000001_XX000000000000000000000000000000000000000000000000000000] // 1 byte (1 slot)
	// [0000001C_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX] // 28 bytes (1 slot
	// [0000001D_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX][XX000000...] // 29 bytes (2 slots)
	function tinySlots(uint256 size) internal pure returns (uint256) {
		unchecked {
			return size != 0 ? (size + 35) >> 5 : 0; // ceil((4 + size) / 32)
		}
	}
	function setTiny(uint256 slot, bytes memory v) internal {
		unchecked {
			uint256 head;
			assembly { head := sload(slot) }
			uint256 size;
			assembly { size := mload(v) }
			uint256 n0 = tinySlots(head >> 224);
			uint256 n1 = tinySlots(size);
			assembly {
				// overwrite
				if gt(n1, 0) {
					sstore(slot, or(shl(224, size), shr(32, mload(add(v, 32)))))
					let ptr := add(v, 60)
					for { let i := 1 } lt(i, n1) { i := add(i, 1) } {
						sstore(add(slot, i), mload(ptr))
						ptr := add(ptr, 32)
					}
				}
				// clear unused
				for { let i := n1 } lt(i, n0) { i := add(i, 1) } {
					sstore(add(slot, i), 0)
				}
			}
		}
	}
	function getTiny(uint256 slot) internal view returns (bytes memory v) {
		unchecked {
			uint256 head;
			assembly { head := sload(slot) }
			uint256 size = head >> 224;
			if (size != 0) {
				v = new bytes(size);
				uint256 n = tinySlots(size);
				assembly {
					mstore(add(v, 32), shl(32, head))
					let p := add(v, 60)
					for { let i := 1 } lt(i, n) { i := add(i, 1) } {
						mstore(p, sload(add(slot, i)))
						p := add(p, 32)
					}
				}
			}
		}
	}
}

File 3 of 3 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.20;

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS
    }

    /**
     * @dev The signature derives the `address(0)`.
     */
    error ECDSAInvalidSignature();

    /**
     * @dev The signature has an invalid length.
     */
    error ECDSAInvalidSignatureLength(uint256 length);

    /**
     * @dev The signature has an S value that is in the upper half order.
     */
    error ECDSAInvalidSignatureS(bytes32 s);

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not
     * return address(0) without also returning an error description. Errors are documented using an enum (error type)
     * and a bytes32 providing additional information about the error.
     *
     * If no error is returned, then the address can be used for verification purposes.
     *
     * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            /// @solidity memory-safe-assembly
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);
        _throwError(error, errorArg);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     */
    function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {
        unchecked {
            bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
            // We do not check for an overflow here since the shift operation results in 0 or 1.
            uint8 v = uint8((uint256(vs) >> 255) + 27);
            return tryRecover(hash, v, r, s);
        }
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     */
    function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {
        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);
        _throwError(error, errorArg);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError, bytes32) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS, s);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature, bytes32(0));
        }

        return (signer, RecoverError.NoError, bytes32(0));
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);
        _throwError(error, errorArg);
        return recovered;
    }

    /**
     * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.
     */
    function _throwError(RecoverError error, bytes32 errorArg) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert ECDSAInvalidSignature();
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert ECDSAInvalidSignatureLength(uint256(errorArg));
        } else if (error == RecoverError.InvalidSignatureS) {
            revert ECDSAInvalidSignatureS(errorArg);
        }
    }
}

File 4 of 3 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

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

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"t","type":"uint256"}],"name":"CCIPReadExpired","type":"error"},{"inputs":[{"internalType":"address","name":"signed","type":"address"},{"internalType":"address","name":"expect","type":"address"}],"name":"CCIPReadUntrusted","type":"error"},{"inputs":[],"name":"ECDSAInvalidSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"name":"ECDSAInvalidSignatureLength","type":"error"},{"inputs":[{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"ECDSAInvalidSignatureS","type":"error"},{"inputs":[],"name":"NoContext","type":"error"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"string[]","name":"urls","type":"string[]"},{"internalType":"bytes","name":"request","type":"bytes"},{"internalType":"bytes4","name":"callback","type":"bytes4"},{"internalType":"bytes","name":"carry","type":"bytes"}],"name":"OffchainLookup","type":"error"},{"inputs":[],"name":"SelectorTaken","type":"error"},{"stateMutability":"nonpayable","type":"fallback"},{"inputs":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"string","name":"endpoint","type":"string"},{"internalType":"bytes","name":"request","type":"bytes"}],"name":"call","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"ccip","type":"bytes"},{"internalType":"bytes","name":"carry","type":"bytes"}],"name":"callback","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"selector","type":"bytes4"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"selector","type":"bytes4"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"string","name":"endpoint","type":"string"},{"internalType":"uint96","name":"index","type":"uint96"}],"name":"claimAndSetContext","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"contextForSelector","outputs":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"string","name":"endpoint","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint96","name":"index","type":"uint96"}],"name":"getContext","outputs":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"string","name":"endpoint","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"string","name":"endpoint","type":"string"},{"internalType":"uint96","name":"index","type":"uint96"}],"name":"setContext","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"x","type":"bytes4"}],"name":"slotForSelector","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes4","name":"x","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"}]

608060405234801561000f575f80fd5b506110528061001d5f395ff3fe608060405234801561000f575f80fd5b5060043610610091575f3560e01c80633e039114116100645780633e039114146101f9578063704042621461020c5780639582e33414610250578063d5f5f9a614610263578063d88a37451461027657610091565b806301ffc9a71461017b57806318aa5141146101a357806318e78b98146101c35780633dcdb8eb146101e4575b5f36606082803560e01c7f43c1d5eecd9e2f1153d9601994bca098d280c2a03f477e74cb5ae37db570bc670180549091505f8190036100e35760405163055fa62d60e21b815260040160405180910390fd5b5f6100ed82610289565b905080515f036101105760405163055fa62d60e21b815260040160405180910390fd5b5f80828060200190518101906101269190610a2f565b9150915061016a82825f368080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525061032292505050565b505050505050915050805190602001f35b61018e610189366004610ad8565b6103c3565b60405190151581526020015b60405180910390f35b6101b66101b1366004610b3d565b6103f9565b60405161019a9190610bcf565b6101d66101d1366004610ad8565b610531565b60405161019a929190610be1565b6101f76101f2366004610c0a565b61059c565b005b6101f7610207366004610c4d565b6105f6565b61024261021a366004610ad8565b60e01c7f43c1d5eecd9e2f1153d9601994bca098d280c2a03f477e74cb5ae37db570bc670190565b60405190815260200161019a565b6101b661025e366004610d14565b610322565b6101f7610271366004610d9b565b610621565b6101d6610284366004610dfe565b61066b565b805460609060e081901c801561031b578067ffffffffffffffff8111156102b2576102b26109a1565b6040519080825280601f01601f1916602001820160405280156102dc576020820181803683370190505b5092505f6102e9826106bb565b90508260201b6020850152603c840160015b82811015610317578681015482526020909101906001016102fb565b5050505b5050919050565b6040805160018082528183019092526060915f9190816020015b606081526020019060019003908161033c57905050905083815f8151811061036657610366610e31565b60200260200101819052503081846318aa514160e01b868960405160200161038f929190610e45565b60408051601f1981840301815290829052630556f18360e41b82526103ba9594939291600401610e6f565b60405180910390fd5b5f6001600160e01b031982166301ffc9a760e01b14806103f357506001600160e01b03198216632560b8cd60e21b145b92915050565b60605f808061040a87890189610f1b565b925092509250428267ffffffffffffffff16101561044757604051633c3abd2160e21b815267ffffffffffffffff831660048201526024016103ba565b5f8061045587890189610f7b565b81516020808401919091208651878301206040516bffffffffffffffffffffffff193060601b169381019390935277ffffffffffffffffffffffffffffffffffffffffffffffff1960c08a901b166034840152603c830191909152605c82015291935091505f90607c016040516020818303038152906040528051906020012090505f6104e282886106d3565b9050826001600160a01b0316816001600160a01b0316146105295760405163b2187bcd60e01b81526001600160a01b038083166004830152841660248201526044016103ba565b845160208601f35b7f43c1d5eecd9e2f1153d9601994bca098d280c2a03f477e74cb5ae37db570bc6760e082901c0180545f916060918015610595575f61056f82610289565b905080515f14610593578080602001905181019061058d9190610a2f565b90955093505b505b5050915091565b7f43c1d5eecd9e2f1153d9601994bca098d280c2a03f477e74cb5ae37db570bc6760e083901c01805480156105e457604051631607edcf60e01b815260040160405180910390fd5b6105ee33846106fb565b909155505050565b61060284848484610621565b61061a85826bffffffffffffffffffffffff1661059c565b5050505050565b61066561063c33836bffffffffffffffffffffffff166106fb565b85858560405160200161065193929190610fca565b604051602081830303815290604052610742565b50505050565b5f60605f61068f61068a86866bffffffffffffffffffffffff166106fb565b610289565b905080515f146106b357808060200190518101906106ad9190610a2f565b90935091505b509250929050565b5f815f036106c9575f6103f3565b5060230160051c90565b5f805f806106e186866107bd565b9250925092506106f18282610806565b5090949350505050565b6040516bffffffffffffffffffffffff19606084901b166020820152603481018290525f9060540160408051601f1981840301815291905280516020909101209392505050565b815481515f61075460e084901c6106bb565b90505f610760836106bb565b9050801561079d57602085015160201c8360e01b178655603c850160015b8281101561079a5781518882015560209091019060010161077e565b50505b805b828110156107b4575f8782015560010161079f565b50505050505050565b5f805f83516041036107f4576020840151604085015160608601515f1a6107e6888285856108c2565b9550955095505050506107ff565b505081515f91506002905b9250925092565b5f82600381111561081957610819611008565b03610822575050565b600182600381111561083657610836611008565b036108545760405163f645eedf60e01b815260040160405180910390fd5b600282600381111561086857610868611008565b036108895760405163fce698f760e01b8152600481018290526024016103ba565b600382600381111561089d5761089d611008565b036108be576040516335e2f38360e21b8152600481018290526024016103ba565b5050565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156108fb57505f91506003905082610980565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa15801561094c573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b03811661097757505f925060019150829050610980565b92505f91508190505b9450945094915050565b6001600160a01b038116811461099e575f80fd5b50565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156109de576109de6109a1565b604052919050565b5f67ffffffffffffffff8211156109ff576109ff6109a1565b50601f01601f191660200190565b5f5b83811015610a27578181015183820152602001610a0f565b50505f910152565b5f8060408385031215610a40575f80fd5b8251610a4b8161098a565b602084015190925067ffffffffffffffff811115610a67575f80fd5b8301601f81018513610a77575f80fd5b8051610a8a610a85826109e6565b6109b5565b818152866020838501011115610a9e575f80fd5b610aaf826020830160208601610a0d565b8093505050509250929050565b80356001600160e01b031981168114610ad3575f80fd5b919050565b5f60208284031215610ae8575f80fd5b610af182610abc565b9392505050565b5f8083601f840112610b08575f80fd5b50813567ffffffffffffffff811115610b1f575f80fd5b602083019150836020828501011115610b36575f80fd5b9250929050565b5f805f8060408587031215610b50575f80fd5b843567ffffffffffffffff80821115610b67575f80fd5b610b7388838901610af8565b90965094506020870135915080821115610b8b575f80fd5b50610b9887828801610af8565b95989497509550505050565b5f8151808452610bbb816020860160208601610a0d565b601f01601f19169290920160200192915050565b602081525f610af16020830184610ba4565b6001600160a01b0383168152604060208201525f610c026040830184610ba4565b949350505050565b5f8060408385031215610c1b575f80fd5b610c2483610abc565b946020939093013593505050565b80356bffffffffffffffffffffffff81168114610ad3575f80fd5b5f805f805f60808688031215610c61575f80fd5b610c6a86610abc565b94506020860135610c7a8161098a565b9350604086013567ffffffffffffffff811115610c95575f80fd5b610ca188828901610af8565b9094509250610cb4905060608701610c32565b90509295509295909350565b5f610ccd610a85846109e6565b9050828152838383011115610ce0575f80fd5b828260208301375f602084830101529392505050565b5f82601f830112610d05575f80fd5b610af183833560208501610cc0565b5f805f60608486031215610d26575f80fd5b8335610d318161098a565b9250602084013567ffffffffffffffff80821115610d4d575f80fd5b818601915086601f830112610d60575f80fd5b610d6f87833560208501610cc0565b93506040860135915080821115610d84575f80fd5b50610d9186828701610cf6565b9150509250925092565b5f805f8060608587031215610dae575f80fd5b8435610db98161098a565b9350602085013567ffffffffffffffff811115610dd4575f80fd5b610de087828801610af8565b9094509250610df3905060408601610c32565b905092959194509250565b5f8060408385031215610e0f575f80fd5b8235610e1a8161098a565b9150610e2860208401610c32565b90509250929050565b634e487b7160e01b5f52603260045260245ffd5b604081525f610e576040830185610ba4565b90506001600160a01b03831660208301529392505050565b5f60a082016001600160a01b0388168352602060a0602085015281885180845260c08601915060c08160051b870101935060208a015f5b82811015610ed45760bf19888703018452610ec2868351610ba4565b95509284019290840190600101610ea6565b50505050508281036040840152610eeb8187610ba4565b6001600160e01b03198616606085015290508281036080840152610f0f8185610ba4565b98975050505050505050565b5f805f60608486031215610f2d575f80fd5b833567ffffffffffffffff80821115610f44575f80fd5b610f5087838801610cf6565b9450602086013591508082168214610f66575f80fd5b90925060408501359080821115610d84575f80fd5b5f8060408385031215610f8c575f80fd5b823567ffffffffffffffff811115610fa2575f80fd5b610fae85828601610cf6565b9250506020830135610fbf8161098a565b809150509250929050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b5f52602160045260245ffdfea2646970667358221220b84141886ed7633d9d3c7619528173022ea702969d163fc93cc886e26a2f093f64736f6c63430008180033

Deployed Bytecode

0x608060405234801561000f575f80fd5b5060043610610091575f3560e01c80633e039114116100645780633e039114146101f9578063704042621461020c5780639582e33414610250578063d5f5f9a614610263578063d88a37451461027657610091565b806301ffc9a71461017b57806318aa5141146101a357806318e78b98146101c35780633dcdb8eb146101e4575b5f36606082803560e01c7f43c1d5eecd9e2f1153d9601994bca098d280c2a03f477e74cb5ae37db570bc670180549091505f8190036100e35760405163055fa62d60e21b815260040160405180910390fd5b5f6100ed82610289565b905080515f036101105760405163055fa62d60e21b815260040160405180910390fd5b5f80828060200190518101906101269190610a2f565b9150915061016a82825f368080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525061032292505050565b505050505050915050805190602001f35b61018e610189366004610ad8565b6103c3565b60405190151581526020015b60405180910390f35b6101b66101b1366004610b3d565b6103f9565b60405161019a9190610bcf565b6101d66101d1366004610ad8565b610531565b60405161019a929190610be1565b6101f76101f2366004610c0a565b61059c565b005b6101f7610207366004610c4d565b6105f6565b61024261021a366004610ad8565b60e01c7f43c1d5eecd9e2f1153d9601994bca098d280c2a03f477e74cb5ae37db570bc670190565b60405190815260200161019a565b6101b661025e366004610d14565b610322565b6101f7610271366004610d9b565b610621565b6101d6610284366004610dfe565b61066b565b805460609060e081901c801561031b578067ffffffffffffffff8111156102b2576102b26109a1565b6040519080825280601f01601f1916602001820160405280156102dc576020820181803683370190505b5092505f6102e9826106bb565b90508260201b6020850152603c840160015b82811015610317578681015482526020909101906001016102fb565b5050505b5050919050565b6040805160018082528183019092526060915f9190816020015b606081526020019060019003908161033c57905050905083815f8151811061036657610366610e31565b60200260200101819052503081846318aa514160e01b868960405160200161038f929190610e45565b60408051601f1981840301815290829052630556f18360e41b82526103ba9594939291600401610e6f565b60405180910390fd5b5f6001600160e01b031982166301ffc9a760e01b14806103f357506001600160e01b03198216632560b8cd60e21b145b92915050565b60605f808061040a87890189610f1b565b925092509250428267ffffffffffffffff16101561044757604051633c3abd2160e21b815267ffffffffffffffff831660048201526024016103ba565b5f8061045587890189610f7b565b81516020808401919091208651878301206040516bffffffffffffffffffffffff193060601b169381019390935277ffffffffffffffffffffffffffffffffffffffffffffffff1960c08a901b166034840152603c830191909152605c82015291935091505f90607c016040516020818303038152906040528051906020012090505f6104e282886106d3565b9050826001600160a01b0316816001600160a01b0316146105295760405163b2187bcd60e01b81526001600160a01b038083166004830152841660248201526044016103ba565b845160208601f35b7f43c1d5eecd9e2f1153d9601994bca098d280c2a03f477e74cb5ae37db570bc6760e082901c0180545f916060918015610595575f61056f82610289565b905080515f14610593578080602001905181019061058d9190610a2f565b90955093505b505b5050915091565b7f43c1d5eecd9e2f1153d9601994bca098d280c2a03f477e74cb5ae37db570bc6760e083901c01805480156105e457604051631607edcf60e01b815260040160405180910390fd5b6105ee33846106fb565b909155505050565b61060284848484610621565b61061a85826bffffffffffffffffffffffff1661059c565b5050505050565b61066561063c33836bffffffffffffffffffffffff166106fb565b85858560405160200161065193929190610fca565b604051602081830303815290604052610742565b50505050565b5f60605f61068f61068a86866bffffffffffffffffffffffff166106fb565b610289565b905080515f146106b357808060200190518101906106ad9190610a2f565b90935091505b509250929050565b5f815f036106c9575f6103f3565b5060230160051c90565b5f805f806106e186866107bd565b9250925092506106f18282610806565b5090949350505050565b6040516bffffffffffffffffffffffff19606084901b166020820152603481018290525f9060540160408051601f1981840301815291905280516020909101209392505050565b815481515f61075460e084901c6106bb565b90505f610760836106bb565b9050801561079d57602085015160201c8360e01b178655603c850160015b8281101561079a5781518882015560209091019060010161077e565b50505b805b828110156107b4575f8782015560010161079f565b50505050505050565b5f805f83516041036107f4576020840151604085015160608601515f1a6107e6888285856108c2565b9550955095505050506107ff565b505081515f91506002905b9250925092565b5f82600381111561081957610819611008565b03610822575050565b600182600381111561083657610836611008565b036108545760405163f645eedf60e01b815260040160405180910390fd5b600282600381111561086857610868611008565b036108895760405163fce698f760e01b8152600481018290526024016103ba565b600382600381111561089d5761089d611008565b036108be576040516335e2f38360e21b8152600481018290526024016103ba565b5050565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156108fb57505f91506003905082610980565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa15801561094c573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b03811661097757505f925060019150829050610980565b92505f91508190505b9450945094915050565b6001600160a01b038116811461099e575f80fd5b50565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156109de576109de6109a1565b604052919050565b5f67ffffffffffffffff8211156109ff576109ff6109a1565b50601f01601f191660200190565b5f5b83811015610a27578181015183820152602001610a0f565b50505f910152565b5f8060408385031215610a40575f80fd5b8251610a4b8161098a565b602084015190925067ffffffffffffffff811115610a67575f80fd5b8301601f81018513610a77575f80fd5b8051610a8a610a85826109e6565b6109b5565b818152866020838501011115610a9e575f80fd5b610aaf826020830160208601610a0d565b8093505050509250929050565b80356001600160e01b031981168114610ad3575f80fd5b919050565b5f60208284031215610ae8575f80fd5b610af182610abc565b9392505050565b5f8083601f840112610b08575f80fd5b50813567ffffffffffffffff811115610b1f575f80fd5b602083019150836020828501011115610b36575f80fd5b9250929050565b5f805f8060408587031215610b50575f80fd5b843567ffffffffffffffff80821115610b67575f80fd5b610b7388838901610af8565b90965094506020870135915080821115610b8b575f80fd5b50610b9887828801610af8565b95989497509550505050565b5f8151808452610bbb816020860160208601610a0d565b601f01601f19169290920160200192915050565b602081525f610af16020830184610ba4565b6001600160a01b0383168152604060208201525f610c026040830184610ba4565b949350505050565b5f8060408385031215610c1b575f80fd5b610c2483610abc565b946020939093013593505050565b80356bffffffffffffffffffffffff81168114610ad3575f80fd5b5f805f805f60808688031215610c61575f80fd5b610c6a86610abc565b94506020860135610c7a8161098a565b9350604086013567ffffffffffffffff811115610c95575f80fd5b610ca188828901610af8565b9094509250610cb4905060608701610c32565b90509295509295909350565b5f610ccd610a85846109e6565b9050828152838383011115610ce0575f80fd5b828260208301375f602084830101529392505050565b5f82601f830112610d05575f80fd5b610af183833560208501610cc0565b5f805f60608486031215610d26575f80fd5b8335610d318161098a565b9250602084013567ffffffffffffffff80821115610d4d575f80fd5b818601915086601f830112610d60575f80fd5b610d6f87833560208501610cc0565b93506040860135915080821115610d84575f80fd5b50610d9186828701610cf6565b9150509250925092565b5f805f8060608587031215610dae575f80fd5b8435610db98161098a565b9350602085013567ffffffffffffffff811115610dd4575f80fd5b610de087828801610af8565b9094509250610df3905060408601610c32565b905092959194509250565b5f8060408385031215610e0f575f80fd5b8235610e1a8161098a565b9150610e2860208401610c32565b90509250929050565b634e487b7160e01b5f52603260045260245ffd5b604081525f610e576040830185610ba4565b90506001600160a01b03831660208301529392505050565b5f60a082016001600160a01b0388168352602060a0602085015281885180845260c08601915060c08160051b870101935060208a015f5b82811015610ed45760bf19888703018452610ec2868351610ba4565b95509284019290840190600101610ea6565b50505050508281036040840152610eeb8187610ba4565b6001600160e01b03198616606085015290508281036080840152610f0f8185610ba4565b98975050505050505050565b5f805f60608486031215610f2d575f80fd5b833567ffffffffffffffff80821115610f44575f80fd5b610f5087838801610cf6565b9450602086013591508082168214610f66575f80fd5b90925060408501359080821115610d84575f80fd5b5f8060408385031215610f8c575f80fd5b823567ffffffffffffffff811115610fa2575f80fd5b610fae85828601610cf6565b9250506020830135610fbf8161098a565b809150509250929050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b5f52602160045260245ffdfea2646970667358221220b84141886ed7633d9d3c7619528173022ea702969d163fc93cc886e26a2f093f64736f6c63430008180033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction 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.