Source Code
Overview
ETH Balance
ETH Value
$0.00| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 5730100 | 585 days ago | 0 ETH | ||||
| 5727702 | 585 days ago | 0 ETH | ||||
| 5725301 | 585 days ago | 0 ETH | ||||
| 5722879 | 585 days ago | 0 ETH | ||||
| 5720474 | 585 days ago | 0 ETH | ||||
| 5718071 | 585 days ago | 0 ETH | ||||
| 5715685 | 585 days ago | 0 ETH | ||||
| 5713278 | 585 days ago | 0 ETH | ||||
| 5710866 | 585 days ago | 0 ETH | ||||
| 5708465 | 585 days ago | 0 ETH | ||||
| 5706069 | 585 days ago | 0 ETH | ||||
| 5703876 | 586 days ago | 0 ETH | ||||
| 5701465 | 586 days ago | 0 ETH | ||||
| 5699074 | 586 days ago | 0 ETH | ||||
| 5696679 | 586 days ago | 0 ETH | ||||
| 5694275 | 586 days ago | 0 ETH | ||||
| 5691854 | 586 days ago | 0 ETH | ||||
| 5689438 | 586 days ago | 0 ETH | ||||
| 5687039 | 586 days ago | 0 ETH | ||||
| 5684629 | 586 days ago | 0 ETH | ||||
| 5682222 | 586 days ago | 0 ETH | ||||
| 5679797 | 586 days ago | 0 ETH | ||||
| 5677414 | 586 days ago | 0 ETH | ||||
| 5675012 | 586 days ago | 0 ETH | ||||
| 5672622 | 586 days ago | 0 ETH |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
BscBlockUpdater
Compiler Version
v0.8.14+commit.80d49f37
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "contracts/interface/IBlockUpdater.sol";
import "contracts/interface/ICircuitVerifier.sol";
contract BscBlockUpdater is IBlockUpdater, Initializable, OwnableUpgradeable {
event ImportValidator(uint256 indexed epoch, uint256 indexed blockNumber, bytes32 blockHash, bytes32 receiptHash);
event ModBlockConfirmation(uint256 oldBlockConfirmation, uint256 newBlockConfirmation);
struct ParsedInput {
uint256 blockNumber;
uint256 epochValidatorCount;
uint256 blockConfirmation;
bytes32 blockHash;
bytes32 receiptHash;
bytes32 signingValidatorSetHash;
bytes32 epochValidatorSetHash;
}
struct ZkProof {
uint256[2] a;
uint256[2][2] b;
uint256[2] c;
uint256[] inputs;
}
uint256 public currentEpoch;
uint256 public minBlockConfirmation;
uint256 public regularValidatorCount;
uint256 public publicInputSize;
IBlockUpdater public oldBlockUpdater;
mapping(uint256 => ICircuitVerifier) public blockVerifier;
// epoch=>validatorHash
mapping(uint256 => bytes32) public validatorHashes;
// epoch=>validatorCount
mapping(uint256 => uint256) private validatorCounts;
// blockHash=>receiptsRoot =>BlockConfirmation
mapping(bytes32 => mapping(bytes32 => uint256)) public blockInfos;
function initialize(
uint256 _epoch,
uint256 _validatorCount,
uint256 _preValidatorCount,
bytes32 _epochValidatorSetHash,
bytes32 _preEpochValidatorSetHash,
bytes32 _blockHash,
bytes32 _receiptHash,
uint256 _minBlockConfirmation,
uint256 _regularValidatorCount) public initializer {
__Ownable_init();
currentEpoch = _epoch;
validatorHashes[_epoch] = _epochValidatorSetHash;
validatorHashes[_epoch - 1] = _preEpochValidatorSetHash;
validatorCounts[_epoch] = _validatorCount;
_setValidatorCount(_epoch, _validatorCount);
_setValidatorCount(_epoch - 1, _preValidatorCount);
blockInfos[_blockHash][_receiptHash] = _minBlockConfirmation;
minBlockConfirmation = _minBlockConfirmation;
regularValidatorCount = _regularValidatorCount;
publicInputSize = 11;
}
function importBlock(bytes calldata _proof) external {
ZkProof memory proofData;
(proofData.a, proofData.b, proofData.c, proofData.inputs) = abi.decode(_proof, (uint256[2], uint256[2][2], uint256[2], uint256[]));
uint256 blockSize = proofData.inputs.length / publicInputSize;
require(blockSize * publicInputSize == proofData.inputs.length, "invalid public input size");
ICircuitVerifier circuitVerifier = blockVerifier[blockSize];
require(address(circuitVerifier) != address(0), "not set verifier");
uint256[1] memory compressInput;
compressInput[0] = _hashInput(proofData.inputs);
require(circuitVerifier.verifyProof(proofData.a, proofData.b, proofData.c, compressInput), "invalid proof");
ParsedInput[] memory parsedInputs = _parseInput(proofData.inputs, blockSize);
for (uint256 i = 0; i < blockSize; i++) {
if (i > 0 && parsedInputs[i].blockHash == parsedInputs[i - 1].blockHash) {
break;
}
if (parsedInputs[i].blockNumber % 200 == 0) {
_importValidator(parsedInputs[i]);
} else {
_importBlock(parsedInputs[i]);
}
}
}
function checkBlock(bytes32 _blockHash, bytes32 _receiptHash) external view returns (bool) {
(bool exist,) = _checkBlock(_blockHash, _receiptHash);
return exist;
}
function checkBlockConfirmation(bytes32 _blockHash, bytes32 _receiptHash) external view returns (bool, uint256) {
return _checkBlock(_blockHash, _receiptHash);
}
function _checkBlock(bytes32 _blockHash, bytes32 _receiptHash) internal view returns (bool, uint256) {
uint256 blockConfirmation = blockInfos[_blockHash][_receiptHash];
if (blockConfirmation > 0) {
return (true, blockConfirmation);
}
if (address(oldBlockUpdater) != address(0)) {
return oldBlockUpdater.checkBlockConfirmation(_blockHash, _receiptHash);
}
return (false, 0);
}
function _importBlock(ParsedInput memory parsedInput) internal {
require(parsedInput.blockConfirmation >= minBlockConfirmation, "Not enough block confirmations");
(bool exist,uint256 blockConfirmation) = _checkBlock(parsedInput.blockHash, parsedInput.receiptHash);
if (exist && parsedInput.blockConfirmation <= blockConfirmation) {
revert("already exist");
}
uint256 epoch = _computeEpoch(parsedInput.blockNumber);
uint256 preEpoch = epoch - 1;
require(validatorHashes[epoch] != bytes32(0), "epoch no upload");
if (parsedInput.blockNumber % 200 <= getValidatorCount(preEpoch) / 2) {
require(parsedInput.signingValidatorSetHash == validatorHashes[preEpoch], "invalid preEpochValidatorSetHash");
} else {
require(parsedInput.signingValidatorSetHash == validatorHashes[epoch], "invalid epochValidatorSetHash");
}
blockInfos[parsedInput.blockHash][parsedInput.receiptHash] = parsedInput.blockConfirmation;
emit ImportBlock(parsedInput.blockNumber, parsedInput.blockHash, parsedInput.receiptHash);
}
function _importValidator(ParsedInput memory parsedInput) internal {
uint256 epoch = _computeEpoch(parsedInput.blockNumber);
uint256 preEpoch = epoch - 1;
require(parsedInput.epochValidatorSetHash != bytes32(0), "invalid epochValidatorSetHash");
require(parsedInput.signingValidatorSetHash != bytes32(0), "invalid signingValidatorSetHash");
require(parsedInput.blockConfirmation >= minBlockConfirmation, "Not enough block confirmations");
require(validatorHashes[epoch] == bytes32(0), "epoch already exist");
require(parsedInput.signingValidatorSetHash == validatorHashes[preEpoch], "invalid preEpochValidatorSetHash");
validatorHashes[epoch] = parsedInput.epochValidatorSetHash;
_setValidatorCount(epoch, parsedInput.epochValidatorCount);
currentEpoch = epoch;
blockInfos[parsedInput.blockHash][parsedInput.receiptHash] = parsedInput.blockConfirmation;
emit ImportValidator(epoch, parsedInput.blockNumber, parsedInput.blockHash, parsedInput.receiptHash);
}
function _setValidatorCount(uint256 _epoch, uint256 _validatorCount) internal {
if (_validatorCount != regularValidatorCount) {
validatorCounts[_epoch] = _validatorCount;
}
}
function getValidatorCount(uint256 _epoch) public view returns (uint256) {
if (validatorCounts[_epoch] != 0) {
return validatorCounts[_epoch];
}
return regularValidatorCount;
}
function _parseInput(uint256[] memory _inputs, uint256 _blockSize) internal pure returns (ParsedInput[] memory) {
uint256 index = 0;
ParsedInput[] memory result = new ParsedInput[](_blockSize);
for (uint256 i = 0; i < _blockSize; i++) {
result[i].blockNumber = _inputs[index];
index++;
result[i].blockHash = bytes32((_inputs[index + 1] << 128) | _inputs[index]);
index += 2;
result[i].receiptHash = bytes32((_inputs[index + 1] << 128) | _inputs[index]);
index += 2;
result[i].signingValidatorSetHash = bytes32((_inputs[index + 1] << 128) | _inputs[index]);
index += 2;
result[i].epochValidatorSetHash = bytes32((_inputs[index + 1] << 128) | _inputs[index]);
index += 2;
result[i].epochValidatorCount = _inputs[index];
index++;
result[i].blockConfirmation = _inputs[index];
index++;
}
return result;
}
function _hashInput(uint256[] memory _inputs) internal pure returns (uint256) {
uint256 n = _inputs.length;
uint256 inputLength = n * 32;
bytes memory packedInputs;
assembly {
packedInputs := mload(0x40) // Get the free memory pointer
mstore(0x40, add(packedInputs, add(inputLength, 0x20))) // Update the free memory pointer
let inputOffset := packedInputs
mstore(inputOffset, inputLength) // Store the length of the concatenated inputs
inputOffset := add(inputOffset, 0x20) // Move the pointer to the start of the concatenated inputs
for {let i := 0} lt(i, n) {i := add(i, 1)} {
let inputValue := mload(add(_inputs, mul(add(i, 1), 0x20))) // Load the input value
mstore(inputOffset, inputValue) // Store the input value at the current offset
inputOffset := add(inputOffset, 0x20) // Move the pointer to the next position
}
}
uint256 computedHash = uint256(keccak256(packedInputs));
return computedHash / 256;
}
function _computeEpoch(uint256 _blockNumber) internal pure returns (uint256) {
return _blockNumber / 200;
}
//----------------------------------------------------------------------------------
// onlyOwner
function setBlockConfirmation(uint256 _minBlockConfirmation) external onlyOwner {
emit ModBlockConfirmation(minBlockConfirmation, _minBlockConfirmation);
minBlockConfirmation = _minBlockConfirmation;
}
function setOldBlockUpdater(address _oldBlockUpdater) external onlyOwner {
oldBlockUpdater = IBlockUpdater(_oldBlockUpdater);
}
function setPublicInputSize(uint256 _publicInputSize) external onlyOwner {
publicInputSize = _publicInputSize;
}
function setVerifier(uint256 _blockSize, address _blockVerifier) external onlyOwner {
blockVerifier[_blockSize] = ICircuitVerifier(_blockVerifier);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/ContextUpgradeable.sol";
import "../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.
*
* By default, the owner account will be the one that deploys the contract. 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 {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
function __Ownable_init() internal onlyInitializing {
__Ownable_init_unchained();
}
function __Ownable_init_unchained() internal onlyInitializing {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @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 {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[49] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)
pragma solidity ^0.8.2;
import "../../utils/AddressUpgradeable.sol";
/**
* @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 Indicates that the contract has been initialized.
* @custom:oz-retyped-from bool
*/
uint8 private _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private _initializing;
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint8 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 functions marked with `initializer` can be nested in the context of a
* constructor.
*
* Emits an {Initialized} event.
*/
modifier initializer() {
bool isTopLevelCall = !_initializing;
require(
(isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
"Initializable: contract is already initialized"
);
_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 255 will prevent any future reinitialization.
*
* Emits an {Initialized} event.
*/
modifier reinitializer(uint8 version) {
require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
_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() {
require(_initializing, "Initializable: contract is not initializing");
_;
}
/**
* @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 {
require(!_initializing, "Initializable: contract is initializing");
if (_initialized != type(uint8).max) {
_initialized = type(uint8).max;
emit Initialized(type(uint8).max);
}
}
/**
* @dev Returns the highest version that has been initialized. See {reinitializer}.
*/
function _getInitializedVersion() internal view returns (uint8) {
return _initialized;
}
/**
* @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
*/
function _isInitializing() internal view returns (bool) {
return _initializing;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library AddressUpgradeable {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
import "../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;
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IBlockUpdater {
event ImportBlock(uint256 identifier, bytes32 blockHash, bytes32 receiptHash);
function importBlock(bytes calldata _proof) external;
function checkBlock(bytes32 _blockHash, bytes32 _receiptsRoot) external view returns (bool);
function checkBlockConfirmation(bytes32 _blockHash, bytes32 _receiptsRoot) external view returns (bool, uint256);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface ICircuitVerifier {
function verifyProof(
uint256[2] memory a,
uint256[2][2] memory b,
uint256[2] memory c,
uint256[1] memory input
) external view returns (bool);
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"identifier","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"blockHash","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"receiptHash","type":"bytes32"}],"name":"ImportBlock","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"blockNumber","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"blockHash","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"receiptHash","type":"bytes32"}],"name":"ImportValidator","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldBlockConfirmation","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBlockConfirmation","type":"uint256"}],"name":"ModBlockConfirmation","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":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"blockInfos","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"blockVerifier","outputs":[{"internalType":"contract ICircuitVerifier","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_blockHash","type":"bytes32"},{"internalType":"bytes32","name":"_receiptHash","type":"bytes32"}],"name":"checkBlock","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_blockHash","type":"bytes32"},{"internalType":"bytes32","name":"_receiptHash","type":"bytes32"}],"name":"checkBlockConfirmation","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_epoch","type":"uint256"}],"name":"getValidatorCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_proof","type":"bytes"}],"name":"importBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_epoch","type":"uint256"},{"internalType":"uint256","name":"_validatorCount","type":"uint256"},{"internalType":"uint256","name":"_preValidatorCount","type":"uint256"},{"internalType":"bytes32","name":"_epochValidatorSetHash","type":"bytes32"},{"internalType":"bytes32","name":"_preEpochValidatorSetHash","type":"bytes32"},{"internalType":"bytes32","name":"_blockHash","type":"bytes32"},{"internalType":"bytes32","name":"_receiptHash","type":"bytes32"},{"internalType":"uint256","name":"_minBlockConfirmation","type":"uint256"},{"internalType":"uint256","name":"_regularValidatorCount","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"minBlockConfirmation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oldBlockUpdater","outputs":[{"internalType":"contract IBlockUpdater","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicInputSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"regularValidatorCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minBlockConfirmation","type":"uint256"}],"name":"setBlockConfirmation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oldBlockUpdater","type":"address"}],"name":"setOldBlockUpdater","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_publicInputSize","type":"uint256"}],"name":"setPublicInputSize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_blockSize","type":"uint256"},{"internalType":"address","name":"_blockVerifier","type":"address"}],"name":"setVerifier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"validatorHashes","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"}]Contract Creation Code
608060405234801561001057600080fd5b50611a64806100206000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c8063953537f8116100ad578063bd043d8811610071578063bd043d8814610271578063c4d98bce14610291578063cc373045146102ba578063dc3588ea146102cd578063f2fde38b146102f057600080fd5b8063953537f8146102265780639c6a3f56146102395780639d0167e714610242578063a4f2b42f14610255578063a9ef31de1461026857600080fd5b8063412ec79d116100f4578063412ec79d146101d457806370e1e09b146101e7578063715018a6146101f057806376671808146101f85780638da5cb5b1461020157600080fd5b806302952ab6146101315780631957ba4e1461016f5780631bf4864e14610184578063254252af1461019757806336fbafad146101c1575b600080fd5b61015c61013f366004611491565b606d60209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b61018261017d3660046114cf565b610303565b005b6101826101923660046114fb565b610339565b6101aa6101a5366004611491565b610363565b604080519215158352602083019190915201610166565b6101826101cf36600461151d565b61037c565b6101826101e236600461158f565b610656565b61015c60685481565b610182610663565b61015c60655481565b6033546001600160a01b03165b6040516001600160a01b039091168152602001610166565b6101826102343660046115a8565b610677565b61015c60675481565b61018261025036600461158f565b610829565b60695461020e906001600160a01b031681565b61015c60665481565b61015c61027f36600461158f565b606b6020526000908152604090205481565b61020e61029f36600461158f565b606a602052600090815260409020546001600160a01b031681565b61015c6102c836600461158f565b610872565b6102e06102db366004611491565b6108a1565b6040519015158152602001610166565b6101826102fe3660046114fb565b6108b7565b61030b610930565b6000918252606a602052604090912080546001600160a01b0319166001600160a01b03909216919091179055565b610341610930565b606980546001600160a01b0319166001600160a01b0392909216919091179055565b600080610370848461098a565b915091505b9250929050565b6103846113ee565b61039082840184611731565b606085018190526040850191909152602084019190915290825260685490516000916103bb91611817565b9050816060015151606854826103d1919061182b565b146104235760405162461bcd60e51b815260206004820152601960248201527f696e76616c6964207075626c696320696e7075742073697a650000000000000060448201526064015b60405180910390fd5b6000818152606a60205260409020546001600160a01b03168061047b5760405162461bcd60e51b815260206004820152601060248201526f3737ba1039b2ba103b32b934b334b2b960811b604482015260640161041a565b610483611428565b6104908460600151610a52565b81528351602085015160408087015190516343753b4d60e01b81526001600160a01b038616936343753b4d936104cf9391929091908790600401611889565b602060405180830381865afa1580156104ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105109190611940565b61054c5760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b210383937b7b360991b604482015260640161041a565b600061055c856060015185610aba565b905060005b8481101561064c576000811180156105bc57508161058060018361195b565b815181106105905761059061184a565b6020026020010151606001518282815181106105ae576105ae61184a565b602002602001015160600151145b61064c5760c88282815181106105d4576105d461184a565b6020026020010151600001516105ea9190611972565b600003610618576106138282815181106106065761060661184a565b6020026020010151610e0c565b61063a565b61063a82828151811061062d5761062d61184a565b602002602001015161107a565b8061064481611986565b915050610561565b5050505050505050565b61065e610930565b606855565b61066b610930565b610675600061130b565b565b600054610100900460ff16158080156106975750600054600160ff909116105b806106b15750303b1580156106b1575060005460ff166001145b6107145760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161041a565b6000805460ff191660011790558015610737576000805461ff0019166101001790555b61073f61135d565b60658a905560008a8152606b602081905260408220899055879161076460018e61195b565b81526020019081526020016000208190555088606c60008c8152602001908152602001600020819055506107988a8a61138c565b6107ac6107a660018c61195b565b8961138c565b6000858152606d60209081526040808320878452909152902083905560668390556067829055600b606855801561081d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050505050565b610831610930565b60665460408051918252602082018390527f5ab2642364d92dafb2be757706f004ccf8325cca566bc2d0742133d316a5eaed910160405180910390a1606655565b6000818152606c60205260408120541561089957506000908152606c602052604090205490565b505060675490565b6000806108ae848461098a565b50949350505050565b6108bf610930565b6001600160a01b0381166109245760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161041a565b61092d8161130b565b50565b6033546001600160a01b031633146106755760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161041a565b6000828152606d60209081526040808320848452909152812054819080156109b757600192509050610375565b6069546001600160a01b031615610a455760695460405163254252af60e01b815260048101879052602481018690526001600160a01b039091169063254252af906044016040805180830381865afa158015610a17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3b919061199f565b9250925050610375565b5060009485945092505050565b805160009081610a6382602061182b565b6040805160208382018101909252828152919250810160005b84811015610a9b57600101602081810288015183529190910190610a7c565b505080516020820120610ab061010082611817565b9695505050505050565b60606000808367ffffffffffffffff811115610ad857610ad8611607565b604051908082528060200260200182016040528015610b3f57816020015b6040805160e08101825260008082526020808301829052928201819052606082018190526080820181905260a0820181905260c08201528252600019909201910181610af65790505b50905060005b848110156108ae57858381518110610b5f57610b5f61184a565b6020026020010151828281518110610b7957610b7961184a565b60209081029190910101515282610b8f81611986565b935050858381518110610ba457610ba461184a565b6020026020010151608087856001610bbc91906119cb565b81518110610bcc57610bcc61184a565b6020026020010151901b1760001b828281518110610bec57610bec61184a565b602090810291909101015160600152610c066002846119cb565b9250858381518110610c1a57610c1a61184a565b6020026020010151608087856001610c3291906119cb565b81518110610c4257610c4261184a565b6020026020010151901b1760001b828281518110610c6257610c6261184a565b602090810291909101015160800152610c7c6002846119cb565b9250858381518110610c9057610c9061184a565b6020026020010151608087856001610ca891906119cb565b81518110610cb857610cb861184a565b6020026020010151901b1760001b828281518110610cd857610cd861184a565b602090810291909101015160a00152610cf26002846119cb565b9250858381518110610d0657610d0661184a565b6020026020010151608087856001610d1e91906119cb565b81518110610d2e57610d2e61184a565b6020026020010151901b1760001b828281518110610d4e57610d4e61184a565b602090810291909101015160c00152610d686002846119cb565b9250858381518110610d7c57610d7c61184a565b6020026020010151828281518110610d9657610d9661184a565b602090810291909101810151015282610dae81611986565b935050858381518110610dc357610dc361184a565b6020026020010151828281518110610ddd57610ddd61184a565b60209081029190910101516040015282610df681611986565b9350508080610e0490611986565b915050610b45565b6000610e1b82600001516113ab565b90506000610e2a60018361195b565b60c0840151909150610e7e5760405162461bcd60e51b815260206004820152601d60248201527f696e76616c69642065706f636856616c696461746f7253657448617368000000604482015260640161041a565b60a0830151610ecf5760405162461bcd60e51b815260206004820152601f60248201527f696e76616c6964207369676e696e6756616c696461746f725365744861736800604482015260640161041a565b60665483604001511015610f255760405162461bcd60e51b815260206004820152601e60248201527f4e6f7420656e6f75676820626c6f636b20636f6e6669726d6174696f6e730000604482015260640161041a565b6000828152606b602052604090205415610f775760405162461bcd60e51b8152602060048201526013602482015272195c1bd8da08185b1c9958591e48195e1a5cdd606a1b604482015260640161041a565b6000818152606b602052604090205460a084015114610fd85760405162461bcd60e51b815260206004820181905260248201527f696e76616c69642070726545706f636856616c696461746f7253657448617368604482015260640161041a565b8260c00151606b60008481526020019081526020016000208190555061100282846020015161138c565b60658290556040838101516060850180516000908152606d6020908152848220608089018051845290825291859020939093558651915190518451918252928101929092529184917fb20f83d7fca2253dd4a37d0ee1922398cbbecf5a89899514947161ae70c0037f910160405180910390a3505050565b606654816040015110156110d05760405162461bcd60e51b815260206004820152601e60248201527f4e6f7420656e6f75676820626c6f636b20636f6e6669726d6174696f6e730000604482015260640161041a565b6000806110e58360600151846080015161098a565b915091508180156110fa575080836040015111155b156111375760405162461bcd60e51b815260206004820152600d60248201526c185b1c9958591e48195e1a5cdd609a1b604482015260640161041a565b600061114684600001516113ab565b9050600061115560018361195b565b6000838152606b60205260409020549091506111a55760405162461bcd60e51b815260206004820152600f60248201526e195c1bd8da081b9bc81d5c1b1bd859608a1b604482015260640161041a565b60026111b082610872565b6111ba9190611817565b85516111c89060c890611972565b11611233576000818152606b602052604090205460a08601511461122e5760405162461bcd60e51b815260206004820181905260248201527f696e76616c69642070726545706f636856616c696461746f7253657448617368604482015260640161041a565b611294565b6000828152606b602052604090205460a0860151146112945760405162461bcd60e51b815260206004820152601d60248201527f696e76616c69642065706f636856616c696461746f7253657448617368000000604482015260640161041a565b604085810151606080880180516000908152606d602090815285822060808c01805184529082529186902094909455895191519051855192835293820152928301919091527fa3fa2e60f4d1c7f6bd60da77a4be0625773dfb6b22c54fe77e725d03e49cdf2e910160405180910390a15050505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166113845760405162461bcd60e51b815260040161041a906119e3565b6106756113be565b60675481146113a7576000828152606c602052604090208190555b5050565b60006113b860c883611817565b92915050565b600054610100900460ff166113e55760405162461bcd60e51b815260040161041a906119e3565b6106753361130b565b6040518060800160405280611401611446565b815260200161140e611464565b815260200161141b611446565b8152602001606081525090565b60405180602001604052806001906020820280368337509192915050565b60405180604001604052806002906020820280368337509192915050565b60405180604001604052806002905b61147b611446565b8152602001906001900390816114735790505090565b600080604083850312156114a457600080fd5b50508035926020909101359150565b80356001600160a01b03811681146114ca57600080fd5b919050565b600080604083850312156114e257600080fd5b823591506114f2602084016114b3565b90509250929050565b60006020828403121561150d57600080fd5b611516826114b3565b9392505050565b6000806020838503121561153057600080fd5b823567ffffffffffffffff8082111561154857600080fd5b818501915085601f83011261155c57600080fd5b81358181111561156b57600080fd5b86602082850101111561157d57600080fd5b60209290920196919550909350505050565b6000602082840312156115a157600080fd5b5035919050565b60008060008060008060008060006101208a8c0312156115c757600080fd5b505087359960208901359950604089013598606081013598506080810135975060a0810135965060c0810135955060e08101359450610100013592509050565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff8111828210171561164057611640611607565b60405290565b600082601f83011261165757600080fd5b61165f61161d565b80604084018581111561167157600080fd5b845b8181101561168b578035845260209384019301611673565b509095945050505050565b600082601f8301126116a757600080fd5b8135602067ffffffffffffffff808311156116c4576116c4611607565b8260051b604051601f19603f830116810181811084821117156116e9576116e9611607565b60405293845285810183019383810192508785111561170757600080fd5b83870191505b848210156117265781358352918301919083019061170d565b979650505050505050565b600080600080610120858703121561174857600080fd5b6117528686611646565b9350604086605f87011261176557600080fd5b61176d61161d565b8060c088018981111561177f57600080fd5b8389015b818110156117a4576117958b82611646565b84526020909301928401611783565b508196506117b28a82611646565b95505050505061010085013567ffffffffffffffff8111156117d357600080fd5b6117df87828801611696565b91505092959194509250565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082611826576118266117eb565b500490565b600081600019048311821515161561184557611845611801565b500290565b634e487b7160e01b600052603260045260246000fd5b8060005b6002811015611883578151845260209384019390910190600101611864565b50505050565b61012081016118988287611860565b60408083018660005b60028082106118b057506118eb565b82518460005b838110156118d45782518252602092830192909101906001016118b6565b5050509284019250602091909101906001016118a1565b505050506118fc60c0830185611860565b61010082018360005b6001811015611924578151835260209283019290910190600101611905565b50505095945050505050565b805180151581146114ca57600080fd5b60006020828403121561195257600080fd5b61151682611930565b60008282101561196d5761196d611801565b500390565b600082611981576119816117eb565b500690565b60006001820161199857611998611801565b5060010190565b600080604083850312156119b257600080fd5b6119bb83611930565b9150602083015190509250929050565b600082198211156119de576119de611801565b500190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea2646970667358221220627cf5f078c8eefecf85bdaea871c04c518ec91c0a5f7f8e5e3997de20cf291064736f6c634300080e0033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061012c5760003560e01c8063953537f8116100ad578063bd043d8811610071578063bd043d8814610271578063c4d98bce14610291578063cc373045146102ba578063dc3588ea146102cd578063f2fde38b146102f057600080fd5b8063953537f8146102265780639c6a3f56146102395780639d0167e714610242578063a4f2b42f14610255578063a9ef31de1461026857600080fd5b8063412ec79d116100f4578063412ec79d146101d457806370e1e09b146101e7578063715018a6146101f057806376671808146101f85780638da5cb5b1461020157600080fd5b806302952ab6146101315780631957ba4e1461016f5780631bf4864e14610184578063254252af1461019757806336fbafad146101c1575b600080fd5b61015c61013f366004611491565b606d60209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b61018261017d3660046114cf565b610303565b005b6101826101923660046114fb565b610339565b6101aa6101a5366004611491565b610363565b604080519215158352602083019190915201610166565b6101826101cf36600461151d565b61037c565b6101826101e236600461158f565b610656565b61015c60685481565b610182610663565b61015c60655481565b6033546001600160a01b03165b6040516001600160a01b039091168152602001610166565b6101826102343660046115a8565b610677565b61015c60675481565b61018261025036600461158f565b610829565b60695461020e906001600160a01b031681565b61015c60665481565b61015c61027f36600461158f565b606b6020526000908152604090205481565b61020e61029f36600461158f565b606a602052600090815260409020546001600160a01b031681565b61015c6102c836600461158f565b610872565b6102e06102db366004611491565b6108a1565b6040519015158152602001610166565b6101826102fe3660046114fb565b6108b7565b61030b610930565b6000918252606a602052604090912080546001600160a01b0319166001600160a01b03909216919091179055565b610341610930565b606980546001600160a01b0319166001600160a01b0392909216919091179055565b600080610370848461098a565b915091505b9250929050565b6103846113ee565b61039082840184611731565b606085018190526040850191909152602084019190915290825260685490516000916103bb91611817565b9050816060015151606854826103d1919061182b565b146104235760405162461bcd60e51b815260206004820152601960248201527f696e76616c6964207075626c696320696e7075742073697a650000000000000060448201526064015b60405180910390fd5b6000818152606a60205260409020546001600160a01b03168061047b5760405162461bcd60e51b815260206004820152601060248201526f3737ba1039b2ba103b32b934b334b2b960811b604482015260640161041a565b610483611428565b6104908460600151610a52565b81528351602085015160408087015190516343753b4d60e01b81526001600160a01b038616936343753b4d936104cf9391929091908790600401611889565b602060405180830381865afa1580156104ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105109190611940565b61054c5760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b210383937b7b360991b604482015260640161041a565b600061055c856060015185610aba565b905060005b8481101561064c576000811180156105bc57508161058060018361195b565b815181106105905761059061184a565b6020026020010151606001518282815181106105ae576105ae61184a565b602002602001015160600151145b61064c5760c88282815181106105d4576105d461184a565b6020026020010151600001516105ea9190611972565b600003610618576106138282815181106106065761060661184a565b6020026020010151610e0c565b61063a565b61063a82828151811061062d5761062d61184a565b602002602001015161107a565b8061064481611986565b915050610561565b5050505050505050565b61065e610930565b606855565b61066b610930565b610675600061130b565b565b600054610100900460ff16158080156106975750600054600160ff909116105b806106b15750303b1580156106b1575060005460ff166001145b6107145760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161041a565b6000805460ff191660011790558015610737576000805461ff0019166101001790555b61073f61135d565b60658a905560008a8152606b602081905260408220899055879161076460018e61195b565b81526020019081526020016000208190555088606c60008c8152602001908152602001600020819055506107988a8a61138c565b6107ac6107a660018c61195b565b8961138c565b6000858152606d60209081526040808320878452909152902083905560668390556067829055600b606855801561081d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050505050565b610831610930565b60665460408051918252602082018390527f5ab2642364d92dafb2be757706f004ccf8325cca566bc2d0742133d316a5eaed910160405180910390a1606655565b6000818152606c60205260408120541561089957506000908152606c602052604090205490565b505060675490565b6000806108ae848461098a565b50949350505050565b6108bf610930565b6001600160a01b0381166109245760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161041a565b61092d8161130b565b50565b6033546001600160a01b031633146106755760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161041a565b6000828152606d60209081526040808320848452909152812054819080156109b757600192509050610375565b6069546001600160a01b031615610a455760695460405163254252af60e01b815260048101879052602481018690526001600160a01b039091169063254252af906044016040805180830381865afa158015610a17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3b919061199f565b9250925050610375565b5060009485945092505050565b805160009081610a6382602061182b565b6040805160208382018101909252828152919250810160005b84811015610a9b57600101602081810288015183529190910190610a7c565b505080516020820120610ab061010082611817565b9695505050505050565b60606000808367ffffffffffffffff811115610ad857610ad8611607565b604051908082528060200260200182016040528015610b3f57816020015b6040805160e08101825260008082526020808301829052928201819052606082018190526080820181905260a0820181905260c08201528252600019909201910181610af65790505b50905060005b848110156108ae57858381518110610b5f57610b5f61184a565b6020026020010151828281518110610b7957610b7961184a565b60209081029190910101515282610b8f81611986565b935050858381518110610ba457610ba461184a565b6020026020010151608087856001610bbc91906119cb565b81518110610bcc57610bcc61184a565b6020026020010151901b1760001b828281518110610bec57610bec61184a565b602090810291909101015160600152610c066002846119cb565b9250858381518110610c1a57610c1a61184a565b6020026020010151608087856001610c3291906119cb565b81518110610c4257610c4261184a565b6020026020010151901b1760001b828281518110610c6257610c6261184a565b602090810291909101015160800152610c7c6002846119cb565b9250858381518110610c9057610c9061184a565b6020026020010151608087856001610ca891906119cb565b81518110610cb857610cb861184a565b6020026020010151901b1760001b828281518110610cd857610cd861184a565b602090810291909101015160a00152610cf26002846119cb565b9250858381518110610d0657610d0661184a565b6020026020010151608087856001610d1e91906119cb565b81518110610d2e57610d2e61184a565b6020026020010151901b1760001b828281518110610d4e57610d4e61184a565b602090810291909101015160c00152610d686002846119cb565b9250858381518110610d7c57610d7c61184a565b6020026020010151828281518110610d9657610d9661184a565b602090810291909101810151015282610dae81611986565b935050858381518110610dc357610dc361184a565b6020026020010151828281518110610ddd57610ddd61184a565b60209081029190910101516040015282610df681611986565b9350508080610e0490611986565b915050610b45565b6000610e1b82600001516113ab565b90506000610e2a60018361195b565b60c0840151909150610e7e5760405162461bcd60e51b815260206004820152601d60248201527f696e76616c69642065706f636856616c696461746f7253657448617368000000604482015260640161041a565b60a0830151610ecf5760405162461bcd60e51b815260206004820152601f60248201527f696e76616c6964207369676e696e6756616c696461746f725365744861736800604482015260640161041a565b60665483604001511015610f255760405162461bcd60e51b815260206004820152601e60248201527f4e6f7420656e6f75676820626c6f636b20636f6e6669726d6174696f6e730000604482015260640161041a565b6000828152606b602052604090205415610f775760405162461bcd60e51b8152602060048201526013602482015272195c1bd8da08185b1c9958591e48195e1a5cdd606a1b604482015260640161041a565b6000818152606b602052604090205460a084015114610fd85760405162461bcd60e51b815260206004820181905260248201527f696e76616c69642070726545706f636856616c696461746f7253657448617368604482015260640161041a565b8260c00151606b60008481526020019081526020016000208190555061100282846020015161138c565b60658290556040838101516060850180516000908152606d6020908152848220608089018051845290825291859020939093558651915190518451918252928101929092529184917fb20f83d7fca2253dd4a37d0ee1922398cbbecf5a89899514947161ae70c0037f910160405180910390a3505050565b606654816040015110156110d05760405162461bcd60e51b815260206004820152601e60248201527f4e6f7420656e6f75676820626c6f636b20636f6e6669726d6174696f6e730000604482015260640161041a565b6000806110e58360600151846080015161098a565b915091508180156110fa575080836040015111155b156111375760405162461bcd60e51b815260206004820152600d60248201526c185b1c9958591e48195e1a5cdd609a1b604482015260640161041a565b600061114684600001516113ab565b9050600061115560018361195b565b6000838152606b60205260409020549091506111a55760405162461bcd60e51b815260206004820152600f60248201526e195c1bd8da081b9bc81d5c1b1bd859608a1b604482015260640161041a565b60026111b082610872565b6111ba9190611817565b85516111c89060c890611972565b11611233576000818152606b602052604090205460a08601511461122e5760405162461bcd60e51b815260206004820181905260248201527f696e76616c69642070726545706f636856616c696461746f7253657448617368604482015260640161041a565b611294565b6000828152606b602052604090205460a0860151146112945760405162461bcd60e51b815260206004820152601d60248201527f696e76616c69642065706f636856616c696461746f7253657448617368000000604482015260640161041a565b604085810151606080880180516000908152606d602090815285822060808c01805184529082529186902094909455895191519051855192835293820152928301919091527fa3fa2e60f4d1c7f6bd60da77a4be0625773dfb6b22c54fe77e725d03e49cdf2e910160405180910390a15050505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166113845760405162461bcd60e51b815260040161041a906119e3565b6106756113be565b60675481146113a7576000828152606c602052604090208190555b5050565b60006113b860c883611817565b92915050565b600054610100900460ff166113e55760405162461bcd60e51b815260040161041a906119e3565b6106753361130b565b6040518060800160405280611401611446565b815260200161140e611464565b815260200161141b611446565b8152602001606081525090565b60405180602001604052806001906020820280368337509192915050565b60405180604001604052806002906020820280368337509192915050565b60405180604001604052806002905b61147b611446565b8152602001906001900390816114735790505090565b600080604083850312156114a457600080fd5b50508035926020909101359150565b80356001600160a01b03811681146114ca57600080fd5b919050565b600080604083850312156114e257600080fd5b823591506114f2602084016114b3565b90509250929050565b60006020828403121561150d57600080fd5b611516826114b3565b9392505050565b6000806020838503121561153057600080fd5b823567ffffffffffffffff8082111561154857600080fd5b818501915085601f83011261155c57600080fd5b81358181111561156b57600080fd5b86602082850101111561157d57600080fd5b60209290920196919550909350505050565b6000602082840312156115a157600080fd5b5035919050565b60008060008060008060008060006101208a8c0312156115c757600080fd5b505087359960208901359950604089013598606081013598506080810135975060a0810135965060c0810135955060e08101359450610100013592509050565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff8111828210171561164057611640611607565b60405290565b600082601f83011261165757600080fd5b61165f61161d565b80604084018581111561167157600080fd5b845b8181101561168b578035845260209384019301611673565b509095945050505050565b600082601f8301126116a757600080fd5b8135602067ffffffffffffffff808311156116c4576116c4611607565b8260051b604051601f19603f830116810181811084821117156116e9576116e9611607565b60405293845285810183019383810192508785111561170757600080fd5b83870191505b848210156117265781358352918301919083019061170d565b979650505050505050565b600080600080610120858703121561174857600080fd5b6117528686611646565b9350604086605f87011261176557600080fd5b61176d61161d565b8060c088018981111561177f57600080fd5b8389015b818110156117a4576117958b82611646565b84526020909301928401611783565b508196506117b28a82611646565b95505050505061010085013567ffffffffffffffff8111156117d357600080fd5b6117df87828801611696565b91505092959194509250565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082611826576118266117eb565b500490565b600081600019048311821515161561184557611845611801565b500290565b634e487b7160e01b600052603260045260246000fd5b8060005b6002811015611883578151845260209384019390910190600101611864565b50505050565b61012081016118988287611860565b60408083018660005b60028082106118b057506118eb565b82518460005b838110156118d45782518252602092830192909101906001016118b6565b5050509284019250602091909101906001016118a1565b505050506118fc60c0830185611860565b61010082018360005b6001811015611924578151835260209283019290910190600101611905565b50505095945050505050565b805180151581146114ca57600080fd5b60006020828403121561195257600080fd5b61151682611930565b60008282101561196d5761196d611801565b500390565b600082611981576119816117eb565b500690565b60006001820161199857611998611801565b5060010190565b600080604083850312156119b257600080fd5b6119bb83611930565b9150602083015190509250929050565b600082198211156119de576119de611801565b500190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea2646970667358221220627cf5f078c8eefecf85bdaea871c04c518ec91c0a5f7f8e5e3997de20cf291064736f6c634300080e0033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
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.