ETH Price: $3,333.63 (+0.20%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Submit Batch241826992026-01-07 12:07:357 days ago1767787655IN
0x35387676...90b8B17D5
0 ETH0.000285082.13359395
Submit Batch241801462026-01-07 3:34:118 days ago1767756851IN
0x35387676...90b8B17D5
0 ETH0.000271532.0316965
Submit Batch241050542025-12-27 16:06:2318 days ago1766851583IN
0x35387676...90b8B17D5
0 ETH0.000270672.02541934
Submit Batch240711522025-12-22 22:31:3523 days ago1766442695IN
0x35387676...90b8B17D5
0 ETH0.000270812.0266661
Submit Batch240508382025-12-20 2:31:4726 days ago1766197907IN
0x35387676...90b8B17D5
0 ETH0.000235862.02393403
Submit Batch240502212025-12-20 0:27:5926 days ago1766190479IN
0x35387676...90b8B17D5
0 ETH0.000235932.02433809
Submit Batch240452922025-12-19 7:56:5927 days ago1766131019IN
0x35387676...90b8B17D5
0 ETH0.000270862.02702821
Submit Batch238972032025-11-28 12:34:1147 days ago1764333251IN
0x35387676...90b8B17D5
0 ETH0.000283932.12481125
Submit Batch238492262025-11-21 18:42:3554 days ago1763750555IN
0x35387676...90b8B17D5
0 ETH0.000344412.57740352
Submit Batch238344772025-11-19 17:01:5956 days ago1763571719IN
0x35387676...90b8B17D5
0 ETH0.000587394.39581673
Submit Batch238286392025-11-18 21:21:2357 days ago1763500883IN
0x35387676...90b8B17D5
0 ETH0.000279312.0900695
Submit Batch238215942025-11-17 21:36:4758 days ago1763415407IN
0x35387676...90b8B17D5
0 ETH0.000345152.58276032
Submit Batch238156972025-11-17 1:44:2359 days ago1763343863IN
0x35387676...90b8B17D5
0 ETH0.000277122.07369774
Submit Batch238156692025-11-17 1:38:3559 days ago1763343515IN
0x35387676...90b8B17D5
0 ETH0.00024282.08346203
Submit Batch238156452025-11-17 1:33:4759 days ago1763343227IN
0x35387676...90b8B17D5
0 ETH0.000279052.08810802
Submit Batch237572712025-11-08 21:37:2367 days ago1762637843IN
0x35387676...90b8B17D5
0 ETH0.000276992.07251737
Submit Batch236849072025-10-29 18:42:2377 days ago1761763343IN
0x35387676...90b8B17D5
0 ETH0.000625674.68222461
Submit Batch236514652025-10-25 2:22:4782 days ago1761358967IN
0x35387676...90b8B17D5
0 ETH0.000241182.069337
Submit Batch236480212025-10-24 14:48:2382 days ago1761317303IN
0x35387676...90b8B17D5
0 ETH0.000365693.13792043
Submit Batch236326862025-10-22 11:10:5984 days ago1761131459IN
0x35387676...90b8B17D5
0 ETH0.000261582.24436492
Submit Batch235834782025-10-15 13:46:3591 days ago1760535995IN
0x35387676...90b8B17D5
0 ETH0.000377182.82243624
Submit Batch235809392025-10-15 5:14:3592 days ago1760505275IN
0x35387676...90b8B17D5
0 ETH0.000281992.11032932
Submit Batch235663892025-10-13 4:23:2394 days ago1760329403IN
0x35387676...90b8B17D5
0 ETH0.000281472.10604249
Submit Batch235558352025-10-11 17:00:3595 days ago1760202035IN
0x35387676...90b8B17D5
0 ETH0.00032912.46242619
Submit Batch235554532025-10-11 15:43:1195 days ago1760197391IN
0x35387676...90b8B17D5
0 ETH0.000349712.61685631
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x6D1fdccc...975c23937
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
ConsensusBridge

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion

Contract Source Code (Solidity Standard Json-Input format)

pragma solidity 0.8.20;

import { SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "lib/openzeppelin-contracts/contracts/utils/ReentrancyGuard.sol";

// BridgeWrapper Interface implementing BridgeWrapper.sol
interface IBridgeWrapper {
    function receiveFromChain(uint16 _srcChainId, uint256 _amount, address _toAddress) external;
	function wToken() external returns (address);

}

// Errors
error InvalidValsetNonce(uint256 newNonce, uint256 currentNonce);
error InvalidBatchNonce(uint256 newNonce, uint256 currentNonce);
error IncorrectCheckpoint();
error MalformedNewValidatorSet();
error MalformedCurrentValidatorSet();
error MalformedBatch();
error InsufficientPower(uint256 cumulativePower, uint256 powerThreshold);
error DeadlineExceeded();
error NewPowerThresholdTooLow();
error InvalidSignature();

/**
 * @title ConsensusBridge
 * @author Tensorplex Lab
 * @notice This contract in addition to BridgeWrapper.sol, helps to facilitate the bridging of tokens from a given chain to Ethereum. 
 *         In the short-term we intend to use these contracts to bridge TAO from BitTensor to a new wrapped TAO on Ethereum.
 *         In the future we hope to reuse these contracts to bridge from future partner blockchains to Ethereum.
 * 
 *         Specifically this contract implements
 *           1. batch minting of wrapped Tokens on Ethereum in submitBatch()
 *           2. replacing current bridge validators in updateValset()
 * 
 * 		  To successfully execute submitBatch or updateValset, a checkpoint (hash) validation must be passed.
 * 		  In both functions, a new checkpoint (hash) is created with the input valset. 
 *        This checkpoint is checked against the bridge's state checkpoint. If they do not match the function will fail.
 *        This enforces that successful execution requires signatures from the state validators, ie. only the Tensorplex multisig wallet. 
 *        We expect to use our relayers as validators.
 * 
 */
contract ConsensusBridge is ReentrancyGuard{
	// Libraries
    using SafeERC20 for IERC20;

	// Variables
    bytes32 public immutable state_gravityId;
    uint256 public powerThreshold = 0;          // powerThreshold must be >= 2. If submitted powers < powerThreshold then the transaction will fail.
	uint256 public state_lastValsetNonce = 0; 
	uint256 public state_lastEventNonce = 0;
	bytes32 public state_lastValsetCheckpoint; // is a hash that is assigned whenever bridge validators are updated (see updateValset() ). 

	mapping(address => uint256) public state_lastBatchNonces;
	mapping(address => uint256) public state_lastTransactionNonce;
	
    struct ValsetArgs {
        // the validators in this set, represented by an Ethereum address
        address[] validators;

        // the powers of the given validators in the same order as above
		// powers is a generalized representation of the voting influence held by that validator. 
		// For our inital implementation we intend for all validators to have the same power value of 1.
		// In future deployments, powers might represent the # of governance tokens held by that validator.
        uint256[] powers;

		// Nonce value for a given valset, to prevent double execution. 
        uint256 valsetNonce;
    }

	// ECDSA Signature format
	struct Signature {
        uint8 v;
        bytes32 r;
        bytes32 s;
    }

	// Events
    event TransactionBatchExecutedEvent(
		uint256 indexed _batchNonce,
		address indexed _token,
		uint256 _eventNonce
	);
    event ValsetUpdatedEvent(
		uint256 indexed _newValsetNonce,
		uint256 _eventNonce,
		address[] _validators,
		uint256[] _powers
	);
    event ReceiveFromChain(
		uint16 indexed _srcChainId,
		address indexed _to,
		uint _amount,
		address wToken,
		bytes32 txnId,
		uint256 transactionNonce
	);

	/**
	 * @notice initializes a ConsensusBridge contract.
	 * @param _gravityId A unique identifier for this gravity instance to use in signatures
	 * @param _validators is an array of validator addresses. These should be the addresses of the Tensorplex relayers. 
	 * @param _powers is an array of corresponding power values for the validators.
	 */
	constructor(
		bytes32 _gravityId,
		// The validator set, not in valset args format since many of it's arguments would never be used in this case
		address[] memory _validators,
		uint256[] memory _powers
	) {
		// CHECKS

		// Check that validators, powers, and signatures (v,r,s) set is well-formed
		if (_validators.length != _powers.length || _validators.length == 0) {
			revert MalformedCurrentValidatorSet();
		}

		// assigning inital valset
		ValsetArgs memory _valset;
		_valset = ValsetArgs(_validators, _powers, 0);

		bytes32 newCheckpoint = makeCheckpoint(_valset, _gravityId);

		// ACTIONS

		// If new powerThreshold is >= 2 then set the new powerThreshold, else revert. 
		uint256 newThreshold = calculatePowerThreshold(_powers);
		if (newThreshold >= 2) {
			powerThreshold = newThreshold;
		} else {
			revert NewPowerThresholdTooLow();
		}

		// set initial state checkpoint
		state_gravityId = _gravityId;
		state_lastValsetCheckpoint = newCheckpoint;

		// LOGS
		emit ValsetUpdatedEvent(
			state_lastValsetNonce,
			state_lastEventNonce,
			_validators,
			_powers
		);
	}

	/**
	 * @dev ceil is a helper function to round up. It is a workaround to solidity's default rounding down behaviour. 
	 * @dev used in PowerThreshold calculation to ensure that threshold is rounded up rather than down.
	 * 
	 * @param a is the input value to be rounded
	 * @param m is the decimal to be rounded to (eg 10 to round to closest 10)
	 */
	function ceil(uint a, uint m) private pure returns (uint ) {
        return ((a + m - 1) / m) * m;
    }

	/**
	 * @notice makeCheckpoint returns a checkpoint of an input valset
	 * @dev under the hood, this function returns a keccak256 hash of the valset and _gravityId. 
	 * @dev used internally by this contract, and is also called by our relayers.
	 * 
	 * @param _valsetArgs is the input valset that will be hashed
	 * @param _gravityId is the unique ID for this gravity instance to be used in signing. 
	 */
	function makeCheckpoint(ValsetArgs memory _valsetArgs, bytes32 _gravityId)
		public
		pure
		returns (bytes32)
	{
		// bytes32 encoding of the string "checkpoint"
		bytes32 methodName = 0x636865636b706f696e7400000000000000000000000000000000000000000000;

		bytes32 checkpoint = keccak256(
			abi.encode(
                _gravityId,
				methodName,
				_valsetArgs.valsetNonce,
				_valsetArgs.validators,
				_valsetArgs.powers
			)
		);

		return checkpoint;
	}

	/**
	 * @notice calculatePowerThreshold returns the threshold for an input valset that is necessary for a vote to pass. 
	 * @dev this is hardcoded to return 2/3rds of the input. 
	 * @dev because solidity rounds down on divsion, we use scaling factor to retain decimal value.
	 * @dev because we are using a scaling factor of 1e18, powers in excess of 5.79 * 10^76 could cause an interger overflow.
	 * 
	 * @param _powers is an array of power values. The threshold is calculated on the sum of this array.
	 */
    function calculatePowerThreshold(uint256[] memory _powers) internal returns (uint256) {
		uint256 totalPower = 0;
        for (uint256 i = 0; i < _powers.length; i++) {
            totalPower += _powers[i];
        }

		// numerator = 2
		// denominator = 3
		// scalingFactor = 1e18
		uint256 result = (totalPower * 2 * 1e18) / 3;
		powerThreshold = (ceil(result, 1e18) / 1e18);

		return powerThreshold;
    }

	/**
	 * @notice updateValset replaces the bridge's current valset with a new valset.
	 * @dev This function is expected to be called with the current validators.
	 * @dev To succeed, the checkpoint (hash) of input _currentValset must match the state valset checkpoint, 
	 *      meaning only the current validators can successfully call this function.
	 * @dev It is intended that only Tensorplex can successfully updateValset as enforced by this checkpoint matching.

	 * @param _newValset is the valset to be inserted
	 * @param _currentValset is the valset that is replaced
	 * @param _sigs is an array of signatures from _currentValset that have signed on the newValset.
	 */
	function updateValset(
		// The new version of the validator set
		ValsetArgs calldata _newValset,
		// The current validators that approve the change
		ValsetArgs calldata _currentValset,
		// These are arrays of the parts of the current validator's signatures
		Signature[] calldata _sigs
	) external {
		// Check that the valset nonce is greater than the old one
		if (_newValset.valsetNonce <= _currentValset.valsetNonce) {
			revert InvalidValsetNonce({
				newNonce: _newValset.valsetNonce,
				currentNonce: _currentValset.valsetNonce
			});
		}

		// Check that the valset nonce is less than a million nonces forward from the old one
		// this makes it difficult for an attacker to lock out the contract by getting a single
		// bad validator set through with uint256 max nonce
		if (_newValset.valsetNonce > _currentValset.valsetNonce + 1000000) {
			revert InvalidValsetNonce({
				newNonce: _newValset.valsetNonce,
				currentNonce: _currentValset.valsetNonce
			});
		}

		// Check that new validators and powers set is well-formed
		if (
			_newValset.validators.length != _newValset.powers.length ||
			_newValset.validators.length == 0
		) {
			revert MalformedNewValidatorSet();
		}

		// Check that current validators, powers, and signatures (v,r,s) set is well-formed
		validateValset(_currentValset, _sigs);

		// Check that the supplied current validator set matches the saved checkpoint
		if (makeCheckpoint(_currentValset, state_gravityId) != state_lastValsetCheckpoint) {
			revert IncorrectCheckpoint();
		}

		// Check that enough current validators have signed off on the new validator set
		bytes32 newCheckpoint = makeCheckpoint(_newValset, state_gravityId);

		// Checks that current valset has signed on newCheckpoint and that it has sufficient power to pass.
		checkValidatorSignatures(_currentValset, _sigs, newCheckpoint, powerThreshold);

		// If new powerThreshold is >= 2 then set the new powerThreshold, else revert. 
		uint256 newThreshold = calculatePowerThreshold(_newValset.powers);
		if (newThreshold >= 2) {
			powerThreshold = newThreshold;
		} else {
			revert NewPowerThresholdTooLow();
		}
		// ACTIONS

		// Stored to be used next time to validate that the valset
		// supplied by the caller is correct.
		state_lastValsetCheckpoint = newCheckpoint;

		// Store new nonce
		state_lastValsetNonce = _newValset.valsetNonce;

		state_lastEventNonce = state_lastEventNonce + 1;
		emit ValsetUpdatedEvent(
			_newValset.valsetNonce,
			state_lastEventNonce,
			_newValset.validators,
			_newValset.powers
		);
	}

	// @notice Ensures a valset is well-formed against input signatures
	// @param _valset is the valset to be validated
	// @param _sigs is an array of signatures
	function validateValset(ValsetArgs calldata _valset, Signature[] calldata _sigs) private pure {
		// Check that current validators, powers, and signatures (v,r,s) set is well-formed
		if (
			_valset.validators.length != _valset.powers.length ||
			_valset.validators.length != _sigs.length
		) {
			revert MalformedCurrentValidatorSet();
		}
	}

	/**
	 * @notice verifySig checks if a signed message _sig was created by the input address _signer.
	 * @param _signer is the expected address that signed _sig
	 * @param _theHash is the expected hash used to sign the message
	 * @param _sig is the signature containing (r,s,v)
	 */
    function verifySig(
		address _signer,
		bytes32 _theHash,
		Signature calldata _sig
	) private pure returns (bool) {
		bytes32 messageDigest = keccak256(
			abi.encodePacked("\x19Ethereum Signed Message:\n32", _theHash)
		);

		address retrievedSigner = ECDSA.recover(messageDigest, _sig.v, _sig.r, _sig.s);
		if(_signer != retrievedSigner) {
			return false;
		}
		return true;
	}

	/**
	 * @notice checkValidatorSignatures checks if the input validator set has signed on the input hash value. 
	 * @dev there is a 2/3rds quorum requirement. If 2/3rds of total validator power has signed, then the transaction can pass.
	 * 
	 * @param _currentValset is the expected currentValset
	 * @param _sigs is an array of signatures to be validated
	 * @param _theHash is the hash of the transaction that was signed
	 * @param _powerThreshold is the value of power required to pass a vote. Cumulative validator power must exceed this to pass.
	 */
	function checkValidatorSignatures(
		// The current validator set and their powers
		ValsetArgs calldata _currentValset,
		// The current validator's signatures
		Signature[] calldata _sigs,
		// This is what we are checking they have signed
		bytes32 _theHash,
		uint256 _powerThreshold
	) private pure {
		uint256 cumulativePower = 0;

		for (uint256 i = 0; i < _currentValset.validators.length; i++) {
			// V must be more than 0
			// If not we shall not process it 
			if(_sigs[i].v != 0) {
				// If v is set to 0, this signifies that it was not possible to get a signature from this validator and we skip evaluation
				// (In a valid signature, it is either 27 or 28)
				// Check that the current validator has signed off on the hash
				bool result = verifySig(_currentValset.validators[i], _theHash, _sigs[i]);
				if(!result) {
					revert InvalidSignature();
				}
				// Sum up cumulative power
				cumulativePower = cumulativePower + _currentValset.powers[i];
			}

			// Break early to avoid wasting gas
			if (cumulativePower > _powerThreshold) {
				break;
			}
		}

		if (cumulativePower < _powerThreshold) {
			revert InsufficientPower(cumulativePower, _powerThreshold);
		}
		// Success
	}

	/**
	 * @notice submitBatch batch executes minting of wrapped Token on Ethereum, sending tokens from the bridge to input addresses on Ethereum.
	 * @dev submitBatch should be triggered after corresponding events emitted on Finney
	 * @dev it is expected that this function is only called by Tensorplex validators.
	 * 
	 * @param _currentValset is expected to be the state valset. If it is not, the submission will fail.
	 * @param _sigs is a corresponding array of validator signatures
	 * @param _amounts is an array of amounts to be transferred
	 * @param _destinations is an array of destination EVM addresses that will recieve amounts. 
	 * @param _transactionIds is an array of transactionIds containing the hashes of corresponding transfer events from source chain.
	 * @param _sourceChainId a unqiue ID identifying the source chain. It is used by the Tensorplex relayers for record keeping.
	 * @param _batchNonce is the nonce.
	 * @param _tokenWrapperAddress is expected to be the address of a deployed BridgeWrapper.sol
	 * @param _deadline is the timestamp that the batch must be executed by. 
	 */
    function submitBatch(
		// The validators that approve the batch
		ValsetArgs calldata _currentValset,
		// These are arrays of the parts of the validators signatures
		Signature[] calldata _sigs,
		// The batch of transactions
		uint256[] calldata _amounts,
		address[] calldata _destinations,
		bytes32[] calldata _transactionIds,
        uint16 _sourceChainId,
		uint256 _batchNonce,
		address _tokenWrapperAddress,
		uint256 _deadline
    ) external nonReentrant {
		if (block.timestamp > _deadline) {
			revert DeadlineExceeded();
		}

        if (_batchNonce <= state_lastBatchNonces[_tokenWrapperAddress] || _batchNonce > state_lastBatchNonces[_tokenWrapperAddress] + 1000000) {
            revert InvalidBatchNonce({
                newNonce: _batchNonce,
                currentNonce: state_lastBatchNonces[_tokenWrapperAddress]
            });
        }

        validateValset(_currentValset, _sigs);
        if (_amounts.length != _destinations.length || _destinations.length != _transactionIds.length) {
            revert MalformedBatch();
        }

		// Check that the supplied current validator set matches the saved checkpoint
		if (makeCheckpoint(_currentValset, state_gravityId) != state_lastValsetCheckpoint) {
			revert IncorrectCheckpoint();
		}

        checkValidatorSignatures(
            _currentValset,
            _sigs,
            // Get hash of the transaction batch and checkpoint
            keccak256(
                abi.encode(
                    state_gravityId,
					// bytes encoding for bridge batching 
                    0x7472616e73616374696f6e426174636800000000000000000000000000000000,
                    _amounts,
                    _destinations,
					_transactionIds,
					_sourceChainId,
                    _batchNonce,
                    _tokenWrapperAddress,
					_deadline
                )
            ),
            powerThreshold
        );
        state_lastBatchNonces[_tokenWrapperAddress] = _batchNonce;
		state_lastEventNonce = state_lastEventNonce + 1;
        {
			// if any of the destination chains have a revert fallback, the whole function will revert
			// should be okay considering destinations are expected to be wallet addresses?
            for (uint256 i = 0; i < _destinations.length; i++) {
                address destination = _destinations[i];
                uint256 amount = _amounts[i];
				address wToken = IBridgeWrapper(_tokenWrapperAddress).wToken();
				bytes32 txnId = _transactionIds[i];
				uint256 oldTxnNonce = state_lastTransactionNonce[_tokenWrapperAddress];
				state_lastTransactionNonce[_tokenWrapperAddress] += 1;
                IBridgeWrapper(_tokenWrapperAddress).receiveFromChain(_sourceChainId, amount, destination);
				emit ReceiveFromChain(_sourceChainId, destination, amount, wToken, txnId, oldTxnNonce);
            }
        }
        {
			emit TransactionBatchExecutedEvent(_batchNonce, _tokenWrapperAddress, state_lastEventNonce);
		}
    }


}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 *
 * ==== Security Considerations
 *
 * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
 * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
 * considered as an intention to spend the allowance in any specific way. The second is that because permits have
 * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
 * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
 * generally recommended is:
 *
 * ```solidity
 * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
 *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
 *     doThing(..., value);
 * }
 *
 * function doThing(..., uint256 value) public {
 *     token.safeTransferFrom(msg.sender, address(this), value);
 *     ...
 * }
 * ```
 *
 * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
 * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
 * {SafeERC20-safeTransferFrom}).
 *
 * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
 * contracts should have entry points that don't rely on permit.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     *
     * CAUTION: See Security Considerations above.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the value of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 value) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 value) external returns (bool);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC20Permit} from "../extensions/IERC20Permit.sol";
