0g-storage-node/storage-contracts-abis/ChunkLinearReward.json

620 lines
52 KiB
JSON
Raw Permalink Normal View History

{
"_format": "hh-sol-artifact-1",
"contractName": "ChunkLinearReward",
"sourceName": "contracts/reward/ChunkLinearReward.sol",
"abi": [
{
"inputs": [
{
"internalType": "uint256",
"name": "releaseSeconds_",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "pricingIndex",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "beneficiary",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "DistributeReward",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "previousAdminRole",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "newAdminRole",
"type": "bytes32"
}
],
"name": "RoleAdminChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "account",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "RoleGranted",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "account",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "RoleRevoked",
"type": "event"
},
{
"inputs": [],
"name": "DEFAULT_ADMIN_ROLE",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "PARAMS_ADMIN_ROLE",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "baseReward",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "pricingIndex",
"type": "uint256"
},
{
"internalType": "address payable",
"name": "beneficiary",
"type": "address"
},
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"name": "claimMineReward",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "donate",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "beforeLength",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "chargedSectors",
"type": "uint256"
}
],
"name": "fillReward",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "firstRewardableChunk",
"outputs": [
{
"internalType": "uint64",
"name": "",
"type": "uint64"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
}
],
"name": "getRoleAdmin",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "index",
"type": "uint256"
}
],
"name": "getRoleMember",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
}
],
"name": "getRoleMemberCount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "grantRole",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "hasRole",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "market_",
"type": "address"
},
{
"internalType": "address",
"name": "mine_",
"type": "address"
}
],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "initialized",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "market",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "mine",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "dest",
"type": "address"
}
],
"name": "payments",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "releaseSeconds",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "renounceRole",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "revokeRole",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "pricingIndex",
"type": "uint256"
}
],
"name": "rewardDeadline",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "rewards",
"outputs": [
{
"internalType": "uint128",
"name": "lockedReward",
"type": "uint128"
},
{
"internalType": "uint128",
"name": "claimableReward",
"type": "uint128"
},
{
"internalType": "uint128",
"name": "distributedReward",
"type": "uint128"
},
{
"internalType": "uint40",
"name": "startTime",
"type": "uint40"
},
{
"internalType": "uint40",
"name": "lastUpdate",
"type": "uint40"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "serviceFeeRateBps",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "baseReward_",
"type": "uint256"
}
],
"name": "setBaseReward",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "bps",
"type": "uint256"
}
],
"name": "setServiceFeeRate",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "treasury_",
"type": "address"
}
],
"name": "setTreasury",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "interfaceId",
"type": "bytes4"
}
],
"name": "supportsInterface",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalBaseReward",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "treasury",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address payable",
"name": "payee",
"type": "address"
}
],
"name": "withdrawPayments",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x60a060405234801561001057600080fd5b5060405161282438038061282483398101604081905261002f91610037565b608052610050565b60006020828403121561004957600080fd5b5051919050565b6080516127a4610080600039600081816102c4015281816107a501528181611620015261170401526127a46000f3fe608060405260043610620001f35760003560e01c80639010d07c116200010b578063b7a3c04c11620000a1578063e2982c21116200006c578063e2982c2114620005d9578063ed88c68e14620005fe578063f0f442601462000608578063f301af42146200062d57600080fd5b8063b7a3c04c1462000552578063c05751111462000577578063ca15c873146200058f578063d547741f14620005b457600080fd5b80639b1d309111620000e25780639b1d309114620004bf578063a217fddf14620004e4578063b15d20da14620004fb578063b3b30c1a146200052057600080fd5b80639010d07c146200045357806391d14854146200047857806399f4b251146200049d57600080fd5b806331b3eb94116200018d57806361d027b3116200015857806361d027b314620003c657806376ad03bc14620004015780637f1b5e43146200041957806380f55605146200043157600080fd5b806331b3eb94146200034057806336568abe1462000365578063485cc955146200038a57806359e9670014620003af57600080fd5b8063158ef93e11620001ce578063158ef93e146200028d5780632129593114620002b0578063248a9ca314620002e65780632f2ff15d146200031b57600080fd5b806301ffc9a714620001f85780630373a23a14620002325780630a539a191462000259575b600080fd5b3480156200020557600080fd5b506200021d6200021736600462001d6c565b620006d9565b60405190151581526020015b60405180910390f35b3480156200023f57600080fd5b50620002576200025136600462001d98565b62000707565b005b3480156200026657600080fd5b506200027e6200027836600462001d98565b62000728565b60405190815260200162000229565b3480156200029a57600080fd5b506000546200021d90600160a01b900460ff1681565b348015620002bd57600080fd5b506200027e7f000000000000000000000000000000000000000000000000000000000000000081565b348015620002f357600080fd5b506200027e6200030536600462001d98565b6000908152600160208190526040909120015490565b3480156200032857600080fd5b50620002576200033a36600462001dc8565b620007e3565b3480156200034d57600080fd5b50620002576200035f36600462001dfb565b62000812565b3480156200037257600080fd5b50620002576200038436600462001dc8565b62000876565b3480156200039757600080fd5b5062000257620003a936600462001e1b565b620008fc565b62000257620003c036600462001e4e565b62000a25565b348015620003d357600080fd5b50600954620003e8906001600160a01b031681565b6040516001600160a01b03909116815260200162000229565b3480156200040e57600080fd5b506200027e60075481565b3480156200042657600080fd5b506200027e60065481565b3480156200043e57600080fd5b50600354620003e8906001600160a01b031681565b3480156200046057600080fd5b50620003e86200047236600462001e4e565b62000e96565b3480156200048557600080fd5b506200021d6200049736600462001dc8565b62000eb0565b348015620004aa57600080fd5b50600454620003e8906001600160a01b031681565b348015620004cc57600080fd5b5062000257620004de36600462001d98565b62000edb565b348015620004f157600080fd5b506200027e600081565b3480156200050857600080fd5b506200027e6000805160206200274f83398151915281565b3480156200052d57600080fd5b506200053862000efc565b60405167ffffffffffffffff909116815260200162000229565b3480156200055f57600080fd5b50620002576200057136600462001e71565b62000fbe565b3480156200058457600080fd5b506200027e60085481565b3480156200059c57600080fd5b506200027e620005ae36600462001d98565b620011ec565b348015620005c157600080fd5b5062000257620005d336600462001dc8565b62001205565b348015620005e657600080fd5b506200027e620005f836600462001dfb565b6200122f565b62000257620012a1565b3480156200061557600080fd5b50620002576200062736600462001dfb565b620012bc565b3480156200063a57600080fd5b50620006966200064c36600462001d98565b600560205260009081526040902080546001909101546001600160801b0380831692600160801b908190048216929182169164ffffffffff918104821691600160a81b9091041685565b604080516001600160801b0396871681529486166020860152929094169183019190915264ffffffffff9081166060830152909116608082015260a00162000229565b60006001600160e01b03198216635a05180f60e01b14806200070157506200070182620012fa565b92915050565b6000805160206200274f833981519152620007228162001331565b50600755565b6000818152600560209081526040808320815160a08101835281546001600160801b038082168352600160801b918290048116958301959095526001909201549384169281019290925264ffffff
"deployedBytecode": "0x608060405260043610620001f35760003560e01c80639010d07c116200010b578063b7a3c04c11620000a1578063e2982c21116200006c578063e2982c2114620005d9578063ed88c68e14620005fe578063f0f442601462000608578063f301af42146200062d57600080fd5b8063b7a3c04c1462000552578063c05751111462000577578063ca15c873146200058f578063d547741f14620005b457600080fd5b80639b1d309111620000e25780639b1d309114620004bf578063a217fddf14620004e4578063b15d20da14620004fb578063b3b30c1a146200052057600080fd5b80639010d07c146200045357806391d14854146200047857806399f4b251146200049d57600080fd5b806331b3eb94116200018d57806361d027b3116200015857806361d027b314620003c657806376ad03bc14620004015780637f1b5e43146200041957806380f55605146200043157600080fd5b806331b3eb94146200034057806336568abe1462000365578063485cc955146200038a57806359e9670014620003af57600080fd5b8063158ef93e11620001ce578063158ef93e146200028d5780632129593114620002b0578063248a9ca314620002e65780632f2ff15d146200031b57600080fd5b806301ffc9a714620001f85780630373a23a14620002325780630a539a191462000259575b600080fd5b3480156200020557600080fd5b506200021d6200021736600462001d6c565b620006d9565b60405190151581526020015b60405180910390f35b3480156200023f57600080fd5b50620002576200025136600462001d98565b62000707565b005b3480156200026657600080fd5b506200027e6200027836600462001d98565b62000728565b60405190815260200162000229565b3480156200029a57600080fd5b506000546200021d90600160a01b900460ff1681565b348015620002bd57600080fd5b506200027e7f000000000000000000000000000000000000000000000000000000000000000081565b348015620002f357600080fd5b506200027e6200030536600462001d98565b6000908152600160208190526040909120015490565b3480156200032857600080fd5b50620002576200033a36600462001dc8565b620007e3565b3480156200034d57600080fd5b50620002576200035f36600462001dfb565b62000812565b3480156200037257600080fd5b50620002576200038436600462001dc8565b62000876565b3480156200039757600080fd5b5062000257620003a936600462001e1b565b620008fc565b62000257620003c036600462001e4e565b62000a25565b348015620003d357600080fd5b50600954620003e8906001600160a01b031681565b6040516001600160a01b03909116815260200162000229565b3480156200040e57600080fd5b506200027e60075481565b3480156200042657600080fd5b506200027e60065481565b3480156200043e57600080fd5b50600354620003e8906001600160a01b031681565b3480156200046057600080fd5b50620003e86200047236600462001e4e565b62000e96565b3480156200048557600080fd5b506200021d6200049736600462001dc8565b62000eb0565b348015620004aa57600080fd5b50600454620003e8906001600160a01b031681565b348015620004cc57600080fd5b5062000257620004de36600462001d98565b62000edb565b348015620004f157600080fd5b506200027e600081565b3480156200050857600080fd5b506200027e6000805160206200274f83398151915281565b3480156200052d57600080fd5b506200053862000efc565b60405167ffffffffffffffff909116815260200162000229565b3480156200055f57600080fd5b50620002576200057136600462001e71565b62000fbe565b3480156200058457600080fd5b506200027e60085481565b3480156200059c57600080fd5b506200027e620005ae36600462001d98565b620011ec565b348015620005c157600080fd5b5062000257620005d336600462001dc8565b62001205565b348015620005e657600080fd5b506200027e620005f836600462001dfb565b6200122f565b62000257620012a1565b3480156200061557600080fd5b50620002576200062736600462001dfb565b620012bc565b3480156200063a57600080fd5b50620006966200064c36600462001d98565b600560205260009081526040902080546001909101546001600160801b0380831692600160801b908190048216929182169164ffffffffff918104821691600160a81b9091041685565b604080516001600160801b0396871681529486166020860152929094169183019190915264ffffffffff9081166060830152909116608082015260a00162000229565b60006001600160e01b03198216635a05180f60e01b14806200070157506200070182620012fa565b92915050565b6000805160206200274f833981519152620007228162001331565b50600755565b6000818152600560209081526040808320815160a08101835281546001600160801b038082168352600160801b918290048116958301959095526001909201549384169281019290925264ffffffffff908304811660608301819052600160a81b909304166080820152908203620007a35750600092915050565b7f0000000000000000000000000000000000000000000000000000000000000000816060015164ffffffffff16620007dc919062001ec2565b9392505050565b600082815260016020819052604090
"linkReferences": {},
"deployedLinkReferences": {}
}