Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
BitVMBridgeV2
Compiler Version
v0.8.28+commit.7893614a
Optimization Enabled:
Yes with 200 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import "lib/openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol"; import "lib/openzeppelin-contracts-upgradeable/contracts/utils/ReentrancyGuardUpgradeable.sol"; import "./interface/IBridge.sol"; import "./interface/IBtcPeg.sol"; /// @custom:oz-upgrades-from BitVMBridge contract BitVMBridgeV2 is IBitVMBridge, OwnableUpgradeable, ReentrancyGuardUpgradeable { /// @notice BTC Peg contract interface IBtcPeg public btcPeg; /// @notice Maximum number of pegs allowed per mint uint256 public constant MAX_PEGS_PER_MINT = 10; uint256 public constant MAX_BTC_PER_MINT = 10000; uint256 public constant MIN_BTC_PER_MINT = 1000; uint256 public constant MAX_BTC_PER_BURN = 10000; uint256 public constant MIN_BTC_PER_BURN = 1000; /// @notice Burn pause status bool public burnPaused; /// @dev Custom errors error TooManyPegs(); error InvalidPegAddress(); error InvalidPegAmount(); error InvalidPeginAmount(); error InvalidBurnAmount(); error InvalidBtcAddress(); error InvalidBtcPegAddress(); error BurnPaused(); /// @notice Modifier to check if burn is not paused modifier whenBurnNotPaused() { if (burnPaused) revert BurnPaused(); _; } function initialize(address _owner, address _btcPegAddr) external initializer { if (_owner == address(0)) revert InvalidPegAddress(); if (_btcPegAddr == address(0)) revert InvalidBtcPegAddress(); __Ownable_init_unchained(_owner); btcPeg = IBtcPeg(_btcPegAddr); } /// @notice Pause burn functionality function pauseBurn() external onlyOwner { burnPaused = true; } /// @notice Unpause burn functionality function unpauseBurn() external onlyOwner { burnPaused = false; } function mint(Peg[] calldata pegs) public onlyOwner nonReentrant { if (pegs.length > MAX_PEGS_PER_MINT) revert TooManyPegs(); if (pegs.length == 0) revert InvalidPegAmount(); for (uint256 i = 0; i < pegs.length; i++) { address to = pegs[i].to; uint256 value = pegs[i].value; if (value < MIN_BTC_PER_MINT || value > MAX_BTC_PER_MINT) revert InvalidPeginAmount(); btcPeg.mint(to, value); emit Mint(to, value); } } function burn(string calldata _btc_addr, uint256 _value, uint256 _operator_id) public nonReentrant whenBurnNotPaused { if (_value < MIN_BTC_PER_BURN || _value > MAX_BTC_PER_BURN) revert InvalidBurnAmount(); btcPeg.burn(msg.sender, _value); emit Burn(msg.sender, _btc_addr, _value, _operator_id); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol"; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { /// @custom:storage-location erc7201:openzeppelin.storage.Ownable struct OwnableStorage { address _owner; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300; function _getOwnableStorage() private pure returns (OwnableStorage storage $) { assembly { $.slot := OwnableStorageLocation } } /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ function __Ownable_init(address initialOwner) internal onlyInitializing { __Ownable_init_unchained(initialOwner); } function __Ownable_init_unchained(address initialOwner) internal onlyInitializing { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { OwnableStorage storage $ = _getOwnableStorage(); return $._owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { OwnableStorage storage $ = _getOwnableStorage(); address oldOwner = $._owner; $._owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol) pragma solidity ^0.8.20; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at, * consider using {ReentrancyGuardTransient} instead. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuardUpgradeable is Initializable { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant NOT_ENTERED = 1; uint256 private constant ENTERED = 2; /// @custom:storage-location erc7201:openzeppelin.storage.ReentrancyGuard struct ReentrancyGuardStorage { uint256 _status; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ReentrancyGuard")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant ReentrancyGuardStorageLocation = 0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00; function _getReentrancyGuardStorage() private pure returns (ReentrancyGuardStorage storage $) { assembly { $.slot := ReentrancyGuardStorageLocation } } /** * @dev Unauthorized reentrant call. */ error ReentrancyGuardReentrantCall(); function __ReentrancyGuard_init() internal onlyInitializing { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal onlyInitializing { ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage(); $._status = NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage(); // On the first call to nonReentrant, _status will be NOT_ENTERED if ($._status == ENTERED) { revert ReentrancyGuardReentrantCall(); } // Any calls to nonReentrant after this point will fail $._status = ENTERED; } function _nonReentrantAfter() private { ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage(); // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) $._status = NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage(); return $._status == ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import "./IBtcPeg.sol"; interface IBitVMBridge { function mint(Peg[] memory pegs) external; function burn(string calldata _btc_addr, uint256 _value, uint256 _operator_id) external; event Mint(address indexed to, uint256 value); event Burn(address indexed from, string btc_addr, uint256 value, uint256 operator_id); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; struct Peg { address to; uint256 value; } interface IBtcPeg { function mint(address _to, uint256 _value) external; function burn(address _user, uint256 _value) external; event BridgeUpdated(address indexed newBridge); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.20; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ```solidity * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Storage of the initializable contract. * * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions * when using with upgradeable contracts. * * @custom:storage-location erc7201:openzeppelin.storage.Initializable */ struct InitializableStorage { /** * @dev Indicates that the contract has been initialized. */ uint64 _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool _initializing; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00; /** * @dev The contract is already initialized. */ error InvalidInitialization(); /** * @dev The contract is not initializing. */ error NotInitializing(); /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint64 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in * production. * * Emits an {Initialized} event. */ modifier initializer() { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); // Cache values to avoid duplicated sloads bool isTopLevelCall = !$._initializing; uint64 initialized = $._initialized; // Allowed calls: // - initialSetup: the contract is not in the initializing state and no previous version was // initialized // - construction: the contract is initialized at version 1 (no reininitialization) and the // current contract is just being deployed bool initialSetup = initialized == 0 && isTopLevelCall; bool construction = initialized == 1 && address(this).code.length == 0; if (!initialSetup && !construction) { revert InvalidInitialization(); } $._initialized = 1; if (isTopLevelCall) { $._initializing = true; } _; if (isTopLevelCall) { $._initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint64 version) { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing || $._initialized >= version) { revert InvalidInitialization(); } $._initialized = version; $._initializing = true; _; $._initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { _checkInitializing(); _; } /** * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}. */ function _checkInitializing() internal view virtual { if (!_isInitializing()) { revert NotInitializing(); } } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing) { revert InvalidInitialization(); } if ($._initialized != type(uint64).max) { $._initialized = type(uint64).max; emit Initialized(type(uint64).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint64) { return _getInitializableStorage()._initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _getInitializableStorage()._initializing; } /** * @dev Returns a pointer to the storage namespace. */ // solhint-disable-next-line var-name-mixedcase function _getInitializableStorage() private pure returns (InitializableStorage storage $) { assembly { $.slot := INITIALIZABLE_STORAGE } } }
{ "remappings": [ "@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/", "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "ds-test/=lib/openzeppelin-contracts-upgradeable/lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", "halmos-cheatcodes/=lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/", "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "openzeppelin-foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/", "solidity-stringutils/=lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "cancun", "viaIR": false, "libraries": {} }
Contract ABI
API[{"inputs":[],"name":"BurnPaused","type":"error"},{"inputs":[],"name":"InvalidBtcAddress","type":"error"},{"inputs":[],"name":"InvalidBtcPegAddress","type":"error"},{"inputs":[],"name":"InvalidBurnAmount","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"InvalidPegAddress","type":"error"},{"inputs":[],"name":"InvalidPegAmount","type":"error"},{"inputs":[],"name":"InvalidPeginAmount","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[],"name":"TooManyPegs","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"string","name":"btc_addr","type":"string"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"operator_id","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"MAX_BTC_PER_BURN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_BTC_PER_MINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PEGS_PER_MINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_BTC_PER_BURN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_BTC_PER_MINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"btcPeg","outputs":[{"internalType":"contract IBtcPeg","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_btc_addr","type":"string"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"uint256","name":"_operator_id","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burnPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_btcPegAddr","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct Peg[]","name":"pegs","type":"tuple[]"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauseBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpauseBurn","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052348015600e575f5ffd5b50610a2d8061001c5f395ff3fe608060405234801561000f575f5ffd5b50600436106100f0575f3560e01c80638214222311610093578063d684534e11610063578063d684534e146101ce578063e63e817914610184578063ed6b8d67146101c5578063f2fde38b146101f1575f5ffd5b806382142223146101845780638da5cb5b1461018d578063a6559fe4146101bd578063b545a18c146101c5575f5ffd5b8063485cc955116100ce578063485cc9551461014057806353f2695814610153578063715018a6146101695780637e0b420114610171575f5ffd5b806302c7bd96146100f457806332dc08ce146101095780634295e85714610138575b5f5ffd5b61010761010236600461084e565b610204565b005b5f5461011b906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b610107610339565b61010761014e3660046108e3565b61034f565b61015b600a81565b60405190815260200161012f565b6101076104c6565b61010761017f366004610914565b6104d9565b61015b61271081565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031661011b565b61010761068a565b61015b6103e881565b5f546101e190600160a01b900460ff1681565b604051901515815260200161012f565b6101076101ff366004610985565b6106a6565b61020c6106e8565b5f54600160a01b900460ff161561023657604051630fb9408f60e41b815260040160405180910390fd5b6103e8821080610247575061271082115b15610265576040516302075cc160e41b815260040160405180910390fd5b5f54604051632770a7eb60e21b8152336004820152602481018490526001600160a01b0390911690639dc29fac906044015f604051808303815f87803b1580156102ad575f5ffd5b505af11580156102bf573d5f5f3e3d5ffd5b50505050336001600160a01b03167fe5c5862dcc0716f0739ac20d79ddc74bcb955d3e5d5861216515cc0612c615988585858560405161030294939291906109a5565b60405180910390a261033360017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b50505050565b610341610732565b5f805460ff60a01b19169055565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff165f811580156103945750825b90505f8267ffffffffffffffff1660011480156103b05750303b155b9050811580156103be575080155b156103dc5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561040657845460ff60401b1916600160401b1785555b6001600160a01b03871661042d5760405163ca9b33e360e01b815260040160405180910390fd5b6001600160a01b03861661045457604051631c57e07f60e01b815260040160405180910390fd5b61045d8761078d565b5f80546001600160a01b0319166001600160a01b03881617905583156104bd57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050565b6104ce610732565b6104d75f610795565b565b6104e1610732565b6104e96106e8565b600a81111561050b576040516309e2b94760e31b815260040160405180910390fd5b5f81900361052c57604051635355abc560e11b815260040160405180910390fd5b5f5b8181101561065c575f838383818110610549576105496109e3565b61055f9260206040909202019081019150610985565b90505f848484818110610574576105746109e3565b9050604002016020013590506103e8811080610591575061271081115b156105af57604051637f08df5160e11b815260040160405180910390fd5b5f546040516340c10f1960e01b81526001600160a01b03848116600483015260248201849052909116906340c10f19906044015f604051808303815f87803b1580156105f9575f5ffd5b505af115801561060b573d5f5f3e3d5ffd5b50505050816001600160a01b03167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968858260405161064a91815260200190565b60405180910390a2505060010161052e565b5061068660017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5050565b610692610732565b5f805460ff60a01b1916600160a01b179055565b6106ae610732565b6001600160a01b0381166106dc57604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6106e581610795565b50565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0080546001190161072c57604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b336107647f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b0316146104d75760405163118cdaa760e01b81523360048201526024016106d3565b6106ae610805565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166104d757604051631afcd79f60e31b815260040160405180910390fd5b5f5f5f5f60608587031215610861575f5ffd5b843567ffffffffffffffff811115610877575f5ffd5b8501601f81018713610887575f5ffd5b803567ffffffffffffffff81111561089d575f5ffd5b8760208284010111156108ae575f5ffd5b602091820198909750908601359560400135945092505050565b80356001600160a01b03811681146108de575f5ffd5b919050565b5f5f604083850312156108f4575f5ffd5b6108fd836108c8565b915061090b602084016108c8565b90509250929050565b5f5f60208385031215610925575f5ffd5b823567ffffffffffffffff81111561093b575f5ffd5b8301601f8101851361094b575f5ffd5b803567ffffffffffffffff811115610961575f5ffd5b8560208260061b8401011115610975575f5ffd5b6020919091019590945092505050565b5f60208284031215610995575f5ffd5b61099e826108c8565b9392505050565b60608152836060820152838560808301375f608085830101525f6080601f19601f870116830101905083602083015282604083015295945050505050565b634e487b7160e01b5f52603260045260245ffdfea264697066735822122089fcaca1d1cb91709aae1e7b7d60081be687816cebb939940c96e60d0c8a696e64736f6c634300081c0033
Deployed Bytecode
0x608060405234801561000f575f5ffd5b50600436106100f0575f3560e01c80638214222311610093578063d684534e11610063578063d684534e146101ce578063e63e817914610184578063ed6b8d67146101c5578063f2fde38b146101f1575f5ffd5b806382142223146101845780638da5cb5b1461018d578063a6559fe4146101bd578063b545a18c146101c5575f5ffd5b8063485cc955116100ce578063485cc9551461014057806353f2695814610153578063715018a6146101695780637e0b420114610171575f5ffd5b806302c7bd96146100f457806332dc08ce146101095780634295e85714610138575b5f5ffd5b61010761010236600461084e565b610204565b005b5f5461011b906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b610107610339565b61010761014e3660046108e3565b61034f565b61015b600a81565b60405190815260200161012f565b6101076104c6565b61010761017f366004610914565b6104d9565b61015b61271081565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031661011b565b61010761068a565b61015b6103e881565b5f546101e190600160a01b900460ff1681565b604051901515815260200161012f565b6101076101ff366004610985565b6106a6565b61020c6106e8565b5f54600160a01b900460ff161561023657604051630fb9408f60e41b815260040160405180910390fd5b6103e8821080610247575061271082115b15610265576040516302075cc160e41b815260040160405180910390fd5b5f54604051632770a7eb60e21b8152336004820152602481018490526001600160a01b0390911690639dc29fac906044015f604051808303815f87803b1580156102ad575f5ffd5b505af11580156102bf573d5f5f3e3d5ffd5b50505050336001600160a01b03167fe5c5862dcc0716f0739ac20d79ddc74bcb955d3e5d5861216515cc0612c615988585858560405161030294939291906109a5565b60405180910390a261033360017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b50505050565b610341610732565b5f805460ff60a01b19169055565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff165f811580156103945750825b90505f8267ffffffffffffffff1660011480156103b05750303b155b9050811580156103be575080155b156103dc5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561040657845460ff60401b1916600160401b1785555b6001600160a01b03871661042d5760405163ca9b33e360e01b815260040160405180910390fd5b6001600160a01b03861661045457604051631c57e07f60e01b815260040160405180910390fd5b61045d8761078d565b5f80546001600160a01b0319166001600160a01b03881617905583156104bd57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050565b6104ce610732565b6104d75f610795565b565b6104e1610732565b6104e96106e8565b600a81111561050b576040516309e2b94760e31b815260040160405180910390fd5b5f81900361052c57604051635355abc560e11b815260040160405180910390fd5b5f5b8181101561065c575f838383818110610549576105496109e3565b61055f9260206040909202019081019150610985565b90505f848484818110610574576105746109e3565b9050604002016020013590506103e8811080610591575061271081115b156105af57604051637f08df5160e11b815260040160405180910390fd5b5f546040516340c10f1960e01b81526001600160a01b03848116600483015260248201849052909116906340c10f19906044015f604051808303815f87803b1580156105f9575f5ffd5b505af115801561060b573d5f5f3e3d5ffd5b50505050816001600160a01b03167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968858260405161064a91815260200190565b60405180910390a2505060010161052e565b5061068660017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5050565b610692610732565b5f805460ff60a01b1916600160a01b179055565b6106ae610732565b6001600160a01b0381166106dc57604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6106e581610795565b50565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0080546001190161072c57604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b336107647f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b0316146104d75760405163118cdaa760e01b81523360048201526024016106d3565b6106ae610805565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166104d757604051631afcd79f60e31b815260040160405180910390fd5b5f5f5f5f60608587031215610861575f5ffd5b843567ffffffffffffffff811115610877575f5ffd5b8501601f81018713610887575f5ffd5b803567ffffffffffffffff81111561089d575f5ffd5b8760208284010111156108ae575f5ffd5b602091820198909750908601359560400135945092505050565b80356001600160a01b03811681146108de575f5ffd5b919050565b5f5f604083850312156108f4575f5ffd5b6108fd836108c8565b915061090b602084016108c8565b90509250929050565b5f5f60208385031215610925575f5ffd5b823567ffffffffffffffff81111561093b575f5ffd5b8301601f8101851361094b575f5ffd5b803567ffffffffffffffff811115610961575f5ffd5b8560208260061b8401011115610975575f5ffd5b6020919091019590945092505050565b5f60208284031215610995575f5ffd5b61099e826108c8565b9392505050565b60608152836060820152838560808301375f608085830101525f6080601f19601f870116830101905083602083015282604083015295945050505050565b634e487b7160e01b5f52603260045260245ffdfea264697066735822122089fcaca1d1cb91709aae1e7b7d60081be687816cebb939940c96e60d0c8a696e64736f6c634300081c0033
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ 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.