import {Address} from "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    /**
     * @dev An operation with an ERC20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data);
        if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)

pragma solidity ^0.8.20;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error AddressInsufficientBalance(address account);

    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedInnerCall();

    /**
     * @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.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert AddressInsufficientBalance(address(this));
        }

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert FailedInnerCall();
        }
    }

    /**
     * @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 or custom error, it is bubbled
     * up by this function (like regular Solidity function calls). However, if
     * the call reverted with no returned reason, this function reverts with a
     * {FailedInnerCall} error.
     *
     * 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.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0);
    }

    /**
     * @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`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert AddressInsufficientBalance(address(this));
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
     * unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {FailedInnerCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
     */
    function _revert(bytes memory returndata) 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 FailedInnerCall();
        }
    }
}

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

pragma solidity ^0.8.20;

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

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

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

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

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

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

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

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

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

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

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

/**
 * @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 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 ReentrancyGuard {
    // 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;

    uint256 private _status;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    constructor() {
        _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 {
        // 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 {
        // 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) {
        return _status == ENTERED;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "viaIR": true,
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"bytes32","name":"_gravityId","type":"bytes32"},{"internalType":"address[]","name":"_validators","type":"address[]"},{"internalType":"uint256[]","name":"_powers","type":"uint256[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"DeadlineExceeded","type":"error"},{"inputs":[],"name":"ECDSAInvalidSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"name":"ECDSAInvalidSignatureLength","type":"error"},{"inputs":[{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"ECDSAInvalidSignatureS","type":"error"},{"inputs":[],"name":"IncorrectCheckpoint","type":"error"},{"inputs":[{"internalType":"uint256","name":"cumulativePower","type":"uint256"},{"internalType":"uint256","name":"powerThreshold","type":"uint256"}],"name":"InsufficientPower","type":"error"},{"inputs":[{"internalType":"uint256","name":"newNonce","type":"uint256"},{"internalType":"uint256","name":"currentNonce","type":"uint256"}],"name":"InvalidBatchNonce","type":"error"},{"inputs":[],"name":"InvalidSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"newNonce","type":"uint256"},{"internalType":"uint256","name":"currentNonce","type":"uint256"}],"name":"InvalidValsetNonce","type":"error"},{"inputs":[],"name":"MalformedBatch","type":"error"},{"inputs":[],"name":"MalformedCurrentValidatorSet","type":"error"},{"inputs":[],"name":"MalformedNewValidatorSet","type":"error"},{"inputs":[],"name":"NewPowerThresholdTooLow","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"wToken","type":"address"},{"indexed":false,"internalType":"bytes32","name":"txnId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"transactionNonce","type":"uint256"}],"name":"ReceiveFromChain","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_batchNonce","type":"uint256"},{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"_eventNonce","type":"uint256"}],"name":"TransactionBatchExecutedEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_newValsetNonce","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_eventNonce","type":"uint256"},{"indexed":false,"internalType":"address[]","name":"_validators","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"_powers","type":"uint256[]"}],"name":"ValsetUpdatedEvent","type":"event"},{"inputs":[{"components":[{"internalType":"address[]","name":"validators","type":"address[]"},{"internalType":"uint256[]","name":"powers","type":"uint256[]"},{"internalType":"uint256","name":"valsetNonce","type":"uint256"}],"internalType":"struct ConsensusBridge.ValsetArgs","name":"_valsetArgs","type":"tuple"},{"internalType":"bytes32","name":"_gravityId","type":"bytes32"}],"name":"makeCheckpoint","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"powerThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"state_gravityId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"state_lastBatchNonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"state_lastEventNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"state_lastTransactionNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"state_lastValsetCheckpoint","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"state_lastValsetNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address[]","name":"validators","type":"address[]"},{"internalType":"uint256[]","name":"powers","type":"uint256[]"},{"internalType":"uint256","name":"valsetNonce","type":"uint256"}],"internalType":"struct ConsensusBridge.ValsetArgs","name":"_currentValset","type":"tuple"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct ConsensusBridge.Signature[]","name":"_sigs","type":"tuple[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"},{"internalType":"address[]","name":"_destinations","type":"address[]"},{"internalType":"bytes32[]","name":"_transactionIds","type":"bytes32[]"},{"internalType":"uint16","name":"_sourceChainId","type":"uint16"},{"internalType":"uint256","name":"_batchNonce","type":"uint256"},{"internalType":"address","name":"_tokenWrapperAddress","type":"address"},{"internalType":"uint256","name":"_deadline","type":"uint256"}],"name":"submitBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address[]","name":"validators","type":"address[]"},{"internalType":"uint256[]","name":"powers","type":"uint256[]"},{"internalType":"uint256","name":"valsetNonce","type":"uint256"}],"internalType":"struct ConsensusBridge.ValsetArgs","name":"_newValset","type":"tuple"},{"components":[{"internalType":"address[]","name":"validators","type":"address[]"},{"internalType":"uint256[]","name":"powers","type":"uint256[]"},{"internalType":"uint256","name":"valsetNonce","type":"uint256"}],"internalType":"struct ConsensusBridge.ValsetArgs","name":"_currentValset","type":"tuple"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct ConsensusBridge.Signature[]","name":"_sigs","type":"tuple[]"}],"name":"updateValset","outputs":[],"stateMutability":"nonpayable","type":"function"}]

0x60a06040908082523462000382576200165e8038038091620000228285620003da565b833981019060608082840312620003825781516020808401516001600160401b03959194919290868111620003825782019583601f8801121562000382578651926200006e84620003fe565b976200007d8a51998a620003da565b84895287890188600596871b8301019187831162000382578901905b8282106200038757505050888101519182116200038257019280601f8501121562000382578351620000cb81620003fe565b94620000da8a519687620003da565b8186528780870192861b820101928311620003825787809101915b838310620003715750505050600160009281845583600255836003558751855181149081159162000367575b506200035657838980516200013681620003a8565b888152888a8201520152838980516200014f81620003a8565b8a8152878a82015201528851878101908482526918da1958dadc1bda5b9d60b21b8b820152858882015260a06080820152620001ba6200019360c083018c62000416565b82620001ad601f1992838382030160a08401528b62000455565b03908101835282620003da565b5190209382819282915b6200031c575b505081831b9180830460021490151715620002e057670de0b6b3a76400009182810290808204841490151715620002f45760039004828101908181116200030857670de0b6b3a763ffff01908111620002f4578290049082820291808304841490151715620002e05750049060028210620002cf5791620002a093917fb119f1f36224601586b5037da909ecf37e83864dddea5d32ad4e32ac1d97e62b9796959355608052600455620002926002549660035494808a51978897885287015285019062000416565b908382038885015262000455565b0390a2516111d290816200048c8239608051818181610250015281816102a7015281816106c101526108a90152f35b88516306e77b7560e51b8152600490fd5b634e487b7160e01b81526011600452602490fd5b634e487b7160e01b82526011600452602482fd5b634e487b7160e01b83526011600452602483fd5b909287518410156200034f578984831b8901015181018091116200030857926000198114620003085784019084620001c4565b92620001ca565b885163c6617b7b60e01b8152600490fd5b9050153862000121565b8251815291810191889101620000f5565b600080fd5b81516001600160a01b03811681036200038257815290890190890162000099565b606081019081106001600160401b03821117620003c457604052565b634e487b7160e01b600052604160045260246000fd5b601f909101601f19168101906001600160401b03821190821017620003c457604052565b6001600160401b038111620003c45760051b60200190565b90815180825260208080930193019160005b82811062000437575050505090565b83516001600160a01b03168552938101939281019260010162000428565b90815180825260208080930193019160005b82811062000476575050505090565b8351855293810193928101926001016200046756fe608080604052600436101561001357600080fd5b60003560e01c908163027ecf18146107be5750806313e3aa84146107845780632bdf6b2c1461073e57806373b2054714610720578063b56561fe14610702578063ba95ec27146106e4578063bdda81d4146106a9578063c5aa66e7146100ea578063df97174b146100b05763f2b533071461008d57600080fd5b346100ab5760003660031901126100ab576020600454604051908152f35b600080fd5b346100ab5760203660031901126100ab576001600160a01b036100d1610b67565b1660005260056020526020604060002054604051908152f35b346100ab57600319610120368201126100ab576001600160401b03600435116100ab57606090600435360301126100ab576024356001600160401b0381116100ab5761013a903690600401610b37565b906044356001600160401b0381116100ab5761015a903690600401610cf0565b91906064356001600160401b0381116100ab5761017b903690600401610cf0565b91906084356001600160401b0381116100ab5761019c903690600401610cf0565b93909660a4359561ffff871687036100ab5760e4356001600160a01b03811690036100ab576002600054146106975760026000556101043542116106855760e4356001600160a01b031660009081526005602052604090205460c435811080159190610668575b5061063057610216600480350180610dfb565b905061022c602460043501600435600401610dfb565b91905014801590610617575b610605578288148015906105fb575b6105e9576102837f000000000000000000000000000000000000000000000000000000000000000061027e36600435600401610c17565b610d20565b600454036105d75761036f91856103588a61031c8d8b61030a6102f76040519788967f000000000000000000000000000000000000000000000000000000000000000060208901526f0e8e4c2dce6c2c6e8d2dedc84c2e8c6d60831b60408901526101206060890152610140880191610e74565b858103601f190160808701528b8d610e30565b848103601f190160a086015291610e74565b61ffff8c1660c083015260c43560e083015260e4356001600160a01b03166101008301526101043561012083015203601f198101835282610b91565b602081519101209060015492600435600401610eff565b60e4356001600160a01b0316600090815260056020526040902060c435905560035460018101811161057d5760010160035560005b8181106103f25760035460405190815260e4356001600160a01b03169060c435907f02c7e81975f8edb86e2a0c038b7b86a49c744236abf0f6177ff5afc6986ab70890602090a36001600055005b610405610400828486610edb565b610eeb565b90610411818987610edb565b6040516302eaf61960e21b815292903590602084600481600060e4356001600160a01b03165af193841561057157600094610593575b5061045383898d610edb565b60e4356001600160a01b03166000908152600660205260409020805491359060018301831161057d5760018301905560e4356001600160a01b03163b156100ab57604051636757ea1160e11b815261ffff8c166004820152602481018590526001600160a01b03848116604483015290969060009088906064908290849060e435165af1801561057157610541575b61053c965060405194855260018060a01b031660208501526040840152606083015260018060a01b0316907f8fa1a7b57137d2b6261e0547bcded7b3af631b8fd8dd09e0d4509a4834ec97d0608061ffff8b1692a3610e98565b6103a4565b6001600160401b03871161055b5761053c966040526104e2565b634e487b7160e01b600052604160045260246000fd5b6040513d6000823e3d90fd5b634e487b7160e01b600052601160045260246000fd5b9093506020813d6020116105cf575b816105af60209383610b91565b810103126100ab57516001600160a01b03811681036100ab57928b610447565b3d91506105a2565b60405163723a340360e01b8152600490fd5b60405163c1f97e3560e01b8152600490fd5b5085831415610247565b60405163c6617b7b60e01b8152600490fd5b5081610627600480350180610dfb565b90501415610238565b60018060a01b0360e43516600052600560205260446040600020546040519063f7f920ad60e01b825260c43560048301526024820152fd5b9050620f42408101811161057d57620f42400160c435118a610203565b60405163559895a360e01b8152600490fd5b604051633ee5aeb560e01b8152600490fd5b346100ab5760003660031901126100ab5760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b346100ab5760003660031901126100ab576020600154604051908152f35b346100ab5760003660031901126100ab576020600254604051908152f35b346100ab5760003660031901126100ab576020600354604051908152f35b346100ab5760403660031901126100ab576004356001600160401b0381116100ab5761077c6107736020923690600401610c17565b60243590610d20565b604051908152f35b346100ab5760203660031901126100ab576001600160a01b036107a5610b67565b1660005260066020526020604060002054604051908152f35b346100ab57600319906060368301126100ab576004356001600160401b038082116100ab57816004019360608184360301126100ab576024908135928084116100ab576060846004019285360301126100ab576044359081116100ab57610829903690600401610b37565b91909360448601359660448201359081891115610b1e5750620f42408101808211610b09578811610aec5750836108608980610dfb565b979050019561086f878a610dfb565b91905014801590610ad9575b610ac7576108978461088d8480610dfb565b9390500183610dfb565b91905014801590610ab2575b610605577f0000000000000000000000000000000000000000000000000000000000000000906108d78261027e3684610c17565b600454036105d7576108f06108fd9261027e368b610c17565b8093600196875493610eff565b61091161090a8588610dfb565b3691610bc9565b83806000926000925b610a78575b508291501b9080820460021490151715610a6357670de0b6b3a76400009081810290808204831490151715610a39576003900481810190818111610a4e57670de0b6b3a763ffff01908111610a395781900481810290808204831490151715610a39570460028110610a2757835560045583600255600354918201809211610a135750610a0e7fb119f1f36224601586b5037da909ecf37e83864dddea5d32ad4e32ac1d97e62b939482600355610a006109e46109dc8380610dfb565b969093610dfb565b9190926040519687968752606060208801526060870191610e30565b918483036040860152610e74565b0390a2005b634e487b7160e01b60009081526011600452fd5b6040516306e77b7560e51b8152600490fd5b83634e487b7160e01b60005260116004526000fd5b84634e487b7160e01b60005260116004526000fd5b82634e487b7160e01b60005260116004526000fd5b9091928151841015610aa957610a9b610aa19160208660051b8501015190610dee565b93610e98565b91908161091a565b9282915061091f565b5081610abe8280610dfb565b905014156108a3565b60405163c01ba0ab60e01b8152600490fd5b50610ae48880610dfb565b90501561087b565b87604491866040519263e0e8edf360e01b84526004840152820152fd5b85634e487b7160e01b60005260116004526000fd5b604491868a63e0e8edf360e01b84526004840152820152fd5b9181601f840112156100ab578235916001600160401b0383116100ab57602080850194606085020101116100ab57565b600435906001600160a01b03821682036100ab57565b35906001600160a01b03821682036100ab57565b90601f801991011681019081106001600160401b0382111761055b57604052565b6001600160401b03811161055b5760051b60200190565b9291610bd482610bb2565b91610be26040519384610b91565b829481845260208094019160051b81019283116100ab57905b828210610c085750505050565b81358152908301908301610bfb565b91906060838203126100ab57604051906001600160401b0390606083018281118482101761055b57604052829480358381116100ab5781019282601f850112156100ab57833593610c6785610bb2565b90610c756040519283610b91565b858252602095868084019160051b830101918683116100ab5787809101915b838310610cd857505050508552838201359081116100ab5781019282601f850112156100ab57610ccd6040949384838796359101610bc9565b908501520135910152565b8190610ce384610b7d565b8152019101908790610c94565b9181601f840112156100ab578235916001600160401b0383116100ab576020808501948460051b0101116100ab57565b6040810151918151602080930151916040519384918183019660c084019188526918da1958dadc1bda5b9d60b21b6040850152606084015260a0608084015283518091528160e0840194019060005b818110610dce57505050601f1992838382030160a084015281808651928381520195019160005b828110610db75750505050610db19203908101835282610b91565b51902090565b835187529581019587945092810192600101610d96565b82516001600160a01b031686529483019487945091830191600101610d6f565b9190820180921161057d57565b903590601e19813603018212156100ab57018035906001600160401b0382116100ab57602001918160051b360383136100ab57565b91908082526020809201929160005b828110610e4d575050505090565b909192938280600192838060a01b03610e6589610b7d565b16815201950193929101610e3f565b81835290916001600160fb1b0383116100ab5760209260051b809284830137010190565b600019811461057d5760010190565b9190811015610eb7576060020190565b634e487b7160e01b600052603260045260246000fd5b3560ff811681036100ab5790565b9190811015610eb75760051b0190565b356001600160a01b03811681036100ab5790565b93909193600092835b610f128380610dfb565b9050811015610fe15760ff610f30610f2b838a86610ea7565b610ecd565b16610f7b575b838511610f4b57610f4690610e98565b610f08565b505050915091505b808210610f5e575050565b604492506040519162bfb6ab60e01b835260048301526024820152fd5b93610fa8610f9661040087610f908780610dfb565b90610edb565b87610fa2888b87610ea7565b91610fed565b15610fcf57610fc990610fc286610f906020870187610dfb565b3590610dee565b93610f36565b604051638baa579f60e01b8152600490fd5b50505091509150610f53565b91906040519160208301917f19457468657265756d205369676e6564204d6573736167653a0a3332000000008352603c840152603c835260608301918383106001600160401b0384111761055b5761106b936110629360405251902061105282610ecd565b6020604084013593013591611087565b90929192611117565b6001600160a01b0390811691160361108257600190565b600090565b91907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841161110b57926020929160ff608095604051948552168484015260408301526060820152600092839182805260015afa156110ff5780516001600160a01b038116156110f657918190565b50809160019190565b604051903d90823e3d90fd5b50505060009160039190565b60048110156111865780611129575050565b600181036111435760405163f645eedf60e01b8152600490fd5b600281036111645760405163fce698f760e01b815260048101839052602490fd5b60031461116e5750565b602490604051906335e2f38360e21b82526004820152fd5b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b15ac79a8564e89864bc619d73b2317e5008633233dd7357d0726557599faffa64736f6c63430008140033666f6f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000003000000000000000000000000d01dd4f58b8b60ff8fc2498e306510865bdf78150000000000000000000000003d78e3692c0743be0595b1f8d20ff014e7ae63da0000000000000000000000005e0b2666e2ac1c6615b18d4c5294cdc181b55b130000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001

Deployed Bytecode

0x608080604052600436101561001357600080fd5b60003560e01c908163027ecf18146107be5750806313e3aa84146107845780632bdf6b2c1461073e57806373b2054714610720578063b56561fe14610702578063ba95ec27146106e4578063bdda81d4146106a9578063c5aa66e7146100ea578063df97174b146100b05763f2b533071461008d57600080fd5b346100ab5760003660031901126100ab576020600454604051908152f35b600080fd5b346100ab5760203660031901126100ab576001600160a01b036100d1610b67565b1660005260056020526020604060002054604051908152f35b346100ab57600319610120368201126100ab576001600160401b03600435116100ab57606090600435360301126100ab576024356001600160401b0381116100ab5761013a903690600401610b37565b906044356001600160401b0381116100ab5761015a903690600401610cf0565b91906064356001600160401b0381116100ab5761017b903690600401610cf0565b91906084356001600160401b0381116100ab5761019c903690600401610cf0565b93909660a4359561ffff871687036100ab5760e4356001600160a01b03811690036100ab576002600054146106975760026000556101043542116106855760e4356001600160a01b031660009081526005602052604090205460c435811080159190610668575b5061063057610216600480350180610dfb565b905061022c602460043501600435600401610dfb565b91905014801590610617575b610605578288148015906105fb575b6105e9576102837f666f6f000000000000000000000000000000000000000000000000000000000061027e36600435600401610c17565b610d20565b600454036105d75761036f91856103588a61031c8d8b61030a6102f76040519788967f666f6f000000000000000000000000000000000000000000000000000000000060208901526f0e8e4c2dce6c2c6e8d2dedc84c2e8c6d60831b60408901526101206060890152610140880191610e74565b858103601f190160808701528b8d610e30565b848103601f190160a086015291610e74565b61ffff8c1660c083015260c43560e083015260e4356001600160a01b03166101008301526101043561012083015203601f198101835282610b91565b602081519101209060015492600435600401610eff565b60e4356001600160a01b0316600090815260056020526040902060c435905560035460018101811161057d5760010160035560005b8181106103f25760035460405190815260e4356001600160a01b03169060c435907f02c7e81975f8edb86e2a0c038b7b86a49c744236abf0f6177ff5afc6986ab70890602090a36001600055005b610405610400828486610edb565b610eeb565b90610411818987610edb565b6040516302eaf61960e21b815292903590602084600481600060e4356001600160a01b03165af193841561057157600094610593575b5061045383898d610edb565b60e4356001600160a01b03166000908152600660205260409020805491359060018301831161057d5760018301905560e4356001600160a01b03163b156100ab57604051636757ea1160e11b815261ffff8c166004820152602481018590526001600160a01b03848116604483015290969060009088906064908290849060e435165af1801561057157610541575b61053c965060405194855260018060a01b031660208501526040840152606083015260018060a01b0316907f8fa1a7b57137d2b6261e0547bcded7b3af631b8fd8dd09e0d4509a4834ec97d0608061ffff8b1692a3610e98565b6103a4565b6001600160401b03871161055b5761053c966040526104e2565b634e487b7160e01b600052604160045260246000fd5b6040513d6000823e3d90fd5b634e487b7160e01b600052601160045260246000fd5b9093506020813d6020116105cf575b816105af60209383610b91565b810103126100ab57516001600160a01b03811681036100ab57928b610447565b3d91506105a2565b60405163723a340360e01b8152600490fd5b60405163c1f97e3560e01b8152600490fd5b5085831415610247565b60405163c6617b7b60e01b8152600490fd5b5081610627600480350180610dfb565b90501415610238565b60018060a01b0360e43516600052600560205260446040600020546040519063f7f920ad60e01b825260c43560048301526024820152fd5b9050620f42408101811161057d57620f42400160c435118a610203565b60405163559895a360e01b8152600490fd5b604051633ee5aeb560e01b8152600490fd5b346100ab5760003660031901126100ab5760206040517f666f6f00000000000000000000000000000000000000000000000000000000008152f35b346100ab5760003660031901126100ab576020600154604051908152f35b346100ab5760003660031901126100ab576020600254604051908152f35b346100ab5760003660031901126100ab576020600354604051908152f35b346100ab5760403660031901126100ab576004356001600160401b0381116100ab5761077c6107736020923690600401610c17565b60243590610d20565b604051908152f35b346100ab5760203660031901126100ab576001600160a01b036107a5610b67565b1660005260066020526020604060002054604051908152f35b346100ab57600319906060368301126100ab576004356001600160401b038082116100ab57816004019360608184360301126100ab576024908135928084116100ab576060846004019285360301126100ab576044359081116100ab57610829903690600401610b37565b91909360448601359660448201359081891115610b1e5750620f42408101808211610b09578811610aec5750836108608980610dfb565b979050019561086f878a610dfb565b91905014801590610ad9575b610ac7576108978461088d8480610dfb565b9390500183610dfb565b91905014801590610ab2575b610605577f666f6f0000000000000000000000000000000000000000000000000000000000906108d78261027e3684610c17565b600454036105d7576108f06108fd9261027e368b610c17565b8093600196875493610eff565b61091161090a8588610dfb565b3691610bc9565b83806000926000925b610a78575b508291501b9080820460021490151715610a6357670de0b6b3a76400009081810290808204831490151715610a39576003900481810190818111610a4e57670de0b6b3a763ffff01908111610a395781900481810290808204831490151715610a39570460028110610a2757835560045583600255600354918201809211610a135750610a0e7fb119f1f36224601586b5037da909ecf37e83864dddea5d32ad4e32ac1d97e62b939482600355610a006109e46109dc8380610dfb565b969093610dfb565b9190926040519687968752606060208801526060870191610e30565b918483036040860152610e74565b0390a2005b634e487b7160e01b60009081526011600452fd5b6040516306e77b7560e51b8152600490fd5b83634e487b7160e01b60005260116004526000fd5b84634e487b7160e01b60005260116004526000fd5b82634e487b7160e01b60005260116004526000fd5b9091928151841015610aa957610a9b610aa19160208660051b8501015190610dee565b93610e98565b91908161091a565b9282915061091f565b5081610abe8280610dfb565b905014156108a3565b60405163c01ba0ab60e01b8152600490fd5b50610ae48880610dfb565b90501561087b565b87604491866040519263e0e8edf360e01b84526004840152820152fd5b85634e487b7160e01b60005260116004526000fd5b604491868a63e0e8edf360e01b84526004840152820152fd5b9181601f840112156100ab578235916001600160401b0383116100ab57602080850194606085020101116100ab57565b600435906001600160a01b03821682036100ab57565b35906001600160a01b03821682036100ab57565b90601f801991011681019081106001600160401b0382111761055b57604052565b6001600160401b03811161055b5760051b60200190565b9291610bd482610bb2565b91610be26040519384610b91565b829481845260208094019160051b81019283116100ab57905b828210610c085750505050565b81358152908301908301610bfb565b91906060838203126100ab57604051906001600160401b0390606083018281118482101761055b57604052829480358381116100ab5781019282601f850112156100ab57833593610c6785610bb2565b90610c756040519283610b91565b858252602095868084019160051b830101918683116100ab5787809101915b838310610cd857505050508552838201359081116100ab5781019282601f850112156100ab57610ccd6040949384838796359101610bc9565b908501520135910152565b8190610ce384610b7d565b8152019101908790610c94565b9181601f840112156100ab578235916001600160401b0383116100ab576020808501948460051b0101116100ab57565b6040810151918151602080930151916040519384918183019660c084019188526918da1958dadc1bda5b9d60b21b6040850152606084015260a0608084015283518091528160e0840194019060005b818110610dce57505050601f1992838382030160a084015281808651928381520195019160005b828110610db75750505050610db19203908101835282610b91565b51902090565b835187529581019587945092810192600101610d96565b82516001600160a01b031686529483019487945091830191600101610d6f565b9190820180921161057d57565b903590601e19813603018212156100ab57018035906001600160401b0382116100ab57602001918160051b360383136100ab57565b91908082526020809201929160005b828110610e4d575050505090565b909192938280600192838060a01b03610e6589610b7d565b16815201950193929101610e3f565b81835290916001600160fb1b0383116100ab5760209260051b809284830137010190565b600019811461057d5760010190565b9190811015610eb7576060020190565b634e487b7160e01b600052603260045260246000fd5b3560ff811681036100ab5790565b9190811015610eb75760051b0190565b356001600160a01b03811681036100ab5790565b93909193600092835b610f128380610dfb565b9050811015610fe15760ff610f30610f2b838a86610ea7565b610ecd565b16610f7b575b838511610f4b57610f4690610e98565b610f08565b505050915091505b808210610f5e575050565b604492506040519162bfb6ab60e01b835260048301526024820152fd5b93610fa8610f9661040087610f908780610dfb565b90610edb565b87610fa2888b87610ea7565b91610fed565b15610fcf57610fc990610fc286610f906020870187610dfb565b3590610dee565b93610f36565b604051638baa579f60e01b8152600490fd5b50505091509150610f53565b91906040519160208301917f19457468657265756d205369676e6564204d6573736167653a0a3332000000008352603c840152603c835260608301918383106001600160401b0384111761055b5761106b936110629360405251902061105282610ecd565b6020604084013593013591611087565b90929192611117565b6001600160a01b0390811691160361108257600190565b600090565b91907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841161110b57926020929160ff608095604051948552168484015260408301526060820152600092839182805260015afa156110ff5780516001600160a01b038116156110f657918190565b50809160019190565b604051903d90823e3d90fd5b50505060009160039190565b60048110156111865780611129575050565b600181036111435760405163f645eedf60e01b8152600490fd5b600281036111645760405163fce698f760e01b815260048101839052602490fd5b60031461116e5750565b602490604051906335e2f38360e21b82526004820152fd5b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b15ac79a8564e89864bc619d73b2317e5008633233dd7357d0726557599faffa64736f6c63430008140033

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
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.