Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 25 from a total of 1,117 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Bridge Back O Gs | 24357399 | 23 days ago | IN | 0 ETH | 0.00035779 | ||||
| Bridge Back Cubs | 24357219 | 23 days ago | IN | 0 ETH | 0.00036368 | ||||
| Bridge Back O Gs | 24342045 | 25 days ago | IN | 0 ETH | 0.00031271 | ||||
| Bridge Back O Gs | 24342027 | 25 days ago | IN | 0 ETH | 0.00065385 | ||||
| Bridge Back O Gs | 24342018 | 25 days ago | IN | 0 ETH | 0.00050541 | ||||
| Bridge Back O Gs | 24342002 | 25 days ago | IN | 0 ETH | 0.00049332 | ||||
| Bridge Back O Gs | 24341991 | 25 days ago | IN | 0 ETH | 0.00032466 | ||||
| Bridge Back O Gs | 24341970 | 25 days ago | IN | 0 ETH | 0.00032645 | ||||
| Bridge Back Cubs | 24327432 | 27 days ago | IN | 0 ETH | 0.00002025 | ||||
| Bridge Back O Gs | 24326612 | 27 days ago | IN | 0 ETH | 0.00020067 | ||||
| Bridge Back Cubs | 24323014 | 28 days ago | IN | 0 ETH | 0.00022013 | ||||
| Bridge Back Cubs | 24323006 | 28 days ago | IN | 0 ETH | 0.00000741 | ||||
| Bridge Back Cubs | 24322991 | 28 days ago | IN | 0 ETH | 0.00000784 | ||||
| Bridge Back Cubs | 24322959 | 28 days ago | IN | 0 ETH | 0.00000727 | ||||
| Bridge Back Cubs | 24322940 | 28 days ago | IN | 0 ETH | 0.00000752 | ||||
| Bridge Back Cubs | 24322928 | 28 days ago | IN | 0 ETH | 0.00000772 | ||||
| Bridge Back Cubs | 24322917 | 28 days ago | IN | 0 ETH | 0.0000069 | ||||
| Bridge Back Cubs | 24322825 | 28 days ago | IN | 0 ETH | 0.00000675 | ||||
| Bridge Back Cubs | 24322312 | 28 days ago | IN | 0 ETH | 0.00000811 | ||||
| Bridge Back O Gs | 24322287 | 28 days ago | IN | 0 ETH | 0.00001658 | ||||
| Bridge Back O Gs | 24322266 | 28 days ago | IN | 0 ETH | 0.00001496 | ||||
| Bridge Back O Gs | 24322251 | 28 days ago | IN | 0 ETH | 0.00001368 | ||||
| Bridge Back O Gs | 24305546 | 30 days ago | IN | 0 ETH | 0.00024509 | ||||
| Bridge Back Cubs | 24272853 | 35 days ago | IN | 0 ETH | 0.00019626 | ||||
| Bridge Back Cubs | 24272850 | 35 days ago | IN | 0 ETH | 0.00024213 |
Advanced mode: Intended for advanced users or developers and will display all Internal Transactions including zero value transfers.
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
|||
|---|---|---|---|---|---|---|---|---|
| Bridge Back | 24357399 | 23 days ago | 0 ETH | |||||
| Transfer* | 24357399 | 23 days ago | 0 ETH | |||||
| Bridge Back | 24357219 | 23 days ago | 0 ETH | |||||
| Transfer* | 24357219 | 23 days ago | 0 ETH | |||||
| Bridge Back | 24342045 | 25 days ago | 0 ETH | |||||
| Transfer* | 24342045 | 25 days ago | 0 ETH | |||||
| Bridge Back | 24342027 | 25 days ago | 0 ETH | |||||
| Transfer* | 24342027 | 25 days ago | 0 ETH | |||||
| Bridge Back | 24342018 | 25 days ago | 0 ETH | |||||
| Transfer* | 24342018 | 25 days ago | 0 ETH | |||||
| Bridge Back | 24342002 | 25 days ago | 0 ETH | |||||
| Transfer* | 24342002 | 25 days ago | 0 ETH | |||||
| Bridge Back | 24341991 | 25 days ago | 0 ETH | |||||
| Transfer* | 24341991 | 25 days ago | 0 ETH | |||||
| Bridge Back | 24341970 | 25 days ago | 0 ETH | |||||
| Transfer* | 24341970 | 25 days ago | 0 ETH | |||||
| Bridge Back | 24327432 | 27 days ago | 0 ETH | |||||
| Transfer* | 24327432 | 27 days ago | 0 ETH | |||||
| Bridge Back | 24326612 | 27 days ago | 0 ETH | |||||
| Transfer* | 24326612 | 27 days ago | 0 ETH | |||||
| Bridge Back | 24323014 | 28 days ago | 0 ETH | |||||
| Transfer* | 24323014 | 28 days ago | 0 ETH | |||||
| Bridge Back | 24323006 | 28 days ago | 0 ETH | |||||
| Transfer* | 24323006 | 28 days ago | 0 ETH | |||||
| Bridge Back | 24322991 | 28 days ago | 0 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
BridgeBack
Compiler Version
v0.8.19+commit.7dd6d404
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.19;
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
interface ICubs is IERC721 {
function bridgeBack(uint256[] calldata tokens, address to) external;
}
interface IKILLABEARSBridge {
function bridgeBack(uint[] calldata tokens, address to) external;
}
contract BridgeBack is Ownable {
using ECDSA for bytes32;
error InvalidNonce();
error InvalidSignature();
error NotBridgable(uint256 token);
ICubs public cubs;
IKILLABEARSBridge public ogBridge;
IERC721 public killabears;
address public signerCubs;
address public signerOGs;
mapping(address => uint256) public noncesCubs;
mapping(address => uint256) public noncesOGs;
constructor(
address cubsAddress,
address ogBridgeAddress,
address killabearsAddress,
address _signerCubs,
address _signerOGs
) {
cubs = ICubs(cubsAddress);
ogBridge = IKILLABEARSBridge(ogBridgeAddress);
killabears = IERC721(killabearsAddress);
signerCubs = _signerCubs;
signerOGs = _signerOGs;
}
function bridgeBackCubs(
uint256[] calldata tokens,
uint256 nonce,
bytes calldata signature
) external {
if (noncesCubs[msg.sender] >= nonce) revert InvalidNonce();
if (
signerCubs !=
ECDSA
.toEthSignedMessageHash(
abi.encodePacked(tokens, nonce, msg.sender)
)
.recover(signature)
) revert InvalidSignature();
noncesCubs[msg.sender] = nonce;
cubs.bridgeBack(tokens, msg.sender);
}
function bridgeBackOGs(
uint[] calldata tokens,
uint256 nonce,
bytes calldata signature
) external {
if (noncesOGs[msg.sender] >= nonce) revert InvalidNonce();
if (
signerOGs !=
ECDSA
.toEthSignedMessageHash(
abi.encodePacked(tokens, nonce, msg.sender)
)
.recover(signature)
) revert InvalidSignature();
noncesOGs[msg.sender] = nonce;
ogBridge.bridgeBack(tokens, msg.sender);
}
function getNonceAndValidateCubOwnership(
address owner,
uint[] calldata tokens
) external view returns (uint256 nonce) {
for (uint i = 0; i < tokens.length; i++) {
if (cubs.ownerOf(tokens[i]) != address(1))
revert NotBridgable(tokens[i]);
}
return noncesCubs[owner];
}
function getNonceAndValidateOGOwnership(
address owner,
uint[] calldata tokens
) external view returns (uint256 nonce) {
for (uint i = 0; i < tokens.length; i++) {
if (killabears.ownerOf(tokens[i]) != address(ogBridge))
revert NotBridgable(tokens[i]);
}
return noncesOGs[owner];
}
function setSignerCubs(address _signer) external onlyOwner {
signerCubs = _signer;
}
function setSignerOGs(address _signer) external onlyOwner {
signerOGs = _signer;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)
pragma solidity ^0.8.0;
import "../Strings.sol";
/**
* @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,
InvalidSignatureV // Deprecated in v4.8
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no error: do nothing
} else if (error == RecoverError.InvalidSignature) {
revert("ECDSA: invalid signature");
} else if (error == RecoverError.InvalidSignatureLength) {
revert("ECDSA: invalid signature length");
} else if (error == RecoverError.InvalidSignatureS) {
revert("ECDSA: invalid signature 's' value");
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature` or error string. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode 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 {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]
*
* _Available since v4.3._
*/
function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
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);
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode 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 {toEthSignedMessageHash} on it.
*/
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, signature);
_throwError(error);
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]
*
* _Available since v4.3._
*/
function tryRecover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address, RecoverError) {
bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
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.
*
* _Available since v4.2._
*/
function recover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, r, vs);
_throwError(error);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `v`,
* `r` and `s` signature fields separately.
*
* _Available since v4.3._
*/
function tryRecover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address, RecoverError) {
// 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);
}
// 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);
}
return (signer, RecoverError.NoError);
}
/**
* @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) = tryRecover(hash, v, r, s);
_throwError(error);
return recovered;
}
/**
* @dev Returns an Ethereum Signed Message, created from a `hash`. This
* produces hash corresponding to the one signed with the
* https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
* JSON-RPC method as part of EIP-191.
*
* See {recover}.
*/
function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
// 32 is the length in bytes of hash,
// enforced by the type signature above
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
}
/**
* @dev Returns an Ethereum Signed Message, created from `s`. This
* produces hash corresponding to the one signed with the
* https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
* JSON-RPC method as part of EIP-191.
*
* See {recover}.
*/
function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
}
/**
* @dev Returns an Ethereum Signed Typed Data, created from a
* `domainSeparator` and a `structHash`. This produces hash corresponding
* to the one signed with the
* https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
* JSON-RPC method as part of EIP-712.
*
* See {recover}.
*/
function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
* or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
* understand this adds an external call which potentially creates a reentrancy vulnerability.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool _approved) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)
pragma solidity ^0.8.0;
import "./math/Math.sol";
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
unchecked {
uint256 length = Math.log10(value) + 1;
string memory buffer = new string(length);
uint256 ptr;
/// @solidity memory-safe-assembly
assembly {
ptr := add(buffer, add(32, length))
}
while (true) {
ptr--;
/// @solidity memory-safe-assembly
assembly {
mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
}
value /= 10;
if (value == 0) break;
}
return buffer;
}
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
unchecked {
return toHexString(value, Math.log256(value) + 1);
}
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)
pragma solidity ^0.8.0;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
enum Rounding {
Down, // Toward negative infinity
Up, // Toward infinity
Zero // Toward zero
}
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow.
return (a & b) + (a ^ b) / 2;
}
/**
* @dev Returns the ceiling of the division of two numbers.
*
* This differs from standard division with `/` in that it rounds up instead
* of rounding down.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b - 1) / b can overflow on addition, so we distribute.
return a == 0 ? 0 : (a - 1) / b + 1;
}
/**
* @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
* @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
* with further edits by Uniswap Labs also under MIT license.
*/
function mulDiv(
uint256 x,
uint256 y,
uint256 denominator
) internal pure returns (uint256 result) {
unchecked {
// 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
// use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
// variables such that product = prod1 * 2^256 + prod0.
uint256 prod0; // Least significant 256 bits of the product
uint256 prod1; // Most significant 256 bits of the product
assembly {
let mm := mulmod(x, y, not(0))
prod0 := mul(x, y)
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
// Handle non-overflow cases, 256 by 256 division.
if (prod1 == 0) {
return prod0 / denominator;
}
// Make sure the result is less than 2^256. Also prevents denominator == 0.
require(denominator > prod1);
///////////////////////////////////////////////
// 512 by 256 division.
///////////////////////////////////////////////
// Make division exact by subtracting the remainder from [prod1 prod0].
uint256 remainder;
assembly {
// Compute remainder using mulmod.
remainder := mulmod(x, y, denominator)
// Subtract 256 bit number from 512 bit number.
prod1 := sub(prod1, gt(remainder, prod0))
prod0 := sub(prod0, remainder)
}
// Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
// See https://cs.stackexchange.com/q/138556/92363.
// Does not overflow because the denominator cannot be zero at this stage in the function.
uint256 twos = denominator & (~denominator + 1);
assembly {
// Divide denominator by twos.
denominator := div(denominator, twos)
// Divide [prod1 prod0] by twos.
prod0 := div(prod0, twos)
// Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
twos := add(div(sub(0, twos), twos), 1)
}
// Shift in bits from prod1 into prod0.
prod0 |= prod1 * twos;
// Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
// that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
// four bits. That is, denominator * inv = 1 mod 2^4.
uint256 inverse = (3 * denominator) ^ 2;
// Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
// in modular arithmetic, doubling the correct bits in each step.
inverse *= 2 - denominator * inverse; // inverse mod 2^8
inverse *= 2 - denominator * inverse; // inverse mod 2^16
inverse *= 2 - denominator * inverse; // inverse mod 2^32
inverse *= 2 - denominator * inverse; // inverse mod 2^64
inverse *= 2 - denominator * inverse; // inverse mod 2^128
inverse *= 2 - denominator * inverse; // inverse mod 2^256
// Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
// This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
// less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
// is no longer required.
result = prod0 * inverse;
return result;
}
}
/**
* @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
*/
function mulDiv(
uint256 x,
uint256 y,
uint256 denominator,
Rounding rounding
) internal pure returns (uint256) {
uint256 result = mulDiv(x, y, denominator);
if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
result += 1;
}
return result;
}
/**
* @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
*
* Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
*/
function sqrt(uint256 a) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
// For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
//
// We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
// `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
//
// This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
// → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
// → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
//
// Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
uint256 result = 1 << (log2(a) >> 1);
// At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
// since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
// every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
// into the expected uint128 result.
unchecked {
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
return min(result, a / result);
}
}
/**
* @notice Calculates sqrt(a), following the selected rounding direction.
*/
function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = sqrt(a);
return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
}
}
/**
* @dev Return the log in base 2, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 128;
}
if (value >> 64 > 0) {
value >>= 64;
result += 64;
}
if (value >> 32 > 0) {
value >>= 32;
result += 32;
}
if (value >> 16 > 0) {
value >>= 16;
result += 16;
}
if (value >> 8 > 0) {
value >>= 8;
result += 8;
}
if (value >> 4 > 0) {
value >>= 4;
result += 4;
}
if (value >> 2 > 0) {
value >>= 2;
result += 2;
}
if (value >> 1 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 2, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log2(value);
return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 10, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >= 10**64) {
value /= 10**64;
result += 64;
}
if (value >= 10**32) {
value /= 10**32;
result += 32;
}
if (value >= 10**16) {
value /= 10**16;
result += 16;
}
if (value >= 10**8) {
value /= 10**8;
result += 8;
}
if (value >= 10**4) {
value /= 10**4;
result += 4;
}
if (value >= 10**2) {
value /= 10**2;
result += 2;
}
if (value >= 10**1) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 256, rounded down, of a positive value.
* Returns 0 if given 0.
*
* Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
*/
function log256(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 16;
}
if (value >> 64 > 0) {
value >>= 64;
result += 8;
}
if (value >> 32 > 0) {
value >>= 32;
result += 4;
}
if (value >> 16 > 0) {
value >>= 16;
result += 2;
}
if (value >> 8 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"cubsAddress","type":"address"},{"internalType":"address","name":"ogBridgeAddress","type":"address"},{"internalType":"address","name":"killabearsAddress","type":"address"},{"internalType":"address","name":"_signerCubs","type":"address"},{"internalType":"address","name":"_signerOGs","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidNonce","type":"error"},{"inputs":[],"name":"InvalidSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"token","type":"uint256"}],"name":"NotBridgable","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"uint256[]","name":"tokens","type":"uint256[]"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"bridgeBackCubs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokens","type":"uint256[]"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"bridgeBackOGs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cubs","outputs":[{"internalType":"contract ICubs","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256[]","name":"tokens","type":"uint256[]"}],"name":"getNonceAndValidateCubOwnership","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256[]","name":"tokens","type":"uint256[]"}],"name":"getNonceAndValidateOGOwnership","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"killabears","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"noncesCubs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"noncesOGs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ogBridge","outputs":[{"internalType":"contract IKILLABEARSBridge","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"setSignerCubs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"setSignerOGs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signerCubs","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"signerOGs","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60806040523480156200001157600080fd5b50604051620011273803806200112783398101604081905262000034916200010f565b6200003f33620000a2565b600180546001600160a01b03199081166001600160a01b039788161790915560028054821695871695909517909455600380548516938616939093179092556004805484169185169190911790556005805490921692169190911790556200017f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146200010a57600080fd5b919050565b600080600080600060a086880312156200012857600080fd5b6200013386620000f2565b94506200014360208701620000f2565b93506200015360408701620000f2565b92506200016360608701620000f2565b91506200017360808701620000f2565b90509295509295909350565b610f98806200018f6000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80637da6fb3311610097578063d35c9a8111610066578063d35c9a8114610209578063dd6983161461021c578063e1f6d1e21461023c578063f2fde38b1461025c57600080fd5b80637da6fb33146101bf5780638da5cb5b146101d25780639c43d7b8146101e3578063a1129fb6146101f657600080fd5b8063372fe3e0116100d3578063372fe3e0146101705780633a59eae4146101835780635db8de4814610196578063715018a6146101b757600080fd5b8063050895e51461010557806314f6f28f1461011a578063205b0b081461014a5780632f1936731461015d575b600080fd5b610118610113366004610c6e565b61026f565b005b60025461012d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b60035461012d906001600160a01b031681565b60015461012d906001600160a01b031681565b60055461012d906001600160a01b031681565b60045461012d906001600160a01b031681565b6101a96101a4366004610cd7565b610299565b604051908152602001610141565b6101186103b2565b6101186101cd366004610c6e565b6103c6565b6000546001600160a01b031661012d565b6101186101f1366004610d2c565b6103f0565b610118610204366004610d2c565b61053a565b6101a9610217366004610cd7565b610631565b6101a961022a366004610c6e565b60076020526000908152604090205481565b6101a961024a366004610c6e565b60066020526000908152604090205481565b61011861026a366004610c6e565b610718565b610277610791565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000805b82811015610393576002546003546001600160a01b039182169116636352211e8686858181106102cf576102cf610dd0565b905060200201356040518263ffffffff1660e01b81526004016102f491815260200190565b602060405180830381865afa158015610311573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103359190610de6565b6001600160a01b0316146103815783838281811061035557610355610dd0565b90506020020135604051633d08a0a560e11b815260040161037891815260200190565b60405180910390fd5b8061038b81610e03565b91505061029d565b505050506001600160a01b031660009081526007602052604090205490565b6103ba610791565b6103c460006107eb565b565b6103ce610791565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b33600090815260066020526040902054831161041f57604051633ab3447f60e11b815260040160405180910390fd5b61048d82828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604051610487925061047391508990899089903390602001610e2a565b60405160208183030381529060405261083b565b90610876565b6004546001600160a01b039081169116146104bb57604051638baa579f60e01b815260040160405180910390fd5b3360008181526006602052604090819020859055600154905163027415a760e01b81526001600160a01b039091169163027415a791610501918991899190600401610e70565b600060405180830381600087803b15801561051b57600080fd5b505af115801561052f573d6000803e3d6000fd5b505050505050505050565b33600090815260076020526040902054831161056957604051633ab3447f60e11b815260040160405180910390fd5b6105bd82828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604051610487925061047391508990899089903390602001610e2a565b6005546001600160a01b039081169116146105eb57604051638baa579f60e01b815260040160405180910390fd5b3360008181526007602052604090819020859055600254905163027415a760e01b81526001600160a01b039091169163027415a791610501918991899190600401610e70565b6000805b828110156106f957600180546001600160a01b0316636352211e86868581811061066157610661610dd0565b905060200201356040518263ffffffff1660e01b815260040161068691815260200190565b602060405180830381865afa1580156106a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c79190610de6565b6001600160a01b0316146106e75783838281811061035557610355610dd0565b806106f181610e03565b915050610635565b505050506001600160a01b031660009081526006602052604090205490565b610720610791565b6001600160a01b0381166107855760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610378565b61078e816107eb565b50565b6000546001600160a01b031633146103c45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610378565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000610847825161089a565b82604051602001610859929190610edb565b604051602081830303815290604052805190602001209050919050565b6000806000610885858561092d565b9150915061089281610972565b509392505050565b606060006108a783610abc565b600101905060008167ffffffffffffffff8111156108c7576108c7610f36565b6040519080825280601f01601f1916602001820160405280156108f1576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846108fb57509392505050565b60008082516041036109635760208301516040840151606085015160001a61095787828585610b95565b9450945050505061096b565b506000905060025b9250929050565b600081600481111561098657610986610f4c565b0361098e5750565b60018160048111156109a2576109a2610f4c565b036109ef5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610378565b6002816004811115610a0357610a03610f4c565b03610a505760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610378565b6003816004811115610a6457610a64610f4c565b0361078e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610378565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310610afb5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310610b27576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310610b4557662386f26fc10000830492506010015b6305f5e1008310610b5d576305f5e100830492506008015b6127108310610b7157612710830492506004015b60648310610b83576064830492506002015b600a8310610b8f576001015b92915050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610bcc5750600090506003610c50565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610c20573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610c4957600060019250925050610c50565b9150600090505b94509492505050565b6001600160a01b038116811461078e57600080fd5b600060208284031215610c8057600080fd5b8135610c8b81610c59565b9392505050565b60008083601f840112610ca457600080fd5b50813567ffffffffffffffff811115610cbc57600080fd5b6020830191508360208260051b850101111561096b57600080fd5b600080600060408486031215610cec57600080fd5b8335610cf781610c59565b9250602084013567ffffffffffffffff811115610d1357600080fd5b610d1f86828701610c92565b9497909650939450505050565b600080600080600060608688031215610d4457600080fd5b853567ffffffffffffffff80821115610d5c57600080fd5b610d6889838a01610c92565b9097509550602088013594506040880135915080821115610d8857600080fd5b818801915088601f830112610d9c57600080fd5b813581811115610dab57600080fd5b896020828501011115610dbd57600080fd5b9699959850939650602001949392505050565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610df857600080fd5b8151610c8b81610c59565b600060018201610e2357634e487b7160e01b600052601160045260246000fd5b5060010190565b60006001600160fb1b03851115610e4057600080fd5b8460051b80878437919091019283525060601b6bffffffffffffffffffffffff1916602082015260340192915050565b6040808252810183905260006001600160fb1b03841115610e9057600080fd5b8360051b808660608501376001600160a01b03939093166020830152500160600192915050565b60005b83811015610ed2578181015183820152602001610eba565b50506000910152565b7f19457468657265756d205369676e6564204d6573736167653a0a000000000000815260008351610f1381601a850160208801610eb7565b835190830190610f2a81601a840160208801610eb7565b01601a01949350505050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052602160045260246000fdfea264697066735822122024b49c59c7b0f3e7abb88a2e99abd3e2067246321e03b7217f58acde7954d83d64736f6c634300081300330000000000000000000000002b4bb904cfde74ec423cc534ef08579ee1c79148000000000000000000000000c69dc97e6653c3348db06be994cbad90f2965e46000000000000000000000000c99c679c50033bbc5321eb88752e89a93e9e83c500000000000000000000000055499ab499b8b5d5429a9c7dd5e2c1a77b170b1f0000000000000000000000006c6466a4ae87f8bdf5f29ece9d30c0710ade2339
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101005760003560e01c80637da6fb3311610097578063d35c9a8111610066578063d35c9a8114610209578063dd6983161461021c578063e1f6d1e21461023c578063f2fde38b1461025c57600080fd5b80637da6fb33146101bf5780638da5cb5b146101d25780639c43d7b8146101e3578063a1129fb6146101f657600080fd5b8063372fe3e0116100d3578063372fe3e0146101705780633a59eae4146101835780635db8de4814610196578063715018a6146101b757600080fd5b8063050895e51461010557806314f6f28f1461011a578063205b0b081461014a5780632f1936731461015d575b600080fd5b610118610113366004610c6e565b61026f565b005b60025461012d906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b60035461012d906001600160a01b031681565b60015461012d906001600160a01b031681565b60055461012d906001600160a01b031681565b60045461012d906001600160a01b031681565b6101a96101a4366004610cd7565b610299565b604051908152602001610141565b6101186103b2565b6101186101cd366004610c6e565b6103c6565b6000546001600160a01b031661012d565b6101186101f1366004610d2c565b6103f0565b610118610204366004610d2c565b61053a565b6101a9610217366004610cd7565b610631565b6101a961022a366004610c6e565b60076020526000908152604090205481565b6101a961024a366004610c6e565b60066020526000908152604090205481565b61011861026a366004610c6e565b610718565b610277610791565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000805b82811015610393576002546003546001600160a01b039182169116636352211e8686858181106102cf576102cf610dd0565b905060200201356040518263ffffffff1660e01b81526004016102f491815260200190565b602060405180830381865afa158015610311573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103359190610de6565b6001600160a01b0316146103815783838281811061035557610355610dd0565b90506020020135604051633d08a0a560e11b815260040161037891815260200190565b60405180910390fd5b8061038b81610e03565b91505061029d565b505050506001600160a01b031660009081526007602052604090205490565b6103ba610791565b6103c460006107eb565b565b6103ce610791565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b33600090815260066020526040902054831161041f57604051633ab3447f60e11b815260040160405180910390fd5b61048d82828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604051610487925061047391508990899089903390602001610e2a565b60405160208183030381529060405261083b565b90610876565b6004546001600160a01b039081169116146104bb57604051638baa579f60e01b815260040160405180910390fd5b3360008181526006602052604090819020859055600154905163027415a760e01b81526001600160a01b039091169163027415a791610501918991899190600401610e70565b600060405180830381600087803b15801561051b57600080fd5b505af115801561052f573d6000803e3d6000fd5b505050505050505050565b33600090815260076020526040902054831161056957604051633ab3447f60e11b815260040160405180910390fd5b6105bd82828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604051610487925061047391508990899089903390602001610e2a565b6005546001600160a01b039081169116146105eb57604051638baa579f60e01b815260040160405180910390fd5b3360008181526007602052604090819020859055600254905163027415a760e01b81526001600160a01b039091169163027415a791610501918991899190600401610e70565b6000805b828110156106f957600180546001600160a01b0316636352211e86868581811061066157610661610dd0565b905060200201356040518263ffffffff1660e01b815260040161068691815260200190565b602060405180830381865afa1580156106a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c79190610de6565b6001600160a01b0316146106e75783838281811061035557610355610dd0565b806106f181610e03565b915050610635565b505050506001600160a01b031660009081526006602052604090205490565b610720610791565b6001600160a01b0381166107855760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610378565b61078e816107eb565b50565b6000546001600160a01b031633146103c45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610378565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000610847825161089a565b82604051602001610859929190610edb565b604051602081830303815290604052805190602001209050919050565b6000806000610885858561092d565b9150915061089281610972565b509392505050565b606060006108a783610abc565b600101905060008167ffffffffffffffff8111156108c7576108c7610f36565b6040519080825280601f01601f1916602001820160405280156108f1576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846108fb57509392505050565b60008082516041036109635760208301516040840151606085015160001a61095787828585610b95565b9450945050505061096b565b506000905060025b9250929050565b600081600481111561098657610986610f4c565b0361098e5750565b60018160048111156109a2576109a2610f4c565b036109ef5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610378565b6002816004811115610a0357610a03610f4c565b03610a505760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610378565b6003816004811115610a6457610a64610f4c565b0361078e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610378565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310610afb5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310610b27576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310610b4557662386f26fc10000830492506010015b6305f5e1008310610b5d576305f5e100830492506008015b6127108310610b7157612710830492506004015b60648310610b83576064830492506002015b600a8310610b8f576001015b92915050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610bcc5750600090506003610c50565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610c20573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610c4957600060019250925050610c50565b9150600090505b94509492505050565b6001600160a01b038116811461078e57600080fd5b600060208284031215610c8057600080fd5b8135610c8b81610c59565b9392505050565b60008083601f840112610ca457600080fd5b50813567ffffffffffffffff811115610cbc57600080fd5b6020830191508360208260051b850101111561096b57600080fd5b600080600060408486031215610cec57600080fd5b8335610cf781610c59565b9250602084013567ffffffffffffffff811115610d1357600080fd5b610d1f86828701610c92565b9497909650939450505050565b600080600080600060608688031215610d4457600080fd5b853567ffffffffffffffff80821115610d5c57600080fd5b610d6889838a01610c92565b9097509550602088013594506040880135915080821115610d8857600080fd5b818801915088601f830112610d9c57600080fd5b813581811115610dab57600080fd5b896020828501011115610dbd57600080fd5b9699959850939650602001949392505050565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610df857600080fd5b8151610c8b81610c59565b600060018201610e2357634e487b7160e01b600052601160045260246000fd5b5060010190565b60006001600160fb1b03851115610e4057600080fd5b8460051b80878437919091019283525060601b6bffffffffffffffffffffffff1916602082015260340192915050565b6040808252810183905260006001600160fb1b03841115610e9057600080fd5b8360051b808660608501376001600160a01b03939093166020830152500160600192915050565b60005b83811015610ed2578181015183820152602001610eba565b50506000910152565b7f19457468657265756d205369676e6564204d6573736167653a0a000000000000815260008351610f1381601a850160208801610eb7565b835190830190610f2a81601a840160208801610eb7565b01601a01949350505050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052602160045260246000fdfea264697066735822122024b49c59c7b0f3e7abb88a2e99abd3e2067246321e03b7217f58acde7954d83d64736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000002b4bb904cfde74ec423cc534ef08579ee1c79148000000000000000000000000c69dc97e6653c3348db06be994cbad90f2965e46000000000000000000000000c99c679c50033bbc5321eb88752e89a93e9e83c500000000000000000000000055499ab499b8b5d5429a9c7dd5e2c1a77b170b1f0000000000000000000000006c6466a4ae87f8bdf5f29ece9d30c0710ade2339
-----Decoded View---------------
Arg [0] : cubsAddress (address): 0x2B4BB904Cfde74Ec423cC534Ef08579ee1c79148
Arg [1] : ogBridgeAddress (address): 0xc69Dc97e6653C3348Db06Be994CbaD90f2965E46
Arg [2] : killabearsAddress (address): 0xc99c679C50033Bbc5321EB88752E89a93e9e83C5
Arg [3] : _signerCubs (address): 0x55499AB499B8b5D5429A9C7Dd5E2c1A77b170b1F
Arg [4] : _signerOGs (address): 0x6C6466A4aE87F8BDf5F29ECE9d30c0710Ade2339
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000002b4bb904cfde74ec423cc534ef08579ee1c79148
Arg [1] : 000000000000000000000000c69dc97e6653c3348db06be994cbad90f2965e46
Arg [2] : 000000000000000000000000c99c679c50033bbc5321eb88752e89a93e9e83c5
Arg [3] : 00000000000000000000000055499ab499b8b5d5429a9c7dd5e2c1a77b170b1f
Arg [4] : 0000000000000000000000006c6466a4ae87f8bdf5f29ece9d30c0710ade2339
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.