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

620 lines
48 KiB
JSON
Raw 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": "0x60c06040523480156200001157600080fd5b506040516200262238038062002622833981016040819052620000349162000083565b604051620000429062000075565b604051809103906000f0801580156200005f573d6000803e3d6000fd5b506001600160a01b031660805260a0526200009d565b61058c806200209683390190565b6000602082840312156200009657600080fd5b5051919050565b60805160a051611fb0620000e660003960008181610283015281816106fc0152818161145e01526115370152600081816107820152818161109601526115a40152611fb06000f3fe6080604052600436106101cd5760003560e01c80639010d07c116100f7578063b7a3c04c11610095578063e2982c2111610064578063e2982c2114610548578063ed88c68e14610568578063f0f4426014610570578063f301af421461059057600080fd5b8063b7a3c04c146104d2578063c0575111146104f2578063ca15c87314610508578063d547741f1461052857600080fd5b80639b1d3091116100d15780639b1d30911461044d578063a217fddf1461046d578063b15d20da14610482578063b3b30c1a146104a457600080fd5b80639010d07c146103ed57806391d148541461040d57806399f4b2511461042d57600080fd5b806331b3eb941161016f57806361d027b31161013e57806361d027b31461036957806376ad03bc146103a15780637f1b5e43146103b757806380f55605146103cd57600080fd5b806331b3eb94146102f657806336568abe14610316578063485cc9551461033657806359e967001461035657600080fd5b8063158ef93e116101ab578063158ef93e146102575780632129593114610271578063248a9ca3146102a55780632f2ff15d146102d657600080fd5b806301ffc9a7146101d25780630373a23a146102075780630a539a1914610229575b600080fd5b3480156101de57600080fd5b506101f26101ed366004611b4a565b610637565b60405190151581526020015b60405180910390f35b34801561021357600080fd5b50610227610222366004611b74565b610662565b005b34801561023557600080fd5b50610249610244366004611b74565b610680565b6040519081526020016101fe565b34801561026357600080fd5b506000546101f29060ff1681565b34801561027d57600080fd5b506102497f000000000000000000000000000000000000000000000000000000000000000081565b3480156102b157600080fd5b506102496102c0366004611b74565b6000908152600160208190526040909120015490565b3480156102e257600080fd5b506102276102f1366004611ba2565b610738565b34801561030257600080fd5b50610227610311366004611bd2565b610763565b34801561032257600080fd5b50610227610331366004611ba2565b6107e1565b34801561034257600080fd5b50610227610351366004611bef565b610864565b610227610364366004611c1d565b610926565b34801561037557600080fd5b50600954610389906001600160a01b031681565b6040516001600160a01b0390911681526020016101fe565b3480156103ad57600080fd5b5061024960075481565b3480156103c357600080fd5b5061024960065481565b3480156103d957600080fd5b50600354610389906001600160a01b031681565b3480156103f957600080fd5b50610389610408366004611c1d565b610d0e565b34801561041957600080fd5b506101f2610428366004611ba2565b610d26565b34801561043957600080fd5b50600454610389906001600160a01b031681565b34801561045957600080fd5b50610227610468366004611b74565b610d51565b34801561047957600080fd5b50610249600081565b34801561048e57600080fd5b50610249600080516020611f5b83398151915281565b3480156104b057600080fd5b506104b9610d6f565b60405167ffffffffffffffff90911681526020016101fe565b3480156104de57600080fd5b506102276104ed366004611c3f565b610e1d565b3480156104fe57600080fd5b5061024960085481565b34801561051457600080fd5b50610249610523366004611b74565b611037565b34801561053457600080fd5b50610227610543366004611ba2565b61104e565b34801561055457600080fd5b50610249610563366004611bd2565b611074565b610227611103565b34801561057c57600080fd5b5061022761058b366004611bd2565b61111c565b34801561059c57600080fd5b506105f56105ab366004611b74565b600560205260009081526040902080546001909101546001600160801b0380831692600160801b908190048216929182169164ffffffffff918104821691600160a81b9091041685565b604080516001600160801b0396871681529486166020860152929094169183019190915264ffffffffff9081166060830152909116608082015260a0016101fe565b60006001600160e01b03198216635a05180f60e01b148061065c575061065c82611157565b92915050565b600080516020611f5b83398151915261067a8161118c565b50600755565b6000818152600560209081526040808320815160a08101835281546001600160801b038082168352600160801b918290048116958301959095526001909201549384169281019290925264ffffffffff908304811660608301819052600160a81b9093041660808201529082036106fa5750600092915050565b7f000000000000000000000000000000000000000000
"deployedBytecode": "0x6080604052600436106101cd5760003560e01c80639010d07c116100f7578063b7a3c04c11610095578063e2982c2111610064578063e2982c2114610548578063ed88c68e14610568578063f0f4426014610570578063f301af421461059057600080fd5b8063b7a3c04c146104d2578063c0575111146104f2578063ca15c87314610508578063d547741f1461052857600080fd5b80639b1d3091116100d15780639b1d30911461044d578063a217fddf1461046d578063b15d20da14610482578063b3b30c1a146104a457600080fd5b80639010d07c146103ed57806391d148541461040d57806399f4b2511461042d57600080fd5b806331b3eb941161016f57806361d027b31161013e57806361d027b31461036957806376ad03bc146103a15780637f1b5e43146103b757806380f55605146103cd57600080fd5b806331b3eb94146102f657806336568abe14610316578063485cc9551461033657806359e967001461035657600080fd5b8063158ef93e116101ab578063158ef93e146102575780632129593114610271578063248a9ca3146102a55780632f2ff15d146102d657600080fd5b806301ffc9a7146101d25780630373a23a146102075780630a539a1914610229575b600080fd5b3480156101de57600080fd5b506101f26101ed366004611b4a565b610637565b60405190151581526020015b60405180910390f35b34801561021357600080fd5b50610227610222366004611b74565b610662565b005b34801561023557600080fd5b50610249610244366004611b74565b610680565b6040519081526020016101fe565b34801561026357600080fd5b506000546101f29060ff1681565b34801561027d57600080fd5b506102497f000000000000000000000000000000000000000000000000000000000000000081565b3480156102b157600080fd5b506102496102c0366004611b74565b6000908152600160208190526040909120015490565b3480156102e257600080fd5b506102276102f1366004611ba2565b610738565b34801561030257600080fd5b50610227610311366004611bd2565b610763565b34801561032257600080fd5b50610227610331366004611ba2565b6107e1565b34801561034257600080fd5b50610227610351366004611bef565b610864565b610227610364366004611c1d565b610926565b34801561037557600080fd5b50600954610389906001600160a01b031681565b6040516001600160a01b0390911681526020016101fe565b3480156103ad57600080fd5b5061024960075481565b3480156103c357600080fd5b5061024960065481565b3480156103d957600080fd5b50600354610389906001600160a01b031681565b3480156103f957600080fd5b50610389610408366004611c1d565b610d0e565b34801561041957600080fd5b506101f2610428366004611ba2565b610d26565b34801561043957600080fd5b50600454610389906001600160a01b031681565b34801561045957600080fd5b50610227610468366004611b74565b610d51565b34801561047957600080fd5b50610249600081565b34801561048e57600080fd5b50610249600080516020611f5b83398151915281565b3480156104b057600080fd5b506104b9610d6f565b60405167ffffffffffffffff90911681526020016101fe565b3480156104de57600080fd5b506102276104ed366004611c3f565b610e1d565b3480156104fe57600080fd5b5061024960085481565b34801561051457600080fd5b50610249610523366004611b74565b611037565b34801561053457600080fd5b50610227610543366004611ba2565b61104e565b34801561055457600080fd5b50610249610563366004611bd2565b611074565b610227611103565b34801561057c57600080fd5b5061022761058b366004611bd2565b61111c565b34801561059c57600080fd5b506105f56105ab366004611b74565b600560205260009081526040902080546001909101546001600160801b0380831692600160801b908190048216929182169164ffffffffff918104821691600160a81b9091041685565b604080516001600160801b0396871681529486166020860152929094169183019190915264ffffffffff9081166060830152909116608082015260a0016101fe565b60006001600160e01b03198216635a05180f60e01b148061065c575061065c82611157565b92915050565b600080516020611f5b83398151915261067a8161118c565b50600755565b6000818152600560209081526040808320815160a08101835281546001600160801b038082168352600160801b918290048116958301959095526001909201549384169281019290925264ffffffffff908304811660608301819052600160a81b9093041660808201529082036106fa5750600092915050565b7f0000000000000000000000000000000000000000000000000000000000000000816060015164ffffffffff166107319190611c8d565b9392505050565b600082815260016020819052604090912001546107548161118c565b61075e8383611199565b505050565b6040516351cff8d960e01b81526001600160a01b0382811660048301527f000000000000000000000000000000000000000000000000000000000000000016906351cff8d990602401600060405180830381600087803b1580156107c657600080fd5b505af11580156107da573d6000803e3d6000fd5b5050505050565b6001600160a01b03811633146108565760
"linkReferences": {},
"deployedLinkReferences": {}
}