UNPKG

@cartesi/staking-pool

Version:
306 lines 16.2 kB
{ "contractName": "GasTaxCommission", "sourceName": "contracts/GasTaxCommission.sol", "abi": [ { "inputs": [ { "internalType": "address", "name": "_gasOracle", "type": "address" }, { "internalType": "address", "name": "_priceOracle", "type": "address" }, { "internalType": "uint256", "name": "_gas", "type": "uint256" }, { "internalType": "uint256", "name": "_feeRaiseTimeout", "type": "uint256" }, { "internalType": "uint256", "name": "_maxRaise", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "newGas", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "timeout", "type": "uint256" } ], "name": "GasTaxChanged", "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": "feeRaiseTimeout", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "gas", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "gasOracle", "outputs": [ { "internalType": "contract GasOracle", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "rewardAmount", "type": "uint256" } ], "name": "getCommission", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "maxRaise", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "priceOracle", "outputs": [ { "internalType": "contract PriceOracle", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "newGasCommission", "type": "uint256" } ], "name": "setGas", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "timeoutTimestamp", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "bytecode": "0x61010060405234801561001157600080fd5b506040516109943803806109948339810160408190526100309161011d565b610039336100b1565b6001600160601b0319606086811b821660c05285901b1660e0526002839055608082905260a08190526001546040517fefb1b20d1d12d754c2da7fe3a7f0b7ea7f1d320144c1a2f873d1eeed95e5c54a9161009f91869190918252602082015260400190565b60405180910390a1505050505061016b565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b038116811461011857600080fd5b919050565b600080600080600060a0868803121561013557600080fd5b61013e86610101565b945061014c60208701610101565b6040870151606088015160809098015196999198509695945092505050565b60805160a05160c05160601c60e05160601c6107d06101c46000396000818160ed01526102c601526000818161012c015261021f015260008181610166015261044e01526000818160b3015261050201526107d06000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063719ec6b111610071578063719ec6b1146101615780638da5cb5b14610188578063b1fc8ad414610199578063c2ce5e86146101ac578063dd51faa2146101b5578063f2fde38b146101c857600080fd5b8063112cde6a146100ae5780632630c12f146100e85780635d62a8dd146101275780636ca7c2161461014e578063715018a614610157575b600080fd5b6100d57f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b61010f7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100df565b61010f7f000000000000000000000000000000000000000000000000000000000000000081565b6100d560025481565b61015f6101db565b005b6100d57f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b031661010f565b6100d56101a73660046106bd565b61021a565b6100d560015481565b61015f6101c336600461068b565b6103a0565b61015f6101d636600461065b565b610570565b6000546001600160a01b0316331461020e5760405162461bcd60e51b8152600401610205906106df565b60405180910390fd5b610218600061060b565b565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663455259cb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561027657600080fd5b505afa15801561028a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102ae91906106a4565b90506000600254826102c0919061074e565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166398d5fdca6040518163ffffffff1660e01b815260040160206040518083038186803b15801561031d57600080fd5b505afa158015610331573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061035591906106a4565b90506000808211610367576000610384565b8161037a84670de0b6b3a764000061074e565b610384919061072c565b90508581116103935780610395565b855b979650505050505050565b6000546001600160a01b031633146103ca5760405162461bcd60e51b8152600401610205906106df565b60025481111561052b5742600154111561044c5760405162461bcd60e51b815260206004820152603a60248201527f476173546178436f6d6d697373696f6e3a20746865206665652072616973652060448201527f74696d656f7574206973206e6f742065787069726564207965740000000000006064820152608401610205565b7f00000000000000000000000000000000000000000000000000000000000000006002548261047b919061076d565b11156104fd5760405162461bcd60e51b815260206004820152604560248201527f476173546178436f6d6d697373696f6e3a20746865206665652072616973652060448201527f6973206f76657220746865206d6178696d756d20616c6c6f776564206761732060648201526476616c756560d81b608482015260a401610205565b6105277f000000000000000000000000000000000000000000000000000000000000000042610714565b6001555b60028190556001546040805183815260208101929092527fefb1b20d1d12d754c2da7fe3a7f0b7ea7f1d320144c1a2f873d1eeed95e5c54a910160405180910390a150565b6000546001600160a01b0316331461059a5760405162461bcd60e51b8152600401610205906106df565b6001600160a01b0381166105ff5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610205565b6106088161060b565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561066d57600080fd5b81356001600160a01b038116811461068457600080fd5b9392505050565b60006020828403121561069d57600080fd5b5035919050565b6000602082840312156106b657600080fd5b5051919050565b600080604083850312156106d057600080fd5b50508035926020909101359150565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000821982111561072757610727610784565b500190565b60008261074957634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561076857610768610784565b500290565b60008282101561077f5761077f610784565b500390565b634e487b7160e01b600052601160045260246000fdfea26469706673582212202a34e654068e336e0a34dcb92a0711e3100f288563a3cd159b7e93312093ab8f64736f6c63430008070033", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c8063719ec6b111610071578063719ec6b1146101615780638da5cb5b14610188578063b1fc8ad414610199578063c2ce5e86146101ac578063dd51faa2146101b5578063f2fde38b146101c857600080fd5b8063112cde6a146100ae5780632630c12f146100e85780635d62a8dd146101275780636ca7c2161461014e578063715018a614610157575b600080fd5b6100d57f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b61010f7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100df565b61010f7f000000000000000000000000000000000000000000000000000000000000000081565b6100d560025481565b61015f6101db565b005b6100d57f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b031661010f565b6100d56101a73660046106bd565b61021a565b6100d560015481565b61015f6101c336600461068b565b6103a0565b61015f6101d636600461065b565b610570565b6000546001600160a01b0316331461020e5760405162461bcd60e51b8152600401610205906106df565b60405180910390fd5b610218600061060b565b565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663455259cb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561027657600080fd5b505afa15801561028a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102ae91906106a4565b90506000600254826102c0919061074e565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166398d5fdca6040518163ffffffff1660e01b815260040160206040518083038186803b15801561031d57600080fd5b505afa158015610331573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061035591906106a4565b90506000808211610367576000610384565b8161037a84670de0b6b3a764000061074e565b610384919061072c565b90508581116103935780610395565b855b979650505050505050565b6000546001600160a01b031633146103ca5760405162461bcd60e51b8152600401610205906106df565b60025481111561052b5742600154111561044c5760405162461bcd60e51b815260206004820152603a60248201527f476173546178436f6d6d697373696f6e3a20746865206665652072616973652060448201527f74696d656f7574206973206e6f742065787069726564207965740000000000006064820152608401610205565b7f00000000000000000000000000000000000000000000000000000000000000006002548261047b919061076d565b11156104fd5760405162461bcd60e51b815260206004820152604560248201527f476173546178436f6d6d697373696f6e3a20746865206665652072616973652060448201527f6973206f76657220746865206d6178696d756d20616c6c6f776564206761732060648201526476616c756560d81b608482015260a401610205565b6105277f000000000000000000000000000000000000000000000000000000000000000042610714565b6001555b60028190556001546040805183815260208101929092527fefb1b20d1d12d754c2da7fe3a7f0b7ea7f1d320144c1a2f873d1eeed95e5c54a910160405180910390a150565b6000546001600160a01b0316331461059a5760405162461bcd60e51b8152600401610205906106df565b6001600160a01b0381166105ff5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610205565b6106088161060b565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561066d57600080fd5b81356001600160a01b038116811461068457600080fd5b9392505050565b60006020828403121561069d57600080fd5b5035919050565b6000602082840312156106b657600080fd5b5051919050565b600080604083850312156106d057600080fd5b50508035926020909101359150565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000821982111561072757610727610784565b500190565b60008261074957634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561076857610768610784565b500290565b60008282101561077f5761077f610784565b500390565b634e487b7160e01b600052601160045260246000fdfea26469706673582212202a34e654068e336e0a34dcb92a0711e3100f288563a3cd159b7e93312093ab8f64736f6c63430008070033", "linkReferences": {}, "deployedLinkReferences": {}, "devdoc": { "events": { "GasTaxChanged(uint256,uint256)": { "params": { "timeout": "timestamp for a new change if raising the fee" } } }, "kind": "dev", "methods": { "getCommission(uint256,uint256)": { "returns": { "_0": "commissionTotal is the amount subtracted from the rewardAmount" } }, "owner()": { "details": "Returns the address of the current owner." }, "renounceOwnership()": { "details": "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." }, "transferOwnership(address)": { "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." } }, "version": 1 }, "userdoc": { "events": { "GasTaxChanged(uint256,uint256)": { "notice": "event fired when setGas function is called and successful" } }, "kind": "user", "methods": { "getCommission(uint256,uint256)": { "notice": "calculates the total amount of the reward that will be directed to the PoolManager" }, "setGas(uint256)": { "notice": "allows for the poolManager to reduce how much they want to charge for the block production tx" } }, "version": 1 }, "evm": { "gasEstimates": { "creation": { "codeDepositCost": "400000", "executionCost": "infinite", "totalCost": "infinite" }, "external": { "feeRaiseTimeout()": "infinite", "gas()": "2351", "gasOracle()": "infinite", "getCommission(uint256,uint256)": "infinite", "maxRaise()": "infinite", "owner()": "2356", "priceOracle()": "infinite", "renounceOwnership()": "28203", "setGas(uint256)": "infinite", "timeoutTimestamp()": "2350", "transferOwnership(address)": "28384" } }, "methodIdentifiers": { "feeRaiseTimeout()": "112cde6a", "gas()": "6ca7c216", "gasOracle()": "5d62a8dd", "getCommission(uint256,uint256)": "b1fc8ad4", "maxRaise()": "719ec6b1", "owner()": "8da5cb5b", "priceOracle()": "2630c12f", "renounceOwnership()": "715018a6", "setGas(uint256)": "dd51faa2", "timeoutTimestamp()": "c2ce5e86", "transferOwnership(address)": "f2fde38b" } } }