Note: Our ether balance display is temporarily unavailable. Please check back later.
Source Code
Overview
ETH Balance
Ether balance is temporarily unavailable. Please check back later.
More Info
ContractCreator
Multichain Info
N/A
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
BitVMBridgeV3
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";
import "lib/btc-light-client/packages/contracts/src/interfaces/IBtcTxVerifier.sol";
/// @custom:oz-upgrades-from BitVMBridgeV2
contract BitVMBridgeV3 is
IBitVMBridge,
OwnableUpgradeable,
ReentrancyGuardUpgradeable
{
/// @notice BTC Peg contract interface
IBtcPeg public btcPeg;
/// @notice Burn pause status
bool public burnPaused;
/// @notice Maximum number of pegs allowed per mint
uint256 public maxPegsPerMint;
uint256 public maxBtcPerMint;
uint256 public minBtcPerMint;
uint256 public maxBtcPerBurn;
uint256 public minBtcPerBurn;
/// @notice BTC Tx Verifier contract interface
IBtcTxVerifier public btcTxVerifier;
/// @notice Minimum number of confirmations required for a BTC transaction
uint256 public minConfirmations;
/// @notice Save minted inclusion proof
mapping(bytes32 => bool) minted;
/// @dev Custom errors
error TooManyPegs();
error InvalidPegAddress();
error InvalidPegAmount();
error InvalidPeginAmount();
error InvalidBurnAmount();
error InvalidBtcAddress();
error InvalidBtcPegAddress();
error BurnPaused();
error UsedInclusionProof();
error InvalidInclusionProof();
error MismatchBtcAmount(uint256 _provided, uint256 _btcAmount);
/// @notice Modifier to check if burn is not paused
modifier whenBurnNotPaused() {
if (burnPaused) revert BurnPaused();
_;
}
function initialize(
address _owner,
address _btcPegAddr,
address _btcTxVerifierAddr,
uint256 _minConfirmations
) external initializer {
if (_owner == address(0)) revert InvalidPegAddress();
if (_btcPegAddr == address(0)) revert InvalidBtcPegAddress();
__Ownable_init_unchained(_owner);
btcPeg = IBtcPeg(_btcPegAddr);
btcTxVerifier = IBtcTxVerifier(_btcTxVerifierAddr);
minConfirmations = _minConfirmations;
}
function setParameters(
uint256 _maxPegsPerMint,
uint256 _maxBtcPerMint,
uint256 _minBtcPerMint,
uint256 _maxBtcPerBurn,
uint256 _minBtcPerBurn
) external onlyOwner {
// basic parameter check
if (_minBtcPerMint > _maxBtcPerMint) revert InvalidPeginAmount();
if (_minBtcPerBurn > _maxBtcPerBurn) revert InvalidBurnAmount();
if (_maxPegsPerMint == 0) revert InvalidPegAmount();
maxPegsPerMint = _maxPegsPerMint;
maxBtcPerMint = _maxBtcPerMint;
minBtcPerMint = _minBtcPerMint;
maxBtcPerBurn = _maxBtcPerBurn;
minBtcPerBurn = _minBtcPerBurn;
}
/// @notice Pause burn functionality
function pauseBurn() external onlyOwner {
burnPaused = true;
}
/// @notice Unpause burn functionality
function unpauseBurn() external onlyOwner {
burnPaused = false;
}
function getInclusionProofKey(
bytes32 _txid,
uint256 _txIndex
) public pure returns (bytes32) {
return keccak256(abi.encode(_txid, _txIndex));
}
function mint(Peg[] calldata pegs) public onlyOwner nonReentrant {
if (pegs.length > maxPegsPerMint) 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;
BtcTxProof calldata inclusionProof = pegs[i].inclusionProof;
uint256 blockNum = pegs[i].blockNum;
uint256 txOutIx = pegs[i].txOutIx;
bytes32 destScriptHash = pegs[i].destScriptHash;
uint256 amountSats = pegs[i].amountSats;
bytes32 inclusionProofKey = getInclusionProofKey(
inclusionProof.txId,
inclusionProof.txIndex
);
if (minted[inclusionProofKey]) revert UsedInclusionProof();
minted[inclusionProofKey] = true;
if (amountSats != value)
revert MismatchBtcAmount(value, amountSats);
bool isValid = btcTxVerifier.verifyPayment(
minConfirmations,
blockNum,
inclusionProof,
txOutIx,
destScriptHash,
amountSats
);
if (!isValid) revert InvalidInclusionProof();
if (value < minBtcPerMint || value > maxBtcPerMint)
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 < minBtcPerBurn || _value > maxBtcPerBurn) {
revert InvalidBurnAmount();
}
btcPeg.burn(msg.sender, _value);
emit Burn(msg.sender, _btc_addr, _value, _operator_id);
}
function setBtcTxVerifier(address _btcTxVerifierAddr) external onlyOwner {
btcTxVerifier = IBtcTxVerifier(_btcTxVerifierAddr);
}
function setBtcPeg(address _btcPegAddr) external onlyOwner {
btcPeg = IBtcPeg(_btcPegAddr);
}
function setMinConfirmations(uint256 _minConfirmations) external onlyOwner {
minConfirmations = _minConfirmations;
}
}// 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[] calldata 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;
import "lib/btc-light-client/packages/contracts/src/interfaces/BtcTxProof.sol";
struct Peg {
address to;
uint256 value;
uint256 blockNum;
BtcTxProof inclusionProof;
uint256 txOutIx;
bytes32 destScriptHash;
uint256 amountSats;
}
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
pragma solidity ^0.8.13;
import "./BtcTxProof.sol";
import "./IBtcMirror.sol";
/** @notice Verifies Bitcoin transaction proofs. */
interface IBtcTxVerifier {
/**
* @notice Verifies that the a transaction cleared, paying a given amount to
* a given address. Specifically, verifies a proof that the tx was
* in block N, and that block N has at least M confirmations.
*/
function verifyPayment(
uint256 minConfirmations,
uint256 blockNum,
BtcTxProof calldata inclusionProof,
uint256 txOutIx,
bytes32 destScriptHash,
uint256 amountSats
) external view returns (bool);
/** @notice Returns the underlying mirror associated with this verifier. */
function mirror() external view returns (IBtcMirror);
}// 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
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
/** @notice Proof that a transaction (rawTx) is in a given block. */
struct BtcTxProof {
/** @notice 80-byte block header. */
bytes blockHeader;
/** @notice Bitcoin transaction ID, equal to SHA256(SHA256(rawTx)) */
// This is not gas-optimized--we could omit it and compute from rawTx. But
//s the cost is minimal, and keeping it allows better revert messages.
bytes32 txId;
/** @notice Index of transaction within the block. */
uint256 txIndex;
/** @notice Merkle proof. Concatenated sibling hashes, 32*n bytes. */
bytes txMerkleProof;
/** @notice Raw transaction, HASH-SERIALIZED, no witnesses. */
bytes rawTx;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
/** @notice Tracks Bitcoin. Provides block hashes. */
interface IBtcMirror {
/** @notice Returns the Bitcoin block hash at a specific height. */
function getBlockHash(uint256 number) external view returns (bytes32);
/** @notice Returns the height of the latest block (tip of the chain). */
function getLatestBlockHeight() external view returns (uint256);
/** @notice Returns the timestamp of the lastest block, as Unix seconds. */
function getLatestBlockTime() external view returns (uint256);
/** @notice Submits a new Bitcoin chain segment (80-byte headers) s*/
function submit(uint256 blockHeight, bytes calldata blockHeaders) external;
}{
"remappings": [
"@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/",
"@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
"btc-light-client/=lib/btc-light-client/",
"ds-test/=lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/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":"InvalidInclusionProof","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"InvalidPegAddress","type":"error"},{"inputs":[],"name":"InvalidPegAmount","type":"error"},{"inputs":[],"name":"InvalidPeginAmount","type":"error"},{"inputs":[{"internalType":"uint256","name":"_provided","type":"uint256"},{"internalType":"uint256","name":"_btcAmount","type":"uint256"}],"name":"MismatchBtcAmount","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"},{"inputs":[],"name":"UsedInclusionProof","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":"btcPeg","outputs":[{"internalType":"contract IBtcPeg","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"btcTxVerifier","outputs":[{"internalType":"contract IBtcTxVerifier","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":"bytes32","name":"_txid","type":"bytes32"},{"internalType":"uint256","name":"_txIndex","type":"uint256"}],"name":"getInclusionProofKey","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_btcPegAddr","type":"address"},{"internalType":"address","name":"_btcTxVerifierAddr","type":"address"},{"internalType":"uint256","name":"_minConfirmations","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxBtcPerBurn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxBtcPerMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPegsPerMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minBtcPerBurn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minBtcPerMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minConfirmations","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"blockNum","type":"uint256"},{"components":[{"internalType":"bytes","name":"blockHeader","type":"bytes"},{"internalType":"bytes32","name":"txId","type":"bytes32"},{"internalType":"uint256","name":"txIndex","type":"uint256"},{"internalType":"bytes","name":"txMerkleProof","type":"bytes"},{"internalType":"bytes","name":"rawTx","type":"bytes"}],"internalType":"struct BtcTxProof","name":"inclusionProof","type":"tuple"},{"internalType":"uint256","name":"txOutIx","type":"uint256"},{"internalType":"bytes32","name":"destScriptHash","type":"bytes32"},{"internalType":"uint256","name":"amountSats","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":"_btcPegAddr","type":"address"}],"name":"setBtcPeg","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_btcTxVerifierAddr","type":"address"}],"name":"setBtcTxVerifier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minConfirmations","type":"uint256"}],"name":"setMinConfirmations","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxPegsPerMint","type":"uint256"},{"internalType":"uint256","name":"_maxBtcPerMint","type":"uint256"},{"internalType":"uint256","name":"_minBtcPerMint","type":"uint256"},{"internalType":"uint256","name":"_maxBtcPerBurn","type":"uint256"},{"internalType":"uint256","name":"_minBtcPerBurn","type":"uint256"}],"name":"setParameters","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
6080604052348015600e575f5ffd5b506110538061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061013d575f3560e01c806375e72c2d116100b4578063cf756fdf11610079578063cf756fdf1461028e578063d2821655146102a1578063d684534e146102b4578063e7c4393e146102d7578063f2fde38b146102e0578063ff284d75146102f3575f5ffd5b806375e72c2d1461021d5780638d6f7e46146102305780638da5cb5b14610243578063a6559fe414610273578063bd67301e1461027b575f5ffd5b80634295e857116101055780634295e857146101b85780635407bb43146101c05780635f4a396b146101c957806363fffc27146101d2578063715018a61461020c57806371ef3e2d14610214575f5ffd5b806302c7bd9614610141578063148943831461015657806321a9b5e51461017257806325424af81461017b57806332dc08ce1461018e575b5f5ffd5b61015461014f366004610c8c565b610306565b005b61015f60015481565b6040519081526020015b60405180910390f35b61015f60025481565b610154610189366004610d21565b61043b565b5f546101a0906001600160a01b031681565b6040516001600160a01b039091168152602001610169565b610154610465565b61015f60035481565b61015f60045481565b61015f6101e0366004610d41565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b61015461047b565b61015f60055481565b61015461022b366004610d21565b61048e565b6006546101a0906001600160a01b031681565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a0565b6101546104b7565b610154610289366004610d61565b6104d3565b61015461029c366004610d98565b610554565b6101546102af366004610de0565b6106e7565b5f546102c790600160a01b900460ff1681565b6040519015158152602001610169565b61015f60075481565b6101546102ee366004610d21565b6106f4565b610154610301366004610df7565b610736565b61030e610b2a565b5f54600160a01b900460ff161561033857604051630fb9408f60e41b815260040160405180910390fd5b600554821080610349575060045482115b15610367576040516302075cc160e41b815260040160405180910390fd5b5f54604051632770a7eb60e21b8152336004820152602481018490526001600160a01b0390911690639dc29fac906044015f604051808303815f87803b1580156103af575f5ffd5b505af11580156103c1573d5f5f3e3d5ffd5b50505050336001600160a01b03167fe5c5862dcc0716f0739ac20d79ddc74bcb955d3e5d5861216515cc0612c61598858585856040516104049493929190610e90565b60405180910390a261043560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b50505050565b610443610b74565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b61046d610b74565b5f805460ff60a01b19169055565b610483610b74565b61048c5f610bcf565b565b610496610b74565b5f80546001600160a01b0319166001600160a01b0392909216919091179055565b6104bf610b74565b5f805460ff60a01b1916600160a01b179055565b6104db610b74565b838311156104fc57604051637f08df5160e11b815260040160405180910390fd5b8181111561051d576040516302075cc160e41b815260040160405180910390fd5b845f0361053d57604051635355abc560e11b815260040160405180910390fd5b600194909455600292909255600355600455600555565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff165f811580156105995750825b90505f8267ffffffffffffffff1660011480156105b55750303b155b9050811580156105c3575080155b156105e15760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561060b57845460ff60401b1916600160401b1785555b6001600160a01b0389166106325760405163ca9b33e360e01b815260040160405180910390fd5b6001600160a01b03881661065957604051631c57e07f60e01b815260040160405180910390fd5b61066289610c3f565b5f80546001600160a01b03808b166001600160a01b03199283161790925560068054928a1692909116919091179055600786905583156106dc57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050565b6106ef610b74565b600755565b6106fc610b74565b6001600160a01b03811661072a57604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b61073381610bcf565b50565b61073e610b74565b610746610b2a565b600154811115610769576040516309e2b94760e31b815260040160405180910390fd5b5f81900361078a57604051635355abc560e11b815260040160405180910390fd5b5f5b81811015610afc575f8383838181106107a7576107a7610eb6565b90506020028101906107b99190610eca565b6107c7906020810190610d21565b90505f8484848181106107dc576107dc610eb6565b90506020028101906107ee9190610eca565b6020013590503685858581811061080757610807610eb6565b90506020028101906108199190610eca565b610827906060810190610ee8565b90505f86868681811061083c5761083c610eb6565b905060200281019061084e9190610eca565b6040013590505f87878781811061086757610867610eb6565b90506020028101906108799190610eca565b6080013590505f88888881811061089257610892610eb6565b90506020028101906108a49190610eca565b60a0013590505f8989898181106108bd576108bd610eb6565b90506020028101906108cf9190610eca565b604080516020808901358282015282890135828401528251808303840181526060909201909252805191012060c0919091013591505f905f8181526008602052604090205490915060ff16156109385760405163d8b7f81760e01b815260040160405180910390fd5b5f818152600860205260409020805460ff1916600117905581871461097a57604051630b2a3b1160e21b81526004810188905260248101839052604401610721565b60065460075460405163e305efd160e01b81525f926001600160a01b03169163e305efd1916109b691908a908c908b908b908b90600401610f45565b602060405180830381865afa1580156109d1573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109f59190610ffe565b905080610a15576040516303cd656760e61b815260040160405180910390fd5b600354881080610a26575060025488115b15610a4457604051637f08df5160e11b815260040160405180910390fd5b5f546040516340c10f1960e01b81526001600160a01b038b81166004830152602482018b9052909116906340c10f19906044015f604051808303815f87803b158015610a8e575f5ffd5b505af1158015610aa0573d5f5f3e3d5ffd5b50505050886001600160a01b03167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688589604051610adf91815260200190565b60405180910390a250506001909701965061078c95505050505050565b50610b2660017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5050565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610b6e57604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b33610ba67f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461048c5760405163118cdaa760e01b8152336004820152602401610721565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00546106fc90600160401b900460ff1661048c57604051631afcd79f60e31b815260040160405180910390fd5b5f5f5f5f60608587031215610c9f575f5ffd5b843567ffffffffffffffff811115610cb5575f5ffd5b8501601f81018713610cc5575f5ffd5b803567ffffffffffffffff811115610cdb575f5ffd5b876020828401011115610cec575f5ffd5b602091820198909750908601359560400135945092505050565b80356001600160a01b0381168114610d1c575f5ffd5b919050565b5f60208284031215610d31575f5ffd5b610d3a82610d06565b9392505050565b5f5f60408385031215610d52575f5ffd5b50508035926020909101359150565b5f5f5f5f5f60a08688031215610d75575f5ffd5b505083359560208501359550604085013594606081013594506080013592509050565b5f5f5f5f60808587031215610dab575f5ffd5b610db485610d06565b9350610dc260208601610d06565b9250610dd060408601610d06565b9396929550929360600135925050565b5f60208284031215610df0575f5ffd5b5035919050565b5f5f60208385031215610e08575f5ffd5b823567ffffffffffffffff811115610e1e575f5ffd5b8301601f81018513610e2e575f5ffd5b803567ffffffffffffffff811115610e44575f5ffd5b8560208260051b8401011115610e58575f5ffd5b6020919091019590945092505050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b606081525f610ea3606083018688610e68565b6020830194909452506040015292915050565b634e487b7160e01b5f52603260045260245ffd5b5f823560de19833603018112610ede575f5ffd5b9190910192915050565b5f8235609e19833603018112610ede575f5ffd5b5f5f8335601e19843603018112610f11575f5ffd5b830160208101925035905067ffffffffffffffff811115610f30575f5ffd5b803603821315610f3e575f5ffd5b9250929050565b86815285602082015260c060408201525f610f608687610efc565b60a060c0850152610f7661016085018284610e68565b602089013560e086015260408901356101008601529150610f9c90506060880188610efc565b84830360bf1901610120860152610fb4838284610e68565b92505050610fc56080880188610efc565b84830360bf1901610140860152610fdd838284610e68565b606086019890985250505050608081019290925260a0909101529392505050565b5f6020828403121561100e575f5ffd5b81518015158114610d3a575f5ffdfea2646970667358221220f69c65d821e8aee9e2d74c0648c21c512c9f854a740faafb8b5a6adfa22207c664736f6c634300081c0033
Deployed Bytecode
0x608060405234801561000f575f5ffd5b506004361061013d575f3560e01c806375e72c2d116100b4578063cf756fdf11610079578063cf756fdf1461028e578063d2821655146102a1578063d684534e146102b4578063e7c4393e146102d7578063f2fde38b146102e0578063ff284d75146102f3575f5ffd5b806375e72c2d1461021d5780638d6f7e46146102305780638da5cb5b14610243578063a6559fe414610273578063bd67301e1461027b575f5ffd5b80634295e857116101055780634295e857146101b85780635407bb43146101c05780635f4a396b146101c957806363fffc27146101d2578063715018a61461020c57806371ef3e2d14610214575f5ffd5b806302c7bd9614610141578063148943831461015657806321a9b5e51461017257806325424af81461017b57806332dc08ce1461018e575b5f5ffd5b61015461014f366004610c8c565b610306565b005b61015f60015481565b6040519081526020015b60405180910390f35b61015f60025481565b610154610189366004610d21565b61043b565b5f546101a0906001600160a01b031681565b6040516001600160a01b039091168152602001610169565b610154610465565b61015f60035481565b61015f60045481565b61015f6101e0366004610d41565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b61015461047b565b61015f60055481565b61015461022b366004610d21565b61048e565b6006546101a0906001600160a01b031681565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a0565b6101546104b7565b610154610289366004610d61565b6104d3565b61015461029c366004610d98565b610554565b6101546102af366004610de0565b6106e7565b5f546102c790600160a01b900460ff1681565b6040519015158152602001610169565b61015f60075481565b6101546102ee366004610d21565b6106f4565b610154610301366004610df7565b610736565b61030e610b2a565b5f54600160a01b900460ff161561033857604051630fb9408f60e41b815260040160405180910390fd5b600554821080610349575060045482115b15610367576040516302075cc160e41b815260040160405180910390fd5b5f54604051632770a7eb60e21b8152336004820152602481018490526001600160a01b0390911690639dc29fac906044015f604051808303815f87803b1580156103af575f5ffd5b505af11580156103c1573d5f5f3e3d5ffd5b50505050336001600160a01b03167fe5c5862dcc0716f0739ac20d79ddc74bcb955d3e5d5861216515cc0612c61598858585856040516104049493929190610e90565b60405180910390a261043560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b50505050565b610443610b74565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b61046d610b74565b5f805460ff60a01b19169055565b610483610b74565b61048c5f610bcf565b565b610496610b74565b5f80546001600160a01b0319166001600160a01b0392909216919091179055565b6104bf610b74565b5f805460ff60a01b1916600160a01b179055565b6104db610b74565b838311156104fc57604051637f08df5160e11b815260040160405180910390fd5b8181111561051d576040516302075cc160e41b815260040160405180910390fd5b845f0361053d57604051635355abc560e11b815260040160405180910390fd5b600194909455600292909255600355600455600555565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff165f811580156105995750825b90505f8267ffffffffffffffff1660011480156105b55750303b155b9050811580156105c3575080155b156105e15760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561060b57845460ff60401b1916600160401b1785555b6001600160a01b0389166106325760405163ca9b33e360e01b815260040160405180910390fd5b6001600160a01b03881661065957604051631c57e07f60e01b815260040160405180910390fd5b61066289610c3f565b5f80546001600160a01b03808b166001600160a01b03199283161790925560068054928a1692909116919091179055600786905583156106dc57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050565b6106ef610b74565b600755565b6106fc610b74565b6001600160a01b03811661072a57604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b61073381610bcf565b50565b61073e610b74565b610746610b2a565b600154811115610769576040516309e2b94760e31b815260040160405180910390fd5b5f81900361078a57604051635355abc560e11b815260040160405180910390fd5b5f5b81811015610afc575f8383838181106107a7576107a7610eb6565b90506020028101906107b99190610eca565b6107c7906020810190610d21565b90505f8484848181106107dc576107dc610eb6565b90506020028101906107ee9190610eca565b6020013590503685858581811061080757610807610eb6565b90506020028101906108199190610eca565b610827906060810190610ee8565b90505f86868681811061083c5761083c610eb6565b905060200281019061084e9190610eca565b6040013590505f87878781811061086757610867610eb6565b90506020028101906108799190610eca565b6080013590505f88888881811061089257610892610eb6565b90506020028101906108a49190610eca565b60a0013590505f8989898181106108bd576108bd610eb6565b90506020028101906108cf9190610eca565b604080516020808901358282015282890135828401528251808303840181526060909201909252805191012060c0919091013591505f905f8181526008602052604090205490915060ff16156109385760405163d8b7f81760e01b815260040160405180910390fd5b5f818152600860205260409020805460ff1916600117905581871461097a57604051630b2a3b1160e21b81526004810188905260248101839052604401610721565b60065460075460405163e305efd160e01b81525f926001600160a01b03169163e305efd1916109b691908a908c908b908b908b90600401610f45565b602060405180830381865afa1580156109d1573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109f59190610ffe565b905080610a15576040516303cd656760e61b815260040160405180910390fd5b600354881080610a26575060025488115b15610a4457604051637f08df5160e11b815260040160405180910390fd5b5f546040516340c10f1960e01b81526001600160a01b038b81166004830152602482018b9052909116906340c10f19906044015f604051808303815f87803b158015610a8e575f5ffd5b505af1158015610aa0573d5f5f3e3d5ffd5b50505050886001600160a01b03167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688589604051610adf91815260200190565b60405180910390a250506001909701965061078c95505050505050565b50610b2660017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5050565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610b6e57604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b33610ba67f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461048c5760405163118cdaa760e01b8152336004820152602401610721565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00546106fc90600160401b900460ff1661048c57604051631afcd79f60e31b815260040160405180910390fd5b5f5f5f5f60608587031215610c9f575f5ffd5b843567ffffffffffffffff811115610cb5575f5ffd5b8501601f81018713610cc5575f5ffd5b803567ffffffffffffffff811115610cdb575f5ffd5b876020828401011115610cec575f5ffd5b602091820198909750908601359560400135945092505050565b80356001600160a01b0381168114610d1c575f5ffd5b919050565b5f60208284031215610d31575f5ffd5b610d3a82610d06565b9392505050565b5f5f60408385031215610d52575f5ffd5b50508035926020909101359150565b5f5f5f5f5f60a08688031215610d75575f5ffd5b505083359560208501359550604085013594606081013594506080013592509050565b5f5f5f5f60808587031215610dab575f5ffd5b610db485610d06565b9350610dc260208601610d06565b9250610dd060408601610d06565b9396929550929360600135925050565b5f60208284031215610df0575f5ffd5b5035919050565b5f5f60208385031215610e08575f5ffd5b823567ffffffffffffffff811115610e1e575f5ffd5b8301601f81018513610e2e575f5ffd5b803567ffffffffffffffff811115610e44575f5ffd5b8560208260051b8401011115610e58575f5ffd5b6020919091019590945092505050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b606081525f610ea3606083018688610e68565b6020830194909452506040015292915050565b634e487b7160e01b5f52603260045260245ffd5b5f823560de19833603018112610ede575f5ffd5b9190910192915050565b5f8235609e19833603018112610ede575f5ffd5b5f5f8335601e19843603018112610f11575f5ffd5b830160208101925035905067ffffffffffffffff811115610f30575f5ffd5b803603821315610f3e575f5ffd5b9250929050565b86815285602082015260c060408201525f610f608687610efc565b60a060c0850152610f7661016085018284610e68565b602089013560e086015260408901356101008601529150610f9c90506060880188610efc565b84830360bf1901610120860152610fb4838284610e68565b92505050610fc56080880188610efc565b84830360bf1901610140860152610fdd838284610e68565b606086019890985250505050608081019290925260a0909101529392505050565b5f6020828403121561100e575f5ffd5b81518015158114610d3a575f5ffdfea2646970667358221220f69c65d821e8aee9e2d74c0648c21c512c9f854a740faafb8b5a6adfa22207c664736f6c634300081c0033
Loading...
Loading
Loading...
Loading
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.