[ { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "address", "name": "serviceManager", "type": "address" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [], "name": "AethosClient_IsRateLimited", "type": "error" }, { "inputs": [], "name": "AethosClient__Unauthorized", "type": "error" }, { "inputs": [], "name": "RateLimiter_InvalidToken", "type": "error" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "_from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "_to", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "_value", "type": "uint256" } ], "name": "Transfer", "type": "event" }, { "inputs": [], "name": "SYMBOL", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "balances", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "bypassRateLimit", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "sender", "type": "address" }, { "internalType": "string", "name": "tokenID", "type": "string" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "checkIfLimitExceeds", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" }, { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "disableRateLimiter", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "enableRateLimiter", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "tokenID", "type": "string" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "evaluateRateLimit", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "addr", "type": "address" } ], "name": "getBalance", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "token", "type": "string" }, { "internalType": "uint256", "name": "amountIn", "type": "uint256" } ], "name": "getPrice", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getRateLimitParams", "outputs": [ { "components": [ { "internalType": "uint256", "name": "maxAmount", "type": "uint256" }, { "internalType": "uint256", "name": "duration", "type": "uint256" }, { "internalType": "uint64", "name": "batchSize", "type": "uint64" } ], "internalType": "struct RateLimitParams", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "user", "type": "address" } ], "name": "getTxBatchAtPtr", "outputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "uint256", "name": "startBlockNumber", "type": "uint256" }, { "internalType": "uint256", "name": "endBlockNumber", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "user", "type": "address" } ], "name": "getTxHistory", "outputs": [ { "components": [ { "internalType": "uint256", "name": "total", "type": "uint256" }, { "internalType": "uint256", "name": "ptr", "type": "uint256" }, { "components": [ { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "uint256", "name": "startBlockNumber", "type": "uint256" }, { "internalType": "uint256", "name": "endBlockNumber", "type": "uint256" } ], "internalType": "struct TxBatch[]", "name": "txBatches", "type": "tuple[]" } ], "internalType": "struct TxHistory", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "isRateLimiterEnabled", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "policyID", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "priceOracle", "outputs": [ { "internalType": "contract IPriceAggregator", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "rateLimitParams", "outputs": [ { "internalType": "uint256", "name": "maxAmount", "type": "uint256" }, { "internalType": "uint256", "name": "duration", "type": "uint256" }, { "internalType": "uint64", "name": "batchSize", "type": "uint64" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "user", "type": "address" } ], "name": "removeRateLimitBypass", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "receiver", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "sendCoin", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "serviceManager", "outputs": [ { "internalType": "contract IServiceManager", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "_policyID", "type": "string" } ], "name": "setPolicy", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_priceOracle", "type": "address" } ], "name": "setPriceOracle", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "user", "type": "address" } ], "name": "setRateLimitBypass", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "uint256", "name": "maxAmount", "type": "uint256" }, { "internalType": "uint256", "name": "duration", "type": "uint256" }, { "internalType": "uint64", "name": "batchSize", "type": "uint64" } ], "internalType": "struct RateLimitParams", "name": "paramsForRateLimiting", "type": "tuple" } ], "name": "setRateLimitParams", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "txHistory", "outputs": [ { "internalType": "uint256", "name": "total", "type": "uint256" }, { "internalType": "uint256", "name": "ptr", "type": "uint256" } ], "stateMutability": "view", "type": "function" } ]
60806040523480156200001157600080fd5b5060405162001c2138038062001c21833981016040819052620000349162000178565b6200003f336200007e565b6001600160a01b03821660009081526009602052604090206509184e72a00090556200006b81620000ce565b62000076826200007e565b5050620001b0565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b620000d8620000fa565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314620001595760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640160405180910390fd5b565b80516001600160a01b03811681146200017357600080fd5b919050565b600080604083850312156200018c57600080fd5b62000197836200015b565b9150620001a7602084016200015b565b90509250929050565b611a6180620001c06000396000f3fe608060405234801561001057600080fd5b50600436106101a95760003560e01c80637012b1d4116100f9578063c60c064611610097578063ed5f43b711610071578063ed5f43b7146104b3578063f2fde38b146104d6578063f76f8d78146104e9578063f8b2cb4f1461050c57600080fd5b8063c60c06461461045c578063c6cf634b1461048b578063daf42d6c146104a057600080fd5b806390b98a11116100d357806390b98a11146103ec578063a8ca8964146103ff578063b74437a514610432578063c47f1ac31461044457600080fd5b80637012b1d4146103b3578063715018a6146103d35780638da5cb5b146103db57600080fd5b80632e6c02e3116101665780633998fdd3116101405780633998fdd31461034a578063530e784f1461035d5780635e89c3f41461038d5780636b4c991b146103a057600080fd5b80632e6c02e3146102d45780632ef3accc146103135780632f53036e1461032657600080fd5b80630a6d4d58146101ae578063112f6a31146101ef5780632630c12f1461021d57806327e235e314610248578063286df6b7146102765780632cc5b108146102aa575b600080fd5b6101d56101bc366004611518565b6003602052600090815260409020805460019091015482565b604080519283526020830191909152015b60405180910390f35b6102026101fd366004611518565b610535565b604080519384526020840192909252908201526060016101e6565b600854610230906001600160a01b031681565b6040516001600160a01b0390911681526020016101e6565b610268610256366004611518565b60096020526000908152604090205481565b6040519081526020016101e6565b6102a8610284366004611518565b6001600160a01b03166000908152600760205260409020805460ff19166001179055565b005b6102bd6102b836600461157b565b6105ed565b6040805192151583526020830191909152016101e6565b6004546005546006546102ef9291906001600160401b031683565b6040805193845260208401929092526001600160401b0316908201526060016101e6565b6102686103213660046115d4565b61063f565b60085461033a90600160a01b900460ff1681565b60405190151581526020016101e6565b600154610230906001600160a01b031681565b6102a861036b366004611518565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b61033a61039b3660046116c1565b61074f565b6102a86103ae366004611705565b610813565b6103c66103c1366004611518565b610894565b6040516101e69190611741565b6102a861097f565b6000546001600160a01b0316610230565b6102a86103fa3660046117be565b610993565b610407610a80565b604080518251815260208084015190820152918101516001600160401b0316908201526060016101e6565b6102a86008805460ff60a01b19169055565b6102a86008805460ff60a01b1916600160a01b179055565b6102a861046a366004611518565b6001600160a01b03166000908152600760205260409020805460ff19169055565b610493610adb565b6040516101e69190611835565b6102a86104ae366004611848565b610b69565b61033a6104c1366004611518565b60076020526000908152604090205460ff1681565b6102a86104e4366004611518565b610b8e565b610493604051806040016040528060048152602001634d45544160e01b81525081565b61026861051a366004611518565b6001600160a01b031660009081526009602052604090205490565b6001600160a01b038116600090815260036020526040812060028101546001820154839283929091106105a75760405162461bcd60e51b8152602060048201526015602482015274506f696e746572206f7574206f6620626f756e647360581b60448201526064015b60405180910390fd5b6000816002018260010154815481106105c2576105c2611860565b6000918252602090912060039091020180546001820154600290920154909891975095509350505050565b6000806106328686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250889250610c07915050565b9150915094509492505050565b60085460405163034d94bb60e21b81526000916001600160a01b031690630d3652ec90610672908790879060040161189f565b602060405180830381865afa15801561068f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b391906118b3565b6106d0576040516354db30c360e11b815260040160405180910390fd5b600854604051630bbceb3360e21b81526001600160a01b0390911690632ef3accc90610704908790879087906004016118d5565b602060405180830381865afa158015610721573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061074591906118f9565b90505b9392505050565b60008061075d338585610c07565b509050801561077057600091505061080d565b604051630bbceb3360e21b81526000903090632ef3accc906107989088908890600401611912565b602060405180830381865afa1580156107b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d991906118f9565b6107e3908561194a565b905060006107f043610ec7565b90506107fb81610eed565b6108054383610f98565b600193505050505b92915050565b61081b6110e2565b805161082e906002906020840190611463565b50600154604051636b4c991b60e01b81526001600160a01b0390911690636b4c991b9061085f908490600401611835565b600060405180830381600087803b15801561087957600080fd5b505af115801561088d573d6000803e3d6000fd5b5050505050565b6108b860405180606001604052806000815260200160008152602001606081525090565b60036000836001600160a01b03166001600160a01b03168152602001908152602001600020604051806060016040529081600082015481526020016001820154815260200160028201805480602002602001604051908101604052809291908181526020016000905b828210156109715783829060005260206000209060030201604051806060016040529081600082015481526020016001820154815260200160028201548152505081526020019060010190610921565b505050915250909392505050565b6109876110e2565b610991600061113c565b565b6040805180820182526004808252634d45544160e01b602083015291516317a270fd60e21b81523092635e89c3f4926109d0929091869101611912565b6020604051808303816000875af11580156109ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1391906118b3565b610a725760405162461bcd60e51b815260206004820152602a60248201527f4d657461436f696e57697468526174654c696d69743a2072617465206c696d696044820152691d08195e18d95959195960b21b606482015260840161059e565b610a7c828261118c565b5050565b610aad6040518060600160405280600081526020016000815260200160006001600160401b031681525090565b5060408051606081018252600454815260055460208201526006546001600160401b03169181019190915290565b60028054610ae890611969565b80601f0160208091040260200160405190810160405280929190818152602001828054610b1490611969565b8015610b615780601f10610b3657610100808354040283529160200191610b61565b820191906000526020600020905b815481529060010190602001808311610b4457829003601f168201915b505050505081565b806004610b76828261199e565b50506008805460ff60a01b1916600160a01b17905550565b610b966110e2565b6001600160a01b038116610bfb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161059e565b610c048161113c565b50565b6008546000908190600160a01b900460ff16610c735760405162461bcd60e51b815260206004820152602560248201527f526174654c696d697465723a2072617465206c696d69746572206e6f7420656e60448201526418589b195960da1b606482015260840161059e565b600554610cd35760405162461bcd60e51b815260206004820152602860248201527f526174654c696d697465723a2072617465206c696d6974206475726174696f6e604482015267081b9bdd081cd95d60c21b606482015260840161059e565b6008546001600160a01b0316610d355760405162461bcd60e51b815260206004820152602160248201527f526174654c696d697465723a207072696365206f7261636c65206e6f742073656044820152601d60fa1b606482015260840161059e565b60085460405163034d94bb60e21b81526001600160a01b0390911690630d3652ec90610d65908790600401611835565b602060405180830381865afa158015610d82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610da691906118b3565b610e0b5760405162461bcd60e51b815260206004820152603060248201527f526174654c696d697465723a20746f6b656e206e6f7420737570706f7274656460448201526f206279207072696365206f7261636c6560801b606482015260840161059e565b604051630bbceb3360e21b81526000903090632ef3accc90610e339088908890600401611912565b602060405180830381865afa158015610e50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7491906118f9565b610e7e908561194a565b90506000610e8b43610ec7565b90506000610e998883611280565b90506000610ea88983866113be565b90506000610eb78a8487611429565b9a91995090975050505050505050565b6005546000908210610ee557600554610ee090836119e1565b61080d565b600092915050565b336000908152600360205260409020805460018201545b600283015481108015610f3d575083836002018281548110610f2857610f28611860565b90600052602060002090600302016002015411155b15610f8c5782600201836001015481548110610f5b57610f5b611860565b90600052602060002090600302016000015482610f7891906119e1565b915080610f84816119f8565b915050610f04565b90825560019091015550565b336000908152600360205260409020600281015415801590610fec5750600281018054610fc7906001906119e1565b81548110610fd757610fd7611860565b90600052602060002090600302016002015483105b1561105a57600281018054839190611006906001906119e1565b8154811061101657611016611860565b906000526020600020906003020160000160008282546110369190611a13565b909155505080548290829060009061104f908490611a13565b909155506110dd9050565b604080516060810182528381526020810185905260065460009282019061108a906001600160401b031687611a13565b90526002808401805460018181018355600092835260208084208651600390940201928355850151908201556040840151920191909155835491925084918491906110d6908490611a13565b9091555050505b505050565b6000546001600160a01b031633146109915760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161059e565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b336000908152600960205260409020548111156111eb5760405162461bcd60e51b815260206004820152601e60248201527f4d657461436f696e3a20696e73756666696369656e742062616c616e63650000604482015260640161059e565b336000908152600960205260408120805483929061120a9084906119e1565b90915550506001600160a01b03821660009081526009602052604081208054839290611237908490611a13565b90915550506040518181526001600160a01b0383169033907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b038216600090815260036020908152604080832081516060810183528154815260018201548185015260028201805484518187028101870186528181528796939586019390929190879084015b8282101561132457838290600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282015481525050815260200190600101906112d4565b5050509152505080516020820151919250905b8260400151518110801561136b5750848360400151828151811061135d5761135d611860565b602002602001015160400151105b156113b557826040015183602001518151811061138a5761138a611860565b602002602001015160000151826113a191906119e1565b9150806113ad816119f8565b915050611337565b50949350505050565b6001600160a01b03831660009081526007602052604081205460ff16156113e85750600454610748565b6004546113f58385611a13565b1161141b57600454829061140a9085906119e1565b61141491906119e1565b9050610748565b6004546107459084906119e1565b6001600160a01b03831660009081526007602052604081205460ff16158015610745575060045461145a8385611a13565b11949350505050565b82805461146f90611969565b90600052602060002090601f01602090048101928261149157600085556114d7565b82601f106114aa57805160ff19168380011785556114d7565b828001600101855582156114d7579182015b828111156114d75782518255916020019190600101906114bc565b506114e39291506114e7565b5090565b5b808211156114e357600081556001016114e8565b80356001600160a01b038116811461151357600080fd5b919050565b60006020828403121561152a57600080fd5b610748826114fc565b60008083601f84011261154557600080fd5b5081356001600160401b0381111561155c57600080fd5b60208301915083602082850101111561157457600080fd5b9250929050565b6000806000806060858703121561159157600080fd5b61159a856114fc565b935060208501356001600160401b038111156115b557600080fd5b6115c187828801611533565b9598909750949560400135949350505050565b6000806000604084860312156115e957600080fd5b83356001600160401b038111156115ff57600080fd5b61160b86828701611533565b909790965060209590950135949350505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261164657600080fd5b81356001600160401b03808211156116605761166061161f565b604051601f8301601f19908116603f011681019082821181831017156116885761168861161f565b816040528381528660208588010111156116a157600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080604083850312156116d457600080fd5b82356001600160401b038111156116ea57600080fd5b6116f685828601611635565b95602094909401359450505050565b60006020828403121561171757600080fd5b81356001600160401b0381111561172d57600080fd5b61173984828501611635565b949350505050565b600060208083526080830184518285015281850151604081818701528087015191506060808188015283835180865260a0890191508685019550600094505b808510156117b157855180518352878101518884015284015184830152948601946001949094019390820190611780565b5098975050505050505050565b600080604083850312156117d157600080fd5b6117da836114fc565b946020939093013593505050565b6000815180845260005b8181101561180e576020818501810151868301820152016117f2565b81811115611820576000602083870101525b50601f01601f19169290920160200192915050565b60208152600061074860208301846117e8565b60006060828403121561185a57600080fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b602081526000610745602083018486611876565b6000602082840312156118c557600080fd5b8151801515811461074857600080fd5b6040815260006118e9604083018587611876565b9050826020830152949350505050565b60006020828403121561190b57600080fd5b5051919050565b60408152600061192560408301856117e8565b90508260208301529392505050565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561196457611964611934565b500290565b600181811c9082168061197d57607f821691505b6020821081141561185a57634e487b7160e01b600052602260045260246000fd5b81358155602082013560018201556002810160408301356001600160401b0381168082146119cb57600080fd5b825467ffffffffffffffff191617909155505050565b6000828210156119f3576119f3611934565b500390565b6000600019821415611a0c57611a0c611934565b5060010190565b60008219821115611a2657611a26611934565b50019056fea26469706673582212204930b75d2602363db73fad3f24515dddc95a953940fb74b2a06757d2ef14011764736f6c634300080c003300000000000000000000000038f6001e8ac11240f903cba56aff72a1425ae371000000000000000000000000ba54ae6056f3eeff31651c5e1fdb8b3b0efb8862