Transactions
Token Transfers
Tokens
Internal Transactions
Coin Balance History
Logs
Code
Read Proxy
Write Contract
Write Proxy
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
- Contract name:
- NFTProxy
- Optimization enabled
- false
- Compiler version
- v0.8.12+commit.f00d7308
- EVM Version
- default
- Verified at
- 2023-12-11T09:15:29.361685Z
Constructor Arguments
0x000000000000000000000000b018aefb9c259ea7a6c41aae730235b06b824b340000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000007d0000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000038d7ea4c68000000000000000000000000000000000000000000000000000006a94d74f430000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000140000000000000000000000003f31228f7a37423822f4d822e1bca12012ff5ccb00000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000002850656e6775696e6e7920434f2028636f7079292028636f7079292028636f7079292028636f70792900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034e4b200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005b68747470733a2f2f626166796265696237786375347965776676326577766e63656d6c3270706966326a61357434726c366a626f6664756a36633272376372786373342e697066732e7733732e6c696e6b2f6d657461646174612f0000000000
Contract source code
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.12;
interface INFT {
struct Initialization {
string name;
string symbol;
string baseTokenURI;
uint256 limitSupply;
uint256 presaleSupply;
uint256 presalePrice;
uint256 publicSalePrice;
uint256 PRESALE_MAX_MINT;
uint256 MAX_PER_MINT;
address royaltyReceiverAddress;
uint96 royaltyFee;
}
function initialize(Initialization calldata initialization) external;
}
contract NFTProxy {
struct AddressSlot {
address value;
}
event Upgraded(address indexed implementation);
/**
* @dev Storage slot with the address of the current implementation.
* This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is
* validated in the constructor.
*/
bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
constructor(address implementation, INFT.Initialization memory initialization) {
getAddressSlot(_IMPLEMENTATION_SLOT).value = implementation;
emit Upgraded(implementation);
(bool success, bytes memory returndata) = implementation.delegatecall(
abi.encodeWithSelector(
INFT.initialize.selector,
initialization
)
);
if (!success) {
if (returndata.length == 0) revert();
assembly {
revert(add(32, returndata), mload(returndata))
}
}
}
/**
* @dev Delegates the current call to "implementation".
*
* This function does not return to its internal call site, it will return directly to the external caller.
*/
function _delegate(address implementation) internal virtual {
assembly {
// Copy msg.data. We take full control of memory in this inline assembly
// block because it will not return to Solidity code. We overwrite the
// Solidity scratch pad at memory position 0.
calldatacopy(0, 0, calldatasize())
// Call the implementation.
// out and outsize are 0 because we don't know the size yet.
let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)
// Copy the returned data.
returndatacopy(0, 0, returndatasize())
switch result
// delegatecall returns 0 on error.
case 0 {
revert(0, returndatasize())
}
default {
return(0, returndatasize())
}
}
}
/**
* @dev This is a virtual function that should be overridden so it returns the address to which the fallback function
* and {_fallback} should delegate.
*/
function _implementation() internal view virtual returns (address) {
return getAddressSlot(_IMPLEMENTATION_SLOT).value;
}
/**
* @dev Delegates the current call to the address returned by "_implementation()".
*
* This function does not return to its internal call site, it will return directly to the external caller.
*/
function _fallback() internal virtual {
_delegate(_implementation());
}
/**
* @dev Fallback function that delegates calls to the address returned by "_implementation()". Will run if no other
* function in the contract matches the call data.
*/
fallback() external payable virtual {
_fallback();
}
/**
* @dev Fallback function that delegates calls to the address returned by "_implementation()". Will run if call data
* is empty.
*/
receive() external payable virtual {
_fallback();
}
/**
* @dev Returns an "AddressSlot" with member "value" located at "slot".
*/
function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
}
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"implementation","internalType":"address"},{"type":"tuple","name":"initialization","internalType":"struct INFT.Initialization","components":[{"type":"string","name":"name","internalType":"string"},{"type":"string","name":"symbol","internalType":"string"},{"type":"string","name":"baseTokenURI","internalType":"string"},{"type":"uint256","name":"limitSupply","internalType":"uint256"},{"type":"uint256","name":"presaleSupply","internalType":"uint256"},{"type":"uint256","name":"presalePrice","internalType":"uint256"},{"type":"uint256","name":"publicSalePrice","internalType":"uint256"},{"type":"uint256","name":"PRESALE_MAX_MINT","internalType":"uint256"},{"type":"uint256","name":"MAX_PER_MINT","internalType":"uint256"},{"type":"address","name":"royaltyReceiverAddress","internalType":"address"},{"type":"uint96","name":"royaltyFee","internalType":"uint96"}]}]},{"type":"event","name":"Upgraded","inputs":[{"type":"address","name":"implementation","internalType":"address","indexed":true}],"anonymous":false},{"type":"fallback","stateMutability":"payable"},{"type":"receive","stateMutability":"payable"}]
Contract Creation Code
0x608060405234801561001057600080fd5b50604051610903380380610903833981810160405281019061003291906105ba565b816100657f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b6101f060201b60201c565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a26000808373ffffffffffffffffffffffffffffffffffffffff16633e67b45160e01b8460405160240161011c9190610795565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060405161018691906107fe565b600060405180830381855af49150503d80600081146101c1576040519150601f19603f3d011682016040523d82523d6000602084013e6101c6565b606091505b5091509150816101e7576000815114156101df57600080fd5b805181602001fd5b50505050610815565b6000819050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006102398261020e565b9050919050565b6102498161022e565b811461025457600080fd5b50565b60008151905061026681610240565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6102ba82610271565b810181811067ffffffffffffffff821117156102d9576102d8610282565b5b80604052505050565b60006102ec6101fa565b90506102f882826102b1565b919050565b600080fd5b600080fd5b600080fd5b600067ffffffffffffffff82111561032757610326610282565b5b61033082610271565b9050602081019050919050565b60005b8381101561035b578082015181840152602081019050610340565b8381111561036a576000848401525b50505050565b600061038361037e8461030c565b6102e2565b90508281526020810184848401111561039f5761039e610307565b5b6103aa84828561033d565b509392505050565b600082601f8301126103c7576103c6610302565b5b81516103d7848260208601610370565b91505092915050565b6000819050919050565b6103f3816103e0565b81146103fe57600080fd5b50565b600081519050610410816103ea565b92915050565b60006bffffffffffffffffffffffff82169050919050565b61043781610416565b811461044257600080fd5b50565b6000815190506104548161042e565b92915050565b600061016082840312156104715761047061026c565b5b61047c6101606102e2565b9050600082015167ffffffffffffffff81111561049c5761049b6102fd565b5b6104a8848285016103b2565b600083015250602082015167ffffffffffffffff8111156104cc576104cb6102fd565b5b6104d8848285016103b2565b602083015250604082015167ffffffffffffffff8111156104fc576104fb6102fd565b5b610508848285016103b2565b604083015250606061051c84828501610401565b606083015250608061053084828501610401565b60808301525060a061054484828501610401565b60a08301525060c061055884828501610401565b60c08301525060e061056c84828501610401565b60e08301525061010061058184828501610401565b6101008301525061012061059784828501610257565b610120830152506101406105ad84828501610445565b6101408301525092915050565b600080604083850312156105d1576105d0610204565b5b60006105df85828601610257565b925050602083015167ffffffffffffffff811115610600576105ff610209565b5b61060c8582860161045a565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b600061063d82610616565b6106478185610621565b935061065781856020860161033d565b61066081610271565b840191505092915050565b610674816103e0565b82525050565b6106838161022e565b82525050565b61069281610416565b82525050565b60006101608301600083015184820360008601526106b68282610632565b915050602083015184820360208601526106d08282610632565b915050604083015184820360408601526106ea8282610632565b91505060608301516106ff606086018261066b565b506080830151610712608086018261066b565b5060a083015161072560a086018261066b565b5060c083015161073860c086018261066b565b5060e083015161074b60e086018261066b565b5061010083015161076061010086018261066b565b5061012083015161077561012086018261067a565b5061014083015161078a610140860182610689565b508091505092915050565b600060208201905081810360008301526107af8184610698565b905092915050565b600081519050919050565b600081905092915050565b60006107d8826107b7565b6107e281856107c2565b93506107f281856020860161033d565b80840191505092915050565b600061080a82846107cd565b915081905092915050565b60e0806108236000396000f3fe608060405236601057600e6018565b005b60166018565b005b602460206026565b607b565b565b600060527f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b60a0565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b3660008037600080366000845af43d6000803e8060008114609b573d6000f35b3d6000fd5b600081905091905056fea2646970667358221220447107ace7218385bf9e0d1e7e513493a39c048bb74379d5b0b21bacd5a3970d64736f6c634300080c0033000000000000000000000000b018aefb9c259ea7a6c41aae730235b06b824b340000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000007d0000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000038d7ea4c68000000000000000000000000000000000000000000000000000006a94d74f430000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000140000000000000000000000003f31228f7a37423822f4d822e1bca12012ff5ccb00000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000002850656e6775696e6e7920434f2028636f7079292028636f7079292028636f7079292028636f70792900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034e4b200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005b68747470733a2f2f626166796265696237786375347965776676326577766e63656d6c3270706966326a61357434726c366a626f6664756a36633272376372786373342e697066732e7733732e6c696e6b2f6d657461646174612f0000000000
Deployed ByteCode
0x608060405236601057600e6018565b005b60166018565b005b602460206026565b607b565b565b600060527f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b60a0565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b3660008037600080366000845af43d6000803e8060008114609b573d6000f35b3d6000fd5b600081905091905056fea2646970667358221220447107ace7218385bf9e0d1e7e513493a39c048bb74379d5b0b21bacd5a3970d64736f6c634300080c0033