false
false
0
Blockchain
Blocks
Blocks
Uncles
Forked Blocks (Reorgs)
Transactions
Validated
Pending
Verified contracts
Tokens
All
BPX
APIs
GraphQL
RPC
Eth RPC
BPX
/
Search
/
Search
Connection Lost
New Solidity Smart Contract Verification
Contract Address
The 0x address supplied on contract creation.
Is Yul contract
No
Yes
Select Yes if you want to verify Yul contract.
Contract Name
Must match the name specified in the code. For example, in
contract MyContract {..}
MyContract
is the contract name.
Include nightly builds
No
Yes
Select yes if you want to show nightly builds.
Compiler
The compiler version is specified in
pragma solidity X.X.X
. Use the compiler version rather than the nightly build. If using the Solidity compiler, run
solc —version
to check.
EVM Version
homestead
tangerineWhistle
spuriousDragon
byzantium
constantinople
petersburg
istanbul
berlin
london
paris
shanghai
default
The EVM version the contract is written for. If the bytecode does not match the version, we try to verify using the latest EVM version.
EVM version details
.
Optimization
No
Yes
If you enabled optimization during compilation, select yes.
Optimization runs
Enter the Solidity Contract Code
// File: bitpost-contracts/contracts-common/interfaces/access/IOwnable.sol pragma solidity ^0.8.20; interface IOwnable { error OwnableUnauthorized(address sender, address owner); error OwnableInvalidOwner(address owner); function getOwner() external view returns(address); function setOwner(address owner) external; } // File: bitpost-contracts/contracts-vm/interfaces/IVersionManager.sol pragma solidity ^0.8.20; interface IVersionManager is IOwnable { error VersionManagerInvalidCid(uint16 cid); function getImplementation(uint16 cid) external view returns(address); function setImplementation(uint16 cid, address implementation) external; function newContract(uint16 cid) external returns(address); } // File: bitpost-contracts/contracts-common/contracts/upgrade/Upgradeable.sol pragma solidity ^0.8.20; abstract contract Upgradeable { /// @custom:storage-location erc7201:bitpost.common.Upgradeable struct Storage_Upgradeable { IVersionManager versionManager; uint16 cid; } // keccak256(abi.encode(uint256(keccak256("bitpost.common.Upgradeable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant STORAGE_LOCATION_UPGRADEABLE = 0x828626e98fd64181cb42e58a50c4931f9ea11da1800ee5ae64b4a2a58285ae00; function _init_Upgradeable(IVersionManager versionManager, uint16 cid) internal { Storage_Upgradeable storage $ = _getStorage_Upgradeable(); $.versionManager = versionManager; $.cid = cid; } function _getVersionManager() internal view returns(IVersionManager) { Storage_Upgradeable storage $ = _getStorage_Upgradeable(); return $.versionManager; } function _getCid() internal view returns(uint16) { Storage_Upgradeable storage $ = _getStorage_Upgradeable(); return $.cid; } function _getStorage_Upgradeable() private pure returns(Storage_Upgradeable storage $) { assembly { $.slot := STORAGE_LOCATION_UPGRADEABLE } } } // File: bitpost-contracts/contracts-common/contracts/access/Ownable.sol pragma solidity ^0.8.20; abstract contract Ownable is IOwnable { /// @custom:storage-location erc7201:bitpost.common.Ownable struct Storage_Ownable { address owner; } // keccak256(abi.encode(uint256(keccak256("bitpost.common.Ownable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant STORAGE_LOCATION_OWNABLE = 0xbfdc26bbaea09886fc184fe4fcae59b15cffdf4b859be87d5955dbd541465600; modifier onlyOwner() { _checkOwner(); _; } function _init_Ownable(address owner) internal { _setOwner(owner); } function getOwner() public view returns(address) { Storage_Ownable storage $ = _getStorage_Ownable(); return $.owner; } function setOwner(address owner) external onlyOwner { _setOwner(owner); } function _setOwner(address owner) internal { require(owner != address(0), OwnableInvalidOwner(address(0))); Storage_Ownable storage $ = _getStorage_Ownable(); $.owner = owner; } function _checkOwner() private view { Storage_Ownable storage $ = _getStorage_Ownable(); require(msg.sender == $.owner, OwnableUnauthorized(msg.sender, $.owner)); } function _getStorage_Ownable() private pure returns(Storage_Ownable storage $) { assembly { $.slot := STORAGE_LOCATION_OWNABLE } } } // File: bitpost-contracts/contracts-vm/contracts/VersionManager.sol pragma solidity ^0.8.20; contract VersionManager is IVersionManager, Ownable { /// @custom:storage-location erc7201:bitpost.vm.VersionManager struct Storage_VersionManager { mapping(uint16 => address) implementations; } // keccak256(abi.encode(uint256(keccak256("bitpost.vm.VersionManager")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant STORAGE_LOCATION_VERSIONMANAGER = 0x433f1e912c5d27d7a45609db3e669bf6cc6b4b451297228e4c27368efb8c2300; constructor() { _init_Ownable(msg.sender); } function getImplementation(uint16 cid) external view returns(address) { Storage_VersionManager storage $ = _getStorage_VersionManager(); require($.implementations[cid] != address(0), VersionManagerInvalidCid(cid)); return $.implementations[cid]; } function setImplementation(uint16 cid, address implementation) external onlyOwner { Storage_VersionManager storage $ = _getStorage_VersionManager(); $.implementations[cid] = implementation; } function newContract(uint16 cid) external returns(address) { Storage_VersionManager storage $ = _getStorage_VersionManager(); require($.implementations[cid] != address(0), VersionManagerInvalidCid(cid)); return address(new Proxy(this, cid)); } function _getStorage_VersionManager() private pure returns(Storage_VersionManager storage $) { assembly { $.slot := STORAGE_LOCATION_VERSIONMANAGER } } } // File: bitpost-contracts/contracts-vm/contracts/proxy/Proxy.sol pragma solidity ^0.8.20; contract Proxy is Upgradeable { constructor(VersionManager versionManager, uint16 cid) { _init_Upgradeable(versionManager, cid); } fallback() external payable { address target = _getVersionManager().getImplementation(_getCid()); // The target address is stored on the stack, not in memory, // so it won't be affected by operations using memory offset 0. assembly { calldatacopy(0, 0, calldatasize()) let result := delegatecall(gas(), target, 0, calldatasize(), 0, 0) returndatacopy(0, 0, returndatasize()) switch result case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } }
We recommend using flattened code. This is necessary if your code utilizes a library or inherits dependencies. Use the
POA solidity flattener or the
truffle flattener
.
Try to fetch constructor arguments automatically
No
Yes
ABI-encoded Constructor Arguments (if required by the contract)
0x000000000000000000000000407b23dad0bd32a3b1ad184a2e61c206615f77710000000000000000000000000000000000000000000000000000000000001388
Add arguments in
ABI hex encoded form
. Constructor arguments are written right to left, and will be found at the end of the input created bytecode. They may also be
parsed here.
Add Contract Libraries
Contract Libraries
Library 1 Name
A library name called in the .sol file. Multiple libraries (up to 10) may be added for each contract. Click the Add Library button to add an additional one.
Library 1 Address
The 0x library address. This can be found in the generated json file or Truffle output (if using truffle).
Library 2 Name
Library 2 Address
Library 3 Name
Library 3 Address
Library 4 Name
Library 4 Address
Library 5 Name
Library 5 Address
Library 6 Name
Library 6 Address
Library 7 Name
Library 7 Address
Library 8 Name
Library 8 Address
Library 9 Name
Library 9 Address
Library 10 Name
Library 10 Address
Add Library
Loading...
Verify & publish
Cancel
Ok
Ok
Ok
No
Yes