Skip to content

Commit

Permalink
feat: upgrade claim rewards process
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyonline committed Aug 22, 2024
1 parent 1c12ff4 commit 4f6d56a
Show file tree
Hide file tree
Showing 13 changed files with 2,754 additions and 12 deletions.
66 changes: 66 additions & 0 deletions broadcast/DeployAprOracle.s.sol/42161/run-latest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"transactions": [
{
"hash": "0x7de561f05a42777d0ef18b6069cd031a7c45910466b1b1151ed4f6b9a4b231eb",
"transactionType": "CREATE",
"contractName": "SiloUsdcLenderAprOracle",
"contractAddress": "0xdf124ac313c0b5d9e61db7da7faaf05aedc832c6",
"function": null,
"arguments": [
"0x1dcAD21ccD74b7A8A7BC7D19894de8Af41D9ea03"
],
"transaction": {
"from": "0x318d0059efe546b5687fa6744af4339391153981",
"gas": "0x1e8641",
"value": "0x0",
"input": "0x60806040523480156200001157600080fd5b50604051620017ec380380620017ec8339810160408190526200003491620000cb565b604080518082018252601b81527f53696c6f2055534443204c656e64657220415052204f7261636c6500000000006020820152600080546001600160a01b0319166001600160a01b03851690811782559251919284928392907f5f56bee8cffbe9a78652a74a60705edede02af10b0bbb888ca44b79a0d42ce80908290a3506001620000c18382620001a2565b505050506200026e565b600060208284031215620000de57600080fd5b81516001600160a01b0381168114620000f657600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200012857607f821691505b6020821081036200014957634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200019d57600081815260208120601f850160051c81016020861015620001785750805b601f850160051c820191505b81811015620001995782815560010162000184565b5050505b505050565b81516001600160401b03811115620001be57620001be620000fd565b620001d681620001cf845462000113565b846200014f565b602080601f8311600181146200020e5760008415620001f55750858301515b600019600386901b1c1916600185901b17855562000199565b600085815260208120601f198616915b828110156200023f578886015182559484019460019091019084016200021e565b50858210156200025e5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61156e806200027e6000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c806306fdde03146100675780632d9e85bd1461008557806338c3e55f146100a65780635aa6e675146100bb578063addd5099146100e6578063d38bfff41461010f575b600080fd5b61006f610122565b60405161007c9190610f1f565b60405180910390f35b610098610093366004610f85565b6101b0565b60405190815260200161007c565b6100b96100b4366004610fb1565b6103e7565b005b6000546100ce906001600160a01b031681565b6040516001600160a01b03909116815260200161007c565b6100ce6100f4366004610fea565b6002602052600090815260409020546001600160a01b031681565b6100b961011d366004610fea565b61051a565b6001805461012f90611007565b80601f016020809104026020016040519081016040528092919081815260200182805461015b90611007565b80156101a85780601f1061017d576101008083540402835291602001916101a8565b820191906000526020600020905b81548152906001019060200180831161018b57829003601f168201915b505050505081565b6000808390506000816001600160a01b031663eb3beb296040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061021a9190611041565b90506000826001600160a01b03166338d52e0f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561025c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102809190611041565b604051631f0f875560e31b81526001600160a01b03808316600483015291925060009184169063f87c3aa890602401606060405180830381865afa1580156102cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102f091906110e4565b905060008612156103555780516103098760001961113a565b11156103555760405162461bcd60e51b815260206004820152601660248201527564656c74612065786365656473206465706f7369747360501b60448201526064015b60405180910390fd5b805160009061036590889061116a565b905080826020015111156103b35760405162461bcd60e51b8152602060048201526015602482015274646562742065786365656473206465706f7369747360581b604482015260640161034c565b6103c2858284600001516105b7565b6103cf8686868587610a81565b6103d99190611192565b955050505050505b92915050565b6103ef610e2b565b600080836001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610430573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061045491906111bf565b50935050925050600082131580610476575062015180610474824261120f565b115b156104ad5760405162461bcd60e51b8152602060048201526007602482015266216f7261636c6560c81b604482015260640161034c565b6001600160a01b0383811660008181526002602090815260409182902080546001600160a01b031916948916948517905581519384528301919091527fd62f444dfe9375cc42bc1942c9da8a7d0282c91b18941f5e2cd72d1fe87b6693910160405180910390a150505050565b610522610e2b565b6001600160a01b0381166105675760405162461bcd60e51b815260206004820152600c60248201526b5a45524f204144445245535360a01b604482015260640161034c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f5f56bee8cffbe9a78652a74a60705edede02af10b0bbb888ca44b79a0d42ce809190a35050565b600080846001600160a01b031663af1df2556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061061c9190611041565b90506000816001600160a01b0316631652e7b7876001600160a01b031663a8d5fd656040518163ffffffff1660e01b8152600401602060405180830381865afa15801561066d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106919190611041565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401606060405180830381865afa1580156106d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f99190611222565b509150508060000361071057600092505050610a7a565b600060026000846001600160a01b03166399248ea76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610754573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107789190611041565b6001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160a01b03169050600080826001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156107ef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061081391906111bf565b50935050925050600082131580610835575062015180610833824261120f565b115b1561086c5760405162461bcd60e51b8152602060048201526007602482015266216f7261636c6560c81b604482015260640161034c565b6000896001600160a01b031663a8d5fd656040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d09190611041565b90506000816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610912573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109369190611250565b61094190600a611357565b90506000818b6109b3848d876001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561098a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ae9190611366565b610e75565b6109bd919061137f565b6109c791906113ac565b9050856001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2b9190611250565b610a3690600a611357565b858284610a476301e133808c61137f565b610a51919061137f565b610a5b91906113ac565b610a65919061137f565b610a6f91906113ac565b985050505050505050505b9392505050565b600080866001600160a01b031663e9176c606040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ac2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae69190611041565b60405163122cfaaf60e21b81526001600160a01b03888116600483015287811660248301529192506000918316906348b3eabc90604401602060405180830381865afa158015610b3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b5e9190611041565b9050600084600001518603610bec5760405163071962ff60e01b81526001600160a01b038981166004830152888116602483015242604483015283169063071962ff90606401602060405180830381865afa158015610bc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be59190611366565b9050610cd7565b604051635dee5f6b60e11b81526001600160a01b0389811660048301528881166024830152831690633ced7d0d90829063bbdcbed69060440161014060405180830381865afa158015610c43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6791906113ce565b8888602001518960400151426040518663ffffffff1660e01b8152600401610c93959493929190611455565b602060405180830381865afa158015610cb0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd49190611366565b90505b6000826001600160a01b0316636bcc82166040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3b9190611366565b90506000610d4e82898960200151610ed7565b905080600003610d6657600095505050505050610e22565b670de0b6b3a7640000856001600160a01b0316639af1d35a6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610dad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dd191906114f6565b60200151610df19067ffffffffffffffff16670de0b6b3a764000061120f565b83610dfc848761137f565b610e0691906113ac565b610e10919061137f565b610e1a91906113ac565b955050505050505b95945050505050565b6000546001600160a01b03163314610e735760405162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015260640161034c565b565b6000811580610e82575082155b15610e8e575082610a7a565b610e98828561137f565b9050828181610ea957610ea9611396565b04905080158015610eb957508315155b15610a7a57604051639811e0c760e01b815260040160405180910390fd5b6000821580610ee4575081155b15610ef157506000610a7a565b610efb848361137f565b9050828181610f0c57610f0c611396565b04905083811115610a7a57509192915050565b600060208083528351808285015260005b81811015610f4c57858101830151858201604001528201610f30565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b0381168114610f8257600080fd5b50565b60008060408385031215610f9857600080fd5b8235610fa381610f6d565b946020939093013593505050565b60008060408385031215610fc457600080fd5b8235610fcf81610f6d565b91506020830135610fdf81610f6d565b809150509250929050565b600060208284031215610ffc57600080fd5b8135610a7a81610f6d565b600181811c9082168061101b57607f821691505b60208210810361103b57634e487b7160e01b600052602260045260246000fd5b50919050565b60006020828403121561105357600080fd5b8151610a7a81610f6d565b6040516060810167ffffffffffffffff8111828210171561108f57634e487b7160e01b600052604160045260246000fd5b60405290565b604051610140810167ffffffffffffffff8111828210171561108f57634e487b7160e01b600052604160045260246000fd5b805167ffffffffffffffff811681146110df57600080fd5b919050565b6000606082840312156110f657600080fd5b6110fe61105e565b8251815260208301516020820152611118604084016110c7565b60408201529392505050565b634e487b7160e01b600052601160045260246000fd5b80820260008212600160ff1b8414161561115657611156611124565b81810583148215176103e1576103e1611124565b808201828112600083128015821682158216171561118a5761118a611124565b505092915050565b808201808211156103e1576103e1611124565b805169ffffffffffffffffffff811681146110df57600080fd5b600080600080600060a086880312156111d757600080fd5b6111e0866111a5565b9450602086015193506040860151925060608601519150611203608087016111a5565b90509295509295909350565b818103818111156103e1576103e1611124565b60008060006060848603121561123757600080fd5b8351925060208401519150604084015190509250925092565b60006020828403121561126257600080fd5b815160ff81168114610a7a57600080fd5b600181815b808511156112ae57816000190482111561129457611294611124565b808516156112a157918102915b93841c9390800290611278565b509250929050565b6000826112c5575060016103e1565b816112d2575060006103e1565b81600181146112e857600281146112f25761130e565b60019150506103e1565b60ff84111561130357611303611124565b50506001821b6103e1565b5060208310610133831016604e8410600b8410161715611331575081810a6103e1565b61133b8383611273565b806000190482111561134f5761134f611124565b029392505050565b6000610a7a60ff8416836112b6565b60006020828403121561137857600080fd5b5051919050565b80820281158282048414176103e1576103e1611124565b634e487b7160e01b600052601260045260246000fd5b6000826113c957634e487b7160e01b600052601260045260246000fd5b500490565b600061014082840312156113e157600080fd5b6113e9611095565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015160c082015260e083015160e08201526101008084015181830152506101208084015181830152508091505092915050565b60006101c082019050865182526020870151602083015260408701516040830152606087015160608301526080870151608083015260a087015160a083015260c087015160c083015260e087015160e083015261010080880151818401525061012080880151818401525085610140830152846101608301526114e561018083018567ffffffffffffffff169052565b826101a08301529695505050505050565b60006060828403121561150857600080fd5b61151061105e565b611519836110c7565b8152611527602084016110c7565b6020820152611118604084016110c756fea2646970667358221220569375c4f2d6e3dc8f48e312ceba620ad97069e38994fa7e711f4770633318ab64736f6c634300081200330000000000000000000000001dcad21ccd74b7a8a7bc7d19894de8af41d9ea03",
"nonce": "0x11",
"chainId": "0xa4b1"
},
"additionalContracts": [],
"isFixedGasLimit": false
}
],
"receipts": [
{
"status": "0x1",
"cumulativeGasUsed": "0x313174",
"logs": [
{
"address": "0xdf124ac313c0b5d9e61db7da7faaf05aedc832c6",
"topics": [
"0x5f56bee8cffbe9a78652a74a60705edede02af10b0bbb888ca44b79a0d42ce80",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000001dcad21ccd74b7a8a7bc7d19894de8af41d9ea03"
],
"data": "0x",
"blockHash": "0x2f199497eb6ca7d54bcf10e9f58cc1b6967bb8a38247fbe2e8b4d5261e4828ce",
"blockNumber": "0xe702e84",
"transactionHash": "0x7de561f05a42777d0ef18b6069cd031a7c45910466b1b1151ed4f6b9a4b231eb",
"transactionIndex": "0xa",
"logIndex": "0x18",
"removed": false
}
],
"logsBloom": "0x00000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000020000000000000000000800000000000000000000000000000000000000000000000000400000000100002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000800000000800020000000000000000002000000000000",
"type": "0x0",
"transactionHash": "0x7de561f05a42777d0ef18b6069cd031a7c45910466b1b1151ed4f6b9a4b231eb",
"transactionIndex": "0xa",
"blockHash": "0x2f199497eb6ca7d54bcf10e9f58cc1b6967bb8a38247fbe2e8b4d5261e4828ce",
"blockNumber": "0xe702e84",
"gasUsed": "0x16e1e2",
"effectiveGasPrice": "0x989680",
"from": "0x318d0059efe546b5687fa6744af4339391153981",
"to": null,
"contractAddress": "0xdf124ac313c0b5d9e61db7da7faaf05aedc832c6",
"gasUsedForL1": "0x323ea",
"l1BlockNumber": "0x1390a9c"
}
],
"libraries": [],
"pending": [],
"returns": {},
"timestamp": 1723501261,
"chain": 42161,
"commit": "1c12ff4"
}
Loading

0 comments on commit 4f6d56a

Please sign in to comment.