Feature Tip: Add private address tag to any address under My Name Tag !
Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 25 from a total of 1,281 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Transfer Ownersh... | 13737167 | 1546 days ago | IN | 0 ETH | 0.0021286 | ||||
| Flip Upgrade Sta... | 13735601 | 1546 days ago | IN | 0 ETH | 0.0031871 | ||||
| Upgrade Droid | 13735586 | 1546 days ago | IN | 0 ETH | 0.04401309 | ||||
| Upgrade Droid | 13735552 | 1546 days ago | IN | 0 ETH | 0.02837981 | ||||
| Upgrade Droid | 13735546 | 1546 days ago | IN | 0 ETH | 0.02826532 | ||||
| Upgrade Droid | 13735539 | 1546 days ago | IN | 0 ETH | 0.03268275 | ||||
| Upgrade Droid | 13735529 | 1546 days ago | IN | 0 ETH | 0.03808783 | ||||
| Upgrade Droid | 13735523 | 1546 days ago | IN | 0 ETH | 0.03207084 | ||||
| Upgrade Droid | 13735517 | 1546 days ago | IN | 0 ETH | 0.03982093 | ||||
| Upgrade Droid | 13735455 | 1546 days ago | IN | 0 ETH | 0.03116421 | ||||
| Upgrade Droid | 13735443 | 1546 days ago | IN | 0 ETH | 0.03002828 | ||||
| Upgrade Droid | 13735441 | 1546 days ago | IN | 0 ETH | 0.02784507 | ||||
| Upgrade Droid | 13735440 | 1546 days ago | IN | 0 ETH | 0.02379456 | ||||
| Upgrade Droid | 13735433 | 1546 days ago | IN | 0 ETH | 0.03315851 | ||||
| Upgrade Droid | 13735428 | 1546 days ago | IN | 0 ETH | 0.0277878 | ||||
| Upgrade Droid | 13735425 | 1546 days ago | IN | 0 ETH | 0.03005432 | ||||
| Upgrade Droid | 13735423 | 1546 days ago | IN | 0 ETH | 0.02888146 | ||||
| Upgrade Droid | 13735420 | 1546 days ago | IN | 0 ETH | 0.0250649 | ||||
| Upgrade Droid | 13735419 | 1546 days ago | IN | 0 ETH | 0.02700898 | ||||
| Upgrade Droid | 13735415 | 1546 days ago | IN | 0 ETH | 0.02886215 | ||||
| Upgrade Droid | 13735400 | 1546 days ago | IN | 0 ETH | 0.02804852 | ||||
| Upgrade Droid | 13735394 | 1546 days ago | IN | 0 ETH | 0.02423771 | ||||
| Upgrade Droid | 13735377 | 1546 days ago | IN | 0 ETH | 0.02445421 | ||||
| Upgrade Droid | 13735340 | 1546 days ago | IN | 0 ETH | 0.03161348 | ||||
| Upgrade Droid | 13735320 | 1546 days ago | IN | 0 ETH | 0.02870054 |
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
|
|||
|---|---|---|---|---|---|---|---|---|
| Burn Token | 13735586 | 1546 days ago | 0 ETH | |||||
| Burn Token | 13735586 | 1546 days ago | 0 ETH | |||||
| Mint Token | 13735586 | 1546 days ago | 0 ETH | |||||
| Get Faction | 13735586 | 1546 days ago | 0 ETH | |||||
| Mint Token | 13735586 | 1546 days ago | 0 ETH | |||||
| Get Faction | 13735586 | 1546 days ago | 0 ETH | |||||
| Owner Of | 13735586 | 1546 days ago | 0 ETH | |||||
| Owner Of | 13735586 | 1546 days ago | 0 ETH | |||||
| Mint Token | 13735552 | 1546 days ago | 0 ETH | |||||
| Get Faction | 13735552 | 1546 days ago | 0 ETH | |||||
| Mint Token | 13735552 | 1546 days ago | 0 ETH | |||||
| Get Faction | 13735552 | 1546 days ago | 0 ETH | |||||
| Owner Of | 13735552 | 1546 days ago | 0 ETH | |||||
| Owner Of | 13735552 | 1546 days ago | 0 ETH | |||||
| Burn Token | 13735546 | 1546 days ago | 0 ETH | |||||
| Burn Token | 13735546 | 1546 days ago | 0 ETH | |||||
| Mint Token | 13735546 | 1546 days ago | 0 ETH | |||||
| Get Faction | 13735546 | 1546 days ago | 0 ETH | |||||
| Mint Token | 13735546 | 1546 days ago | 0 ETH | |||||
| Get Faction | 13735546 | 1546 days ago | 0 ETH | |||||
| Owner Of | 13735546 | 1546 days ago | 0 ETH | |||||
| Owner Of | 13735546 | 1546 days ago | 0 ETH | |||||
| Burn Token | 13735539 | 1546 days ago | 0 ETH | |||||
| Burn Token | 13735539 | 1546 days ago | 0 ETH | |||||
| Mint Token | 13735539 | 1546 days ago | 0 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
UpgradeModule
Compiler Version
v0.8.0+commit.c7dfd78e
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "./ISavageDroids.sol";
/**
* @title Upgrade contract for Savage Droids
* @dev This contract allows the upgrade of Savage Droids tokens.
*
* Users supply 2 Droids to be upgraded.
*
* SAVAGE DROIDS X BLOCK::BLOCK
*
* Smart contract work done by joshpeters.eth
*/
contract UpgradeModule is Ownable, ReentrancyGuard {
using ECDSA for bytes32;
using Address for address;
ISavageDroids savageDroids;
// Token ID
uint256 private _currentTokenId;
// Upgrade toggle
bool private _isUpgradeActive;
// Singer for upgrade
address private signVerifier;
// Module contract
mapping(address => bool) private moduleContracts;
event Mint(
address indexed to,
uint256 indexed tokenId,
uint256 indexed serialId,
uint256 factionId,
bytes32 biosHash
);
constructor(address savageDroidsAddress, uint256 currentTokenId) {
savageDroids = ISavageDroids(savageDroidsAddress);
_currentTokenId = currentTokenId;
_isUpgradeActive = false;
signVerifier = 0x251738372e272681FcD8e2E3D0D09A9Af047C562;
}
// @dev Returns the token id of the last token
function getCurrentTokenId() external view returns (uint256) {
return _currentTokenId;
}
// @dev Returns the enabled/disabled status for upgrade
function getUpgradeState() external view returns (bool) {
return _isUpgradeActive;
}
// @dev Allows to enable/disable minting of upgrade
function flipUpgradeState() external onlyOwner {
_isUpgradeActive = !_isUpgradeActive;
}
// @dev Sets a new signature verifier
function setSignVerifier(address verifier) external onlyOwner {
signVerifier = verifier;
}
// @dev Future proof the contract to allow for
// functionality like fusion to increment token id counter.
function toggleModuleContract(address module, bool state) external onlyOwner {
moduleContracts[module] = state;
}
// @dev Future proof the contract to allow for
// functionality like fusion to increment token id counter.
function incrementCurrentTokenId() external returns (uint256) {
require(moduleContracts[msg.sender]);
_currentTokenId += 1;
return _currentTokenId;
}
function getUpgradeSigningHash(
address recipient,
uint256 sourceTokenId,
uint256 destinationTokenId,
uint256 sourceSerialId,
uint256 destinationSerialId,
bytes32 sourceBiosHash,
bytes32 destinationBiosHash
) public pure returns (bytes32) {
return
keccak256(
abi.encodePacked(
recipient,
sourceTokenId,
destinationTokenId,
sourceSerialId,
destinationSerialId,
sourceBiosHash,
destinationBiosHash
)
);
}
function upgradeDroid(
uint256 sourceTokenId,
uint256 destinationTokenId,
uint256 sourceSerialId,
uint256 destinationSerialId,
bytes32 sourceBiosHash,
bytes32 destinationBiosHash,
bytes memory sig
) external nonReentrant {
require(_isUpgradeActive, "Upgrade not active");
require(sourceTokenId != destinationTokenId, "Droids cannot be the same");
require(
savageDroids.ownerOf(sourceTokenId) == msg.sender,
"Must own source Droid"
);
require(
savageDroids.ownerOf(destinationTokenId) == msg.sender,
"Must own destination Droid"
);
// Verify signature
bytes32 message = getUpgradeSigningHash(
msg.sender,
sourceTokenId,
destinationTokenId,
sourceSerialId,
destinationSerialId,
sourceBiosHash,
destinationBiosHash
).toEthSignedMessageHash();
require(
ECDSA.recover(message, sig) == signVerifier,
"Permission to call upgrade function failed"
);
// Mint new source droid
_currentTokenId += 1;
uint256 sourceFactionId = savageDroids.getFaction(sourceTokenId);
emit Mint(
msg.sender,
_currentTokenId,
sourceSerialId,
sourceFactionId,
sourceBiosHash
);
savageDroids.mintToken(msg.sender, _currentTokenId, sourceFactionId);
// Mint new destination droid
_currentTokenId += 1;
uint256 destinationFactionId = savageDroids.getFaction(destinationTokenId);
emit Mint(
msg.sender,
_currentTokenId,
destinationSerialId,
destinationFactionId,
destinationBiosHash
);
savageDroids.mintToken(msg.sender, _currentTokenId, destinationFactionId);
//Burn old source droid
savageDroids.burnToken(sourceTokenId);
//Burn old destination droid
savageDroids.burnToken(destinationTokenId);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface ISavageDroids {
function mintToken(
address recipient,
uint256 tokenId,
uint256 factionId
) external;
function burnToken(uint256 tokenId) external;
function getFaction(uint256 tokenId) external view returns (uint256);
function ownerOf(uint256 tokenId) external view returns (address);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @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
}
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");
} else if (error == RecoverError.InvalidSignatureV) {
revert("ECDSA: invalid signature 'v' 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) {
// Check the signature length
// - case 65: r,s,v signature (standard)
// - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
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.
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 if (signature.length == 64) {
bytes32 r;
bytes32 vs;
// ecrecover takes the signature parameters, and the only way to get them
// currently is to use assembly.
assembly {
r := mload(add(signature, 0x20))
vs := mload(add(signature, 0x40))
}
return tryRecover(hash, r, vs);
} 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;
uint8 v;
assembly {
s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
v := add(shr(255, vs), 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 (v != 27 && v != 28) {
return (address(0), RecoverError.InvalidSignatureV);
}
// 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 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
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;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @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;
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");
(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");
(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");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// 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
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}// SPDX-License-Identifier: MIT
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() {
_setOwner(_msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
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 {
_setOwner(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");
_setOwner(newOwner);
}
function _setOwner(address newOwner) private {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}{
"remappings": [],
"optimizer": {
"enabled": false,
"runs": 200
},
"evmVersion": "istanbul",
"libraries": {},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"savageDroidsAddress","type":"address"},{"internalType":"uint256","name":"currentTokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"serialId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"factionId","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"biosHash","type":"bytes32"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"flipUpgradeState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getCurrentTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"sourceTokenId","type":"uint256"},{"internalType":"uint256","name":"destinationTokenId","type":"uint256"},{"internalType":"uint256","name":"sourceSerialId","type":"uint256"},{"internalType":"uint256","name":"destinationSerialId","type":"uint256"},{"internalType":"bytes32","name":"sourceBiosHash","type":"bytes32"},{"internalType":"bytes32","name":"destinationBiosHash","type":"bytes32"}],"name":"getUpgradeSigningHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getUpgradeState","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"incrementCurrentTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","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":"verifier","type":"address"}],"name":"setSignVerifier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"module","type":"address"},{"internalType":"bool","name":"state","type":"bool"}],"name":"toggleModuleContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"sourceTokenId","type":"uint256"},{"internalType":"uint256","name":"destinationTokenId","type":"uint256"},{"internalType":"uint256","name":"sourceSerialId","type":"uint256"},{"internalType":"uint256","name":"destinationSerialId","type":"uint256"},{"internalType":"bytes32","name":"sourceBiosHash","type":"bytes32"},{"internalType":"bytes32","name":"destinationBiosHash","type":"bytes32"},{"internalType":"bytes","name":"sig","type":"bytes"}],"name":"upgradeDroid","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60806040523480156200001157600080fd5b506040516200252438038062002524833981810160405281019062000037919062000218565b620000576200004b6200011e60201b60201c565b6200012660201b60201c565b6001808190555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806003819055506000600460006101000a81548160ff02191690831515021790555073251738372e272681fcd8e2e3d0d09a9af047c562600460016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050620002cb565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081519050620001fb8162000297565b92915050565b6000815190506200021281620002b1565b92915050565b600080604083850312156200022c57600080fd5b60006200023c85828601620001ea565b92505060206200024f8582860162000201565b9150509250929050565b600062000266826200026d565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b620002a28162000259565b8114620002ae57600080fd5b50565b620002bc816200028d565b8114620002c857600080fd5b50565b61224980620002db6000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80638da5cb5b116100715780638da5cb5b1461012e5780639a8030041461014c578063b05c538a14610168578063c7f83f8314610184578063e8649f58146101a2578063f2fde38b146101be576100a9565b80634c26e3a7146100ae57806356189236146100b8578063715018a6146100d65780637c3906db146100e05780638444b39114610110575b600080fd5b6100b66101da565b005b6100c0610282565b6040516100cd9190611f8f565b60405180910390f35b6100de61028c565b005b6100fa60048036038101906100f591906116b6565b610314565b6040516101079190611daf565b60405180910390f35b610118610356565b6040516101259190611d94565b60405180910390f35b61013661036d565b6040516101439190611d42565b60405180910390f35b6101666004803603810190610161919061167a565b610396565b005b610182600480360381019061017d919061177d565b61046d565b005b61018c610cbe565b6040516101999190611f8f565b60405180910390f35b6101bc60048036038101906101b79190611628565b610d38565b005b6101d860048036038101906101d39190611628565b610df8565b005b6101e2610ef0565b73ffffffffffffffffffffffffffffffffffffffff1661020061036d565b73ffffffffffffffffffffffffffffffffffffffff1614610256576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161024d90611f2f565b60405180910390fd5b600460009054906101000a900460ff1615600460006101000a81548160ff021916908315150217905550565b6000600354905090565b610294610ef0565b73ffffffffffffffffffffffffffffffffffffffff166102b261036d565b73ffffffffffffffffffffffffffffffffffffffff1614610308576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102ff90611f2f565b60405180910390fd5b6103126000610ef8565b565b6000878787878787876040516020016103339796959493929190611c9b565b604051602081830303815290604052805190602001209050979650505050505050565b6000600460009054906101000a900460ff16905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61039e610ef0565b73ffffffffffffffffffffffffffffffffffffffff166103bc61036d565b73ffffffffffffffffffffffffffffffffffffffff1614610412576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161040990611f2f565b60405180910390fd5b80600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600260015414156104b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104aa90611f4f565b60405180910390fd5b6002600181905550600460009054906101000a900460ff1661050a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050190611eaf565b60405180910390fd5b8587141561054d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054490611ecf565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e896040518263ffffffff1660e01b81526004016105bf9190611f8f565b60206040518083038186803b1580156105d757600080fd5b505afa1580156105eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060f9190611651565b73ffffffffffffffffffffffffffffffffffffffff1614610665576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161065c90611f6f565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e886040518263ffffffff1660e01b81526004016106d79190611f8f565b60206040518083038186803b1580156106ef57600080fd5b505afa158015610703573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107279190611651565b73ffffffffffffffffffffffffffffffffffffffff161461077d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077490611e4f565b60405180910390fd5b6000610796610791338a8a8a8a8a8a610314565b610fbc565b9050600460019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107db8284610fec565b73ffffffffffffffffffffffffffffffffffffffff1614610831576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082890611e8f565b60405180910390fd5b6001600360008282546108449190612050565b925050819055506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a8a150b88a6040518263ffffffff1660e01b81526004016108a89190611f8f565b60206040518083038186803b1580156108c057600080fd5b505afa1580156108d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f89190611754565b9050866003543373ffffffffffffffffffffffffffffffffffffffff167f4433a56dd9486339cfe1197bb85e8a15fa7024672999675294138322e024fe2b8489604051610946929190611faa565b60405180910390a4600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323a36d2b33600354846040518463ffffffff1660e01b81526004016109af93929190611d5d565b600060405180830381600087803b1580156109c957600080fd5b505af11580156109dd573d6000803e3d6000fd5b505050506001600360008282546109f49190612050565b925050819055506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a8a150b88a6040518263ffffffff1660e01b8152600401610a589190611f8f565b60206040518083038186803b158015610a7057600080fd5b505afa158015610a84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa89190611754565b9050866003543373ffffffffffffffffffffffffffffffffffffffff167f4433a56dd9486339cfe1197bb85e8a15fa7024672999675294138322e024fe2b8489604051610af6929190611faa565b60405180910390a4600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323a36d2b33600354846040518463ffffffff1660e01b8152600401610b5f93929190611d5d565b600060405180830381600087803b158015610b7957600080fd5b505af1158015610b8d573d6000803e3d6000fd5b50505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637b47ec1a8b6040518263ffffffff1660e01b8152600401610bec9190611f8f565b600060405180830381600087803b158015610c0657600080fd5b505af1158015610c1a573d6000803e3d6000fd5b50505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637b47ec1a8a6040518263ffffffff1660e01b8152600401610c799190611f8f565b600060405180830381600087803b158015610c9357600080fd5b505af1158015610ca7573d6000803e3d6000fd5b505050505050506001808190555050505050505050565b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610d1657600080fd5b600160036000828254610d299190612050565b92505081905550600354905090565b610d40610ef0565b73ffffffffffffffffffffffffffffffffffffffff16610d5e61036d565b73ffffffffffffffffffffffffffffffffffffffff1614610db4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dab90611f2f565b60405180910390fd5b80600460016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610e00610ef0565b73ffffffffffffffffffffffffffffffffffffffff16610e1e61036d565b73ffffffffffffffffffffffffffffffffffffffff1614610e74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e6b90611f2f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610ee4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610edb90611e6f565b60405180910390fd5b610eed81610ef8565b50565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081604051602001610fcf9190611d1c565b604051602081830303815290604052805190602001209050919050565b6000806000610ffb8585611013565b9150915061100881611096565b819250505092915050565b6000806041835114156110555760008060006020860151925060408601519150606086015160001a9050611049878285856113e7565b9450945050505061108f565b60408351141561108657600080602085015191506040850151905061107b8683836114f4565b93509350505061108f565b60006002915091505b9250929050565b600060048111156110d0577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816004811115611109577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1415611114576113e4565b6001600481111561114e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816004811115611187577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156111c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111bf90611e0f565b60405180910390fd5b60026004811115611202577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81600481111561123b577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b141561127c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161127390611e2f565b60405180910390fd5b600360048111156112b6577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8160048111156112ef577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1415611330576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161132790611eef565b60405180910390fd5b600480811115611369577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8160048111156113a2577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156113e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113da90611f0f565b60405180910390fd5b5b50565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c11156114225760006003915091506114eb565b601b8560ff161415801561143a5750601c8560ff1614155b1561144c5760006004915091506114eb565b6000600187878787604051600081526020016040526040516114719493929190611dca565b6020604051602081039080840390855afa158015611493573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156114e2576000600192509250506114eb565b80600092509250505b94509492505050565b6000806000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85169150601b8560ff1c019050611534878288856113e7565b935093505050935093915050565b600061155561155084612004565b611fd3565b90508281526020810184848401111561156d57600080fd5b611578848285612105565b509392505050565b60008135905061158f816121b7565b92915050565b6000815190506115a4816121b7565b92915050565b6000813590506115b9816121ce565b92915050565b6000813590506115ce816121e5565b92915050565b600082601f8301126115e557600080fd5b81356115f5848260208601611542565b91505092915050565b60008135905061160d816121fc565b92915050565b600081519050611622816121fc565b92915050565b60006020828403121561163a57600080fd5b600061164884828501611580565b91505092915050565b60006020828403121561166357600080fd5b600061167184828501611595565b91505092915050565b6000806040838503121561168d57600080fd5b600061169b85828601611580565b92505060206116ac858286016115aa565b9150509250929050565b600080600080600080600060e0888a0312156116d157600080fd5b60006116df8a828b01611580565b97505060206116f08a828b016115fe565b96505060406117018a828b016115fe565b95505060606117128a828b016115fe565b94505060806117238a828b016115fe565b93505060a06117348a828b016115bf565b92505060c06117458a828b016115bf565b91505092959891949750929550565b60006020828403121561176657600080fd5b600061177484828501611613565b91505092915050565b600080600080600080600060e0888a03121561179857600080fd5b60006117a68a828b016115fe565b97505060206117b78a828b016115fe565b96505060406117c88a828b016115fe565b95505060606117d98a828b016115fe565b94505060806117ea8a828b016115bf565b93505060a06117fb8a828b016115bf565b92505060c088013567ffffffffffffffff81111561181857600080fd5b6118248a828b016115d4565b91505092959891949750929550565b61183c816120a6565b82525050565b61185361184e826120a6565b612114565b82525050565b611862816120b8565b82525050565b611871816120c4565b82525050565b611888611883826120c4565b612126565b82525050565b600061189b601883612034565b91507f45434453413a20696e76616c6964207369676e617475726500000000000000006000830152602082019050919050565b60006118db601f83612034565b91507f45434453413a20696e76616c6964207369676e6174757265206c656e677468006000830152602082019050919050565b600061191b601c83612045565b91507f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000830152601c82019050919050565b600061195b601a83612034565b91507f4d757374206f776e2064657374696e6174696f6e2044726f69640000000000006000830152602082019050919050565b600061199b602683612034565b91507f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008301527f64647265737300000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611a01602a83612034565b91507f5065726d697373696f6e20746f2063616c6c20757067726164652066756e637460008301527f696f6e206661696c6564000000000000000000000000000000000000000000006020830152604082019050919050565b6000611a67601283612034565b91507f55706772616465206e6f742061637469766500000000000000000000000000006000830152602082019050919050565b6000611aa7601983612034565b91507f44726f6964732063616e6e6f74206265207468652073616d65000000000000006000830152602082019050919050565b6000611ae7602283612034565b91507f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008301527f75650000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611b4d602283612034565b91507f45434453413a20696e76616c6964207369676e6174757265202776272076616c60008301527f75650000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611bb3602083612034565b91507f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726000830152602082019050919050565b6000611bf3601f83612034565b91507f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006000830152602082019050919050565b6000611c33601583612034565b91507f4d757374206f776e20736f757263652044726f696400000000000000000000006000830152602082019050919050565b611c6f816120ee565b82525050565b611c86611c81826120ee565b612142565b82525050565b611c95816120f8565b82525050565b6000611ca7828a611842565b601482019150611cb78289611c75565b602082019150611cc78288611c75565b602082019150611cd78287611c75565b602082019150611ce78286611c75565b602082019150611cf78285611877565b602082019150611d078284611877565b60208201915081905098975050505050505050565b6000611d278261190e565b9150611d338284611877565b60208201915081905092915050565b6000602082019050611d576000830184611833565b92915050565b6000606082019050611d726000830186611833565b611d7f6020830185611c66565b611d8c6040830184611c66565b949350505050565b6000602082019050611da96000830184611859565b92915050565b6000602082019050611dc46000830184611868565b92915050565b6000608082019050611ddf6000830187611868565b611dec6020830186611c8c565b611df96040830185611868565b611e066060830184611868565b95945050505050565b60006020820190508181036000830152611e288161188e565b9050919050565b60006020820190508181036000830152611e48816118ce565b9050919050565b60006020820190508181036000830152611e688161194e565b9050919050565b60006020820190508181036000830152611e888161198e565b9050919050565b60006020820190508181036000830152611ea8816119f4565b9050919050565b60006020820190508181036000830152611ec881611a5a565b9050919050565b60006020820190508181036000830152611ee881611a9a565b9050919050565b60006020820190508181036000830152611f0881611ada565b9050919050565b60006020820190508181036000830152611f2881611b40565b9050919050565b60006020820190508181036000830152611f4881611ba6565b9050919050565b60006020820190508181036000830152611f6881611be6565b9050919050565b60006020820190508181036000830152611f8881611c26565b9050919050565b6000602082019050611fa46000830184611c66565b92915050565b6000604082019050611fbf6000830185611c66565b611fcc6020830184611868565b9392505050565b6000604051905081810181811067ffffffffffffffff82111715611ffa57611ff961217b565b5b8060405250919050565b600067ffffffffffffffff82111561201f5761201e61217b565b5b601f19601f8301169050602081019050919050565b600082825260208201905092915050565b600081905092915050565b600061205b826120ee565b9150612066836120ee565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561209b5761209a61214c565b5b828201905092915050565b60006120b1826120ce565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b82818337600083830152505050565b600061211f82612130565b9050919050565b6000819050919050565b600061213b826121aa565b9050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008160601b9050919050565b6121c0816120a6565b81146121cb57600080fd5b50565b6121d7816120b8565b81146121e257600080fd5b50565b6121ee816120c4565b81146121f957600080fd5b50565b612205816120ee565b811461221057600080fd5b5056fea2646970667358221220ceb461a20a2700971e7f4a9ffacbe64122535b94d0c2dbf24692d54ca294ae8364736f6c63430008000033000000000000000000000000a6794dec66df7d8b69752956df1b28ca93f77cd700000000000000000000000000000000000000000000000000000000000022b7
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80638da5cb5b116100715780638da5cb5b1461012e5780639a8030041461014c578063b05c538a14610168578063c7f83f8314610184578063e8649f58146101a2578063f2fde38b146101be576100a9565b80634c26e3a7146100ae57806356189236146100b8578063715018a6146100d65780637c3906db146100e05780638444b39114610110575b600080fd5b6100b66101da565b005b6100c0610282565b6040516100cd9190611f8f565b60405180910390f35b6100de61028c565b005b6100fa60048036038101906100f591906116b6565b610314565b6040516101079190611daf565b60405180910390f35b610118610356565b6040516101259190611d94565b60405180910390f35b61013661036d565b6040516101439190611d42565b60405180910390f35b6101666004803603810190610161919061167a565b610396565b005b610182600480360381019061017d919061177d565b61046d565b005b61018c610cbe565b6040516101999190611f8f565b60405180910390f35b6101bc60048036038101906101b79190611628565b610d38565b005b6101d860048036038101906101d39190611628565b610df8565b005b6101e2610ef0565b73ffffffffffffffffffffffffffffffffffffffff1661020061036d565b73ffffffffffffffffffffffffffffffffffffffff1614610256576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161024d90611f2f565b60405180910390fd5b600460009054906101000a900460ff1615600460006101000a81548160ff021916908315150217905550565b6000600354905090565b610294610ef0565b73ffffffffffffffffffffffffffffffffffffffff166102b261036d565b73ffffffffffffffffffffffffffffffffffffffff1614610308576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102ff90611f2f565b60405180910390fd5b6103126000610ef8565b565b6000878787878787876040516020016103339796959493929190611c9b565b604051602081830303815290604052805190602001209050979650505050505050565b6000600460009054906101000a900460ff16905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61039e610ef0565b73ffffffffffffffffffffffffffffffffffffffff166103bc61036d565b73ffffffffffffffffffffffffffffffffffffffff1614610412576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161040990611f2f565b60405180910390fd5b80600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600260015414156104b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104aa90611f4f565b60405180910390fd5b6002600181905550600460009054906101000a900460ff1661050a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050190611eaf565b60405180910390fd5b8587141561054d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054490611ecf565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e896040518263ffffffff1660e01b81526004016105bf9190611f8f565b60206040518083038186803b1580156105d757600080fd5b505afa1580156105eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060f9190611651565b73ffffffffffffffffffffffffffffffffffffffff1614610665576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161065c90611f6f565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e886040518263ffffffff1660e01b81526004016106d79190611f8f565b60206040518083038186803b1580156106ef57600080fd5b505afa158015610703573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107279190611651565b73ffffffffffffffffffffffffffffffffffffffff161461077d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077490611e4f565b60405180910390fd5b6000610796610791338a8a8a8a8a8a610314565b610fbc565b9050600460019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107db8284610fec565b73ffffffffffffffffffffffffffffffffffffffff1614610831576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082890611e8f565b60405180910390fd5b6001600360008282546108449190612050565b925050819055506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a8a150b88a6040518263ffffffff1660e01b81526004016108a89190611f8f565b60206040518083038186803b1580156108c057600080fd5b505afa1580156108d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f89190611754565b9050866003543373ffffffffffffffffffffffffffffffffffffffff167f4433a56dd9486339cfe1197bb85e8a15fa7024672999675294138322e024fe2b8489604051610946929190611faa565b60405180910390a4600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323a36d2b33600354846040518463ffffffff1660e01b81526004016109af93929190611d5d565b600060405180830381600087803b1580156109c957600080fd5b505af11580156109dd573d6000803e3d6000fd5b505050506001600360008282546109f49190612050565b925050819055506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a8a150b88a6040518263ffffffff1660e01b8152600401610a589190611f8f565b60206040518083038186803b158015610a7057600080fd5b505afa158015610a84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa89190611754565b9050866003543373ffffffffffffffffffffffffffffffffffffffff167f4433a56dd9486339cfe1197bb85e8a15fa7024672999675294138322e024fe2b8489604051610af6929190611faa565b60405180910390a4600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323a36d2b33600354846040518463ffffffff1660e01b8152600401610b5f93929190611d5d565b600060405180830381600087803b158015610b7957600080fd5b505af1158015610b8d573d6000803e3d6000fd5b50505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637b47ec1a8b6040518263ffffffff1660e01b8152600401610bec9190611f8f565b600060405180830381600087803b158015610c0657600080fd5b505af1158015610c1a573d6000803e3d6000fd5b50505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637b47ec1a8a6040518263ffffffff1660e01b8152600401610c799190611f8f565b600060405180830381600087803b158015610c9357600080fd5b505af1158015610ca7573d6000803e3d6000fd5b505050505050506001808190555050505050505050565b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610d1657600080fd5b600160036000828254610d299190612050565b92505081905550600354905090565b610d40610ef0565b73ffffffffffffffffffffffffffffffffffffffff16610d5e61036d565b73ffffffffffffffffffffffffffffffffffffffff1614610db4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dab90611f2f565b60405180910390fd5b80600460016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610e00610ef0565b73ffffffffffffffffffffffffffffffffffffffff16610e1e61036d565b73ffffffffffffffffffffffffffffffffffffffff1614610e74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e6b90611f2f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610ee4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610edb90611e6f565b60405180910390fd5b610eed81610ef8565b50565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081604051602001610fcf9190611d1c565b604051602081830303815290604052805190602001209050919050565b6000806000610ffb8585611013565b9150915061100881611096565b819250505092915050565b6000806041835114156110555760008060006020860151925060408601519150606086015160001a9050611049878285856113e7565b9450945050505061108f565b60408351141561108657600080602085015191506040850151905061107b8683836114f4565b93509350505061108f565b60006002915091505b9250929050565b600060048111156110d0577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816004811115611109577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1415611114576113e4565b6001600481111561114e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816004811115611187577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156111c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111bf90611e0f565b60405180910390fd5b60026004811115611202577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81600481111561123b577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b141561127c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161127390611e2f565b60405180910390fd5b600360048111156112b6577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8160048111156112ef577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1415611330576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161132790611eef565b60405180910390fd5b600480811115611369577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8160048111156113a2577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156113e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113da90611f0f565b60405180910390fd5b5b50565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c11156114225760006003915091506114eb565b601b8560ff161415801561143a5750601c8560ff1614155b1561144c5760006004915091506114eb565b6000600187878787604051600081526020016040526040516114719493929190611dca565b6020604051602081039080840390855afa158015611493573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156114e2576000600192509250506114eb565b80600092509250505b94509492505050565b6000806000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85169150601b8560ff1c019050611534878288856113e7565b935093505050935093915050565b600061155561155084612004565b611fd3565b90508281526020810184848401111561156d57600080fd5b611578848285612105565b509392505050565b60008135905061158f816121b7565b92915050565b6000815190506115a4816121b7565b92915050565b6000813590506115b9816121ce565b92915050565b6000813590506115ce816121e5565b92915050565b600082601f8301126115e557600080fd5b81356115f5848260208601611542565b91505092915050565b60008135905061160d816121fc565b92915050565b600081519050611622816121fc565b92915050565b60006020828403121561163a57600080fd5b600061164884828501611580565b91505092915050565b60006020828403121561166357600080fd5b600061167184828501611595565b91505092915050565b6000806040838503121561168d57600080fd5b600061169b85828601611580565b92505060206116ac858286016115aa565b9150509250929050565b600080600080600080600060e0888a0312156116d157600080fd5b60006116df8a828b01611580565b97505060206116f08a828b016115fe565b96505060406117018a828b016115fe565b95505060606117128a828b016115fe565b94505060806117238a828b016115fe565b93505060a06117348a828b016115bf565b92505060c06117458a828b016115bf565b91505092959891949750929550565b60006020828403121561176657600080fd5b600061177484828501611613565b91505092915050565b600080600080600080600060e0888a03121561179857600080fd5b60006117a68a828b016115fe565b97505060206117b78a828b016115fe565b96505060406117c88a828b016115fe565b95505060606117d98a828b016115fe565b94505060806117ea8a828b016115bf565b93505060a06117fb8a828b016115bf565b92505060c088013567ffffffffffffffff81111561181857600080fd5b6118248a828b016115d4565b91505092959891949750929550565b61183c816120a6565b82525050565b61185361184e826120a6565b612114565b82525050565b611862816120b8565b82525050565b611871816120c4565b82525050565b611888611883826120c4565b612126565b82525050565b600061189b601883612034565b91507f45434453413a20696e76616c6964207369676e617475726500000000000000006000830152602082019050919050565b60006118db601f83612034565b91507f45434453413a20696e76616c6964207369676e6174757265206c656e677468006000830152602082019050919050565b600061191b601c83612045565b91507f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000830152601c82019050919050565b600061195b601a83612034565b91507f4d757374206f776e2064657374696e6174696f6e2044726f69640000000000006000830152602082019050919050565b600061199b602683612034565b91507f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008301527f64647265737300000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611a01602a83612034565b91507f5065726d697373696f6e20746f2063616c6c20757067726164652066756e637460008301527f696f6e206661696c6564000000000000000000000000000000000000000000006020830152604082019050919050565b6000611a67601283612034565b91507f55706772616465206e6f742061637469766500000000000000000000000000006000830152602082019050919050565b6000611aa7601983612034565b91507f44726f6964732063616e6e6f74206265207468652073616d65000000000000006000830152602082019050919050565b6000611ae7602283612034565b91507f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008301527f75650000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611b4d602283612034565b91507f45434453413a20696e76616c6964207369676e6174757265202776272076616c60008301527f75650000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611bb3602083612034565b91507f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726000830152602082019050919050565b6000611bf3601f83612034565b91507f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006000830152602082019050919050565b6000611c33601583612034565b91507f4d757374206f776e20736f757263652044726f696400000000000000000000006000830152602082019050919050565b611c6f816120ee565b82525050565b611c86611c81826120ee565b612142565b82525050565b611c95816120f8565b82525050565b6000611ca7828a611842565b601482019150611cb78289611c75565b602082019150611cc78288611c75565b602082019150611cd78287611c75565b602082019150611ce78286611c75565b602082019150611cf78285611877565b602082019150611d078284611877565b60208201915081905098975050505050505050565b6000611d278261190e565b9150611d338284611877565b60208201915081905092915050565b6000602082019050611d576000830184611833565b92915050565b6000606082019050611d726000830186611833565b611d7f6020830185611c66565b611d8c6040830184611c66565b949350505050565b6000602082019050611da96000830184611859565b92915050565b6000602082019050611dc46000830184611868565b92915050565b6000608082019050611ddf6000830187611868565b611dec6020830186611c8c565b611df96040830185611868565b611e066060830184611868565b95945050505050565b60006020820190508181036000830152611e288161188e565b9050919050565b60006020820190508181036000830152611e48816118ce565b9050919050565b60006020820190508181036000830152611e688161194e565b9050919050565b60006020820190508181036000830152611e888161198e565b9050919050565b60006020820190508181036000830152611ea8816119f4565b9050919050565b60006020820190508181036000830152611ec881611a5a565b9050919050565b60006020820190508181036000830152611ee881611a9a565b9050919050565b60006020820190508181036000830152611f0881611ada565b9050919050565b60006020820190508181036000830152611f2881611b40565b9050919050565b60006020820190508181036000830152611f4881611ba6565b9050919050565b60006020820190508181036000830152611f6881611be6565b9050919050565b60006020820190508181036000830152611f8881611c26565b9050919050565b6000602082019050611fa46000830184611c66565b92915050565b6000604082019050611fbf6000830185611c66565b611fcc6020830184611868565b9392505050565b6000604051905081810181811067ffffffffffffffff82111715611ffa57611ff961217b565b5b8060405250919050565b600067ffffffffffffffff82111561201f5761201e61217b565b5b601f19601f8301169050602081019050919050565b600082825260208201905092915050565b600081905092915050565b600061205b826120ee565b9150612066836120ee565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561209b5761209a61214c565b5b828201905092915050565b60006120b1826120ce565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b82818337600083830152505050565b600061211f82612130565b9050919050565b6000819050919050565b600061213b826121aa565b9050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008160601b9050919050565b6121c0816120a6565b81146121cb57600080fd5b50565b6121d7816120b8565b81146121e257600080fd5b50565b6121ee816120c4565b81146121f957600080fd5b50565b612205816120ee565b811461221057600080fd5b5056fea2646970667358221220ceb461a20a2700971e7f4a9ffacbe64122535b94d0c2dbf24692d54ca294ae8364736f6c63430008000033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a6794dec66df7d8b69752956df1b28ca93f77cd700000000000000000000000000000000000000000000000000000000000022b7
-----Decoded View---------------
Arg [0] : savageDroidsAddress (address): 0xa6794DEc66Df7d8B69752956df1b28cA93f77CD7
Arg [1] : currentTokenId (uint256): 8887
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000a6794dec66df7d8b69752956df1b28ca93f77cd7
Arg [1] : 00000000000000000000000000000000000000000000000000000000000022b7
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 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.