Source Code
Latest 25 from a total of 4,412 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Unlock | 22613712 | 231 days ago | IN | 0 ETH | 0.00017245 | ||||
| Unlock | 22608336 | 232 days ago | IN | 0 ETH | 0.0000848 | ||||
| Unlock | 22608306 | 232 days ago | IN | 0 ETH | 0.00025235 | ||||
| Unlock | 22608287 | 232 days ago | IN | 0 ETH | 0.00023507 | ||||
| Unlock | 22607787 | 232 days ago | IN | 0 ETH | 0.00009891 | ||||
| Unlock | 22607524 | 232 days ago | IN | 0 ETH | 0.00016908 | ||||
| Unlock | 22605994 | 232 days ago | IN | 0 ETH | 0.00038138 | ||||
| Unlock | 22598106 | 233 days ago | IN | 0 ETH | 0.00033785 | ||||
| Unlock | 22591649 | 234 days ago | IN | 0 ETH | 0.00026469 | ||||
| Lock Token | 22542817 | 241 days ago | IN | 0 ETH | 0.00011979 | ||||
| Unlock | 22525761 | 244 days ago | IN | 0 ETH | 0.00028537 | ||||
| Unlock | 22516949 | 245 days ago | IN | 0 ETH | 0.00020573 | ||||
| Unlock | 22496073 | 248 days ago | IN | 0 ETH | 0.00037738 | ||||
| Unlock | 22487422 | 249 days ago | IN | 0 ETH | 0.00025369 | ||||
| Unlock | 22480907 | 250 days ago | IN | 0 ETH | 0.00039375 | ||||
| Unlock | 22468244 | 252 days ago | IN | 0 ETH | 0.00077158 | ||||
| Lock ETH | 22468117 | 252 days ago | IN | 0.05 ETH | 0.00035482 | ||||
| Change Validator... | 22468041 | 252 days ago | IN | 0 ETH | 0.00147324 | ||||
| Lock Token | 22445716 | 255 days ago | IN | 0 ETH | 0.00025211 | ||||
| Unlock | 22443937 | 255 days ago | IN | 0 ETH | 0.00036126 | ||||
| Unlock | 22443929 | 255 days ago | IN | 0 ETH | 0.00019503 | ||||
| Unlock | 22443925 | 255 days ago | IN | 0 ETH | 0.00019602 | ||||
| Lock Token | 22443309 | 255 days ago | IN | 0 ETH | 0.00013079 | ||||
| Lock ETH | 22418968 | 259 days ago | IN | 0.07 ETH | 0.00002833 | ||||
| Unlock | 22332651 | 271 days ago | IN | 0 ETH | 0.00041812 |
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| Transfer | 22613712 | 231 days ago | 5.5377707 ETH | ||||
| Transfer | 22608306 | 232 days ago | 539.09090951 ETH | ||||
| Transfer | 22608287 | 232 days ago | 539.09090951 ETH | ||||
| Transfer | 22607524 | 232 days ago | 29.9979 ETH | ||||
| Transfer | 22598106 | 233 days ago | 5.23585001 ETH | ||||
| Transfer | 22591649 | 234 days ago | 2.8881 ETH | ||||
| Transfer | 22525761 | 244 days ago | 8.88548747 ETH | ||||
| Transfer | 22516949 | 245 days ago | 5.5201 ETH | ||||
| Transfer | 22496073 | 248 days ago | 0.55417086 ETH | ||||
| Transfer | 22487422 | 249 days ago | 3.40912278 ETH | ||||
| Transfer | 22468244 | 252 days ago | 0.037311 ETH | ||||
| Transfer | 22443937 | 255 days ago | 0.8438026 ETH | ||||
| Transfer | 22443929 | 255 days ago | 0.057311 ETH | ||||
| Transfer | 22443925 | 255 days ago | 3.2881 ETH | ||||
| Transfer | 22332651 | 271 days ago | 0.037311 ETH | ||||
| Transfer | 22292024 | 276 days ago | 0.037311 ETH | ||||
| Transfer | 22262910 | 280 days ago | 8.42668478 ETH | ||||
| Transfer | 22210248 | 288 days ago | 3.73274413 ETH | ||||
| Transfer | 22018429 | 315 days ago | 16.57682232 ETH | ||||
| Lock ETH | 21829453 | 341 days ago | 10,000 ETH | ||||
| Transfer | 21777452 | 348 days ago | 24.9881 ETH | ||||
| Transfer | 21716763 | 357 days ago | 9.98810889 ETH | ||||
| Transfer | 21712660 | 357 days ago | 5.9881 ETH | ||||
| Transfer | 21708523 | 358 days ago | 2.9861 ETH | ||||
| Transfer | 21705374 | 358 days ago | 24.9881 ETH |
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
ForceBridge
Compiler Version
v0.8.0+commit.c7dfd78e
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.0;
pragma abicoder v2;
import {IERC20} from "./interfaces/IERC20.sol";
import {SafeERC20} from "./libraries/SafeERC20.sol";
import {Address} from "./libraries/Address.sol";
import {MultisigUtils} from "./libraries/MultisigUtils.sol";
import {SafeMath} from "./libraries/SafeMath.sol";
contract ForceBridge {
using Address for address;
using SafeERC20 for IERC20;
// refer to https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md
uint256 public constant SIGNATURE_SIZE = 65;
uint256 public constant VALIDATORS_SIZE_LIMIT = 50;
string public constant NAME_712 = "Force Bridge";
// if the number of verified signatures has reached `multisigThreshold_`, validators approve the tx
uint256 public multisigThreshold_;
address[] validators_;
// UNLOCK_TYPEHASH = keccak256("unlock(UnlockRecord[] calldata records)");
bytes32 public constant UNLOCK_TYPEHASH =
0xf1c18f82536658c0cb1a208d4a52b9915dc9e75640ed0daf3a6be45d02ca5c9f;
// CHANGE_VALIDATORS_TYPEHASH = keccak256("changeValidators(address[] validators, uint256 multisigThreshold)");
bytes32 public constant CHANGE_VALIDATORS_TYPEHASH =
0xd2cedd075bf1780178b261ac9c9000261e7fd88d66f6309124bddf24f5d953f8;
bytes32 private _CACHED_DOMAIN_SEPARATOR;
uint256 private _CACHED_CHAIN_ID;
bytes32 private _HASHED_NAME;
bytes32 private _HASHED_VERSION;
bytes32 private _TYPE_HASH;
uint256 public latestUnlockNonce_;
uint256 public latestChangeValidatorsNonce_;
event Locked(
address indexed token,
address indexed sender,
uint256 lockedAmount,
bytes recipientLockscript,
bytes sudtExtraData
);
event Unlocked(
address indexed token,
address indexed recipient,
address indexed sender,
uint256 receivedAmount,
bytes ckbTxHash
);
struct UnlockRecord {
address token;
address recipient;
uint256 amount;
bytes ckbTxHash;
}
constructor(address[] memory validators, uint256 multisigThreshold) {
// set DOMAIN_SEPARATOR
// refer: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/24a0bc23cfe3fbc76f8f2510b78af1e948ae6651/contracts/utils/cryptography/draft-EIP712.sol
bytes32 hashedName = keccak256(bytes(NAME_712));
bytes32 hashedVersion = keccak256(bytes("1"));
bytes32 typeHash = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");
_HASHED_NAME = hashedName;
_HASHED_VERSION = hashedVersion;
_CACHED_CHAIN_ID = _getChainId();
_CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);
_TYPE_HASH = typeHash;
// set validators
require(
validators.length > 0,
"validators are none"
);
require(
multisigThreshold > 0,
"invalid multisigThreshold"
);
require(
validators.length <= VALIDATORS_SIZE_LIMIT,
"number of validators exceeds the limit"
);
validators_ = validators;
require(
multisigThreshold <= validators.length,
"invalid multisigThreshold"
);
multisigThreshold_ = multisigThreshold;
}
function DOMAIN_SEPARATOR() external view returns (bytes32) {
return _domainSeparator();
}
/**
* @dev Returns the domain separator for the current chain.
*/
function _domainSeparator() internal view virtual returns (bytes32) {
if (_getChainId() == _CACHED_CHAIN_ID) {
return _CACHED_DOMAIN_SEPARATOR;
} else {
return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);
}
}
function _buildDomainSeparator(bytes32 typeHash, bytes32 name, bytes32 version) private view returns (bytes32) {
return keccak256(
abi.encode(
typeHash,
name,
version,
_getChainId(),
address(this)
)
);
}
function _getChainId() private view returns (uint256 chainId) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
// solhint-disable-next-line no-inline-assembly
assembly {
chainId := chainid()
}
}
function changeValidators(
address[] memory validators,
uint256 multisigThreshold,
uint256 nonce,
bytes memory signatures
) public {
require(nonce == latestChangeValidatorsNonce_, "changeValidators nonce invalid");
latestChangeValidatorsNonce_ = SafeMath.add(nonce, 1);
require(
validators.length > 0,
"validators are none"
);
require(
multisigThreshold > 0,
"invalid multisigThreshold"
);
require(
validators.length <= VALIDATORS_SIZE_LIMIT,
"number of validators exceeds the limit"
);
require(
multisigThreshold <= validators.length,
"invalid multisigThreshold"
);
for (uint256 i = 0; i < validators.length; i++) {
for (uint256 j = i + 1; j < validators.length; j ++) {
require(
validators[i] != validators[j],
"repeated validators"
);
}
}
bytes32 msgHash =
keccak256(
abi.encodePacked(
"\x19\x01", // solium-disable-line
_domainSeparator(),
keccak256(
abi.encode(
CHANGE_VALIDATORS_TYPEHASH,
validators,
multisigThreshold,
nonce
)
)
)
);
validatorsApprove(msgHash, signatures, multisigThreshold_);
validators_ = validators;
multisigThreshold_ = multisigThreshold;
}
/**
* @notice if addr is not one of validators_, return validators_.length
* @return index of addr in validators_
*/
function _getIndexOfValidators(address user)
internal
view
returns (uint256)
{
for (uint256 i = 0; i < validators_.length; i++) {
if (validators_[i] == user) {
return i;
}
}
return validators_.length;
}
/**
* @notice @dev signatures are a multiple of 65 bytes and are densely packed.
* @param signatures The signatures bytes array
*/
function validatorsApprove(
bytes32 msgHash,
bytes memory signatures,
uint256 threshold
) public view {
require(signatures.length % SIGNATURE_SIZE == 0, "invalid signatures");
// 1. check length of signature
uint256 length = signatures.length / SIGNATURE_SIZE;
require(
length >= threshold,
"length of signatures must greater than threshold"
);
// 3. check number of verified signatures >= threshold
uint256 verifiedNum = 0;
uint256 i = 0;
uint8 v;
bytes32 r;
bytes32 s;
address recoveredAddress;
// set indexVisited[ index of recoveredAddress in validators_ ] = true
bool[] memory validatorIndexVisited = new bool[](validators_.length);
uint256 validatorIndex;
while (i < length) {
(v, r, s) = MultisigUtils.parseSignature(signatures, i);
i++;
recoveredAddress = ecrecover(msgHash, v, r, s);
require(recoveredAddress != address(0), "invalid signature");
// get index of recoveredAddress in validators_
validatorIndex = _getIndexOfValidators(recoveredAddress);
// recoveredAddress is not validator or has been visited
if (
validatorIndex >= validators_.length ||
validatorIndexVisited[validatorIndex]
) {
continue;
}
// recoveredAddress verified
validatorIndexVisited[validatorIndex] = true;
verifiedNum++;
if (verifiedNum >= threshold) {
return;
}
}
require(verifiedNum >= threshold, "signatures not verified");
}
function unlock(UnlockRecord[] calldata records, uint256 nonce, bytes calldata signatures)
public
{
// check nonce hasn't been used
require(latestUnlockNonce_ == nonce, "unlock nonce invalid");
latestUnlockNonce_ = SafeMath.add(nonce, 1);
// 1. calc msgHash
bytes32 msgHash =
keccak256(
abi.encodePacked(
"\x19\x01", // solium-disable-line
_domainSeparator(),
keccak256(abi.encode(UNLOCK_TYPEHASH, records, nonce))
)
);
validatorsApprove(msgHash, signatures, multisigThreshold_);
for (uint256 i = 0; i < records.length; i++) {
UnlockRecord calldata r = records[i];
if (r.amount == 0) continue;
if (r.token == address(0)) {
payable(r.recipient).transfer(r.amount);
} else {
IERC20(r.token).safeTransfer(r.recipient, r.amount);
}
emit Unlocked(
r.token,
r.recipient,
msg.sender,
r.amount,
r.ckbTxHash
);
}
}
function lockETH(
bytes memory recipientLockscript,
bytes memory sudtExtraData
) public payable {
require (msg.value > 0, "amount should be greater than 0");
emit Locked(
address(0),
msg.sender,
msg.value,
recipientLockscript,
sudtExtraData
);
}
// before lockToken, user should approve -> TokenLocker Contract with 0xffffff token
function lockToken(
address token,
uint256 amount,
bytes memory recipientLockscript,
bytes memory sudtExtraData
) public {
require (amount > 0, "amount should be greater than 0");
IERC20(token).safeTransferFrom(msg.sender, address(this), amount);
emit Locked(
token,
msg.sender,
amount,
recipientLockscript,
sudtExtraData
);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma abicoder v2;
/**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) 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 `amount` 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 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @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);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma abicoder v2;
import "../interfaces/IERC20.sol";
import "./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;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
// solhint-disable-next-line max-line-length
require((value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 newAllowance = token.allowance(address(this), spender) + value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 newAllowance = token.allowance(address(this), spender) - value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
/**
* @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, "SafeERC20: low-level call failed");
if (returndata.length > 0) { // Return data is optional
// solhint-disable-next-line max-line-length
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma abicoder v2;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @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
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// solhint-disable-next-line no-inline-assembly
assembly { size := extcodesize(account) }
return size > 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://diligence.consensys.net/posts/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.5.11/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");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(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 functionCall(target, data, "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");
require(isContract(target), "Address: call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.call{ value: value }(data);
return _verifyCallResult(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) {
require(isContract(target), "Address: static call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.staticcall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
if (success) {
return returndata;
} else {
// 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
// solhint-disable-next-line no-inline-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma abicoder v2;
library MultisigUtils {
// @notice Extracts the r, s, and v parameters to `ecrecover(...)` from the signature at position `index` in a densely packed signatures bytes array.
// @dev Based on [OpenZeppelin's ECRecovery](https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/ECRecovery.sol)
// @param signatures The signatures bytes array
// @param index The index of the signature in the bytes array (0 indexed)
function parseSignature(bytes memory signatures, uint256 index)
internal
pure
returns (
uint8 v,
bytes32 r,
bytes32 s
)
{
uint256 offset = index * 65;
// The signature format is a compact form of:
// {bytes32 r}{bytes32 s}{uint8 v}
// Compact means, uint8 is not padded to 32 bytes.
assembly {
// solium-disable-line security/no-inline-assembly
r := mload(add(signatures, add(32, offset)))
s := mload(add(signatures, add(64, offset)))
// Here we are loading the last 32 bytes, including 31 bytes
// of 's'. There is no 'mload8' to do this.
//
// 'byte' is not working due to the Solidity parser, so lets
// use the second best option, 'and'
v := and(mload(add(signatures, add(65, offset))), 0xff)
}
if (v < 27) {
v += 27;
}
require(v == 27 || v == 28, "invalid v of signature(r, s, v)");
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma abicoder v2;
/*
The MIT License (MIT)
Copyright (c) 2016 Smart Contract Solutions, Inc.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
if (_a == 0) {
return 0;
}
c = _a * _b;
require(c / _a == _b, "Overflow during multiplication.");
return c;
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 _a, uint256 _b) internal pure returns (uint256) {
// assert(_b > 0); // Solidity automatically throws when dividing by 0
// uint256 c = _a / _b;
// assert(_a == _b * c + _a % _b); // There is no case in which this doesn't hold
return _a / _b;
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {
require(_b <= _a, "Underflow during subtraction.");
return _a - _b;
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
c = _a + _b;
require(c >= _a, "Overflow during addition.");
return c;
}
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address[]","name":"validators","type":"address[]"},{"internalType":"uint256","name":"multisigThreshold","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"lockedAmount","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"recipientLockscript","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"sudtExtraData","type":"bytes"}],"name":"Locked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"receivedAmount","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"ckbTxHash","type":"bytes"}],"name":"Unlocked","type":"event"},{"inputs":[],"name":"CHANGE_VALIDATORS_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NAME_712","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SIGNATURE_SIZE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNLOCK_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VALIDATORS_SIZE_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"validators","type":"address[]"},{"internalType":"uint256","name":"multisigThreshold","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"signatures","type":"bytes"}],"name":"changeValidators","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"latestChangeValidatorsNonce_","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestUnlockNonce_","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"recipientLockscript","type":"bytes"},{"internalType":"bytes","name":"sudtExtraData","type":"bytes"}],"name":"lockETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"recipientLockscript","type":"bytes"},{"internalType":"bytes","name":"sudtExtraData","type":"bytes"}],"name":"lockToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"multisigThreshold_","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"ckbTxHash","type":"bytes"}],"internalType":"struct ForceBridge.UnlockRecord[]","name":"records","type":"tuple[]"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"signatures","type":"bytes"}],"name":"unlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"msgHash","type":"bytes32"},{"internalType":"bytes","name":"signatures","type":"bytes"},{"internalType":"uint256","name":"threshold","type":"uint256"}],"name":"validatorsApprove","outputs":[],"stateMutability":"view","type":"function"}]Contract Creation Code
60806040523480156200001157600080fd5b5060405162001f2b38038062001f2b83398101604081905262000034916200029a565b604080518082018252600c81526b466f7263652042726964676560a01b602091820152815180830190925260018252603160f81b9101527f710a8ed36eae46ded8818e1199a40714204a74b9b1f4e89b3a22651c1d11cbd760048190557fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660058190557f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f620000e2620001b3565b600355620000f2818484620001b7565b60025560068190558451620001245760405162461bcd60e51b81526004016200011b90620003e2565b60405180910390fd5b60008411620001475760405162461bcd60e51b81526004016200011b9062000419565b6032855111156200016c5760405162461bcd60e51b81526004016200011b906200039c565b845162000181906001906020880190620001fc565b508451841115620001a65760405162461bcd60e51b81526004016200011b9062000419565b5050506000555062000466565b4690565b6000838383620001c6620001b3565b30604051602001620001dd95949392919062000370565b6040516020818303038152906040528051906020012090509392505050565b82805482825590600052602060002090810192821562000254579160200282015b828111156200025457825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906200021d565b506200026292915062000266565b5090565b5b8082111562000262576000815560010162000267565b80516001600160a01b03811681146200029557600080fd5b919050565b60008060408385031215620002ad578182fd5b82516001600160401b0380821115620002c4578384fd5b818501915085601f830112620002d8578384fd5b8151602082821115620002ef57620002ef62000450565b8082026040518282820101818110868211171562000311576200031162000450565b604052838152828101945085830182870184018b101562000330578889fd5b8896505b848710156200035d5762000348816200027d565b86526001969096019594830194830162000334565b5097909101519698969750505050505050565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b60208082526026908201527f6e756d626572206f662076616c696461746f7273206578636565647320746865604082015265081b1a5b5a5d60d21b606082015260800190565b60208082526013908201527f76616c696461746f727320617265206e6f6e6500000000000000000000000000604082015260600190565b60208082526019908201527f696e76616c6964206d756c74697369675468726573686f6c6400000000000000604082015260600190565b634e487b7160e01b600052604160045260246000fd5b611ab580620004766000396000f3fe6080604052600436106100dd5760003560e01c80638c8ca33c1161007f578063d36394b011610059578063d36394b0146101ed578063ea3cbb421461020d578063fa9c67f31461022d578063fd4e17aa14610242576100dd565b80638c8ca33c146101b0578063a406ad9a146101c5578063a6c03437146101d8576100dd565b80632da5351c116100bb5780632da5351c1461014f578063308ff0c9146101715780633644e515146101865780634592329b1461019b576100dd565b8063052b9e5c146100e257806314f9ad3e146101045780632187e8f914610124575b600080fd5b3480156100ee57600080fd5b506101026100fd366004610f9e565b610257565b005b34801561011057600080fd5b5061010261011f3660046110e2565b6102ea565b34801561013057600080fd5b50610139610565565b60405161014691906114f6565b60405180910390f35b34801561015b57600080fd5b5061016461058d565b6040516101469190611346565b34801561017d57600080fd5b50610164610592565b34801561019257600080fd5b50610164610597565b3480156101a757600080fd5b506101646105a7565b3480156101bc57600080fd5b506101646105ad565b6101026101d336600461121b565b6105d1565b3480156101e457600080fd5b50610164610636565b3480156101f957600080fd5b50610102610208366004611019565b61063c565b34801561021957600080fd5b506101026102283660046111cd565b610864565b34801561023957600080fd5b50610164610a98565b34801561024e57600080fd5b50610164610a9e565b600083116102805760405162461bcd60e51b8152600401610277906116aa565b60405180910390fd5b6102956001600160a01b038516333086610ac2565b336001600160a01b0316846001600160a01b03167f6aee94645d3f2b304035eced96277957513be5777c155afe6abb6c2285db7ad38585856040516102dc939291906118b2565b60405180910390a350505050565b826007541461030b5760405162461bcd60e51b81526004016102779061182a565b610316836001610b20565b6007556000610323610b54565b60405161035a907ff1c18f82536658c0cb1a208d4a52b9915dc9e75640ed0daf3a6be45d02ca5c9f908990899089906020016113af565b604051602081830303815290604052805190602001206040516020016103819291906112ee565b6040516020818303038152906040528051906020012090506103da8184848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250549250610864915050565b60005b8581101561055c573687878381811061040657634e487b7160e01b600052603260045260246000fd5b90506020028101906104189190611933565b90506040810135610429575061054a565b60006104386020830183610f84565b6001600160a01b03161415610499576104576040820160208301610f84565b6001600160a01b03166108fc82604001359081150290604051600060405180830381858888f19350505050158015610493573d6000803e3d6000fd5b506104ce565b6104ce6104ac6040830160208401610f84565b60408301356104be6020850185610f84565b6001600160a01b03169190610b88565b336104df6040830160208401610f84565b6001600160a01b03166104f56020840184610f84565b6001600160a01b03167fa68ce84c815a939744a011df05adcf79b74994aada52c5810979c254042f553d604085013561053160608701876118e7565b6040516105409392919061188f565b60405180910390a4505b8061055481611a0e565b9150506103dd565b50505050505050565b6040518060400160405280600c81526020016b466f7263652042726964676560a01b81525081565b603281565b604181565b60006105a1610b54565b90505b90565b60085481565b7ff1c18f82536658c0cb1a208d4a52b9915dc9e75640ed0daf3a6be45d02ca5c9f81565b600034116105f15760405162461bcd60e51b8152600401610277906116aa565b60405133906000907f6aee94645d3f2b304035eced96277957513be5777c155afe6abb6c2285db7ad39061062a903490879087906118b2565b60405180910390a35050565b60005481565b600854821461065d5760405162461bcd60e51b815260040161027790611673565b610668826001610b20565b60085583516106895760405162461bcd60e51b8152600401610277906117c6565b600083116106a95760405162461bcd60e51b8152600401610277906117f3565b6032845111156106cb5760405162461bcd60e51b81526004016102779061162d565b83518311156106ec5760405162461bcd60e51b8152600401610277906117f3565b60005b84518110156107b6576000610705826001611972565b90505b85518110156107a35785818151811061073157634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b031686838151811061076257634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b031614156107915760405162461bcd60e51b81526004016102779061174f565b8061079b81611a0e565b915050610708565b50806107ae81611a0e565b9150506106ef565b5060006107c1610b54565b6040516107f8907fd2cedd075bf1780178b261ac9c9000261e7fd88d66f6309124bddf24f5d953f89088908890889060200161134f565b6040516020818303038152906040528051906020012060405160200161081f9291906112ee565b6040516020818303038152906040528051906020012090506108448183600054610864565b8451610857906001906020880190610e88565b5050506000919091555050565b604182516108729190611a29565b1561088f5760405162461bcd60e51b815260040161027790611601565b60006041835161089f91906119af565b9050818110156108c15760405162461bcd60e51b8152600401610277906115b1565b600080600080600080600060018054905067ffffffffffffffff8111156108f857634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610921578160200160208202803683370190505b50905060005b88871015610a69576109398b88610ba7565b919750955093508661094a81611a0e565b97505060018c8787876040516000815260200160405260405161097094939291906114d8565b6020604051602081039080840390855afa158015610992573d6000803e3d6000fd5b5050604051601f1901519350506001600160a01b0383166109c55760405162461bcd60e51b815260040161027790611540565b6109ce83610c25565b60015490915081101580610a0657508181815181106109fd57634e487b7160e01b600052603260045260246000fd5b60200260200101515b15610a1057610927565b6001828281518110610a3257634e487b7160e01b600052603260045260246000fd5b9115156020928302919091019091015287610a4c81611a0e565b985050898810610a6457505050505050505050610a93565b610927565b89881015610a895760405162461bcd60e51b815260040161027790611858565b5050505050505050505b505050565b60075481565b7fd2cedd075bf1780178b261ac9c9000261e7fd88d66f6309124bddf24f5d953f881565b610b1a846323b872dd60e01b858585604051602401610ae393929190611309565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610c9d565b50505050565b6000610b2c8284611972565b905082811015610b4e5760405162461bcd60e51b815260040161027790611718565b92915050565b6000600354610b61610d2c565b1415610b7057506002546105a4565b610b81600654600454600554610d30565b90506105a4565b610a938363a9059cbb60e01b8484604051602401610ae392919061132d565b6000808080610bb78560416119c3565b8681016020810151604082015160419092015160ff169650945092509050601b841015610bec57610be9601b8561198a565b93505b8360ff16601b1480610c0157508360ff16601c145b610c1d5760405162461bcd60e51b815260040161027790611509565b509250925092565b6000805b600154811015610c9257826001600160a01b031660018281548110610c5e57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03161415610c80579050610c98565b80610c8a81611a0e565b915050610c29565b50506001545b919050565b6000610cf2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610d729092919063ffffffff16565b805190915015610a935780806020019051810190610d1091906111ad565b610a935760405162461bcd60e51b81526004016102779061177c565b4690565b6000838383610d3d610d2c565b30604051602001610d529594939291906114ac565b6040516020818303038152906040528051906020012090505b9392505050565b6060610d818484600085610d89565b949350505050565b606082471015610dab5760405162461bcd60e51b81526004016102779061156b565b610db485610e49565b610dd05760405162461bcd60e51b8152600401610277906116e1565b600080866001600160a01b03168587604051610dec91906112d2565b60006040518083038185875af1925050503d8060008114610e29576040519150601f19603f3d011682016040523d82523d6000602084013e610e2e565b606091505b5091509150610e3e828286610e4f565b979650505050505050565b3b151590565b60608315610e5e575081610d6b565b825115610e6e5782518084602001fd5b8160405162461bcd60e51b815260040161027791906114f6565b828054828255906000526020600020908101928215610edd579160200282015b82811115610edd57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190610ea8565b50610ee9929150610eed565b5090565b5b80821115610ee95760008155600101610eee565b80356001600160a01b0381168114610c9857600080fd5b600082601f830112610f29578081fd5b813567ffffffffffffffff811115610f4357610f43611a69565b610f56601f8201601f1916602001611948565b818152846020838601011115610f6a578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215610f95578081fd5b610d6b82610f02565b60008060008060808587031215610fb3578283fd5b610fbc85610f02565b935060208501359250604085013567ffffffffffffffff80821115610fdf578384fd5b610feb88838901610f19565b93506060870135915080821115611000578283fd5b5061100d87828801610f19565b91505092959194509250565b6000806000806080858703121561102e578384fd5b843567ffffffffffffffff80821115611045578586fd5b818701915087601f830112611058578586fd5b813560208282111561106c5761106c611a69565b80820261107a828201611948565b8381528281019086840183880185018e1015611094578b8cfd5b8b97505b858810156110bd576110a981610f02565b835260019790970196918401918401611098565b5099505050880135955050604087013593506060870135915080821115611000578283fd5b6000806000806000606086880312156110f9578081fd5b853567ffffffffffffffff80821115611110578283fd5b818801915088601f830112611123578283fd5b813581811115611131578384fd5b60208a818284028601011115611145578485fd5b8084019850819750808a0135965060408a0135935082841115611166578485fd5b838a0193508a601f850112611179578485fd5b8335915082821115611189578485fd5b8a81838601011115611199578485fd5b979a96995094975050909401935090919050565b6000602082840312156111be578081fd5b81518015158114610d6b578182fd5b6000806000606084860312156111e1578283fd5b83359250602084013567ffffffffffffffff8111156111fe578283fd5b61120a86828701610f19565b925050604084013590509250925092565b6000806040838503121561122d578182fd5b823567ffffffffffffffff80821115611244578384fd5b61125086838701610f19565b93506020850135915080821115611265578283fd5b5061127285828601610f19565b9150509250929050565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b600081518084526112be8160208601602086016119e2565b601f01601f19169290920160200192915050565b600082516112e48184602087016119e2565b9190910192915050565b61190160f01b81526002810192909252602282015260420190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b90815260200190565b600060808201868352602060808185015281875180845260a0860191508289019350845b818110156113985784516001600160a01b031683529383019391830191600101611373565b505060408501969096525050506060015292915050565b84815260606020808301829052828201859052600091906080908185018782028601830189865b8a81101561149357888303607f190184528135368d9003607e190181126113fb578889fd5b8c016001600160a01b038061140f83610f02565b1685528061141e888401610f02565b168588015250604081810135908501528781013536829003601e1901811261144457898afd5b8101803567ffffffffffffffff81111561145c578a8bfd5b80360383131561146a578a8bfd5b888a87015261147e898701828a850161127c565b968801969550505091850191506001016113d6565b5050809550505050505082604083015295945050505050565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b93845260ff9290921660208401526040830152606082015260800190565b600060208252610d6b60208301846112a6565b6020808252601f908201527f696e76616c69642076206f66207369676e617475726528722c20732c20762900604082015260600190565b602080825260119082015270696e76616c6964207369676e617475726560781b604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b60208082526030908201527f6c656e677468206f66207369676e617475726573206d7573742067726561746560408201526f1c881d1a185b881d1a1c995cda1bdb1960821b606082015260800190565b602080825260129082015271696e76616c6964207369676e61747572657360701b604082015260600190565b60208082526026908201527f6e756d626572206f662076616c696461746f7273206578636565647320746865604082015265081b1a5b5a5d60d21b606082015260800190565b6020808252601e908201527f6368616e676556616c696461746f7273206e6f6e636520696e76616c69640000604082015260600190565b6020808252601f908201527f616d6f756e742073686f756c642062652067726561746572207468616e203000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526019908201527f4f766572666c6f7720647572696e67206164646974696f6e2e00000000000000604082015260600190565b60208082526013908201527272657065617465642076616c696461746f727360681b604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60208082526013908201527276616c696461746f727320617265206e6f6e6560681b604082015260600190565b60208082526019908201527f696e76616c6964206d756c74697369675468726573686f6c6400000000000000604082015260600190565b6020808252601490820152731d5b9b1bd8dac81b9bdb98d9481a5b9d985b1a5960621b604082015260600190565b60208082526017908201527f7369676e617475726573206e6f74207665726966696564000000000000000000604082015260600190565b6000848252604060208301526118a960408301848661127c565b95945050505050565b6000848252606060208301526118cb60608301856112a6565b82810360408401526118dd81856112a6565b9695505050505050565b6000808335601e198436030181126118fd578283fd5b83018035915067ffffffffffffffff821115611917578283fd5b60200191503681900382131561192c57600080fd5b9250929050565b60008235607e198336030181126112e4578182fd5b60405181810167ffffffffffffffff8111828210171561196a5761196a611a69565b604052919050565b6000821982111561198557611985611a3d565b500190565b600060ff821660ff84168060ff038211156119a7576119a7611a3d565b019392505050565b6000826119be576119be611a53565b500490565b60008160001904831182151516156119dd576119dd611a3d565b500290565b60005b838110156119fd5781810151838201526020016119e5565b83811115610b1a5750506000910152565b6000600019821415611a2257611a22611a3d565b5060010190565b600082611a3857611a38611a53565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fdfea2646970667358221220d1bf555edf085a00b31d67e2433cb478015edea0f2e421fa76aca73bf44e23a164736f6c63430008000033000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c14d8369433deb902e573bfd85006ac15634576300000000000000000000000032b9895966d44ba0d43474528b7ba1e40710fbf0
Deployed Bytecode
0x6080604052600436106100dd5760003560e01c80638c8ca33c1161007f578063d36394b011610059578063d36394b0146101ed578063ea3cbb421461020d578063fa9c67f31461022d578063fd4e17aa14610242576100dd565b80638c8ca33c146101b0578063a406ad9a146101c5578063a6c03437146101d8576100dd565b80632da5351c116100bb5780632da5351c1461014f578063308ff0c9146101715780633644e515146101865780634592329b1461019b576100dd565b8063052b9e5c146100e257806314f9ad3e146101045780632187e8f914610124575b600080fd5b3480156100ee57600080fd5b506101026100fd366004610f9e565b610257565b005b34801561011057600080fd5b5061010261011f3660046110e2565b6102ea565b34801561013057600080fd5b50610139610565565b60405161014691906114f6565b60405180910390f35b34801561015b57600080fd5b5061016461058d565b6040516101469190611346565b34801561017d57600080fd5b50610164610592565b34801561019257600080fd5b50610164610597565b3480156101a757600080fd5b506101646105a7565b3480156101bc57600080fd5b506101646105ad565b6101026101d336600461121b565b6105d1565b3480156101e457600080fd5b50610164610636565b3480156101f957600080fd5b50610102610208366004611019565b61063c565b34801561021957600080fd5b506101026102283660046111cd565b610864565b34801561023957600080fd5b50610164610a98565b34801561024e57600080fd5b50610164610a9e565b600083116102805760405162461bcd60e51b8152600401610277906116aa565b60405180910390fd5b6102956001600160a01b038516333086610ac2565b336001600160a01b0316846001600160a01b03167f6aee94645d3f2b304035eced96277957513be5777c155afe6abb6c2285db7ad38585856040516102dc939291906118b2565b60405180910390a350505050565b826007541461030b5760405162461bcd60e51b81526004016102779061182a565b610316836001610b20565b6007556000610323610b54565b60405161035a907ff1c18f82536658c0cb1a208d4a52b9915dc9e75640ed0daf3a6be45d02ca5c9f908990899089906020016113af565b604051602081830303815290604052805190602001206040516020016103819291906112ee565b6040516020818303038152906040528051906020012090506103da8184848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250549250610864915050565b60005b8581101561055c573687878381811061040657634e487b7160e01b600052603260045260246000fd5b90506020028101906104189190611933565b90506040810135610429575061054a565b60006104386020830183610f84565b6001600160a01b03161415610499576104576040820160208301610f84565b6001600160a01b03166108fc82604001359081150290604051600060405180830381858888f19350505050158015610493573d6000803e3d6000fd5b506104ce565b6104ce6104ac6040830160208401610f84565b60408301356104be6020850185610f84565b6001600160a01b03169190610b88565b336104df6040830160208401610f84565b6001600160a01b03166104f56020840184610f84565b6001600160a01b03167fa68ce84c815a939744a011df05adcf79b74994aada52c5810979c254042f553d604085013561053160608701876118e7565b6040516105409392919061188f565b60405180910390a4505b8061055481611a0e565b9150506103dd565b50505050505050565b6040518060400160405280600c81526020016b466f7263652042726964676560a01b81525081565b603281565b604181565b60006105a1610b54565b90505b90565b60085481565b7ff1c18f82536658c0cb1a208d4a52b9915dc9e75640ed0daf3a6be45d02ca5c9f81565b600034116105f15760405162461bcd60e51b8152600401610277906116aa565b60405133906000907f6aee94645d3f2b304035eced96277957513be5777c155afe6abb6c2285db7ad39061062a903490879087906118b2565b60405180910390a35050565b60005481565b600854821461065d5760405162461bcd60e51b815260040161027790611673565b610668826001610b20565b60085583516106895760405162461bcd60e51b8152600401610277906117c6565b600083116106a95760405162461bcd60e51b8152600401610277906117f3565b6032845111156106cb5760405162461bcd60e51b81526004016102779061162d565b83518311156106ec5760405162461bcd60e51b8152600401610277906117f3565b60005b84518110156107b6576000610705826001611972565b90505b85518110156107a35785818151811061073157634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b031686838151811061076257634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b031614156107915760405162461bcd60e51b81526004016102779061174f565b8061079b81611a0e565b915050610708565b50806107ae81611a0e565b9150506106ef565b5060006107c1610b54565b6040516107f8907fd2cedd075bf1780178b261ac9c9000261e7fd88d66f6309124bddf24f5d953f89088908890889060200161134f565b6040516020818303038152906040528051906020012060405160200161081f9291906112ee565b6040516020818303038152906040528051906020012090506108448183600054610864565b8451610857906001906020880190610e88565b5050506000919091555050565b604182516108729190611a29565b1561088f5760405162461bcd60e51b815260040161027790611601565b60006041835161089f91906119af565b9050818110156108c15760405162461bcd60e51b8152600401610277906115b1565b600080600080600080600060018054905067ffffffffffffffff8111156108f857634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610921578160200160208202803683370190505b50905060005b88871015610a69576109398b88610ba7565b919750955093508661094a81611a0e565b97505060018c8787876040516000815260200160405260405161097094939291906114d8565b6020604051602081039080840390855afa158015610992573d6000803e3d6000fd5b5050604051601f1901519350506001600160a01b0383166109c55760405162461bcd60e51b815260040161027790611540565b6109ce83610c25565b60015490915081101580610a0657508181815181106109fd57634e487b7160e01b600052603260045260246000fd5b60200260200101515b15610a1057610927565b6001828281518110610a3257634e487b7160e01b600052603260045260246000fd5b9115156020928302919091019091015287610a4c81611a0e565b985050898810610a6457505050505050505050610a93565b610927565b89881015610a895760405162461bcd60e51b815260040161027790611858565b5050505050505050505b505050565b60075481565b7fd2cedd075bf1780178b261ac9c9000261e7fd88d66f6309124bddf24f5d953f881565b610b1a846323b872dd60e01b858585604051602401610ae393929190611309565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610c9d565b50505050565b6000610b2c8284611972565b905082811015610b4e5760405162461bcd60e51b815260040161027790611718565b92915050565b6000600354610b61610d2c565b1415610b7057506002546105a4565b610b81600654600454600554610d30565b90506105a4565b610a938363a9059cbb60e01b8484604051602401610ae392919061132d565b6000808080610bb78560416119c3565b8681016020810151604082015160419092015160ff169650945092509050601b841015610bec57610be9601b8561198a565b93505b8360ff16601b1480610c0157508360ff16601c145b610c1d5760405162461bcd60e51b815260040161027790611509565b509250925092565b6000805b600154811015610c9257826001600160a01b031660018281548110610c5e57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03161415610c80579050610c98565b80610c8a81611a0e565b915050610c29565b50506001545b919050565b6000610cf2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610d729092919063ffffffff16565b805190915015610a935780806020019051810190610d1091906111ad565b610a935760405162461bcd60e51b81526004016102779061177c565b4690565b6000838383610d3d610d2c565b30604051602001610d529594939291906114ac565b6040516020818303038152906040528051906020012090505b9392505050565b6060610d818484600085610d89565b949350505050565b606082471015610dab5760405162461bcd60e51b81526004016102779061156b565b610db485610e49565b610dd05760405162461bcd60e51b8152600401610277906116e1565b600080866001600160a01b03168587604051610dec91906112d2565b60006040518083038185875af1925050503d8060008114610e29576040519150601f19603f3d011682016040523d82523d6000602084013e610e2e565b606091505b5091509150610e3e828286610e4f565b979650505050505050565b3b151590565b60608315610e5e575081610d6b565b825115610e6e5782518084602001fd5b8160405162461bcd60e51b815260040161027791906114f6565b828054828255906000526020600020908101928215610edd579160200282015b82811115610edd57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190610ea8565b50610ee9929150610eed565b5090565b5b80821115610ee95760008155600101610eee565b80356001600160a01b0381168114610c9857600080fd5b600082601f830112610f29578081fd5b813567ffffffffffffffff811115610f4357610f43611a69565b610f56601f8201601f1916602001611948565b818152846020838601011115610f6a578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215610f95578081fd5b610d6b82610f02565b60008060008060808587031215610fb3578283fd5b610fbc85610f02565b935060208501359250604085013567ffffffffffffffff80821115610fdf578384fd5b610feb88838901610f19565b93506060870135915080821115611000578283fd5b5061100d87828801610f19565b91505092959194509250565b6000806000806080858703121561102e578384fd5b843567ffffffffffffffff80821115611045578586fd5b818701915087601f830112611058578586fd5b813560208282111561106c5761106c611a69565b80820261107a828201611948565b8381528281019086840183880185018e1015611094578b8cfd5b8b97505b858810156110bd576110a981610f02565b835260019790970196918401918401611098565b5099505050880135955050604087013593506060870135915080821115611000578283fd5b6000806000806000606086880312156110f9578081fd5b853567ffffffffffffffff80821115611110578283fd5b818801915088601f830112611123578283fd5b813581811115611131578384fd5b60208a818284028601011115611145578485fd5b8084019850819750808a0135965060408a0135935082841115611166578485fd5b838a0193508a601f850112611179578485fd5b8335915082821115611189578485fd5b8a81838601011115611199578485fd5b979a96995094975050909401935090919050565b6000602082840312156111be578081fd5b81518015158114610d6b578182fd5b6000806000606084860312156111e1578283fd5b83359250602084013567ffffffffffffffff8111156111fe578283fd5b61120a86828701610f19565b925050604084013590509250925092565b6000806040838503121561122d578182fd5b823567ffffffffffffffff80821115611244578384fd5b61125086838701610f19565b93506020850135915080821115611265578283fd5b5061127285828601610f19565b9150509250929050565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b600081518084526112be8160208601602086016119e2565b601f01601f19169290920160200192915050565b600082516112e48184602087016119e2565b9190910192915050565b61190160f01b81526002810192909252602282015260420190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b90815260200190565b600060808201868352602060808185015281875180845260a0860191508289019350845b818110156113985784516001600160a01b031683529383019391830191600101611373565b505060408501969096525050506060015292915050565b84815260606020808301829052828201859052600091906080908185018782028601830189865b8a81101561149357888303607f190184528135368d9003607e190181126113fb578889fd5b8c016001600160a01b038061140f83610f02565b1685528061141e888401610f02565b168588015250604081810135908501528781013536829003601e1901811261144457898afd5b8101803567ffffffffffffffff81111561145c578a8bfd5b80360383131561146a578a8bfd5b888a87015261147e898701828a850161127c565b968801969550505091850191506001016113d6565b5050809550505050505082604083015295945050505050565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b93845260ff9290921660208401526040830152606082015260800190565b600060208252610d6b60208301846112a6565b6020808252601f908201527f696e76616c69642076206f66207369676e617475726528722c20732c20762900604082015260600190565b602080825260119082015270696e76616c6964207369676e617475726560781b604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b60208082526030908201527f6c656e677468206f66207369676e617475726573206d7573742067726561746560408201526f1c881d1a185b881d1a1c995cda1bdb1960821b606082015260800190565b602080825260129082015271696e76616c6964207369676e61747572657360701b604082015260600190565b60208082526026908201527f6e756d626572206f662076616c696461746f7273206578636565647320746865604082015265081b1a5b5a5d60d21b606082015260800190565b6020808252601e908201527f6368616e676556616c696461746f7273206e6f6e636520696e76616c69640000604082015260600190565b6020808252601f908201527f616d6f756e742073686f756c642062652067726561746572207468616e203000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526019908201527f4f766572666c6f7720647572696e67206164646974696f6e2e00000000000000604082015260600190565b60208082526013908201527272657065617465642076616c696461746f727360681b604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60208082526013908201527276616c696461746f727320617265206e6f6e6560681b604082015260600190565b60208082526019908201527f696e76616c6964206d756c74697369675468726573686f6c6400000000000000604082015260600190565b6020808252601490820152731d5b9b1bd8dac81b9bdb98d9481a5b9d985b1a5960621b604082015260600190565b60208082526017908201527f7369676e617475726573206e6f74207665726966696564000000000000000000604082015260600190565b6000848252604060208301526118a960408301848661127c565b95945050505050565b6000848252606060208301526118cb60608301856112a6565b82810360408401526118dd81856112a6565b9695505050505050565b6000808335601e198436030181126118fd578283fd5b83018035915067ffffffffffffffff821115611917578283fd5b60200191503681900382131561192c57600080fd5b9250929050565b60008235607e198336030181126112e4578182fd5b60405181810167ffffffffffffffff8111828210171561196a5761196a611a69565b604052919050565b6000821982111561198557611985611a3d565b500190565b600060ff821660ff84168060ff038211156119a7576119a7611a3d565b019392505050565b6000826119be576119be611a53565b500490565b60008160001904831182151516156119dd576119dd611a3d565b500290565b60005b838110156119fd5781810151838201526020016119e5565b83811115610b1a5750506000910152565b6000600019821415611a2257611a22611a3d565b5060010190565b600082611a3857611a38611a53565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fdfea2646970667358221220d1bf555edf085a00b31d67e2433cb478015edea0f2e421fa76aca73bf44e23a164736f6c63430008000033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c14d8369433deb902e573bfd85006ac15634576300000000000000000000000032b9895966d44ba0d43474528b7ba1e40710fbf0
-----Decoded View---------------
Arg [0] : validators (address[]): 0xc14D8369433deb902e573bfd85006ac156345763,0x32b9895966d44Ba0D43474528b7ba1e40710Fbf0
Arg [1] : multisigThreshold (uint256): 1
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [3] : 000000000000000000000000c14d8369433deb902e573bfd85006ac156345763
Arg [4] : 00000000000000000000000032b9895966d44ba0d43474528b7ba1e40710fbf0
Loading...
Loading
Loading...
Loading
Net Worth in USD
$383.94
Net Worth in ETH
0.119292
Token Allocations
BAT
15.87%
AAVE
14.22%
LINK
13.47%
Others
56.44%
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| ETH | 15.87% | $0.203635 | 299.3 | $60.95 | |
| ETH | 14.22% | $165.39 | 0.33 | $54.58 | |
| ETH | 13.47% | $12.93 | 4 | $51.72 | |
| ETH | 11.38% | $0.999251 | 43.73 | $43.7 | |
| ETH | 10.85% | $0.999362 | 41.7 | $41.67 | |
| ETH | 8.03% | $1,513.76 | 0.0204 | $30.84 | |
| ETH | 5.24% | $5.03 | 4.0001 | $20.12 | |
| ETH | 3.02% | $0.426243 | 27.2 | $11.59 | |
| ETH | 2.89% | $3,468.35 | 0.0032 | $11.1 | |
| ETH | 2.72% | $0.012737 | 821 | $10.46 | |
| ETH | 2.33% | $0.146937 | 61 | $8.96 | |
| ETH | 1.87% | $25.61 | 0.28 | $7.17 | |
| ETH | 1.13% | $0.334577 | 13 | $4.35 | |
| ETH | 1.11% | $0.023129 | 185 | $4.28 | |
| ETH | 1.11% | $0.007871 | 543.3 | $4.28 | |
| ETH | 1.09% | $0.445305 | 9.4 | $4.19 | |
| ETH | 1.02% | $0.016799 | 234.2 | $3.93 | |
| ETH | 0.76% | $0.063072 | 46 | $2.9 | |
| ETH | 0.71% | $0.315516 | 8.7 | $2.74 | |
| ETH | 0.71% | $0.147469 | 18.48 | $2.73 | |
| ETH | 0.33% | $0.533876 | 2.353 | $1.26 | |
| ETH | 0.06% | $0.000228 | 1,000 | $0.2275 | |
| ETH | 0.05% | $0.001119 | 184.2 | $0.206 |
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ 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.