Contract
0x77533A0b34cd9Aa135EBE795dc40666Ca295C16D
12
Contract Overview
My Name Tag:
Not Available, login to update
[ Download CSV Export ]
Contract Name:
QiTokenSaleDistributorProxy
Compiler Version
v0.6.12+commit.27d51765
Contract Source Code (Solidity)
/** *Submitted for verification at snowtrace.io on 2021-11-02 */ /** * File: ReentrancyGuard.sol */ // SPDX-License-Identifier: MIT pragma solidity 0.6.12; /** * @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]. */ 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() public { _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; } } /** * File: QiTokenSaleDistributorProxyStorage.sol */ pragma solidity 0.6.12; contract QiTokenSaleDistributorProxyStorage { // Current contract admin address address public admin; // Requested new admin for the contract address public pendingAdmin; // Current contract implementation address address public implementation; // Requested new contract implementation address address public pendingImplementation; } /** * File: QiTokenSaleDistributorProxy.sol */ pragma solidity 0.6.12; contract QiTokenSaleDistributorProxy is ReentrancyGuard, QiTokenSaleDistributorProxyStorage { constructor() public { admin = msg.sender; } /** * Request a new admin to be set for the contract. * * @param newAdmin New admin address */ function setPendingAdmin(address newAdmin) public adminOnly { pendingAdmin = newAdmin; } /** * Accept admin transfer from the current admin to the new. */ function acceptPendingAdmin() public { require(msg.sender == pendingAdmin && pendingAdmin != address(0), "Caller must be the pending admin"); admin = pendingAdmin; pendingAdmin = address(0); } /** * Request a new implementation to be set for the contract. * * @param newImplementation New contract implementation contract address */ function setPendingImplementation(address newImplementation) public adminOnly { pendingImplementation = newImplementation; } /** * Accept pending implementation change */ function acceptPendingImplementation() public { require(msg.sender == pendingImplementation && pendingImplementation != address(0), "Only the pending implementation contract can call this"); implementation = pendingImplementation; pendingImplementation = address(0); } fallback() payable external { (bool success, ) = implementation.delegatecall(msg.data); assembly { let free_mem_ptr := mload(0x40) let size := returndatasize() returndatacopy(free_mem_ptr, 0, size) switch success case 0 { revert(free_mem_ptr, size) } default { return(free_mem_ptr, size) } } } /******************************************************** * * * MODIFIERS * * * ********************************************************/ modifier adminOnly { require(msg.sender == admin, "admin only"); _; } }
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"acceptPendingAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"acceptPendingImplementation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingImplementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"setPendingAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"setPendingImplementation","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506001600081905580546001600160a01b031916331790556104a7806100376000396000f3fe60806040526004361061007b5760003560e01c80634dd18bf51161004e5780634dd18bf51461018f5780635c60da1b146101c2578063709920c1146101d7578063f851a440146101ec5761007b565b806309ed43c9146100ff57806316ec205c146101345780632678224714610149578063396f7b231461017a575b6003546040516000916001600160a01b031690829036908083838082843760405192019450600093509091505080830381855af49150503d80600081146100de576040519150601f19603f3d011682016040523d82523d6000602084013e6100e3565b606091505b505090506040513d806000833e8280156100fb578183f35b8183fd5b34801561010b57600080fd5b506101326004803603602081101561012257600080fd5b50356001600160a01b0316610201565b005b34801561014057600080fd5b5061013261026f565b34801561015557600080fd5b5061015e6102f5565b604080516001600160a01b039092168252519081900360200190f35b34801561018657600080fd5b5061015e610304565b34801561019b57600080fd5b50610132600480360360208110156101b257600080fd5b50356001600160a01b0316610313565b3480156101ce57600080fd5b5061015e610381565b3480156101e357600080fd5b50610132610390565b3480156101f857600080fd5b5061015e61042c565b6001546001600160a01b0316331461024d576040805162461bcd60e51b815260206004820152600a60248201526961646d696e206f6e6c7960b01b604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b03163314801561029357506004546001600160a01b031615155b6102ce5760405162461bcd60e51b815260040180806020018281038252603681526020018061043c6036913960400191505060405180910390fd5b60048054600380546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b6004546001600160a01b031681565b6001546001600160a01b0316331461035f576040805162461bcd60e51b815260206004820152600a60248201526961646d696e206f6e6c7960b01b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b031681565b6002546001600160a01b0316331480156103b457506002546001600160a01b031615155b610405576040805162461bcd60e51b815260206004820181905260248201527f43616c6c6572206d757374206265207468652070656e64696e672061646d696e604482015290519081900360640190fd5b60028054600180546001600160a01b03199081166001600160a01b03841617909155169055565b6001546001600160a01b03168156fe4f6e6c79207468652070656e64696e6720696d706c656d656e746174696f6e20636f6e74726163742063616e2063616c6c2074686973a2646970667358221220951f926bfd67b6f61d66da9ea69070e858c7a30dad2257aacee3a8704097b3b664736f6c634300060c0033
Deployed ByteCode Sourcemap
3261:2232:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4723:14;;:37;;4705:12;;-1:-1:-1;;;;;4723:14:0;;4705:12;;4751:8;;4723:37;4705:12;4751:8;;4705:12;4723:37;;;;;;;-1:-1:-1;4723:37:0;;-1:-1:-1;4723:37:0;;-1:-1:-1;;4723:37:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4704:56;;;4823:4;4817:11;4854:16;4916:4;4913:1;4899:12;4884:37;4944:7;4965:37;;;;5047:4;5033:12;5026:26;4965:37;4995:4;4981:12;4974:26;4146:138;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4146:138:0;-1:-1:-1;;;;;4146:138:0;;:::i;:::-;;4355:302;;;;;;;;;;;;;:::i;2954:27::-;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;2954:27:0;;;;;;;;;;;;;;3130:36;;;;;;;;;;;;;:::i;3550:102::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3550:102:0;-1:-1:-1;;;;;3550:102:0;;:::i;3038:29::-;;;;;;;;;;;;;:::i;3743:226::-;;;;;;;;;;;;;:::i;2880:20::-;;;;;;;;;;;;;:::i;4146:138::-;5450:5;;-1:-1:-1;;;;;5450:5:0;5436:10;:19;5428:42;;;;;-1:-1:-1;;;5428:42:0;;;;;;;;;;;;-1:-1:-1;;;5428:42:0;;;;;;;;;;;;;;;4235:21:::1;:41:::0;;-1:-1:-1;;;;;;4235:41:0::1;-1:-1:-1::0;;;;;4235:41:0;;;::::1;::::0;;;::::1;::::0;;4146:138::o;4355:302::-;4434:21;;-1:-1:-1;;;;;4434:21:0;4420:10;:35;:74;;;;-1:-1:-1;4459:21:0;;-1:-1:-1;;;;;4459:21:0;:35;;4420:74;4412:141;;;;-1:-1:-1;;;4412:141:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4583:21;;;4566:14;:38;;-1:-1:-1;;;;;;4566:38:0;;;-1:-1:-1;;;;;4583:21:0;;4566:38;;;;4615:34;;;4355:302::o;2954:27::-;;;-1:-1:-1;;;;;2954:27:0;;:::o;3130:36::-;;;-1:-1:-1;;;;;3130:36:0;;:::o;3550:102::-;5450:5;;-1:-1:-1;;;;;5450:5:0;5436:10;:19;5428:42;;;;;-1:-1:-1;;;5428:42:0;;;;;;;;;;;;-1:-1:-1;;;5428:42:0;;;;;;;;;;;;;;;3621:12:::1;:23:::0;;-1:-1:-1;;;;;;3621:23:0::1;-1:-1:-1::0;;;;;3621:23:0;;;::::1;::::0;;;::::1;::::0;;3550:102::o;3038:29::-;;;-1:-1:-1;;;;;3038:29:0;;:::o;3743:226::-;3813:12;;-1:-1:-1;;;;;3813:12:0;3799:10;:26;:56;;;;-1:-1:-1;3829:12:0;;-1:-1:-1;;;;;3829:12:0;:26;;3799:56;3791:101;;;;;-1:-1:-1;;;3791:101:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3913:12;;;;3905:20;;-1:-1:-1;;;;;;3905:20:0;;;-1:-1:-1;;;;;3913:12:0;;3905:20;;;;3936:25;;;3743:226::o;2880:20::-;;;-1:-1:-1;;;;;2880:20:0;;:::o
Swarm Source
ipfs://951f926bfd67b6f61d66da9ea69070e858c7a30dad2257aacee3a8704097b3b6
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.