diff --git a/build/contracts/EsToken.json b/build/contracts/EsToken.json new file mode 100644 index 0000000..015e639 --- /dev/null +++ b/build/contracts/EsToken.json @@ -0,0 +1,459 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "EsToken", + "sourceName": "contracts/tokens/erc20/EsToken.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "gov", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "inPrivateTransferMode", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "isHandler", + "outputs": [ + { + "internalType": "bool", + "name": "status", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "isMinter", + "outputs": [ + { + "internalType": "bool", + "name": "status", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_gov", + "type": "address" + } + ], + "name": "setGov", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_handler", + "type": "address" + }, + { + "internalType": "bool", + "name": "_isActive", + "type": "bool" + } + ], + "name": "setHandler", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_inPrivateTransferMode", + "type": "bool" + } + ], + "name": "setInPrivateTransferMode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_minter", + "type": "address" + }, + { + "internalType": "bool", + "name": "_isActive", + "type": "bool" + } + ], + "name": "setMinter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_sender", + "type": "address" + }, + { + "internalType": "address", + "name": "_recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x6080604052346200032f5762001346803803806200001d8162000334565b9283398101906040818303126200032f5780516001600160401b03908181116200032f57836200004f9184016200035a565b91602093848201518381116200032f576200006b92016200035a565b82518281116200022f576003918254916001958684811c9416801562000324575b888510146200030e578190601f94858111620002b8575b508890858311600114620002515760009262000245575b505060001982861b1c191690861b1783555b80519384116200022f5760049586548681811c9116801562000224575b828210146200020f57838111620001c4575b50809285116001146200015657509383949184926000956200014a575b50501b92600019911b1c19161790555b600580546001600160a01b03191633179055604051610f799081620003cd8239f35b01519350388062000118565b92919084601f1981168860005285600020956000905b89838310620001a957505050106200018e575b50505050811b01905562000128565b01519060f884600019921b161c19169055388080806200017f565b8587015189559097019694850194889350908101906200016c565b87600052816000208480880160051c82019284891062000205575b0160051c019087905b828110620001f8575050620000fb565b60008155018790620001e8565b92508192620001df565b602288634e487b7160e01b6000525260246000fd5b90607f1690620000e9565b634e487b7160e01b600052604160045260246000fd5b015190503880620000ba565b90889350601f19831691876000528a6000209260005b8c828210620002a1575050841162000288575b505050811b018355620000cc565b015160001983881b60f8161c191690553880806200027a565b8385015186558c9790950194938401930162000267565b90915085600052886000208580850160051c8201928b861062000304575b918a91869594930160051c01915b828110620002f4575050620000a3565b600081558594508a9101620002e4565b92508192620002d6565b634e487b7160e01b600052602260045260246000fd5b93607f16936200008c565b600080fd5b6040519190601f01601f191682016001600160401b038111838210176200022f57604052565b919080601f840112156200032f5782516001600160401b0381116200022f5760209062000390601f8201601f1916830162000334565b928184528282870101116200032f5760005b818110620003b857508260009394955001015290565b8581018301518482018401528201620003a256fe608060408181526004918236101561001657600080fd5b600092833560e01c91826306fdde031461099857508163095ea7b31461096e57816312d43a511461094557816318160ddd1461092657816323b872dd146108eb578163313ce567146108cf578163395093511461087f57816340c10f191461072857816346ea87af146106ea5781635a47a1a71461069857816370a082311461066157816395d89b41146105425781639cb7de4b146104e55781639dc29fac1461033f578163a457c2d71461029a57508063a9059cbb1461026a578063aa271e1a1461022d578063cf456ae7146101ce578063cfad57a21461017d578063dd62ed3e146101355763dfbaefb11461010c57600080fd5b3461013157816003193601126101315760209060ff60055460a01c1690519015158152f35b5080fd5b503461013157806003193601126101315780602092610152610ab9565b61015a610ad4565b6001600160a01b0391821683526001865283832091168252845220549051908152f35b82346101cb5760203660031901126101cb57610197610ab9565b600554906001600160a01b03906101b13383851614610e01565b16906bffffffffffffffffffffffff60a01b161760055580f35b80fd5b503461013157806003193601126101315761022a906101eb610ab9565b906101f4610aea565b60055490926001600160a01b039161020f9083163314610e01565b168452600660205283209060ff801983541691151516179055565b80f35b50346101315760203660031901126101315760209160ff9082906001600160a01b03610257610ab9565b1681526006855220541690519015158152f35b5034610131578060031936011261013157602090610293610289610ab9565b6024359033610b1c565b5160018152f35b905082346101cb57826003193601126101cb576102b5610ab9565b918360243592338152600160205281812060018060a01b03861682526020522054908282106102ee576020856102938585038733610cff565b608490602086519162461bcd60e51b8352820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152fd5b8391503461013157826003193601126101315761035a610ab9565b6024353384526020916006835261037660ff8787205416610e45565b6001600160a01b03169283156104985760ff60055460a01c16610437575b83855284835285852054908282106103e95750908495817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef94938688528785520381872055816002540360025551908152a380f35b865162461bcd60e51b8152908101849052602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608490fd5b3385526007835260ff868620541661039457855162461bcd60e51b8152908101839052602360248201527f4573546f6b656e3a206d73672e73656e646572206e6f742077686974656c69736044820152621d195960ea1b6064820152608490fd5b855162461bcd60e51b8152908101839052602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608490fd5b50503461013157806003193601126101315761022a90610503610ab9565b9061050c610aea565b60055490926001600160a01b03916105279083163314610e01565b168452600760205283209060ff801983541691151516179055565b838334610131578160031936011261013157805190828454600181811c90808316928315610657575b60209384841081146106445783885290811561062857506001146105d3575b505050829003601f01601f191682019267ffffffffffffffff8411838510176105c057508291826105bc925282610a70565b0390f35b634e487b7160e01b815260418552602490fd5b8787529192508591837f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b838510610614575050505083010185808061058a565b8054888601830152930192849082016105fe565b60ff1916878501525050151560051b840101905085808061058a565b634e487b7160e01b895260228a52602489fd5b91607f169161056b565b5050346101315760203660031901126101315760209181906001600160a01b03610689610ab9565b16815280845220549051908152f35b839034610131576020366003190112610131573580151580910361013157600554906106ce336001600160a01b03841614610e01565b60ff60a01b1990911660a09190911b60ff60a01b161760055580f35b5050346101315760203660031901126101315760209160ff9082906001600160a01b03610715610ab9565b1681526007855220541690519015158152f35b90503461087b578160031936011261087b57610742610ab9565b6024353385526020916006835261075e60ff8688205416610e45565b6001600160a01b0316938415610839579085929160ff60055460a01c166107ca575b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9394506107b082600254610af9565b60025585855284835280852082815401905551908152a380f35b91939092503386526007845260ff8287205416156107ec575084918391610780565b83608492519162461bcd60e51b8352820152602360248201527f4573546f6b656e3a206d73672e73656e646572206e6f742077686974656c69736044820152621d195960ea1b6064820152fd5b5162461bcd60e51b8152808401839052601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606490fd5b8280fd5b5050346101315780600319360112610131576102936020926108c86108a2610ab9565b338352600186528483206001600160a01b03821684528652918490205460243590610af9565b9033610cff565b5050346101315781600319360112610131576020905160128152f35b5050346101315760603660031901126101315760209061091d61090c610ab9565b610914610ad4565b60443591610e86565b90519015158152f35b5050346101315781600319360112610131576020906002549051908152f35b50503461013157816003193601126101315760055490516001600160a01b039091168152602090f35b50503461013157806003193601126101315760209061029361098e610ab9565b6024359033610cff565b8490843461087b578260031936011261087b5782600354600181811c90808316928315610a66575b6020938484108114610644578388529081156106285750600114610a1057505050829003601f01601f191682019267ffffffffffffffff8411838510176105c057508291826105bc925282610a70565b600387529192508591837fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b838510610a52575050505083010185808061058a565b805488860183015293019284908201610a3c565b91607f16916109c0565b6020808252825181830181905290939260005b828110610aa557505060409293506000838284010152601f8019910116010190565b818101860151848201604001528501610a83565b600435906001600160a01b0382168203610acf57565b600080fd5b602435906001600160a01b0382168203610acf57565b602435908115158203610acf57565b91908201809211610b0657565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03908116918215610cac5716918215610c5b5760ff60055460a01c16610bf4575b600082815280602052604081205491808310610ba057604082827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef958760209652828652038282205586815220818154019055604051908152a3565b60405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608490fd5b33600052600760205260ff60406000205416610b445760405162461bcd60e51b815260206004820152602360248201527f4573546f6b656e3a206d73672e73656e646572206e6f742077686974656c69736044820152621d195960ea1b6064820152608490fd5b60405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608490fd5b60405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608490fd5b6001600160a01b03908116918215610db05716918215610d605760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260018252604060002085600052825280604060002055604051908152a3565b60405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608490fd5b60405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b15610e0857565b60405162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b6044820152606490fd5b15610e4c57565b60405162461bcd60e51b815260206004820152601260248201527122b9aa37b5b2b71d103337b93134b23232b760711b6044820152606490fd5b91906000338152600760205260ff604082205416610f39576001600160a01b03841681526001602081815260408084203385529091529091205493908401610ed8575b610ed39350610b1c565b600190565b828410610ef457610eef83610ed395033383610cff565b610ec9565b60405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606490fd5b50610ed392610b1c56fea264697066735822122039c60ab226638efd7dfd7f4a981d06ee73b69ed60c23a236674a452c7782b33a64736f6c63430008130033", + "deployedBytecode": "0x608060408181526004918236101561001657600080fd5b600092833560e01c91826306fdde031461099857508163095ea7b31461096e57816312d43a511461094557816318160ddd1461092657816323b872dd146108eb578163313ce567146108cf578163395093511461087f57816340c10f191461072857816346ea87af146106ea5781635a47a1a71461069857816370a082311461066157816395d89b41146105425781639cb7de4b146104e55781639dc29fac1461033f578163a457c2d71461029a57508063a9059cbb1461026a578063aa271e1a1461022d578063cf456ae7146101ce578063cfad57a21461017d578063dd62ed3e146101355763dfbaefb11461010c57600080fd5b3461013157816003193601126101315760209060ff60055460a01c1690519015158152f35b5080fd5b503461013157806003193601126101315780602092610152610ab9565b61015a610ad4565b6001600160a01b0391821683526001865283832091168252845220549051908152f35b82346101cb5760203660031901126101cb57610197610ab9565b600554906001600160a01b03906101b13383851614610e01565b16906bffffffffffffffffffffffff60a01b161760055580f35b80fd5b503461013157806003193601126101315761022a906101eb610ab9565b906101f4610aea565b60055490926001600160a01b039161020f9083163314610e01565b168452600660205283209060ff801983541691151516179055565b80f35b50346101315760203660031901126101315760209160ff9082906001600160a01b03610257610ab9565b1681526006855220541690519015158152f35b5034610131578060031936011261013157602090610293610289610ab9565b6024359033610b1c565b5160018152f35b905082346101cb57826003193601126101cb576102b5610ab9565b918360243592338152600160205281812060018060a01b03861682526020522054908282106102ee576020856102938585038733610cff565b608490602086519162461bcd60e51b8352820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152fd5b8391503461013157826003193601126101315761035a610ab9565b6024353384526020916006835261037660ff8787205416610e45565b6001600160a01b03169283156104985760ff60055460a01c16610437575b83855284835285852054908282106103e95750908495817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef94938688528785520381872055816002540360025551908152a380f35b865162461bcd60e51b8152908101849052602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608490fd5b3385526007835260ff868620541661039457855162461bcd60e51b8152908101839052602360248201527f4573546f6b656e3a206d73672e73656e646572206e6f742077686974656c69736044820152621d195960ea1b6064820152608490fd5b855162461bcd60e51b8152908101839052602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608490fd5b50503461013157806003193601126101315761022a90610503610ab9565b9061050c610aea565b60055490926001600160a01b03916105279083163314610e01565b168452600760205283209060ff801983541691151516179055565b838334610131578160031936011261013157805190828454600181811c90808316928315610657575b60209384841081146106445783885290811561062857506001146105d3575b505050829003601f01601f191682019267ffffffffffffffff8411838510176105c057508291826105bc925282610a70565b0390f35b634e487b7160e01b815260418552602490fd5b8787529192508591837f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b838510610614575050505083010185808061058a565b8054888601830152930192849082016105fe565b60ff1916878501525050151560051b840101905085808061058a565b634e487b7160e01b895260228a52602489fd5b91607f169161056b565b5050346101315760203660031901126101315760209181906001600160a01b03610689610ab9565b16815280845220549051908152f35b839034610131576020366003190112610131573580151580910361013157600554906106ce336001600160a01b03841614610e01565b60ff60a01b1990911660a09190911b60ff60a01b161760055580f35b5050346101315760203660031901126101315760209160ff9082906001600160a01b03610715610ab9565b1681526007855220541690519015158152f35b90503461087b578160031936011261087b57610742610ab9565b6024353385526020916006835261075e60ff8688205416610e45565b6001600160a01b0316938415610839579085929160ff60055460a01c166107ca575b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9394506107b082600254610af9565b60025585855284835280852082815401905551908152a380f35b91939092503386526007845260ff8287205416156107ec575084918391610780565b83608492519162461bcd60e51b8352820152602360248201527f4573546f6b656e3a206d73672e73656e646572206e6f742077686974656c69736044820152621d195960ea1b6064820152fd5b5162461bcd60e51b8152808401839052601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606490fd5b8280fd5b5050346101315780600319360112610131576102936020926108c86108a2610ab9565b338352600186528483206001600160a01b03821684528652918490205460243590610af9565b9033610cff565b5050346101315781600319360112610131576020905160128152f35b5050346101315760603660031901126101315760209061091d61090c610ab9565b610914610ad4565b60443591610e86565b90519015158152f35b5050346101315781600319360112610131576020906002549051908152f35b50503461013157816003193601126101315760055490516001600160a01b039091168152602090f35b50503461013157806003193601126101315760209061029361098e610ab9565b6024359033610cff565b8490843461087b578260031936011261087b5782600354600181811c90808316928315610a66575b6020938484108114610644578388529081156106285750600114610a1057505050829003601f01601f191682019267ffffffffffffffff8411838510176105c057508291826105bc925282610a70565b600387529192508591837fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b838510610a52575050505083010185808061058a565b805488860183015293019284908201610a3c565b91607f16916109c0565b6020808252825181830181905290939260005b828110610aa557505060409293506000838284010152601f8019910116010190565b818101860151848201604001528501610a83565b600435906001600160a01b0382168203610acf57565b600080fd5b602435906001600160a01b0382168203610acf57565b602435908115158203610acf57565b91908201809211610b0657565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03908116918215610cac5716918215610c5b5760ff60055460a01c16610bf4575b600082815280602052604081205491808310610ba057604082827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef958760209652828652038282205586815220818154019055604051908152a3565b60405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608490fd5b33600052600760205260ff60406000205416610b445760405162461bcd60e51b815260206004820152602360248201527f4573546f6b656e3a206d73672e73656e646572206e6f742077686974656c69736044820152621d195960ea1b6064820152608490fd5b60405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608490fd5b60405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608490fd5b6001600160a01b03908116918215610db05716918215610d605760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260018252604060002085600052825280604060002055604051908152a3565b60405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608490fd5b60405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b15610e0857565b60405162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b6044820152606490fd5b15610e4c57565b60405162461bcd60e51b815260206004820152601260248201527122b9aa37b5b2b71d103337b93134b23232b760711b6044820152606490fd5b91906000338152600760205260ff604082205416610f39576001600160a01b03841681526001602081815260408084203385529091529091205493908401610ed8575b610ed39350610b1c565b600190565b828410610ef457610eef83610ed395033383610cff565b610ec9565b60405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606490fd5b50610ed392610b1c56fea264697066735822122039c60ab226638efd7dfd7f4a981d06ee73b69ed60c23a236674a452c7782b33a64736f6c63430008130033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/build/contracts/RewardDistributor.json b/build/contracts/RewardDistributor.json new file mode 100644 index 0000000..14d57f0 --- /dev/null +++ b/build/contracts/RewardDistributor.json @@ -0,0 +1,237 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "RewardDistributor", + "sourceName": "contracts/staking/RewardDistributor.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_rewardTracker", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Distribute", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokensPerIntervalChange", + "type": "event" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_decimals", + "type": "uint256" + } + ], + "name": "distribute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "gov", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastDistributionTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingRewards", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardTracker", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_admin", + "type": "address" + } + ], + "name": "setAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_gov", + "type": "address" + } + ], + "name": "setGov", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "setTokensPerInterval", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "tokensPerInterval", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "updateLastDistributionTime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x6080346100a157601f610a7638819003918201601f19168301916001600160401b038311848410176100a65780849260409485528339810103126100a157610052602061004b836100bc565b92016100bc565b90600160005560018060a01b0319913383600154161760015560018060a01b0380921683600254161760025516816005541617600555339060065416176006556040516109a590816100d18239f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b03821682036100a15756fe6040608081526004908136101561001557600080fd5b600091823560e01c90816301e33667146103d557816312d43a51146103ac57816318e20a03146102825781633ae6d6eb146102555781636bcb411a1461022c578163704b6c02146101dc57816375b17350146101ba5781637625391a1461019757508063a8d9362714610179578063cfad57a214610128578063eded3fda14610105578063f7c618c1146100dd5763f851a440146100b257600080fd5b346100d957816003193601126100d95760065490516001600160a01b039091168152602090f35b5080fd5b50346100d957816003193601126100d95760025490516001600160a01b039091168152602090f35b50346100d957816003193601126100d95760209061012161078c565b9051908152f35b823461017657602036600319011261017657610142610428565b600154906001600160a01b039061015c3383851614610443565b16906bffffffffffffffffffffffff60a01b161760015580f35b80fd5b50346100d957816003193601126100d9576020906003549051908152f35b8284346101765781600319360112610176575061012160209260243590356107b4565b9050346101d857826003193601126101d85760209250549051908152f35b8280fd5b8334610176576020366003190112610176576101f6610428565b6001546001600160a01b0391906102109083163314610443565b166bffffffffffffffffffffffff60a01b600654161760065580f35b5050346100d957816003193601126100d95760055490516001600160a01b039091168152602090f35b8390346100d957816003193601126100d95761027c60018060a01b03600654163314610717565b42905580f35b919050346101d85760203660031901126101d85781359160018060a01b036102af81600654163314610717565b8154156103515790849160055416803b156101d857829082855180958193630f8562c360e21b83525af1801561034757610316575b847f98dc76c39aa5a5dcb749f8750a65db3dfa1e14bcc1591a9c16a7420e5da748f8602086868160035551908152a180f35b67ffffffffffffffff829593951161033457508352918160206102e4565b634e487b7160e01b835260419052602482fd5b83513d87823e3d90fd5b506020608492519162461bcd60e51b8352820152602f60248201527f5265776172644469737472696275746f723a20696e76616c6964206c6173744460448201526e6973747269627574696f6e54696d6560881b6064820152fd5b5050346100d957816003193601126100d95760015490516001600160a01b039091168152602090f35b8334610176576060366003190112610176576103ef610428565b6001600160a01b03906024358281168103610424578261041761042194600154163314610443565b60443592166104bf565b80f35b8380fd5b600435906001600160a01b038216820361043e57565b600080fd5b1561044a57565b60405162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b6044820152606490fd5b90601f8019910116810190811067ffffffffffffffff8211176104a957604052565b634e487b7160e01b600052604160045260246000fd5b60405163a9059cbb60e01b60208083019182526001600160a01b03948516602484015260448084019690965294825292608082019267ffffffffffffffff929190838511838610176104a957169060c08101848110848211176104a9576040528584527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656460a0820152600080958192519082855af1903d15610638573d928311610624579061058e9392916040519261058188601f19601f8401160185610487565b83523d868885013e610643565b805191821591848315610600575b5050509050156105a95750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b9193818094500103126100d95782015190811515820361017657508038808461059c565b634e487b7160e01b85526041600452602485fd5b9061058e9392506060915b919290156106a55750815115610657575090565b3b156106605790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156106b85750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b8285106106fe575050604492506000838284010152601f80199101168101030190fd5b84810182015186860160440152938101938593506106db565b1561071e57565b60405162461bcd60e51b815260206004820152601c60248201527f5265776172644469737472696275746f723a20666f7262696464656e000000006044820152606490fd5b8181029291811591840414171561077657565b634e487b7160e01b600052601160045260246000fd5b6004548042146107ae574203428111610776576107ab90600354610763565b90565b50600090565b60055490916001600160a01b03918216330361091c576107d261078c565b928315610913576107e7904260045584610763565b90604d811161077657600a0a9081156108fd5704906002541690604051916370a0823160e01b83523060048401526020928381602481855afa9081156108f1576000916108c4575b50821161086f5790610865817f4def474aca53bf221d07d9ab0f675b3f6d8d2494b8427271bcf43c018ef1eead949333906104bf565b604051908152a190565b60405162461bcd60e51b815260048101849052602760248201527f5265776172644469737472696275746f723a20696e73756666696369656e742060448201526662616c616e636560c81b6064820152608490fd5b908482813d83116108ea575b6108da8183610487565b810103126101765750513861082f565b503d6108d0565b6040513d6000823e3d90fd5b634e487b7160e01b600052601260045260246000fd5b50505050600090565b60405162461bcd60e51b815260206004820152602560248201527f5265776172644469737472696275746f723a20696e76616c6964206d73672e7360448201526432b73232b960d91b6064820152608490fdfea2646970667358221220143b643604569f6cbd8674d3264e614faea1394a6bb4ae34c7b1c41f479ac78364736f6c63430008130033", + "deployedBytecode": "0x6040608081526004908136101561001557600080fd5b600091823560e01c90816301e33667146103d557816312d43a51146103ac57816318e20a03146102825781633ae6d6eb146102555781636bcb411a1461022c578163704b6c02146101dc57816375b17350146101ba5781637625391a1461019757508063a8d9362714610179578063cfad57a214610128578063eded3fda14610105578063f7c618c1146100dd5763f851a440146100b257600080fd5b346100d957816003193601126100d95760065490516001600160a01b039091168152602090f35b5080fd5b50346100d957816003193601126100d95760025490516001600160a01b039091168152602090f35b50346100d957816003193601126100d95760209061012161078c565b9051908152f35b823461017657602036600319011261017657610142610428565b600154906001600160a01b039061015c3383851614610443565b16906bffffffffffffffffffffffff60a01b161760015580f35b80fd5b50346100d957816003193601126100d9576020906003549051908152f35b8284346101765781600319360112610176575061012160209260243590356107b4565b9050346101d857826003193601126101d85760209250549051908152f35b8280fd5b8334610176576020366003190112610176576101f6610428565b6001546001600160a01b0391906102109083163314610443565b166bffffffffffffffffffffffff60a01b600654161760065580f35b5050346100d957816003193601126100d95760055490516001600160a01b039091168152602090f35b8390346100d957816003193601126100d95761027c60018060a01b03600654163314610717565b42905580f35b919050346101d85760203660031901126101d85781359160018060a01b036102af81600654163314610717565b8154156103515790849160055416803b156101d857829082855180958193630f8562c360e21b83525af1801561034757610316575b847f98dc76c39aa5a5dcb749f8750a65db3dfa1e14bcc1591a9c16a7420e5da748f8602086868160035551908152a180f35b67ffffffffffffffff829593951161033457508352918160206102e4565b634e487b7160e01b835260419052602482fd5b83513d87823e3d90fd5b506020608492519162461bcd60e51b8352820152602f60248201527f5265776172644469737472696275746f723a20696e76616c6964206c6173744460448201526e6973747269627574696f6e54696d6560881b6064820152fd5b5050346100d957816003193601126100d95760015490516001600160a01b039091168152602090f35b8334610176576060366003190112610176576103ef610428565b6001600160a01b03906024358281168103610424578261041761042194600154163314610443565b60443592166104bf565b80f35b8380fd5b600435906001600160a01b038216820361043e57565b600080fd5b1561044a57565b60405162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b6044820152606490fd5b90601f8019910116810190811067ffffffffffffffff8211176104a957604052565b634e487b7160e01b600052604160045260246000fd5b60405163a9059cbb60e01b60208083019182526001600160a01b03948516602484015260448084019690965294825292608082019267ffffffffffffffff929190838511838610176104a957169060c08101848110848211176104a9576040528584527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656460a0820152600080958192519082855af1903d15610638573d928311610624579061058e9392916040519261058188601f19601f8401160185610487565b83523d868885013e610643565b805191821591848315610600575b5050509050156105a95750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b9193818094500103126100d95782015190811515820361017657508038808461059c565b634e487b7160e01b85526041600452602485fd5b9061058e9392506060915b919290156106a55750815115610657575090565b3b156106605790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156106b85750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b8285106106fe575050604492506000838284010152601f80199101168101030190fd5b84810182015186860160440152938101938593506106db565b1561071e57565b60405162461bcd60e51b815260206004820152601c60248201527f5265776172644469737472696275746f723a20666f7262696464656e000000006044820152606490fd5b8181029291811591840414171561077657565b634e487b7160e01b600052601160045260246000fd5b6004548042146107ae574203428111610776576107ab90600354610763565b90565b50600090565b60055490916001600160a01b03918216330361091c576107d261078c565b928315610913576107e7904260045584610763565b90604d811161077657600a0a9081156108fd5704906002541690604051916370a0823160e01b83523060048401526020928381602481855afa9081156108f1576000916108c4575b50821161086f5790610865817f4def474aca53bf221d07d9ab0f675b3f6d8d2494b8427271bcf43c018ef1eead949333906104bf565b604051908152a190565b60405162461bcd60e51b815260048101849052602760248201527f5265776172644469737472696275746f723a20696e73756666696369656e742060448201526662616c616e636560c81b6064820152608490fd5b908482813d83116108ea575b6108da8183610487565b810103126101765750513861082f565b503d6108d0565b6040513d6000823e3d90fd5b634e487b7160e01b600052601260045260246000fd5b50505050600090565b60405162461bcd60e51b815260206004820152602560248201527f5265776172644469737472696275746f723a20696e76616c6964206d73672e7360448201526432b73232b960d91b6064820152608490fdfea2646970667358221220143b643604569f6cbd8674d3264e614faea1394a6bb4ae34c7b1c41f479ac78364736f6c63430008130033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/build/contracts/RewardRouter.json b/build/contracts/RewardRouter.json new file mode 100644 index 0000000..8d6a1c9 --- /dev/null +++ b/build/contracts/RewardRouter.json @@ -0,0 +1,318 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "RewardRouter", + "sourceName": "contracts/staking/RewardRouter.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_cec", + "type": "address" + }, + { + "internalType": "address", + "name": "_esCec", + "type": "address" + }, + { + "internalType": "address", + "name": "_stakedCecTracker", + "type": "address" + }, + { + "internalType": "address", + "name": "_cecVester", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "StakeCec", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "UnstakeCec", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_accounts", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "_amounts", + "type": "uint256[]" + } + ], + "name": "batchStakeCecForAccount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "cec", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cecVester", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "claim", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "claimEsCec", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "esCec", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gov", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_shouldClaimCec", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_shouldStakeCec", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_shouldClaimEsCec", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_shouldStakeEsCec", + "type": "bool" + } + ], + "name": "handleRewards", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_gov", + "type": "address" + } + ], + "name": "setGov", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "stakeCec", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "stakeCecForAccount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "stakeEsCec", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "stakedCecTracker", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "unstakeCec", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "unstakeEsCec", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x6080346100c857601f610e1538819003918201601f19168301916001600160401b038311848410176100cd578084926080946040528339810103126100c857610047816100e3565b610053602083016100e3565b9061006c6060610065604086016100e3565b94016100e3565b90600160005560018060a01b0319933385600154161760015560018060a01b03809481809416876002541617600255168560035416176003551683600454161760045516906005541617600555604051610d1d90816100f88239f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b03821682036100c85756fe6040608081526004908136101561001557600080fd5b600091823560e01c90816301e33667146106c557816305a174c11461069c57816312d43a511461067357816319ff26ae1461064a578163232efcb3146104b05781632d741940146102c2578163319489e61461028e57816334da865014610238578163362a4bb9146102595781634e71d92d1461023857816371dfbd921461020f578163b65b4973146101e3578163b6e0b05a146101ae578163becdd3291461017a57508063cfad57a21461012c5763d4ebb8b9146100d357600080fd5b34610128573660031901126101255761011e6100ed61089a565b6100f5610a5b565b6001546001600160a01b03919061010f9083163314610919565b60243591600254169033610b67565b6001815580f35b80fd5b5080fd5b82346101255760203660031901126101255761014661089a565b600154906001600160a01b03906101603383851614610919565b16906bffffffffffffffffffffffff60a01b161760015580f35b8390346101285760203660031901126101285761011e90610199610a5b565b6003549035906001600160a01b031633610c32565b8390346101285760203660031901126101285761011e906101cd610a5b565b6003549035906001600160a01b03163380610b67565b90503461020b578260031936011261020b575490516001600160a01b03909116815260209150f35b8280fd5b50503461012857816003193601126101285760025490516001600160a01b039091168152602090f35b8334610125578060031936011261012557610251610a5b565b61011e610ab1565b8390346101285760203660031901126101285761011e90610278610a5b565b6002549035906001600160a01b03163380610b67565b8390346101285760203660031901126101285761011e906102ad610a5b565b6002549035906001600160a01b031633610c32565b90503461020b57608036600319011261020b57803591821515830361049a57836024359283151584036101285760443594851515860361020b5760643594851515860361049a57610311610a5b565b839161041e575b80610415575b6103f7575b508194610368575b5050508061035f575b610341575b506001815580f35b60035461035991906001600160a01b03163380610b67565b38610339565b50801515610334565b805483516309f4173d60e11b815233928101838152602080820194909452959650939491928492839003604001918391906001600160a01b03165af19182156103ee575083916103bd575b509038838161032b565b90506020813d82116103e6575b816103d7602093836108df565b8101031261020b5751386103b3565b3d91506103ca565b513d85823e3d90fd5b60025461040f91906001600160a01b03163380610b67565b38610323565b5080151561031e565b60055485516309f4173d60e11b81523385820181815260208082019290925293945090929091839182900360400190829088906001600160a01b03165af19081156104a6578491610471575b5090610318565b90506020813d821161049e575b8161048b602093836108df565b8101031261049a57513861046a565b8380fd5b3d915061047e565b85513d86823e3d90fd5b9190503461020b578060031936011261020b57813567ffffffffffffffff9283821161064657366023830112156106465781810135916104ef83610901565b946104fc855196876108df565b8386526020918287016024809660051b83010191368311610642578601905b82821061061f57505050833590811161061b573660238201121561061b578083013561055261054982610901565b965196876108df565b808652848387019160051b83010191368311610617579697968501905b8282106106085750505050610582610a5b565b60018060a01b03926001958461059d88968754163314610919565b80600254169187985b6105b2575b8787815580f35b8051891015610603576105de826105c98b84610a31565b5116846105d68c88610a31565b519133610b67565b60001989146105f15797860197866105a6565b634e487b7160e01b8852601185528588fd5b6105ab565b8135815290830190830161056f565b8880fd5b8680fd5b81356001600160a01b038116810361063e57815290840190840161051b565b8a80fd5b8980fd5b8480fd5b50503461012857816003193601126101285760035490516001600160a01b039091168152602090f35b50503461012857816003193601126101285760015490516001600160a01b039091168152602090f35b50503461012857816003193601126101285760055490516001600160a01b039091168152602090f35b9190503461020b57606036600319011261020b576106e161089a565b6024916001600160a01b038335818116939084900361061b5761070982600154163314610919565b169181516020938482019263a9059cbb60e01b845286830152604435604483015260448252608082019267ffffffffffffffff92808510848611176108885760c08101858110858211176108765786528685527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656460a082015251899182919082855af1903d15610867573d92831161085557906107c59392918551926107b888601f19601f84011601856108df565b83523d8a8885013e61095d565b8051838115918215610831575b50509050156107df578480f35b5162461bcd60e51b815292830152602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608490fd5b8380929350010312610851578201518015158103610851578083386107d2565b8580fd5b634e487b7160e01b8952604188528689fd5b906107c593925060609161095d565b634e487b7160e01b8b5260418a52888bfd5b634e487b7160e01b8a5260418952878afd5b600435906001600160a01b03821682036108b057565b600080fd5b67ffffffffffffffff81116108c957604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff8211176108c957604052565b67ffffffffffffffff81116108c95760051b60200190565b1561092057565b60405162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b6044820152606490fd5b919290156109bf5750815115610971575090565b3b1561097a5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156109d25750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b828510610a18575050604492506000838284010152601f80199101168101030190fd5b84810182015186860160440152938101938593506109f5565b8051821015610a455760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b600260005414610a6c576002600055565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b600480546040516309f4173d60e11b8152339281018390526024810192909252602090829060449082906000906001600160a01b03165af18015610b1d57610af65750565b602090813d8111610b16575b610b0c81836108df565b810103126108b057565b503d610b02565b6040513d6000823e3d90fd5b15610b3057565b60405162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a590817d85b5bdd5b9d608a1b6044820152606490fd5b92610b73811515610b29565b6004546001600160a01b039490851690813b156108b0576084869160008094604051998a958694631e42d69b60e21b86521660048501528089166024850152891660448401528660648401525af1908115610b1d577f47d4c7c194999b93d76f7d16393f56c8c189d502fea3ff400ec5badfab608c2694610c1e92610c23575b50604080516001600160a01b0394851681529490931660208501529183019190915281906060820190565b0390a1565b610c2c906108b5565b38610bf3565b610c3d831515610b29565b6004546001600160a01b039081169390843b156108b05760009460848692604051978893849263098bf59d60e01b8452808916908160048601528a16602485015287604485015260648401525af1908115610b1d577f50c634fcff06a5b70f80b0a33a6f53cac80744ae146a235b402296908535bf5894610c1e92610c235750604080516001600160a01b039485168152949093166020850152918301919091528190606082019056fea2646970667358221220a34d5f4d5d2e4925d85c25f7d1cefba570019e7290fec5383910baef0794ec0764736f6c63430008130033", + "deployedBytecode": "0x6040608081526004908136101561001557600080fd5b600091823560e01c90816301e33667146106c557816305a174c11461069c57816312d43a511461067357816319ff26ae1461064a578163232efcb3146104b05781632d741940146102c2578163319489e61461028e57816334da865014610238578163362a4bb9146102595781634e71d92d1461023857816371dfbd921461020f578163b65b4973146101e3578163b6e0b05a146101ae578163becdd3291461017a57508063cfad57a21461012c5763d4ebb8b9146100d357600080fd5b34610128573660031901126101255761011e6100ed61089a565b6100f5610a5b565b6001546001600160a01b03919061010f9083163314610919565b60243591600254169033610b67565b6001815580f35b80fd5b5080fd5b82346101255760203660031901126101255761014661089a565b600154906001600160a01b03906101603383851614610919565b16906bffffffffffffffffffffffff60a01b161760015580f35b8390346101285760203660031901126101285761011e90610199610a5b565b6003549035906001600160a01b031633610c32565b8390346101285760203660031901126101285761011e906101cd610a5b565b6003549035906001600160a01b03163380610b67565b90503461020b578260031936011261020b575490516001600160a01b03909116815260209150f35b8280fd5b50503461012857816003193601126101285760025490516001600160a01b039091168152602090f35b8334610125578060031936011261012557610251610a5b565b61011e610ab1565b8390346101285760203660031901126101285761011e90610278610a5b565b6002549035906001600160a01b03163380610b67565b8390346101285760203660031901126101285761011e906102ad610a5b565b6002549035906001600160a01b031633610c32565b90503461020b57608036600319011261020b57803591821515830361049a57836024359283151584036101285760443594851515860361020b5760643594851515860361049a57610311610a5b565b839161041e575b80610415575b6103f7575b508194610368575b5050508061035f575b610341575b506001815580f35b60035461035991906001600160a01b03163380610b67565b38610339565b50801515610334565b805483516309f4173d60e11b815233928101838152602080820194909452959650939491928492839003604001918391906001600160a01b03165af19182156103ee575083916103bd575b509038838161032b565b90506020813d82116103e6575b816103d7602093836108df565b8101031261020b5751386103b3565b3d91506103ca565b513d85823e3d90fd5b60025461040f91906001600160a01b03163380610b67565b38610323565b5080151561031e565b60055485516309f4173d60e11b81523385820181815260208082019290925293945090929091839182900360400190829088906001600160a01b03165af19081156104a6578491610471575b5090610318565b90506020813d821161049e575b8161048b602093836108df565b8101031261049a57513861046a565b8380fd5b3d915061047e565b85513d86823e3d90fd5b9190503461020b578060031936011261020b57813567ffffffffffffffff9283821161064657366023830112156106465781810135916104ef83610901565b946104fc855196876108df565b8386526020918287016024809660051b83010191368311610642578601905b82821061061f57505050833590811161061b573660238201121561061b578083013561055261054982610901565b965196876108df565b808652848387019160051b83010191368311610617579697968501905b8282106106085750505050610582610a5b565b60018060a01b03926001958461059d88968754163314610919565b80600254169187985b6105b2575b8787815580f35b8051891015610603576105de826105c98b84610a31565b5116846105d68c88610a31565b519133610b67565b60001989146105f15797860197866105a6565b634e487b7160e01b8852601185528588fd5b6105ab565b8135815290830190830161056f565b8880fd5b8680fd5b81356001600160a01b038116810361063e57815290840190840161051b565b8a80fd5b8980fd5b8480fd5b50503461012857816003193601126101285760035490516001600160a01b039091168152602090f35b50503461012857816003193601126101285760015490516001600160a01b039091168152602090f35b50503461012857816003193601126101285760055490516001600160a01b039091168152602090f35b9190503461020b57606036600319011261020b576106e161089a565b6024916001600160a01b038335818116939084900361061b5761070982600154163314610919565b169181516020938482019263a9059cbb60e01b845286830152604435604483015260448252608082019267ffffffffffffffff92808510848611176108885760c08101858110858211176108765786528685527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656460a082015251899182919082855af1903d15610867573d92831161085557906107c59392918551926107b888601f19601f84011601856108df565b83523d8a8885013e61095d565b8051838115918215610831575b50509050156107df578480f35b5162461bcd60e51b815292830152602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608490fd5b8380929350010312610851578201518015158103610851578083386107d2565b8580fd5b634e487b7160e01b8952604188528689fd5b906107c593925060609161095d565b634e487b7160e01b8b5260418a52888bfd5b634e487b7160e01b8a5260418952878afd5b600435906001600160a01b03821682036108b057565b600080fd5b67ffffffffffffffff81116108c957604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff8211176108c957604052565b67ffffffffffffffff81116108c95760051b60200190565b1561092057565b60405162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b6044820152606490fd5b919290156109bf5750815115610971575090565b3b1561097a5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156109d25750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b828510610a18575050604492506000838284010152601f80199101168101030190fd5b84810182015186860160440152938101938593506109f5565b8051821015610a455760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b600260005414610a6c576002600055565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b600480546040516309f4173d60e11b8152339281018390526024810192909252602090829060449082906000906001600160a01b03165af18015610b1d57610af65750565b602090813d8111610b16575b610b0c81836108df565b810103126108b057565b503d610b02565b6040513d6000823e3d90fd5b15610b3057565b60405162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a590817d85b5bdd5b9d608a1b6044820152606490fd5b92610b73811515610b29565b6004546001600160a01b039490851690813b156108b0576084869160008094604051998a958694631e42d69b60e21b86521660048501528089166024850152891660448401528660648401525af1908115610b1d577f47d4c7c194999b93d76f7d16393f56c8c189d502fea3ff400ec5badfab608c2694610c1e92610c23575b50604080516001600160a01b0394851681529490931660208501529183019190915281906060820190565b0390a1565b610c2c906108b5565b38610bf3565b610c3d831515610b29565b6004546001600160a01b039081169390843b156108b05760009460848692604051978893849263098bf59d60e01b8452808916908160048601528a16602485015287604485015260648401525af1908115610b1d577f50c634fcff06a5b70f80b0a33a6f53cac80744ae146a235b402296908535bf5894610c1e92610c235750604080516001600160a01b039485168152949093166020850152918301919091528190606082019056fea2646970667358221220a34d5f4d5d2e4925d85c25f7d1cefba570019e7290fec5383910baef0794ec0764736f6c63430008130033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/build/contracts/RewardTracker.json b/build/contracts/RewardTracker.json new file mode 100644 index 0000000..614a5a8 --- /dev/null +++ b/build/contracts/RewardTracker.json @@ -0,0 +1,920 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "RewardTracker", + "sourceName": "contracts/staking/RewardTracker.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Claim", + "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": "BASIS_POINTS_DIVISOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PRECISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "internalType": "address", + "name": "_spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowances", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "averageStakedAmounts", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balances", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_receiver", + "type": "address" + } + ], + "name": "claim", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "address", + "name": "_receiver", + "type": "address" + } + ], + "name": "claimForAccount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "claimable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "claimableReward", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cumulativeRewardPerToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "cumulativeRewards", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "depositBalances", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "distributor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gov", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "inPrivateClaimingMode", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "inPrivateStakingMode", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "inPrivateTransferMode", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_depositTokens", + "type": "address[]" + }, + { + "internalType": "address", + "name": "_distributor", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "isDepositToken", + "outputs": [ + { + "internalType": "bool", + "name": "status", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "handler", + "type": "address" + } + ], + "name": "isHandler", + "outputs": [ + { + "internalType": "bool", + "name": "status", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "previousCumulatedRewardPerToken", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_depositToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "_isDepositToken", + "type": "bool" + } + ], + "name": "setDepositToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_gov", + "type": "address" + } + ], + "name": "setGov", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_handler", + "type": "address" + }, + { + "internalType": "bool", + "name": "_isActive", + "type": "bool" + } + ], + "name": "setHandler", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_inPrivateClaimingMode", + "type": "bool" + } + ], + "name": "setInPrivateClaimingMode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_inPrivateStakingMode", + "type": "bool" + } + ], + "name": "setInPrivateStakingMode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_inPrivateTransferMode", + "type": "bool" + } + ], + "name": "setInPrivateTransferMode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_depositToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "stake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_fundingAccount", + "type": "address" + }, + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "address", + "name": "_depositToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "stakeForAccount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "stakedAmounts", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tokensPerInterval", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "totalDepositSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_sender", + "type": "address" + }, + { + "internalType": "address", + "name": "_recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_depositToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "unstake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "address", + "name": "_depositToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_receiver", + "type": "address" + } + ], + "name": "unstakeForAccount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "updateRewards", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040523462000341576200266b803803806200001d8162000346565b9283398101604082820312620003415781516001600160401b03908181116200034157826200004e91850162000382565b926020928382015183811162000341576200006a920162000382565b6001600081815581546001600160a01b031916331782556004805460ff1916601217815586519096929391908581116200032e57600254938585811c9516801562000323575b8886101462000310578190601f95868111620002bc575b508890868311600114620002565784926200024a575b5050600019600383901b1c191690851b176002555b815194851162000237576003968754908582811c921680156200022c575b88831014620002195750838111620001d1575b50859285116001146200016b5793945084929190836200015f575b50501b9160001990841b1c19161790555b6040516122769081620003f58239f35b0151925038806200013e565b86815285812093958591601f198316915b88838310620001b657505050106200019d575b505050811b0190556200014f565b015160001983861b60f8161c191690553880806200018f565b8587015188559096019594850194879350908101906200017c565b8782528682208480880160051c8201928989106200020f575b0160051c019085905b8281106200020357505062000123565b838155018590620001f3565b92508192620001ea565b634e487b7160e01b835260229052602482fd5b91607f169162000110565b634e487b7160e01b815260418752602490fd5b015190503880620000dd565b600285528985208894509190601f198416865b8c828210620002a557505084116200028b575b505050811b01600255620000f2565b015160001960f88460031b161c191690553880806200027c565b8385015186558b9790950194938401930162000269565b909150600284528884208680850160051c8201928b861062000306575b918991869594930160051c01915b828110620002f7575050620000c7565b868155859450899101620002e7565b92508192620002d9565b634e487b7160e01b835260228952602483fd5b94607f1694620000b0565b634e487b7160e01b825260418852602482fd5b600080fd5b6040519190601f01601f191682016001600160401b038111838210176200036c57604052565b634e487b7160e01b600052604160045260246000fd5b919080601f84011215620003415782516001600160401b0381116200036c57602090620003b8601f8201601f1916830162000346565b92818452828287010111620003415760005b818110620003e057508260009394955001015290565b8581018301518482018401528201620003ca56fe6040608081526004908136101561001557600080fd5b600091823560e01c90816301e3366714610f3b57816306fdde0314610e7c578163095ea7b314610e52578163098bf59d14610dfe57816310c1c10314610dc6578163126082cf14610da957816312d43a5114610d8057816313e82e7a14610d3f57816318160ddd14610d205781631d30d5bc14610cd75781631e83409a14610c7657816323b872dd14610c5157816327e235e314610840578163313ce56714610c305781633792def314610bf8578163392e53cd14610bd15781633cd7f70014610b865781633e158b0c14610b65578163402914f514610b3857816344a0841114610b00578163462d0b2e1461094e57816346ea87af14610910578163552ce1dc146108d857816355b6ed5c146108ba5781635a47a1a71461087857816370a0823114610840578163790b5a6c146107e957816395d89b41146106e65781639cb7de4b14610689578163a318021714610651578163a8d93627146105c2578163a9059cbb14610591578163aaf5eb6814610569578163adc9772e1461052a578163b89e45b3146104ec578163bfe10928146104c3578163c2a672e01461045c57508063c5fa273014610436578063cfad57a2146103e5578063dd62ed3e1461039d578063dfbaefb11461037a578063e44b75581461031b578063e9503425146102e4578063f5d9d63e1461029c578063f5fc50761461027e578063f76033d3146102585763f7c618c11461022857600080fd5b346102545781600319360112610254576020906102436115f8565b90516001600160a01b039091168152f35b5080fd5b503461025457816003193601126102545760209060ff60125460101c1690519015158152f35b5034610254578160031936011261025457602090600c549051908152f35b5034610254578060031936011261025457806020926102b9610f6e565b6102c1610f89565b6001600160a01b039182168352600a865283832091168252845220549051908152f35b50346102545760203660031901126102545760209181906001600160a01b0361030b610f6e565b168152600e845220549051908152f35b503461025457806003193601126102545761037790610338610f6e565b90610341611064565b60015490926001600160a01b039161035c9083163314611073565b168452600960205283209060ff801983541691151516179055565b80f35b503461025457816003193601126102545760209060ff6012541690519015158152f35b5034610254578060031936011261025457806020926103ba610f6e565b6103c2610f89565b6001600160a01b0391821683526007865283832091168252845220549051908152f35b8234610433576020366003190112610433576103ff610f6e565b600154906001600160a01b03906104193383851614611073565b16906bffffffffffffffffffffffff60a01b161760015580f35b80fd5b503461025457816003193601126102545760209060ff60125460081c1690519015158152f35b9050346104bf57816003193601126104bf57610476610f6e565b9161047f61131d565b60ff60125460081c166104a2578361049b336024358682611c91565b6001815580f35b5162461bcd60e51b8152915081906104bb9082016112db565b0390fd5b8280fd5b50503461025457816003193601126102545760085490516001600160a01b039091168152602090f35b5050346102545760203660031901126102545760209160ff9082906001600160a01b03610517610f6e565b1681526009855220541690519015158152f35b9050346104bf57816003193601126104bf57610544610f6e565b9161054d61131d565b60ff60125460081c166104a2578361049b602435853380611ada565b505034610254578160031936011261025457602090516c0c9f2c9cd04674edea400000008152f35b5050346102545780600319360112610254576020906105bb6105b1610f6e565b6024359033611704565b5160018152f35b919050346104bf57826003193601126104bf57600854815163a8d9362760e01b81529260209184919082906001600160a01b03165afa918215610647578392610610575b6020838351908152f35b9091506020813d821161063f575b8161062b60209383610fd4565b810103126104bf5760209250519038610606565b3d915061061e565b81513d85823e3d90fd5b5050346102545760203660031901126102545760209181906001600160a01b03610679610f6e565b1681526011845220549051908152f35b505034610254578060031936011261025457610377906106a7610f6e565b906106b0611064565b60015490926001600160a01b03916106cb9083163314611073565b168452601360205283209060ff801983541691151516179055565b919050346104bf57826003193601126104bf57805191836003549060019082821c9282811680156107df575b60209586861082146107cc57508488529081156107aa5750600114610751575b61074d8686610743828b0383610fd4565b519182918261100c565b0390f35b929550600383527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b828410610797575050508261074d94610743928201019438610732565b805486850188015292860192810161077a565b60ff191687860152505050151560051b83010192506107438261074d38610732565b634e487b7160e01b845260229052602483fd5b93607f1693610712565b833461043357608036600319011261043357610803610f6e565b61080b610f89565b906044356001600160a01b038116810361083c5761049b9261082b61131d565b6108336119d8565b60643592611ada565b8380fd5b5050346102545760203660031901126102545760209181906001600160a01b03610868610f6e565b1681526006845220549051908152f35b833461043357602036600319011261043357610892611055565b6108a760018060a01b03600154163314611073565b60ff801960125416911515161760125580f35b505034610254578060031936011261025457806020926103ba610f6e565b5050346102545760203660031901126102545760209181906001600160a01b03610900610f6e565b168152600b845220549051908152f35b5050346102545760203660031901126102545760209160ff9082906001600160a01b0361093b610f6e565b1681526013855220541690519015158152f35b8391503461025457826003193601126102545780359267ffffffffffffffff80851161083c573660238601121561083c5784830135908111610aed5760059281841b908351966020936109a38585018a610fd4565b88528388016024809483010191368311610ae9578401905b828210610ac6575050506109cd610f89565b9360019384549860018060a01b03976109e9898c163314611073565b60ff8b60a01c16610a795760ff60a01b19909a16600160a01b1786559798899890865b610a29575b600880546001600160a01b031916898b161790558980f35b81518b1015610a74578a811b820183015189168a5260098352838a20805460ff1916881790556000198b14610a62579986019986610a0c565b634e487b7160e01b8a5260118552858afd5b610a11565b835162461bcd60e51b81528086018490526022818801527f526577617264547261636b65723a20616c726561647920696e697469616c697a604482015261195960f21b6064820152608490fd5b81356001600160a01b0381168103610ae55781529085019085016109bb565b8980fd5b8880fd5b634e487b7160e01b845260418352602484fd5b5050346102545760203660031901126102545760209181906001600160a01b03610b28610f6e565b168152600f845220549051908152f35b50503461025457602036600319011261025457602090610b5e610b59610f6e565b6114c7565b9051908152f35b8334610433578060031936011261043357610b7e61131d565b61049b611f1e565b833461043357602036600319011261043357610ba0611055565b610bb560018060a01b03600154163314611073565b62ff000060125491151560101b169062ff000019161760125580f35b50503461025457816003193601126102545760209060ff60015460a01c1690519015158152f35b5050346102545760203660031901126102545760209181906001600160a01b03610c20610f6e565b1681526010845220549051908152f35b8284346104335780600319360112610433575060ff60209254169051908152f35b50503461025457602090610c6d610c6736610f9f565b91611396565b90519015158152f35b83833461025457602036600319011261025457610c91610f6e565b92610c9a61131d565b60ff60125460101c16610cbe57506001610cb66020943361167a565b925551908152f35b905162461bcd60e51b81529081906104bb9082016112db565b833461043357602036600319011261043357610cf1611055565b610d0660018060a01b03600154163314611073565b61ff0060125491151560081b169061ff0019161760125580f35b5050346102545781600319360112610254576020906005549051908152f35b505034610254578060031936011261025457906020916001610cb6610d62610f6e565b610d6a610f89565b90610d7361131d565b610d7b6119d8565b61167a565b50503461025457816003193601126102545760015490516001600160a01b039091168152602090f35b505034610254578160031936011261025457602090516127108152f35b5050346102545760203660031901126102545760209181906001600160a01b03610dee610f6e565b168152600d845220549051908152f35b833461043357608036600319011261043357610e18610f6e565b610e20610f89565b90606435906001600160a01b038216820361083c5761049b92610e4161131d565b610e496119d8565b60443591611c91565b5050346102545780600319360112610254576020906105bb610e72610f6e565b60243590336118c5565b919050346104bf57826003193601126104bf57805191836002549060019082821c928281168015610f31575b60209586861082146107cc57508488529081156107aa5750600114610ed85761074d8686610743828b0383610fd4565b929550600283527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b828410610f1e575050508261074d94610743928201019438610732565b8054868501880152928601928101610f01565b93607f1693610ea8565b833461043357610377610f4d36610f9f565b60015490926001600160a01b0391610f689083163314611073565b166110b7565b600435906001600160a01b0382168203610f8457565b600080fd5b602435906001600160a01b0382168203610f8457565b6060906003190112610f84576001600160a01b03906004358281168103610f8457916024359081168103610f84579060443590565b90601f8019910116810190811067ffffffffffffffff821117610ff657604052565b634e487b7160e01b600052604160045260246000fd5b6020808252825181830181905290939260005b82811061104157505060409293506000838284010152601f8019910116010190565b81810186015184820160400152850161101f565b600435908115158203610f8457565b602435908115158203610f8457565b1561107a57565b60405162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b6044820152606490fd5b60405163a9059cbb60e01b60208201526001600160a01b039290921660248301526044808301939093529181526110f8916110f3606483610fd4565b6110fa565b565b60018060a01b0316906040516040810167ffffffffffffffff9082811082821117610ff6576040526020938483527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564858401526000808587829751910182855af1903d1561123f573d92831161122b57906111959392916040519261118888601f19601f8401160185610fd4565b83523d868885013e61124a565b805191821591848315611207575b5050509050156111b05750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b919381809450010312610254578201519081151582036104335750803880846111a3565b634e487b7160e01b85526041600452602485fd5b906111959392506060915b919290156112ac575081511561125e575090565b3b156112675790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156112bf5750805190602001fd5b60405162461bcd60e51b81529081906104bb906004830161100c565b60809060208152602160208201527f526577617264547261636b65723a20616374696f6e206e6f7420656e61626c656040820152601960fa1b60608201520190565b60026000541461132e576002600055565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b9190820391821161138057565b634e487b7160e01b600052601160045260246000fd5b9291906000933385526020946013865260409560ff8783205416611469576001600160a01b03831680835260078252878320338452825287832054861161140c576114079697836113fb93889361140296526007815282822090338352522054611373565b33836118c5565b611704565b600190565b875162461bcd60e51b815260048101839052603060248201527f526577617264547261636b65723a207472616e7366657220616d6f756e74206560448201526f78636565647320616c6c6f77616e636560801b6064820152608490fd5b5050611407939450611704565b8181029291811591840414171561138057565b9190820180921161138057565b60ff16604d811161138057600a0a90565b81156114b1570490565b634e487b7160e01b600052601260045260246000fd5b6001600160a01b039081166000818152600d602090815260408083205492959492939284156115e95790826004949392600854168251958680926376f69fed60e11b82525afa9384156115df5787946115ac575b506c0c9f2c9cd04674edea4000000093848102908082048614901517156115985791611588916115959798600f61155861158e9796600c54611489565b93868352600e815261157c848420549a61157660ff60045416611496565b906114a7565b96835252205490611373565b90611476565b0490611489565b90565b634e487b7160e01b88526011600452602488fd5b9093508181813d83116115d8575b6115c48183610fd4565b810103126115d45751923861151b565b8680fd5b503d6115ba565b81513d89823e3d90fd5b5093949250600e915052205490565b60085460405163f7c618c160e01b81526001600160a01b03916020908290600490829086165afa90811561166e57600091611634575b50905090565b6020813d8211611666575b8161164c60209383610fd4565b81010312610254575191821682036104335750803861162e565b3d915061163f565b6040513d6000823e3d90fd5b60009161168682612011565b6001600160a01b038281168452600e602052604084208054949055918391826116b1575b5050505090565b826116e0917f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d495610f686115f8565b604080516001600160a01b039290921682526020820192909252a1388181806116aa565b6001600160a01b0390811691821561186a57169182156118115760ff60125416611804575b600090828252602091600683526040908282822054106117a9579081857fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef959493526006845261177c8383832054611373565b8682526006855282822055868152816117988482842054611489565b9188815260068652205551908152a3565b815162461bcd60e51b815260048101859052602e60248201527f526577617264547261636b65723a207472616e7366657220616d6f756e74206560448201526d7863656564732062616c616e636560901b6064820152608490fd5b61180c6119d8565b611729565b60405162461bcd60e51b815260206004820152602b60248201527f526577617264547261636b65723a207472616e7366657220746f20746865207a60448201526a65726f206164647265737360a81b6064820152608490fd5b60405162461bcd60e51b815260206004820152602d60248201527f526577617264547261636b65723a207472616e736665722066726f6d2074686560448201526c207a65726f206164647265737360981b6064820152608490fd5b6001600160a01b0390811691821561197e57169182156119265760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260078252604060002085600052825280604060002055604051908152a3565b60405162461bcd60e51b815260206004820152602a60248201527f526577617264547261636b65723a20617070726f766520746f20746865207a65604482015269726f206164647265737360b01b6064820152608490fd5b60405162461bcd60e51b815260206004820152602c60248201527f526577617264547261636b65723a20617070726f76652066726f6d207468652060448201526b7a65726f206164647265737360a01b6064820152608490fd5b33600052601360205260ff60406000205416156119f157565b60405162461bcd60e51b815260206004820152601860248201527f526577617264547261636b65723a20666f7262696464656e00000000000000006044820152606490fd5b15611a3d57565b60405162461bcd60e51b815260206004820152601e60248201527f526577617264547261636b65723a20696e76616c6964205f616d6f756e7400006044820152606490fd5b15611a8957565b60405162461bcd60e51b8152602060048201526024808201527f526577617264547261636b65723a20696e76616c6964205f6465706f7369745460448201526337b5b2b760e11b6064820152608490fd5b92611ae6811515611a36565b60018060a01b038093169360009385855260209360098552604092611b1060ff8589205416611a82565b83516323b872dd60e01b8782015290831660248201523060448201526064808201869052815260a0810167ffffffffffffffff811182821017611c7d578452611b5990886110fa565b611b6281612011565b1694858552600d8452611b788383872054611489565b868652600d855282862055600a84528185208186528452611b9c8383872054611489565b868652600a8552828620828752855282862055600b8452611bc08383872054611489565b908552600b8452818520558415611c2a57907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9291611c0182600554611489565b60055585855260068352611c188282872054611489565b868652600684528186205551908152a3565b5162461bcd60e51b815260048101839052602760248201527f526577617264547261636b65723a206d696e7420746f20746865207a65726f206044820152666164647265737360c81b6064820152608490fd5b634e487b7160e01b88526041600452602488fd5b939290611c9f831515611a36565b60018060a01b038091169060009082825260209060098252604097611cc960ff8a86205416611a82565b611cd281612011565b1690818352600d815287832054868110611ec65786611cf091611373565b828452600d825288842055600a8152878320848452815287832054868110611e6c5786611d1c91611373565b828452600a8252888420858552825288842055600b8152611d408689852054611373565b848452600b8252888420558115611e175781835260068152858884205410611dc1577fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906110f8979883855260068252611d9d8882872054611373565b8486526006835281862055611db4886005546114a7565b60055551878152a36110b7565b60849088519062461bcd60e51b82526004820152602a60248201527f526577617264547261636b65723a206275726e20616d6f756e7420657863656560448201526964732062616c616e636560b01b6064820152fd5b60849088519062461bcd60e51b82526004820152602960248201527f526577617264547261636b65723a206275726e2066726f6d20746865207a65726044820152686f206164647265737360b81b6064820152fd5b885162461bcd60e51b815260048101839052602d60248201527f526577617264547261636b65723a205f616d6f756e742065786365656473206460448201526c65706f73697442616c616e636560981b6064820152608490fd5b885162461bcd60e51b815260048101839052602b60248201527f526577617264547261636b65723a205f616d6f756e742065786365656473207360448201526a1d185ad959105b5bdd5b9d60aa1b6064820152608490fd5b60055460018060a01b036008541660ff6004541660405190633b129c8d60e11b82528360048301526024820152602081604481600080965af1908115612006578291611fd5575b50600c5492151580611fcc575b611f80575b5050156110f857565b9092916c0c9f2c9cd04674edea4000000091828102928184041490151715611fb857611fad929350611489565b80600c553880611f77565b634e487b7160e01b84526011600452602484fd5b50801515611f72565b90506020813d8211611ffe575b81611fef60209383610fd4565b81010312610254575138611f65565b3d9150611fe2565b6040513d84823e3d90fd5b6005549060018060a01b0380600854169060ff6004541690604093845192633b129c8d60e11b845286600485015260248401526020928381604481600080995af1908115612236578591612205575b50600c54961515806121fc575b6121b2575b5085156121aa571680612087575b5050505050565b808352600d8252838320546c0c9f2c9cd04674edea400000006120ce6120ba6120b460ff60045416611496565b846114a7565b848752600f8652611588888820548a611373565b0495828552600e84526120e48787872054611489565b90838652600e85528187872055600f85528686205515158061219a575b61210c575b50612080565b6010835285858520549061211f91611489565b8096838652601185528187872054601087528888205461213e91611476565b90612148916114a7565b9260045460ff1661215890611496565b612161916114a7565b9061216b91611476565b90612175916114a7565b61217e91611489565b9083526011825283832055601090522055388080808080612106565b50600d8352848420541515612101565b505050505050565b90956c0c9f2c9cd04674edea40000000918281029281840414901517156121e857906121dd91611489565b9485600c5538612072565b634e487b7160e01b85526011600452602485fd5b5080151561206d565b90508381813d831161222f575b61221c8183610fd4565b8101031261222b575138612060565b8480fd5b503d612212565b86513d87823e3d90fdfea2646970667358221220b89c61b0bfd5aac629961bea40c03f673fd85581c5fe23d628bee803cc1ce5ec64736f6c63430008130033", + "deployedBytecode": "0x6040608081526004908136101561001557600080fd5b600091823560e01c90816301e3366714610f3b57816306fdde0314610e7c578163095ea7b314610e52578163098bf59d14610dfe57816310c1c10314610dc6578163126082cf14610da957816312d43a5114610d8057816313e82e7a14610d3f57816318160ddd14610d205781631d30d5bc14610cd75781631e83409a14610c7657816323b872dd14610c5157816327e235e314610840578163313ce56714610c305781633792def314610bf8578163392e53cd14610bd15781633cd7f70014610b865781633e158b0c14610b65578163402914f514610b3857816344a0841114610b00578163462d0b2e1461094e57816346ea87af14610910578163552ce1dc146108d857816355b6ed5c146108ba5781635a47a1a71461087857816370a0823114610840578163790b5a6c146107e957816395d89b41146106e65781639cb7de4b14610689578163a318021714610651578163a8d93627146105c2578163a9059cbb14610591578163aaf5eb6814610569578163adc9772e1461052a578163b89e45b3146104ec578163bfe10928146104c3578163c2a672e01461045c57508063c5fa273014610436578063cfad57a2146103e5578063dd62ed3e1461039d578063dfbaefb11461037a578063e44b75581461031b578063e9503425146102e4578063f5d9d63e1461029c578063f5fc50761461027e578063f76033d3146102585763f7c618c11461022857600080fd5b346102545781600319360112610254576020906102436115f8565b90516001600160a01b039091168152f35b5080fd5b503461025457816003193601126102545760209060ff60125460101c1690519015158152f35b5034610254578160031936011261025457602090600c549051908152f35b5034610254578060031936011261025457806020926102b9610f6e565b6102c1610f89565b6001600160a01b039182168352600a865283832091168252845220549051908152f35b50346102545760203660031901126102545760209181906001600160a01b0361030b610f6e565b168152600e845220549051908152f35b503461025457806003193601126102545761037790610338610f6e565b90610341611064565b60015490926001600160a01b039161035c9083163314611073565b168452600960205283209060ff801983541691151516179055565b80f35b503461025457816003193601126102545760209060ff6012541690519015158152f35b5034610254578060031936011261025457806020926103ba610f6e565b6103c2610f89565b6001600160a01b0391821683526007865283832091168252845220549051908152f35b8234610433576020366003190112610433576103ff610f6e565b600154906001600160a01b03906104193383851614611073565b16906bffffffffffffffffffffffff60a01b161760015580f35b80fd5b503461025457816003193601126102545760209060ff60125460081c1690519015158152f35b9050346104bf57816003193601126104bf57610476610f6e565b9161047f61131d565b60ff60125460081c166104a2578361049b336024358682611c91565b6001815580f35b5162461bcd60e51b8152915081906104bb9082016112db565b0390fd5b8280fd5b50503461025457816003193601126102545760085490516001600160a01b039091168152602090f35b5050346102545760203660031901126102545760209160ff9082906001600160a01b03610517610f6e565b1681526009855220541690519015158152f35b9050346104bf57816003193601126104bf57610544610f6e565b9161054d61131d565b60ff60125460081c166104a2578361049b602435853380611ada565b505034610254578160031936011261025457602090516c0c9f2c9cd04674edea400000008152f35b5050346102545780600319360112610254576020906105bb6105b1610f6e565b6024359033611704565b5160018152f35b919050346104bf57826003193601126104bf57600854815163a8d9362760e01b81529260209184919082906001600160a01b03165afa918215610647578392610610575b6020838351908152f35b9091506020813d821161063f575b8161062b60209383610fd4565b810103126104bf5760209250519038610606565b3d915061061e565b81513d85823e3d90fd5b5050346102545760203660031901126102545760209181906001600160a01b03610679610f6e565b1681526011845220549051908152f35b505034610254578060031936011261025457610377906106a7610f6e565b906106b0611064565b60015490926001600160a01b03916106cb9083163314611073565b168452601360205283209060ff801983541691151516179055565b919050346104bf57826003193601126104bf57805191836003549060019082821c9282811680156107df575b60209586861082146107cc57508488529081156107aa5750600114610751575b61074d8686610743828b0383610fd4565b519182918261100c565b0390f35b929550600383527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b828410610797575050508261074d94610743928201019438610732565b805486850188015292860192810161077a565b60ff191687860152505050151560051b83010192506107438261074d38610732565b634e487b7160e01b845260229052602483fd5b93607f1693610712565b833461043357608036600319011261043357610803610f6e565b61080b610f89565b906044356001600160a01b038116810361083c5761049b9261082b61131d565b6108336119d8565b60643592611ada565b8380fd5b5050346102545760203660031901126102545760209181906001600160a01b03610868610f6e565b1681526006845220549051908152f35b833461043357602036600319011261043357610892611055565b6108a760018060a01b03600154163314611073565b60ff801960125416911515161760125580f35b505034610254578060031936011261025457806020926103ba610f6e565b5050346102545760203660031901126102545760209181906001600160a01b03610900610f6e565b168152600b845220549051908152f35b5050346102545760203660031901126102545760209160ff9082906001600160a01b0361093b610f6e565b1681526013855220541690519015158152f35b8391503461025457826003193601126102545780359267ffffffffffffffff80851161083c573660238601121561083c5784830135908111610aed5760059281841b908351966020936109a38585018a610fd4565b88528388016024809483010191368311610ae9578401905b828210610ac6575050506109cd610f89565b9360019384549860018060a01b03976109e9898c163314611073565b60ff8b60a01c16610a795760ff60a01b19909a16600160a01b1786559798899890865b610a29575b600880546001600160a01b031916898b161790558980f35b81518b1015610a74578a811b820183015189168a5260098352838a20805460ff1916881790556000198b14610a62579986019986610a0c565b634e487b7160e01b8a5260118552858afd5b610a11565b835162461bcd60e51b81528086018490526022818801527f526577617264547261636b65723a20616c726561647920696e697469616c697a604482015261195960f21b6064820152608490fd5b81356001600160a01b0381168103610ae55781529085019085016109bb565b8980fd5b8880fd5b634e487b7160e01b845260418352602484fd5b5050346102545760203660031901126102545760209181906001600160a01b03610b28610f6e565b168152600f845220549051908152f35b50503461025457602036600319011261025457602090610b5e610b59610f6e565b6114c7565b9051908152f35b8334610433578060031936011261043357610b7e61131d565b61049b611f1e565b833461043357602036600319011261043357610ba0611055565b610bb560018060a01b03600154163314611073565b62ff000060125491151560101b169062ff000019161760125580f35b50503461025457816003193601126102545760209060ff60015460a01c1690519015158152f35b5050346102545760203660031901126102545760209181906001600160a01b03610c20610f6e565b1681526010845220549051908152f35b8284346104335780600319360112610433575060ff60209254169051908152f35b50503461025457602090610c6d610c6736610f9f565b91611396565b90519015158152f35b83833461025457602036600319011261025457610c91610f6e565b92610c9a61131d565b60ff60125460101c16610cbe57506001610cb66020943361167a565b925551908152f35b905162461bcd60e51b81529081906104bb9082016112db565b833461043357602036600319011261043357610cf1611055565b610d0660018060a01b03600154163314611073565b61ff0060125491151560081b169061ff0019161760125580f35b5050346102545781600319360112610254576020906005549051908152f35b505034610254578060031936011261025457906020916001610cb6610d62610f6e565b610d6a610f89565b90610d7361131d565b610d7b6119d8565b61167a565b50503461025457816003193601126102545760015490516001600160a01b039091168152602090f35b505034610254578160031936011261025457602090516127108152f35b5050346102545760203660031901126102545760209181906001600160a01b03610dee610f6e565b168152600d845220549051908152f35b833461043357608036600319011261043357610e18610f6e565b610e20610f89565b90606435906001600160a01b038216820361083c5761049b92610e4161131d565b610e496119d8565b60443591611c91565b5050346102545780600319360112610254576020906105bb610e72610f6e565b60243590336118c5565b919050346104bf57826003193601126104bf57805191836002549060019082821c928281168015610f31575b60209586861082146107cc57508488529081156107aa5750600114610ed85761074d8686610743828b0383610fd4565b929550600283527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b828410610f1e575050508261074d94610743928201019438610732565b8054868501880152928601928101610f01565b93607f1693610ea8565b833461043357610377610f4d36610f9f565b60015490926001600160a01b0391610f689083163314611073565b166110b7565b600435906001600160a01b0382168203610f8457565b600080fd5b602435906001600160a01b0382168203610f8457565b6060906003190112610f84576001600160a01b03906004358281168103610f8457916024359081168103610f84579060443590565b90601f8019910116810190811067ffffffffffffffff821117610ff657604052565b634e487b7160e01b600052604160045260246000fd5b6020808252825181830181905290939260005b82811061104157505060409293506000838284010152601f8019910116010190565b81810186015184820160400152850161101f565b600435908115158203610f8457565b602435908115158203610f8457565b1561107a57565b60405162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b6044820152606490fd5b60405163a9059cbb60e01b60208201526001600160a01b039290921660248301526044808301939093529181526110f8916110f3606483610fd4565b6110fa565b565b60018060a01b0316906040516040810167ffffffffffffffff9082811082821117610ff6576040526020938483527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564858401526000808587829751910182855af1903d1561123f573d92831161122b57906111959392916040519261118888601f19601f8401160185610fd4565b83523d868885013e61124a565b805191821591848315611207575b5050509050156111b05750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b919381809450010312610254578201519081151582036104335750803880846111a3565b634e487b7160e01b85526041600452602485fd5b906111959392506060915b919290156112ac575081511561125e575090565b3b156112675790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156112bf5750805190602001fd5b60405162461bcd60e51b81529081906104bb906004830161100c565b60809060208152602160208201527f526577617264547261636b65723a20616374696f6e206e6f7420656e61626c656040820152601960fa1b60608201520190565b60026000541461132e576002600055565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b9190820391821161138057565b634e487b7160e01b600052601160045260246000fd5b9291906000933385526020946013865260409560ff8783205416611469576001600160a01b03831680835260078252878320338452825287832054861161140c576114079697836113fb93889361140296526007815282822090338352522054611373565b33836118c5565b611704565b600190565b875162461bcd60e51b815260048101839052603060248201527f526577617264547261636b65723a207472616e7366657220616d6f756e74206560448201526f78636565647320616c6c6f77616e636560801b6064820152608490fd5b5050611407939450611704565b8181029291811591840414171561138057565b9190820180921161138057565b60ff16604d811161138057600a0a90565b81156114b1570490565b634e487b7160e01b600052601260045260246000fd5b6001600160a01b039081166000818152600d602090815260408083205492959492939284156115e95790826004949392600854168251958680926376f69fed60e11b82525afa9384156115df5787946115ac575b506c0c9f2c9cd04674edea4000000093848102908082048614901517156115985791611588916115959798600f61155861158e9796600c54611489565b93868352600e815261157c848420549a61157660ff60045416611496565b906114a7565b96835252205490611373565b90611476565b0490611489565b90565b634e487b7160e01b88526011600452602488fd5b9093508181813d83116115d8575b6115c48183610fd4565b810103126115d45751923861151b565b8680fd5b503d6115ba565b81513d89823e3d90fd5b5093949250600e915052205490565b60085460405163f7c618c160e01b81526001600160a01b03916020908290600490829086165afa90811561166e57600091611634575b50905090565b6020813d8211611666575b8161164c60209383610fd4565b81010312610254575191821682036104335750803861162e565b3d915061163f565b6040513d6000823e3d90fd5b60009161168682612011565b6001600160a01b038281168452600e602052604084208054949055918391826116b1575b5050505090565b826116e0917f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d495610f686115f8565b604080516001600160a01b039290921682526020820192909252a1388181806116aa565b6001600160a01b0390811691821561186a57169182156118115760ff60125416611804575b600090828252602091600683526040908282822054106117a9579081857fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef959493526006845261177c8383832054611373565b8682526006855282822055868152816117988482842054611489565b9188815260068652205551908152a3565b815162461bcd60e51b815260048101859052602e60248201527f526577617264547261636b65723a207472616e7366657220616d6f756e74206560448201526d7863656564732062616c616e636560901b6064820152608490fd5b61180c6119d8565b611729565b60405162461bcd60e51b815260206004820152602b60248201527f526577617264547261636b65723a207472616e7366657220746f20746865207a60448201526a65726f206164647265737360a81b6064820152608490fd5b60405162461bcd60e51b815260206004820152602d60248201527f526577617264547261636b65723a207472616e736665722066726f6d2074686560448201526c207a65726f206164647265737360981b6064820152608490fd5b6001600160a01b0390811691821561197e57169182156119265760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260078252604060002085600052825280604060002055604051908152a3565b60405162461bcd60e51b815260206004820152602a60248201527f526577617264547261636b65723a20617070726f766520746f20746865207a65604482015269726f206164647265737360b01b6064820152608490fd5b60405162461bcd60e51b815260206004820152602c60248201527f526577617264547261636b65723a20617070726f76652066726f6d207468652060448201526b7a65726f206164647265737360a01b6064820152608490fd5b33600052601360205260ff60406000205416156119f157565b60405162461bcd60e51b815260206004820152601860248201527f526577617264547261636b65723a20666f7262696464656e00000000000000006044820152606490fd5b15611a3d57565b60405162461bcd60e51b815260206004820152601e60248201527f526577617264547261636b65723a20696e76616c6964205f616d6f756e7400006044820152606490fd5b15611a8957565b60405162461bcd60e51b8152602060048201526024808201527f526577617264547261636b65723a20696e76616c6964205f6465706f7369745460448201526337b5b2b760e11b6064820152608490fd5b92611ae6811515611a36565b60018060a01b038093169360009385855260209360098552604092611b1060ff8589205416611a82565b83516323b872dd60e01b8782015290831660248201523060448201526064808201869052815260a0810167ffffffffffffffff811182821017611c7d578452611b5990886110fa565b611b6281612011565b1694858552600d8452611b788383872054611489565b868652600d855282862055600a84528185208186528452611b9c8383872054611489565b868652600a8552828620828752855282862055600b8452611bc08383872054611489565b908552600b8452818520558415611c2a57907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9291611c0182600554611489565b60055585855260068352611c188282872054611489565b868652600684528186205551908152a3565b5162461bcd60e51b815260048101839052602760248201527f526577617264547261636b65723a206d696e7420746f20746865207a65726f206044820152666164647265737360c81b6064820152608490fd5b634e487b7160e01b88526041600452602488fd5b939290611c9f831515611a36565b60018060a01b038091169060009082825260209060098252604097611cc960ff8a86205416611a82565b611cd281612011565b1690818352600d815287832054868110611ec65786611cf091611373565b828452600d825288842055600a8152878320848452815287832054868110611e6c5786611d1c91611373565b828452600a8252888420858552825288842055600b8152611d408689852054611373565b848452600b8252888420558115611e175781835260068152858884205410611dc1577fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906110f8979883855260068252611d9d8882872054611373565b8486526006835281862055611db4886005546114a7565b60055551878152a36110b7565b60849088519062461bcd60e51b82526004820152602a60248201527f526577617264547261636b65723a206275726e20616d6f756e7420657863656560448201526964732062616c616e636560b01b6064820152fd5b60849088519062461bcd60e51b82526004820152602960248201527f526577617264547261636b65723a206275726e2066726f6d20746865207a65726044820152686f206164647265737360b81b6064820152fd5b885162461bcd60e51b815260048101839052602d60248201527f526577617264547261636b65723a205f616d6f756e742065786365656473206460448201526c65706f73697442616c616e636560981b6064820152608490fd5b885162461bcd60e51b815260048101839052602b60248201527f526577617264547261636b65723a205f616d6f756e742065786365656473207360448201526a1d185ad959105b5bdd5b9d60aa1b6064820152608490fd5b60055460018060a01b036008541660ff6004541660405190633b129c8d60e11b82528360048301526024820152602081604481600080965af1908115612006578291611fd5575b50600c5492151580611fcc575b611f80575b5050156110f857565b9092916c0c9f2c9cd04674edea4000000091828102928184041490151715611fb857611fad929350611489565b80600c553880611f77565b634e487b7160e01b84526011600452602484fd5b50801515611f72565b90506020813d8211611ffe575b81611fef60209383610fd4565b81010312610254575138611f65565b3d9150611fe2565b6040513d84823e3d90fd5b6005549060018060a01b0380600854169060ff6004541690604093845192633b129c8d60e11b845286600485015260248401526020928381604481600080995af1908115612236578591612205575b50600c54961515806121fc575b6121b2575b5085156121aa571680612087575b5050505050565b808352600d8252838320546c0c9f2c9cd04674edea400000006120ce6120ba6120b460ff60045416611496565b846114a7565b848752600f8652611588888820548a611373565b0495828552600e84526120e48787872054611489565b90838652600e85528187872055600f85528686205515158061219a575b61210c575b50612080565b6010835285858520549061211f91611489565b8096838652601185528187872054601087528888205461213e91611476565b90612148916114a7565b9260045460ff1661215890611496565b612161916114a7565b9061216b91611476565b90612175916114a7565b61217e91611489565b9083526011825283832055601090522055388080808080612106565b50600d8352848420541515612101565b505050505050565b90956c0c9f2c9cd04674edea40000000918281029281840414901517156121e857906121dd91611489565b9485600c5538612072565b634e487b7160e01b85526011600452602485fd5b5080151561206d565b90508381813d831161222f575b61221c8183610fd4565b8101031261222b575138612060565b8480fd5b503d612212565b86513d87823e3d90fdfea2646970667358221220b89c61b0bfd5aac629961bea40c03f673fd85581c5fe23d628bee803cc1ce5ec64736f6c63430008130033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/build/contracts/Vester.json b/build/contracts/Vester.json new file mode 100644 index 0000000..9cef488 --- /dev/null +++ b/build/contracts/Vester.json @@ -0,0 +1,946 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Vester", + "sourceName": "contracts/staking/Vester.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "uint256", + "name": "_vestingDuration", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_esToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_pairToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_claimableToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_rewardTracker", + "type": "address" + }, + { + "internalType": "bool", + "name": "_needCheckStake", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Claim", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Deposit", + "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": "PairTransfer", + "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" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "claimedAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balances", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "bonusRewards", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "claim", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "address", + "name": "_receiver", + "type": "address" + } + ], + "name": "claimForAccount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "claimable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "claimableToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "claimedAmounts", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "cumulativeClaimAmounts", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "cumulativeRewardDeductions", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "depositForAccount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "esToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "getCombinedAverageStakedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "getMaxVestableAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_esAmount", + "type": "uint256" + } + ], + "name": "getPairAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "getTotalVested", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "getVestedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gov", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "hasPairToken", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "hasRewardTracker", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "handler", + "type": "address" + } + ], + "name": "isHandler", + "outputs": [ + { + "internalType": "bool", + "name": "status", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "lastVestingTimes", + "outputs": [ + { + "internalType": "uint256", + "name": "time", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "needCheckStake", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "pairAmounts", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pairSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pairToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardTracker", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "setBonusRewards", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "setCumulativeRewardDeductions", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_gov", + "type": "address" + } + ], + "name": "setGov", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_handler", + "type": "address" + }, + { + "internalType": "bool", + "name": "_isActive", + "type": "bool" + } + ], + "name": "setHandler", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_rewardTracker", + "type": "address" + } + ], + "name": "setRewardTracker", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "vestingDuration", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x6080604052346200046c5762002062803803806200001d8162000471565b928339810190610100818303126200046c5780516001600160401b0381116200046c57826200004e91830162000497565b602082015190926001600160401b0382116200046c576200007191830162000497565b90604081015191620000866060830162000509565b90620000956080840162000509565b93620000a460a0850162000509565b9160e0620000b560c0870162000509565b9501519687151588036200046c576001600081905580546001600160a01b031916331790556004805460ff191660121790558051906001600160401b0382116200035d5760025490600182811c9216801562000461575b60208310146200033c5781601f849311620003fd575b50602090601f83116001146200037f5760009262000373575b50508160011b916000199060031b1c1916176002555b8051906001600160401b0382116200035d5760035490600182811c9216801562000352575b60208310146200033c5781601f849311620002ca575b50602090601f83116001146200023b576000926200022f575b50508160011b916000199060031b1c1916176003555b600555600680546001600160a01b03199081166001600160a01b039485161790915560078054821695841695909517909455600880548516918316919091179055600980549093169116179055600c805491151560ff1660ff1992909216919091179055604051611b2390816200051f8239f35b015190503880620001a5565b6003600090815293507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b91905b601f1984168510620002ae576001945083601f1981161062000294575b505050811b01600355620001bb565b015160001960f88460031b161c1916905538808062000285565b8181015183556020948501946001909301929091019062000268565b60036000529091507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b601f840160051c81016020851062000334575b90849392915b601f830160051c82018110620003245750506200018c565b600081558594506001016200030c565b508062000306565b634e487b7160e01b600052602260045260246000fd5b91607f169162000176565b634e487b7160e01b600052604160045260246000fd5b0151905038806200013b565b6002600090815293506000805160206200204283398151915291905b601f1984168510620003e1576001945083601f19811610620003c7575b505050811b0160025562000151565b015160001960f88460031b161c19169055388080620003b8565b818101518355602094850194600190930192909101906200039b565b600260005290915060008051602062002042833981519152601f840160051c8101916020851062000456575b90601f859493920160051c01905b81811062000446575062000122565b6000815584935060010162000437565b909150819062000429565b91607f16916200010c565b600080fd5b6040519190601f01601f191682016001600160401b038111838210176200035d57604052565b919080601f840112156200046c5782516001600160401b0381116200035d57602090620004cd601f8201601f1916830162000471565b928184528282870101116200046c5760005b818110620004f557508260009394955001015290565b8581018301518482018401528201620004df565b51906001600160a01b03821682036200046c5756fe6040608081526004908136101561001557600080fd5b600091823560e01c90816301e3366714610c9b57816306fdde0314610bdc57816308f26c7614610bb6578163095ea7b3146104505781630db9ea4a14610b7e57816312d43a5114610b5557816313e82e7a14610b145781631514617e14610af557816315e90a4114610ad657816316ca05c514610aad57816318160ddd14610a8e57816323b872dd14610a7757816327e235e314610677578163313ce56714610a56578163342fcda914610a21578163387a785d146109e95781633ccfd60b1461083d5781633de35b7914610814578163402914f5146107ee57816341f22724146107a657816345f01ee61461078057816346ea87af146107425781634e71d92d146107105781635d50e729146106d85781636bcb411a146106af57816370a082311461067757816371417b321461063f5781637cf8f3b21461061657816393035473146105f557816395d89b41146104ee5781639cb7de4b1461048d578163a2545fa514610455578163a9059cbb14610450578163ac110d141461042c578163b5ff136d146103f4578163b6b55f25146103c757508063cfad57a214610379578063d5a73fdd1461034d578063d75abb5714610323578063d89b7007146102dc578063dd62ed3e146102af578063f2293bb01461025c578063f421f62a146102325763f6d6d5aa1461020757600080fd5b3461022e578160031936011261022e5760085490516001600160a01b039091168152602090f35b5080fd5b503461022e578160031936011261022e5760095490516001600160a01b0390911615158152602090f35b82346102ac5760203660031901126102ac57610276610cd1565b6001546001600160a01b0391906102909083163314610dd7565b166bffffffffffffffffffffffff60a01b600954161760095580f35b80fd5b503461022e578060031936011261022e57906020916102cc610cd1565b506102d5610cec565b5051908152f35b503461022e578060031936011261022e576102f5610cd1565b6102fd610e1b565b610305611a9b565b6001600160a01b031682526012602052812060243590556001815580f35b503461022e578160031936011261022e5760075490516001600160a01b0390911615158152602090f35b503461022e57602036600319011261022e5760209061037261036d610cd1565b611308565b9051908152f35b82346102ac5760203660031901126102ac57610393610cd1565b600154906001600160a01b03906103ad3383851614610dd7565b16906bffffffffffffffffffffffff60a01b161760015580f35b83903461022e57602036600319011261022e576103ed906103e6610e1b565b35336114a4565b6001815580f35b50503461022e57602036600319011261022e5760209181906001600160a01b0361041c610cd1565b168152600f845220549051908152f35b50503461022e578160031936011261022e5760209060ff600c541690519015158152f35b610db8565b50503461022e57602036600319011261022e5760209181906001600160a01b0361047d610cd1565b1681526013845220549051908152f35b50503461022e578060031936011261022e576104a7610cd1565b90602435918215158093036104ea576001546001600160a01b0391906104d09083163314610dd7565b168352601460205282209060ff8019835416911617905580f35b8380fd5b919050346105f157826003193601126105f157805191836003549060019082821c9282811680156105e7575b60209586861082146105d457508488529081156105b25750600114610559575b610555868661054b828b0383610d37565b5191829182610d6f565b0390f35b929550600383527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b82841061059f57505050826105559461054b92820101943861053a565b8054868501880152928601928101610582565b60ff191687860152505050151560051b830101925061054b826105553861053a565b634e487b7160e01b845260229052602483fd5b93607f169361051a565b8280fd5b50503461022e57602036600319011261022e5760209061037261036d610cd1565b50503461022e578060031936011261022e57602090610372610636610cd1565b602435906112bb565b50503461022e57602036600319011261022e5760209181906001600160a01b03610667610cd1565b1681526010845220549051908152f35b50503461022e57602036600319011261022e5760209181906001600160a01b0361069f610cd1565b168152600d845220549051908152f35b50503461022e578160031936011261022e5760095490516001600160a01b039091168152602090f35b50503461022e57602036600319011261022e5760209181906001600160a01b03610700610cd1565b168152600e845220549051908152f35b50503461022e578160031936011261022e579060209161072e610e1b565b600161073a3333611a07565b925551908152f35b50503461022e57602036600319011261022e5760209160ff9082906001600160a01b0361076d610cd1565b1681526014855220541690519015158152f35b50503461022e57602036600319011261022e576020906103726107a1610cd1565b61119e565b50503461022e578060031936011261022e576107c0610cd1565b6107c8610e1b565b6107d0611a9b565b6001600160a01b031682526013602052812060243590556001815580f35b50503461022e57602036600319011261022e5760209061037261080f610cd1565b6119c9565b50503461022e578160031936011261022e5760075490516001600160a01b039091168152602090f35b9050346105f157826003193601126105f157610857610e1b565b6108613333611a07565b50338352602091600f835280842054600d845281852054926108838285611099565b156109a65750917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b56893916060936108d08360018060a01b03806007541661090c575b339060065416610e71565b6108da833361141a565b338752600f84528682812055601084528682812055601184528682812055815193338552840152820152a16001815580f35b338a52600e87526109a1856109518c8281205492839161092d331515611377565b338152600e8d52610943838383205410156113ce565b338152600e8d5220546110bc565b338d52600e8a52878d205561096881600b546110bc565b600b558b87518281527f659523c479d006050ebc0d0e48fea36d1b2c5d45b2f31402ac6f8671fc84cc048b3392a3338360075416610e71565b6108c5565b825162461bcd60e51b8152908101859052601d60248201527f5665737465723a2076657374656420616d6f756e74206973207a65726f0000006044820152606490fd5b50503461022e57602036600319011261022e5760209181906001600160a01b03610a11610cd1565b1681526012845220549051908152f35b50503461022e573660031901126102ac576103ed610a3d610cd1565b610a45610e1b565b610a4d611a9b565b602435906114a4565b8284346102ac57806003193601126102ac575060ff60209254169051908152f35b83346102ac57610a8636610d02565b505050611332565b50503461022e578160031936011261022e57602090600a549051908152f35b50503461022e578160031936011261022e5760065490516001600160a01b039091168152602090f35b50503461022e578160031936011261022e57602090600b549051908152f35b50503461022e578160031936011261022e576020906005549051908152f35b50503461022e578060031936011261022e5790602091600161073a610b37610cd1565b610b3f610cec565b90610b48610e1b565b610b50611a9b565b611a07565b50503461022e578160031936011261022e5760015490516001600160a01b039091168152602090f35b50503461022e57602036600319011261022e5760209181906001600160a01b03610ba6610cd1565b1681526011845220549051908152f35b50503461022e57602036600319011261022e57602090610372610bd7610cd1565b6110c9565b919050346105f157826003193601126105f157805191836002549060019082821c928281168015610c91575b60209586861082146105d457508488529081156105b25750600114610c3857610555868661054b828b0383610d37565b929550600283527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b828410610c7e57505050826105559461054b92820101943861053a565b8054868501880152928601928101610c61565b93607f1693610c08565b83346102ac57610cce610cad36610d02565b60015490926001600160a01b0391610cc89083163314610dd7565b16610e71565b80f35b600435906001600160a01b0382168203610ce757565b600080fd5b602435906001600160a01b0382168203610ce757565b6060906003190112610ce7576001600160a01b03906004358281168103610ce757916024359081168103610ce7579060443590565b90601f8019910116810190811067ffffffffffffffff821117610d5957604052565b634e487b7160e01b600052604160045260246000fd5b6020808252825181830181905290939260005b828110610da457505060409293506000838284010152601f8019910116010190565b818101860151848201604001528501610d82565b34610ce7576040366003190112610ce757610dd1610cd1565b50611332565b15610dde57565b60405162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b6044820152606490fd5b600260005414610e2c576002600055565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b60405163a9059cbb60e01b60208201526001600160a01b03929092166024830152604480830193909352918152610eb291610ead606483610d37565b610eb4565b565b60018060a01b0316906040516040810167ffffffffffffffff9082811082821117610d59576040526020938483527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564858401526000808587829751910182855af1903d15610ff9573d928311610fe55790610f4f93929160405192610f4288601f19601f8401160185610d37565b83523d868885013e611004565b805191821591848315610fc1575b505050905015610f6a5750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b91938180945001031261022e578201519081151582036102ac575080388084610f5d565b634e487b7160e01b85526041600452602485fd5b90610f4f9392506060915b919290156110665750815115611018575090565b3b156110215790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156110795750805190602001fd5b60405162461bcd60e51b81529081906110959060048301610d6f565b0390fd5b919082018092116110a657565b634e487b7160e01b600052601160045260246000fd5b919082039182116110a657565b6001600160a01b039081166000818152601360209081526040822054600954929490939192168061111b575b508352601290526040822054908181106111165761111392506110bc565b90565b505090565b92826024929460405193848092633792def360e01b82528860048301525afa91821561119357859261115e575b506012929161115691611099565b9290916110f5565b9091508281813d831161118c575b6111768183610d37565b81010312611188575190611156611148565b8480fd5b503d61116c565b6040513d87823e3d90fd5b6009546001600160a01b039081169190821561125357604051633792def360e01b81529116600482018190526020918281602481875afa9081156112475760009161125b575b501561125357819060246040518095819363a318021760e01b835260048301525afa9081156112475760009161121b575b50905090565b82813d8311611240575b61122f8183610d37565b810103126102ac5750518038611215565b503d611225565b6040513d6000823e3d90fd5b505050600090565b908382813d8311611281575b6112718183610d37565b810103126102ac575051386111e4565b503d611267565b818102929181159184041417156110a657565b81156112a5570490565b634e487b7160e01b600052601260045260246000fd5b6009549091906001600160a01b031615611301576112d88261119e565b918215611253576112e8906110c9565b90811561125357611113926112fc91611288565b61129b565b5050600090565b60018060a01b0316600052600d602052611113604060002054600f60205260406000205490611099565b60405162461bcd60e51b815260206004820152601960248201527f5665737465723a206e6f6e2d7472616e736665727261626c65000000000000006044820152606490fd5b1561137e57565b60405162461bcd60e51b815260206004820152602260248201527f5665737465723a206275726e2066726f6d20746865207a65726f206164647265604482015261737360f01b6064820152608490fd5b156113d557565b60405162461bcd60e51b815260206004820152601d60248201527f5665737465723a2062616c616e6365206973206e6f7420656e6f7567680000006044820152606490fd5b6001600160a01b031661142e811515611377565b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020600093838552600d825261146b81604087205410156113ce565b838552600d82526114808160408720546110bc565b848652600d8352604086205561149881600a546110bc565b600a55604051908152a3565b9190801561179c576114b583611885565b60018060a01b03926114ce8285600654168330916117e1565b838116936114dd85151561183a565b6114e983600a54611099565b600a55600090858252602091600d83526040966115098689842054611099565b818352600d85528883205580827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef868b518a8152a380828460075416806116e6575b50505060ff600c5416806116d9575b611606575b50505061156b826110c9565b61157483611308565b116115b7575092516001600160a01b0390931683526020830152907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c90604090a1565b60849085519062461bcd60e51b825260048201526024808201527f5665737465723a206d6178207665737461626c6520616d6f756e7420657863656044820152631959195960e21b6064820152fd5b838360095416936008541660448a5180968193637aeceb1f60e11b835286600484015260248301525afa9283156116cf5790829189939461169a575b508152600d84522054116116585738808061155f565b60649085519062461bcd60e51b825280600483015260248201527f5665737465723a20696e73756666696369656e74206365632062616c616e63656044820152fd5b8580929550819394503d83116116c8575b6116b58183610d37565b8101031261022e57908791519238611642565b503d6116ab565b88513d84823e3d90fd5b508260095416151561155a565b828252600e8752868b83205491600d82528c8a61170682872054826112bb565b91858311611719575b505050505061154b565b61175561174a7f659523c479d006050ebc0d0e48fea36d1b2c5d45b2f31402ac6f8671fc84cc049761177e956110bc565b8095819430916117e1565b61176088151561183a565b61176c82600b54611099565b600b55878752600e8552862054611099565b858552600e83528d8520558c51908152a38082388681808a8e61170f565b60405162461bcd60e51b815260206004820152601760248201527f5665737465723a20696e76616c6964205f616d6f756e740000000000000000006044820152606490fd5b6040516323b872dd60e01b60208201526001600160a01b03928316602482015292909116604483015260648083019390935291815260a081019181831067ffffffffffffffff841117610d5957610eb292604052610eb4565b1561184157565b606460405162461bcd60e51b815260206004820152602060248201527f5665737465723a206d696e7420746f20746865207a65726f20616464726573736044820152fd5b61188e81611962565b6001600160a01b0380831660008181526011602052604080822042905590949093929190831561195a57836118c29161141a565b808552600f6020526118d78385872054611099565b908552600f602052838520556006541690813b156104ea578251632770a7eb60e21b81523060048201526024810191909152929081908490604490829084905af1801561194e5761192757505050565b67ffffffffffffffff831161193a575052565b634e487b7160e01b81526041600452602490fd5b509051903d90823e3d90fd5b505050505050565b6001600160a01b03811660008181526011602052604090205461198590426110bc565b90600052600d602052604060002054918215611253576119b9916119ab6119b092611308565b611288565b6005549061129b565b8181106119c4575090565b905090565b6111139060018060a01b038116600052600f602052611a016119fb6040600020546010602052604060002054906110bc565b91611962565b90611099565b611a7d917f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d491611a3681611885565b611a3f816119c9565b9384809360018060a01b03808516806000526010602052611a6584604060002054611099565b90600052601060205260406000205560085416610e71565b604080516001600160a01b039290921682526020820192909252a190565b33600052601460205260ff6040600020541615611ab457565b60405162461bcd60e51b81526020600482015260116024820152702b32b9ba32b91d103337b93134b23232b760791b6044820152606490fdfea26469706673582212204ec2e325de603c91d8517820fdaa605484edead3ee87bf9d525ddac83ce788e764736f6c63430008130033405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace", + "deployedBytecode": "0x6040608081526004908136101561001557600080fd5b600091823560e01c90816301e3366714610c9b57816306fdde0314610bdc57816308f26c7614610bb6578163095ea7b3146104505781630db9ea4a14610b7e57816312d43a5114610b5557816313e82e7a14610b145781631514617e14610af557816315e90a4114610ad657816316ca05c514610aad57816318160ddd14610a8e57816323b872dd14610a7757816327e235e314610677578163313ce56714610a56578163342fcda914610a21578163387a785d146109e95781633ccfd60b1461083d5781633de35b7914610814578163402914f5146107ee57816341f22724146107a657816345f01ee61461078057816346ea87af146107425781634e71d92d146107105781635d50e729146106d85781636bcb411a146106af57816370a082311461067757816371417b321461063f5781637cf8f3b21461061657816393035473146105f557816395d89b41146104ee5781639cb7de4b1461048d578163a2545fa514610455578163a9059cbb14610450578163ac110d141461042c578163b5ff136d146103f4578163b6b55f25146103c757508063cfad57a214610379578063d5a73fdd1461034d578063d75abb5714610323578063d89b7007146102dc578063dd62ed3e146102af578063f2293bb01461025c578063f421f62a146102325763f6d6d5aa1461020757600080fd5b3461022e578160031936011261022e5760085490516001600160a01b039091168152602090f35b5080fd5b503461022e578160031936011261022e5760095490516001600160a01b0390911615158152602090f35b82346102ac5760203660031901126102ac57610276610cd1565b6001546001600160a01b0391906102909083163314610dd7565b166bffffffffffffffffffffffff60a01b600954161760095580f35b80fd5b503461022e578060031936011261022e57906020916102cc610cd1565b506102d5610cec565b5051908152f35b503461022e578060031936011261022e576102f5610cd1565b6102fd610e1b565b610305611a9b565b6001600160a01b031682526012602052812060243590556001815580f35b503461022e578160031936011261022e5760075490516001600160a01b0390911615158152602090f35b503461022e57602036600319011261022e5760209061037261036d610cd1565b611308565b9051908152f35b82346102ac5760203660031901126102ac57610393610cd1565b600154906001600160a01b03906103ad3383851614610dd7565b16906bffffffffffffffffffffffff60a01b161760015580f35b83903461022e57602036600319011261022e576103ed906103e6610e1b565b35336114a4565b6001815580f35b50503461022e57602036600319011261022e5760209181906001600160a01b0361041c610cd1565b168152600f845220549051908152f35b50503461022e578160031936011261022e5760209060ff600c541690519015158152f35b610db8565b50503461022e57602036600319011261022e5760209181906001600160a01b0361047d610cd1565b1681526013845220549051908152f35b50503461022e578060031936011261022e576104a7610cd1565b90602435918215158093036104ea576001546001600160a01b0391906104d09083163314610dd7565b168352601460205282209060ff8019835416911617905580f35b8380fd5b919050346105f157826003193601126105f157805191836003549060019082821c9282811680156105e7575b60209586861082146105d457508488529081156105b25750600114610559575b610555868661054b828b0383610d37565b5191829182610d6f565b0390f35b929550600383527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b82841061059f57505050826105559461054b92820101943861053a565b8054868501880152928601928101610582565b60ff191687860152505050151560051b830101925061054b826105553861053a565b634e487b7160e01b845260229052602483fd5b93607f169361051a565b8280fd5b50503461022e57602036600319011261022e5760209061037261036d610cd1565b50503461022e578060031936011261022e57602090610372610636610cd1565b602435906112bb565b50503461022e57602036600319011261022e5760209181906001600160a01b03610667610cd1565b1681526010845220549051908152f35b50503461022e57602036600319011261022e5760209181906001600160a01b0361069f610cd1565b168152600d845220549051908152f35b50503461022e578160031936011261022e5760095490516001600160a01b039091168152602090f35b50503461022e57602036600319011261022e5760209181906001600160a01b03610700610cd1565b168152600e845220549051908152f35b50503461022e578160031936011261022e579060209161072e610e1b565b600161073a3333611a07565b925551908152f35b50503461022e57602036600319011261022e5760209160ff9082906001600160a01b0361076d610cd1565b1681526014855220541690519015158152f35b50503461022e57602036600319011261022e576020906103726107a1610cd1565b61119e565b50503461022e578060031936011261022e576107c0610cd1565b6107c8610e1b565b6107d0611a9b565b6001600160a01b031682526013602052812060243590556001815580f35b50503461022e57602036600319011261022e5760209061037261080f610cd1565b6119c9565b50503461022e578160031936011261022e5760075490516001600160a01b039091168152602090f35b9050346105f157826003193601126105f157610857610e1b565b6108613333611a07565b50338352602091600f835280842054600d845281852054926108838285611099565b156109a65750917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b56893916060936108d08360018060a01b03806007541661090c575b339060065416610e71565b6108da833361141a565b338752600f84528682812055601084528682812055601184528682812055815193338552840152820152a16001815580f35b338a52600e87526109a1856109518c8281205492839161092d331515611377565b338152600e8d52610943838383205410156113ce565b338152600e8d5220546110bc565b338d52600e8a52878d205561096881600b546110bc565b600b558b87518281527f659523c479d006050ebc0d0e48fea36d1b2c5d45b2f31402ac6f8671fc84cc048b3392a3338360075416610e71565b6108c5565b825162461bcd60e51b8152908101859052601d60248201527f5665737465723a2076657374656420616d6f756e74206973207a65726f0000006044820152606490fd5b50503461022e57602036600319011261022e5760209181906001600160a01b03610a11610cd1565b1681526012845220549051908152f35b50503461022e573660031901126102ac576103ed610a3d610cd1565b610a45610e1b565b610a4d611a9b565b602435906114a4565b8284346102ac57806003193601126102ac575060ff60209254169051908152f35b83346102ac57610a8636610d02565b505050611332565b50503461022e578160031936011261022e57602090600a549051908152f35b50503461022e578160031936011261022e5760065490516001600160a01b039091168152602090f35b50503461022e578160031936011261022e57602090600b549051908152f35b50503461022e578160031936011261022e576020906005549051908152f35b50503461022e578060031936011261022e5790602091600161073a610b37610cd1565b610b3f610cec565b90610b48610e1b565b610b50611a9b565b611a07565b50503461022e578160031936011261022e5760015490516001600160a01b039091168152602090f35b50503461022e57602036600319011261022e5760209181906001600160a01b03610ba6610cd1565b1681526011845220549051908152f35b50503461022e57602036600319011261022e57602090610372610bd7610cd1565b6110c9565b919050346105f157826003193601126105f157805191836002549060019082821c928281168015610c91575b60209586861082146105d457508488529081156105b25750600114610c3857610555868661054b828b0383610d37565b929550600283527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b828410610c7e57505050826105559461054b92820101943861053a565b8054868501880152928601928101610c61565b93607f1693610c08565b83346102ac57610cce610cad36610d02565b60015490926001600160a01b0391610cc89083163314610dd7565b16610e71565b80f35b600435906001600160a01b0382168203610ce757565b600080fd5b602435906001600160a01b0382168203610ce757565b6060906003190112610ce7576001600160a01b03906004358281168103610ce757916024359081168103610ce7579060443590565b90601f8019910116810190811067ffffffffffffffff821117610d5957604052565b634e487b7160e01b600052604160045260246000fd5b6020808252825181830181905290939260005b828110610da457505060409293506000838284010152601f8019910116010190565b818101860151848201604001528501610d82565b34610ce7576040366003190112610ce757610dd1610cd1565b50611332565b15610dde57565b60405162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b6044820152606490fd5b600260005414610e2c576002600055565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b60405163a9059cbb60e01b60208201526001600160a01b03929092166024830152604480830193909352918152610eb291610ead606483610d37565b610eb4565b565b60018060a01b0316906040516040810167ffffffffffffffff9082811082821117610d59576040526020938483527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564858401526000808587829751910182855af1903d15610ff9573d928311610fe55790610f4f93929160405192610f4288601f19601f8401160185610d37565b83523d868885013e611004565b805191821591848315610fc1575b505050905015610f6a5750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b91938180945001031261022e578201519081151582036102ac575080388084610f5d565b634e487b7160e01b85526041600452602485fd5b90610f4f9392506060915b919290156110665750815115611018575090565b3b156110215790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156110795750805190602001fd5b60405162461bcd60e51b81529081906110959060048301610d6f565b0390fd5b919082018092116110a657565b634e487b7160e01b600052601160045260246000fd5b919082039182116110a657565b6001600160a01b039081166000818152601360209081526040822054600954929490939192168061111b575b508352601290526040822054908181106111165761111392506110bc565b90565b505090565b92826024929460405193848092633792def360e01b82528860048301525afa91821561119357859261115e575b506012929161115691611099565b9290916110f5565b9091508281813d831161118c575b6111768183610d37565b81010312611188575190611156611148565b8480fd5b503d61116c565b6040513d87823e3d90fd5b6009546001600160a01b039081169190821561125357604051633792def360e01b81529116600482018190526020918281602481875afa9081156112475760009161125b575b501561125357819060246040518095819363a318021760e01b835260048301525afa9081156112475760009161121b575b50905090565b82813d8311611240575b61122f8183610d37565b810103126102ac5750518038611215565b503d611225565b6040513d6000823e3d90fd5b505050600090565b908382813d8311611281575b6112718183610d37565b810103126102ac575051386111e4565b503d611267565b818102929181159184041417156110a657565b81156112a5570490565b634e487b7160e01b600052601260045260246000fd5b6009549091906001600160a01b031615611301576112d88261119e565b918215611253576112e8906110c9565b90811561125357611113926112fc91611288565b61129b565b5050600090565b60018060a01b0316600052600d602052611113604060002054600f60205260406000205490611099565b60405162461bcd60e51b815260206004820152601960248201527f5665737465723a206e6f6e2d7472616e736665727261626c65000000000000006044820152606490fd5b1561137e57565b60405162461bcd60e51b815260206004820152602260248201527f5665737465723a206275726e2066726f6d20746865207a65726f206164647265604482015261737360f01b6064820152608490fd5b156113d557565b60405162461bcd60e51b815260206004820152601d60248201527f5665737465723a2062616c616e6365206973206e6f7420656e6f7567680000006044820152606490fd5b6001600160a01b031661142e811515611377565b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020600093838552600d825261146b81604087205410156113ce565b838552600d82526114808160408720546110bc565b848652600d8352604086205561149881600a546110bc565b600a55604051908152a3565b9190801561179c576114b583611885565b60018060a01b03926114ce8285600654168330916117e1565b838116936114dd85151561183a565b6114e983600a54611099565b600a55600090858252602091600d83526040966115098689842054611099565b818352600d85528883205580827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef868b518a8152a380828460075416806116e6575b50505060ff600c5416806116d9575b611606575b50505061156b826110c9565b61157483611308565b116115b7575092516001600160a01b0390931683526020830152907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c90604090a1565b60849085519062461bcd60e51b825260048201526024808201527f5665737465723a206d6178207665737461626c6520616d6f756e7420657863656044820152631959195960e21b6064820152fd5b838360095416936008541660448a5180968193637aeceb1f60e11b835286600484015260248301525afa9283156116cf5790829189939461169a575b508152600d84522054116116585738808061155f565b60649085519062461bcd60e51b825280600483015260248201527f5665737465723a20696e73756666696369656e74206365632062616c616e63656044820152fd5b8580929550819394503d83116116c8575b6116b58183610d37565b8101031261022e57908791519238611642565b503d6116ab565b88513d84823e3d90fd5b508260095416151561155a565b828252600e8752868b83205491600d82528c8a61170682872054826112bb565b91858311611719575b505050505061154b565b61175561174a7f659523c479d006050ebc0d0e48fea36d1b2c5d45b2f31402ac6f8671fc84cc049761177e956110bc565b8095819430916117e1565b61176088151561183a565b61176c82600b54611099565b600b55878752600e8552862054611099565b858552600e83528d8520558c51908152a38082388681808a8e61170f565b60405162461bcd60e51b815260206004820152601760248201527f5665737465723a20696e76616c6964205f616d6f756e740000000000000000006044820152606490fd5b6040516323b872dd60e01b60208201526001600160a01b03928316602482015292909116604483015260648083019390935291815260a081019181831067ffffffffffffffff841117610d5957610eb292604052610eb4565b1561184157565b606460405162461bcd60e51b815260206004820152602060248201527f5665737465723a206d696e7420746f20746865207a65726f20616464726573736044820152fd5b61188e81611962565b6001600160a01b0380831660008181526011602052604080822042905590949093929190831561195a57836118c29161141a565b808552600f6020526118d78385872054611099565b908552600f602052838520556006541690813b156104ea578251632770a7eb60e21b81523060048201526024810191909152929081908490604490829084905af1801561194e5761192757505050565b67ffffffffffffffff831161193a575052565b634e487b7160e01b81526041600452602490fd5b509051903d90823e3d90fd5b505050505050565b6001600160a01b03811660008181526011602052604090205461198590426110bc565b90600052600d602052604060002054918215611253576119b9916119ab6119b092611308565b611288565b6005549061129b565b8181106119c4575090565b905090565b6111139060018060a01b038116600052600f602052611a016119fb6040600020546010602052604060002054906110bc565b91611962565b90611099565b611a7d917f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d491611a3681611885565b611a3f816119c9565b9384809360018060a01b03808516806000526010602052611a6584604060002054611099565b90600052601060205260406000205560085416610e71565b604080516001600160a01b039290921682526020820192909252a190565b33600052601460205260ff6040600020541615611ab457565b60405162461bcd60e51b81526020600482015260116024820152702b32b9ba32b91d103337b93134b23232b760791b6044820152606490fdfea26469706673582212204ec2e325de603c91d8517820fdaa605484edead3ee87bf9d525ddac83ce788e764736f6c63430008130033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/config/config_bsc_test.js b/config/config_bsc_test.js index fc89049..dd52d61 100644 --- a/config/config_bsc_test.js +++ b/config/config_bsc_test.js @@ -48,12 +48,19 @@ const mint = { airdropCount: 500, } +const staking = { + cec: '0xe34c5ea0c3083d11a735dc0609533b92130319f5', + // stake cecๆ—ถ, ๆฏ่ดจๆŠผไธ€ไธชcec, ๆฏๅนดๅฏ่Žทๅพ—็š„ๆ”ถ็›Š + rewardPerSecond: BigInt(1.5 * 10 ** 18) / BigInt(365 * 24 * 60 * 60) +} + var config = { market, admins, token, imtbl, - mint + mint, + staking }; module.exports = config; diff --git a/deploy/8_deploy_staking.ts b/deploy/8_deploy_staking.ts new file mode 100644 index 0000000..1f5147c --- /dev/null +++ b/deploy/8_deploy_staking.ts @@ -0,0 +1,125 @@ +import {HardhatRuntimeEnvironment} from "hardhat/types"; +import {DeployFunction} from "hardhat-deploy/types"; +import {updateArray} from "../scripts/utils"; +import {ZeroAddress} from "ethers"; + +const secondsPerYear = 365 * 24 * 60 * 60; + +const deployNFTClaim: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const provider = hre.ethers.provider; + const from = await (await provider.getSigner()).getAddress(); + const config = require(`../config/config_${hre.network.name}`); + const {mallFeeAddress, paymentTokens, verifier} = config.market; + const {cec, rewardPerSecond} = config.staking; + const tokenName = "Escrowed CEC"; + const tokenSymbol = "esCEC"; + const esCEC = await hre.deployments.deploy("EsToken", { + from, + args: [tokenName, tokenSymbol], + log: true, + }); + console.log("==EsToken addr=", esCEC.address); + updateArray({ + name: "esCEC", + type: "erc20", + json: "assets/contracts/EsToken.json", + address: esCEC.address, + network: hre.network.name, + }); + // verify the contract + try { + await hre.run("verify:verify", { + address: esCEC.address, + constructorArguments: [tokenName, tokenSymbol], + }); + } catch (e) { + console.log("==verify failed", e); + } + + const stakedCecTracker = await hre.deployments.deploy("RewardTracker", { + from, + args: ["Staked CEC", "sCEC"], + log: true, + }); + console.log("==RewardTracker addr=", stakedCecTracker.address); + updateArray({ + name: "stakedCecTracker", + type: "logic", + json: "assets/contracts/RewardTracker.json", + address: stakedCecTracker.address, + network: hre.network.name, + }); + const stakedCecDistributor = await hre.deployments.deploy("RewardDistributor", { + from, + args: [esCEC.address, stakedCecTracker.address], + log: true, + }); + + console.log("==RewardDistributor addr=", stakedCecDistributor.address); + updateArray({ + name: "stakedCecDistributor", + type: "logic", + json: "assets/contracts/RewardDistributor.json", + address: stakedCecDistributor.address, + network: hre.network.name, + }); + + const vester = await hre.deployments.deploy("Vester", { + from, + args: ["Vested CEC", "veCEC", secondsPerYear, esCEC.address, ZeroAddress, cec, ZeroAddress, false], + log: true, + }); + + console.log("==Vester addr=", vester.address); + updateArray({ + name: "vester", + type: "logic", + json: "assets/contracts/Vester.json", + address: vester.address, + network: hre.network.name, + }); + + + const rewardRouter = await hre.deployments.deploy("RewardRouter", { + from, + args: [cec, + esCEC.address, + stakedCecTracker.address, + vester.address,], + log: true, + }); + console.log("==RewardRouter addr=", rewardRouter.address); + updateArray({ + name: "rewardRouter", + type: "logic", + json: "assets/contracts/RewardRouter.json", + address: rewardRouter.address, + network: hre.network.name, + }); + + const stakedCecTrackerContract = await hre.ethers.getContractAt("RewardTracker", stakedCecTracker.address); + const stakedCecDistributorContract = await hre.ethers.getContractAt("RewardDistributor", stakedCecDistributor.address); + const esCECContract = await hre.ethers.getContractAt("EsToken", esCEC.address); + + await stakedCecTrackerContract.initialize([cec, esCEC.address], stakedCecDistributor.address); + + await stakedCecTrackerContract.setInPrivateTransferMode(true) + + await stakedCecTrackerContract.setInPrivateStakingMode(true) + + await stakedCecDistributorContract.updateLastDistributionTime(); + + await stakedCecDistributorContract.setTokensPerInterval(rewardPerSecond); + + await stakedCecTrackerContract.setHandler(rewardRouter.address, true) + // ไธบไบ†่ƒฝ่ฐƒ็”จburnๆ–นๆณ• + await esCECContract.setMinter(vester.address, true) + // ่ฎพๅฎšesCECไธ่ƒฝๅ…ฌๅผ€่ฝฌ่ดฆ + await esCECContract.setInPrivateTransferMode(true) + // ๆทปๅŠ ่ฝฌ่ดฆ็™ฝๅๅ• + await esCECContract.setHandler(stakedCecTracker.address, true) +}; + +deployNFTClaim.tags = ["Staking"]; + +export default deployNFTClaim; diff --git a/deployments/bsc_test/EsToken.json b/deployments/bsc_test/EsToken.json new file mode 100644 index 0000000..03f2f16 --- /dev/null +++ b/deployments/bsc_test/EsToken.json @@ -0,0 +1,646 @@ +{ + "address": "0x68Db28B700B2AC2A5034A5c8bD70c1Ffc3E587DD", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "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": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "gov", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "inPrivateTransferMode", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "isHandler", + "outputs": [ + { + "internalType": "bool", + "name": "status", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "isMinter", + "outputs": [ + { + "internalType": "bool", + "name": "status", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_gov", + "type": "address" + } + ], + "name": "setGov", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_handler", + "type": "address" + }, + { + "internalType": "bool", + "name": "_isActive", + "type": "bool" + } + ], + "name": "setHandler", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_inPrivateTransferMode", + "type": "bool" + } + ], + "name": "setInPrivateTransferMode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_minter", + "type": "address" + }, + { + "internalType": "bool", + "name": "_isActive", + "type": "bool" + } + ], + "name": "setMinter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_sender", + "type": "address" + }, + { + "internalType": "address", + "name": "_recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x0fd4619d427ed6f49903687918d6ad7812f56da708a76793387bbfa19f8358d4", + "receipt": { + "to": null, + "from": "0x50A8e60041A206AcaA5F844a1104896224be6F39", + "contractAddress": "0x68Db28B700B2AC2A5034A5c8bD70c1Ffc3E587DD", + "transactionIndex": 0, + "gasUsed": "993001", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x014958e22e0f6346035a83ae94f432df43c8d6ee7d018a3632ac2fb2bb5cea8d", + "transactionHash": "0x0fd4619d427ed6f49903687918d6ad7812f56da708a76793387bbfa19f8358d4", + "logs": [], + "blockNumber": 43369439, + "cumulativeGasUsed": "993001", + "status": 1, + "byzantium": true + }, + "args": [ + "Escrowed CEC", + "esCEC" + ], + "numDeployments": 1, + "solcInputHash": "1b5451948df002b329e5d71e4ffbd43e", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"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\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gov\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"inPrivateTransferMode\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isHandler\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"status\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isMinter\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"status\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_gov\",\"type\":\"address\"}],\"name\":\"setGov\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_handler\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_isActive\",\"type\":\"bool\"}],\"name\":\"setHandler\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_inPrivateTransferMode\",\"type\":\"bool\"}],\"name\":\"setInPrivateTransferMode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_minter\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_isActive\",\"type\":\"bool\"}],\"name\":\"setMinter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/tokens/erc20/EsToken.sol\":\"EsToken\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the default value returned by this function, unless\\n * it's overridden.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(address from, address to, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0xa92e4fa126feb6907daa0513ddd816b2eb91f30a808de54f63c17d0e162c3439\",\"license\":\"MIT\"},\"contracts/core/Governable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\ncontract Governable {\\n address public gov;\\n\\n constructor() {\\n gov = msg.sender;\\n }\\n\\n modifier onlyGov() {\\n require(msg.sender == gov, \\\"Governable: forbidden\\\");\\n _;\\n }\\n\\n function setGov(address _gov) external onlyGov {\\n gov = _gov;\\n }\\n}\\n\",\"keccak256\":\"0xcb7c11d1557db3369d984c7e804b1946c79867f3ab2dd2793ad3bb502c6c2383\",\"license\":\"MIT\"},\"contracts/interfaces/IMintable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\ninterface IMintable {\\n function isMinter(address _account) external returns (bool);\\n function setMinter(address _minter, bool _isActive) external;\\n function mint(address _account, uint256 _amount) external;\\n function burn(address _account, uint256 _amount) external;\\n}\",\"keccak256\":\"0x99bccac95e8a4bba811b01e39e40ce5921ec977432696fd492a2a340674e90ae\",\"license\":\"MIT\"},\"contracts/tokens/erc20/EsToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.19;\\n\\nimport {ERC20} from \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport {IMintable} from \\\"../../interfaces/IMintable.sol\\\";\\nimport {Governable} from \\\"../../core/Governable.sol\\\";\\n\\ncontract EsToken is ERC20, IMintable, Governable {\\n bool public inPrivateTransferMode;\\n\\n mapping(address account => bool status) public override isMinter;\\n\\n mapping(address account => bool status) public isHandler;\\n\\n constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) {}\\n\\n modifier onlyMinter() {\\n require(isMinter[msg.sender], \\\"EsToken: forbidden\\\");\\n _;\\n }\\n\\n function setMinter(address _minter, bool _isActive) external override onlyGov {\\n isMinter[_minter] = _isActive;\\n }\\n\\n function mint(address _account, uint256 _amount) external override onlyMinter {\\n _mint(_account, _amount);\\n }\\n\\n function burn(address _account, uint256 _amount) external override onlyMinter {\\n _burn(_account, _amount);\\n }\\n\\n function setInPrivateTransferMode(bool _inPrivateTransferMode) external onlyGov {\\n inPrivateTransferMode = _inPrivateTransferMode;\\n }\\n\\n function setHandler(address _handler, bool _isActive) external onlyGov {\\n isHandler[_handler] = _isActive;\\n }\\n\\n function transferFrom(address _sender, address _recipient, uint256 _amount) public override returns (bool) {\\n if (isHandler[msg.sender]) {\\n _transfer(_sender, _recipient, _amount);\\n return true;\\n }\\n _spendAllowance(_sender, msg.sender, _amount);\\n _transfer(_sender, _recipient, _amount);\\n return true;\\n }\\n\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal override {\\n if (inPrivateTransferMode) {\\n require(isHandler[msg.sender], \\\"EsToken: msg.sender not whitelisted\\\");\\n }\\n super._beforeTokenTransfer(from, to, amount);\\n }\\n}\\n\",\"keccak256\":\"0x0f9aa9b29d2258e7560e1a66f49f87f071c764db41c779a27c7eab3424a9807b\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6080604052346200032f5762001346803803806200001d8162000334565b9283398101906040818303126200032f5780516001600160401b03908181116200032f57836200004f9184016200035a565b91602093848201518381116200032f576200006b92016200035a565b82518281116200022f576003918254916001958684811c9416801562000324575b888510146200030e578190601f94858111620002b8575b508890858311600114620002515760009262000245575b505060001982861b1c191690861b1783555b80519384116200022f5760049586548681811c9116801562000224575b828210146200020f57838111620001c4575b50809285116001146200015657509383949184926000956200014a575b50501b92600019911b1c19161790555b600580546001600160a01b03191633179055604051610f799081620003cd8239f35b01519350388062000118565b92919084601f1981168860005285600020956000905b89838310620001a957505050106200018e575b50505050811b01905562000128565b01519060f884600019921b161c19169055388080806200017f565b8587015189559097019694850194889350908101906200016c565b87600052816000208480880160051c82019284891062000205575b0160051c019087905b828110620001f8575050620000fb565b60008155018790620001e8565b92508192620001df565b602288634e487b7160e01b6000525260246000fd5b90607f1690620000e9565b634e487b7160e01b600052604160045260246000fd5b015190503880620000ba565b90889350601f19831691876000528a6000209260005b8c828210620002a1575050841162000288575b505050811b018355620000cc565b015160001983881b60f8161c191690553880806200027a565b8385015186558c9790950194938401930162000267565b90915085600052886000208580850160051c8201928b861062000304575b918a91869594930160051c01915b828110620002f4575050620000a3565b600081558594508a9101620002e4565b92508192620002d6565b634e487b7160e01b600052602260045260246000fd5b93607f16936200008c565b600080fd5b6040519190601f01601f191682016001600160401b038111838210176200022f57604052565b919080601f840112156200032f5782516001600160401b0381116200022f5760209062000390601f8201601f1916830162000334565b928184528282870101116200032f5760005b818110620003b857508260009394955001015290565b8581018301518482018401528201620003a256fe608060408181526004918236101561001657600080fd5b600092833560e01c91826306fdde031461099857508163095ea7b31461096e57816312d43a511461094557816318160ddd1461092657816323b872dd146108eb578163313ce567146108cf578163395093511461087f57816340c10f191461072857816346ea87af146106ea5781635a47a1a71461069857816370a082311461066157816395d89b41146105425781639cb7de4b146104e55781639dc29fac1461033f578163a457c2d71461029a57508063a9059cbb1461026a578063aa271e1a1461022d578063cf456ae7146101ce578063cfad57a21461017d578063dd62ed3e146101355763dfbaefb11461010c57600080fd5b3461013157816003193601126101315760209060ff60055460a01c1690519015158152f35b5080fd5b503461013157806003193601126101315780602092610152610ab9565b61015a610ad4565b6001600160a01b0391821683526001865283832091168252845220549051908152f35b82346101cb5760203660031901126101cb57610197610ab9565b600554906001600160a01b03906101b13383851614610e01565b16906bffffffffffffffffffffffff60a01b161760055580f35b80fd5b503461013157806003193601126101315761022a906101eb610ab9565b906101f4610aea565b60055490926001600160a01b039161020f9083163314610e01565b168452600660205283209060ff801983541691151516179055565b80f35b50346101315760203660031901126101315760209160ff9082906001600160a01b03610257610ab9565b1681526006855220541690519015158152f35b5034610131578060031936011261013157602090610293610289610ab9565b6024359033610b1c565b5160018152f35b905082346101cb57826003193601126101cb576102b5610ab9565b918360243592338152600160205281812060018060a01b03861682526020522054908282106102ee576020856102938585038733610cff565b608490602086519162461bcd60e51b8352820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152fd5b8391503461013157826003193601126101315761035a610ab9565b6024353384526020916006835261037660ff8787205416610e45565b6001600160a01b03169283156104985760ff60055460a01c16610437575b83855284835285852054908282106103e95750908495817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef94938688528785520381872055816002540360025551908152a380f35b865162461bcd60e51b8152908101849052602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608490fd5b3385526007835260ff868620541661039457855162461bcd60e51b8152908101839052602360248201527f4573546f6b656e3a206d73672e73656e646572206e6f742077686974656c69736044820152621d195960ea1b6064820152608490fd5b855162461bcd60e51b8152908101839052602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608490fd5b50503461013157806003193601126101315761022a90610503610ab9565b9061050c610aea565b60055490926001600160a01b03916105279083163314610e01565b168452600760205283209060ff801983541691151516179055565b838334610131578160031936011261013157805190828454600181811c90808316928315610657575b60209384841081146106445783885290811561062857506001146105d3575b505050829003601f01601f191682019267ffffffffffffffff8411838510176105c057508291826105bc925282610a70565b0390f35b634e487b7160e01b815260418552602490fd5b8787529192508591837f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b838510610614575050505083010185808061058a565b8054888601830152930192849082016105fe565b60ff1916878501525050151560051b840101905085808061058a565b634e487b7160e01b895260228a52602489fd5b91607f169161056b565b5050346101315760203660031901126101315760209181906001600160a01b03610689610ab9565b16815280845220549051908152f35b839034610131576020366003190112610131573580151580910361013157600554906106ce336001600160a01b03841614610e01565b60ff60a01b1990911660a09190911b60ff60a01b161760055580f35b5050346101315760203660031901126101315760209160ff9082906001600160a01b03610715610ab9565b1681526007855220541690519015158152f35b90503461087b578160031936011261087b57610742610ab9565b6024353385526020916006835261075e60ff8688205416610e45565b6001600160a01b0316938415610839579085929160ff60055460a01c166107ca575b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9394506107b082600254610af9565b60025585855284835280852082815401905551908152a380f35b91939092503386526007845260ff8287205416156107ec575084918391610780565b83608492519162461bcd60e51b8352820152602360248201527f4573546f6b656e3a206d73672e73656e646572206e6f742077686974656c69736044820152621d195960ea1b6064820152fd5b5162461bcd60e51b8152808401839052601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606490fd5b8280fd5b5050346101315780600319360112610131576102936020926108c86108a2610ab9565b338352600186528483206001600160a01b03821684528652918490205460243590610af9565b9033610cff565b5050346101315781600319360112610131576020905160128152f35b5050346101315760603660031901126101315760209061091d61090c610ab9565b610914610ad4565b60443591610e86565b90519015158152f35b5050346101315781600319360112610131576020906002549051908152f35b50503461013157816003193601126101315760055490516001600160a01b039091168152602090f35b50503461013157806003193601126101315760209061029361098e610ab9565b6024359033610cff565b8490843461087b578260031936011261087b5782600354600181811c90808316928315610a66575b6020938484108114610644578388529081156106285750600114610a1057505050829003601f01601f191682019267ffffffffffffffff8411838510176105c057508291826105bc925282610a70565b600387529192508591837fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b838510610a52575050505083010185808061058a565b805488860183015293019284908201610a3c565b91607f16916109c0565b6020808252825181830181905290939260005b828110610aa557505060409293506000838284010152601f8019910116010190565b818101860151848201604001528501610a83565b600435906001600160a01b0382168203610acf57565b600080fd5b602435906001600160a01b0382168203610acf57565b602435908115158203610acf57565b91908201809211610b0657565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03908116918215610cac5716918215610c5b5760ff60055460a01c16610bf4575b600082815280602052604081205491808310610ba057604082827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef958760209652828652038282205586815220818154019055604051908152a3565b60405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608490fd5b33600052600760205260ff60406000205416610b445760405162461bcd60e51b815260206004820152602360248201527f4573546f6b656e3a206d73672e73656e646572206e6f742077686974656c69736044820152621d195960ea1b6064820152608490fd5b60405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608490fd5b60405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608490fd5b6001600160a01b03908116918215610db05716918215610d605760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260018252604060002085600052825280604060002055604051908152a3565b60405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608490fd5b60405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b15610e0857565b60405162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b6044820152606490fd5b15610e4c57565b60405162461bcd60e51b815260206004820152601260248201527122b9aa37b5b2b71d103337b93134b23232b760711b6044820152606490fd5b91906000338152600760205260ff604082205416610f39576001600160a01b03841681526001602081815260408084203385529091529091205493908401610ed8575b610ed39350610b1c565b600190565b828410610ef457610eef83610ed395033383610cff565b610ec9565b60405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606490fd5b50610ed392610b1c56fea264697066735822122039c60ab226638efd7dfd7f4a981d06ee73b69ed60c23a236674a452c7782b33a64736f6c63430008130033", + "deployedBytecode": "0x608060408181526004918236101561001657600080fd5b600092833560e01c91826306fdde031461099857508163095ea7b31461096e57816312d43a511461094557816318160ddd1461092657816323b872dd146108eb578163313ce567146108cf578163395093511461087f57816340c10f191461072857816346ea87af146106ea5781635a47a1a71461069857816370a082311461066157816395d89b41146105425781639cb7de4b146104e55781639dc29fac1461033f578163a457c2d71461029a57508063a9059cbb1461026a578063aa271e1a1461022d578063cf456ae7146101ce578063cfad57a21461017d578063dd62ed3e146101355763dfbaefb11461010c57600080fd5b3461013157816003193601126101315760209060ff60055460a01c1690519015158152f35b5080fd5b503461013157806003193601126101315780602092610152610ab9565b61015a610ad4565b6001600160a01b0391821683526001865283832091168252845220549051908152f35b82346101cb5760203660031901126101cb57610197610ab9565b600554906001600160a01b03906101b13383851614610e01565b16906bffffffffffffffffffffffff60a01b161760055580f35b80fd5b503461013157806003193601126101315761022a906101eb610ab9565b906101f4610aea565b60055490926001600160a01b039161020f9083163314610e01565b168452600660205283209060ff801983541691151516179055565b80f35b50346101315760203660031901126101315760209160ff9082906001600160a01b03610257610ab9565b1681526006855220541690519015158152f35b5034610131578060031936011261013157602090610293610289610ab9565b6024359033610b1c565b5160018152f35b905082346101cb57826003193601126101cb576102b5610ab9565b918360243592338152600160205281812060018060a01b03861682526020522054908282106102ee576020856102938585038733610cff565b608490602086519162461bcd60e51b8352820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152fd5b8391503461013157826003193601126101315761035a610ab9565b6024353384526020916006835261037660ff8787205416610e45565b6001600160a01b03169283156104985760ff60055460a01c16610437575b83855284835285852054908282106103e95750908495817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef94938688528785520381872055816002540360025551908152a380f35b865162461bcd60e51b8152908101849052602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608490fd5b3385526007835260ff868620541661039457855162461bcd60e51b8152908101839052602360248201527f4573546f6b656e3a206d73672e73656e646572206e6f742077686974656c69736044820152621d195960ea1b6064820152608490fd5b855162461bcd60e51b8152908101839052602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608490fd5b50503461013157806003193601126101315761022a90610503610ab9565b9061050c610aea565b60055490926001600160a01b03916105279083163314610e01565b168452600760205283209060ff801983541691151516179055565b838334610131578160031936011261013157805190828454600181811c90808316928315610657575b60209384841081146106445783885290811561062857506001146105d3575b505050829003601f01601f191682019267ffffffffffffffff8411838510176105c057508291826105bc925282610a70565b0390f35b634e487b7160e01b815260418552602490fd5b8787529192508591837f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b838510610614575050505083010185808061058a565b8054888601830152930192849082016105fe565b60ff1916878501525050151560051b840101905085808061058a565b634e487b7160e01b895260228a52602489fd5b91607f169161056b565b5050346101315760203660031901126101315760209181906001600160a01b03610689610ab9565b16815280845220549051908152f35b839034610131576020366003190112610131573580151580910361013157600554906106ce336001600160a01b03841614610e01565b60ff60a01b1990911660a09190911b60ff60a01b161760055580f35b5050346101315760203660031901126101315760209160ff9082906001600160a01b03610715610ab9565b1681526007855220541690519015158152f35b90503461087b578160031936011261087b57610742610ab9565b6024353385526020916006835261075e60ff8688205416610e45565b6001600160a01b0316938415610839579085929160ff60055460a01c166107ca575b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9394506107b082600254610af9565b60025585855284835280852082815401905551908152a380f35b91939092503386526007845260ff8287205416156107ec575084918391610780565b83608492519162461bcd60e51b8352820152602360248201527f4573546f6b656e3a206d73672e73656e646572206e6f742077686974656c69736044820152621d195960ea1b6064820152fd5b5162461bcd60e51b8152808401839052601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606490fd5b8280fd5b5050346101315780600319360112610131576102936020926108c86108a2610ab9565b338352600186528483206001600160a01b03821684528652918490205460243590610af9565b9033610cff565b5050346101315781600319360112610131576020905160128152f35b5050346101315760603660031901126101315760209061091d61090c610ab9565b610914610ad4565b60443591610e86565b90519015158152f35b5050346101315781600319360112610131576020906002549051908152f35b50503461013157816003193601126101315760055490516001600160a01b039091168152602090f35b50503461013157806003193601126101315760209061029361098e610ab9565b6024359033610cff565b8490843461087b578260031936011261087b5782600354600181811c90808316928315610a66575b6020938484108114610644578388529081156106285750600114610a1057505050829003601f01601f191682019267ffffffffffffffff8411838510176105c057508291826105bc925282610a70565b600387529192508591837fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b838510610a52575050505083010185808061058a565b805488860183015293019284908201610a3c565b91607f16916109c0565b6020808252825181830181905290939260005b828110610aa557505060409293506000838284010152601f8019910116010190565b818101860151848201604001528501610a83565b600435906001600160a01b0382168203610acf57565b600080fd5b602435906001600160a01b0382168203610acf57565b602435908115158203610acf57565b91908201809211610b0657565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03908116918215610cac5716918215610c5b5760ff60055460a01c16610bf4575b600082815280602052604081205491808310610ba057604082827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef958760209652828652038282205586815220818154019055604051908152a3565b60405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608490fd5b33600052600760205260ff60406000205416610b445760405162461bcd60e51b815260206004820152602360248201527f4573546f6b656e3a206d73672e73656e646572206e6f742077686974656c69736044820152621d195960ea1b6064820152608490fd5b60405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608490fd5b60405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608490fd5b6001600160a01b03908116918215610db05716918215610d605760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260018252604060002085600052825280604060002055604051908152a3565b60405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608490fd5b60405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b15610e0857565b60405162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b6044820152606490fd5b15610e4c57565b60405162461bcd60e51b815260206004820152601260248201527122b9aa37b5b2b71d103337b93134b23232b760711b6044820152606490fd5b91906000338152600760205260ff604082205416610f39576001600160a01b03841681526001602081815260408084203385529091529091205493908401610ed8575b610ed39350610b1c565b600190565b828410610ef457610eef83610ed395033383610cff565b610ec9565b60405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606490fd5b50610ed392610b1c56fea264697066735822122039c60ab226638efd7dfd7f4a981d06ee73b69ed60c23a236674a452c7782b33a64736f6c63430008130033", + "devdoc": { + "events": { + "Approval(address,address,uint256)": { + "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance." + }, + "Transfer(address,address,uint256)": { + "details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero." + } + }, + "kind": "dev", + "methods": { + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "See {IERC20-balanceOf}." + }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." + }, + "name()": { + "details": "Returns the name of the token." + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "totalSupply()": { + "details": "See {IERC20-totalSupply}." + }, + "transfer(address,uint256)": { + "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 15, + "contract": "contracts/tokens/erc20/EsToken.sol:EsToken", + "label": "_balances", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 21, + "contract": "contracts/tokens/erc20/EsToken.sol:EsToken", + "label": "_allowances", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 23, + "contract": "contracts/tokens/erc20/EsToken.sol:EsToken", + "label": "_totalSupply", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 25, + "contract": "contracts/tokens/erc20/EsToken.sol:EsToken", + "label": "_name", + "offset": 0, + "slot": "3", + "type": "t_string_storage" + }, + { + "astId": 27, + "contract": "contracts/tokens/erc20/EsToken.sol:EsToken", + "label": "_symbol", + "offset": 0, + "slot": "4", + "type": "t_string_storage" + }, + { + "astId": 1465, + "contract": "contracts/tokens/erc20/EsToken.sol:EsToken", + "label": "gov", + "offset": 0, + "slot": "5", + "type": "t_address" + }, + { + "astId": 1546, + "contract": "contracts/tokens/erc20/EsToken.sol:EsToken", + "label": "inPrivateTransferMode", + "offset": 20, + "slot": "5", + "type": "t_bool" + }, + { + "astId": 1551, + "contract": "contracts/tokens/erc20/EsToken.sol:EsToken", + "label": "isMinter", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 1555, + "contract": "contracts/tokens/erc20/EsToken.sol:EsToken", + "label": "isHandler", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_address,t_bool)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/bsc_test/RewardDistributor.json b/deployments/bsc_test/RewardDistributor.json new file mode 100644 index 0000000..5f77262 --- /dev/null +++ b/deployments/bsc_test/RewardDistributor.json @@ -0,0 +1,338 @@ +{ + "address": "0x96d38E8e6470871F756F1a2e9dF614BCebd57AE8", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_rewardTracker", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Distribute", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokensPerIntervalChange", + "type": "event" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_decimals", + "type": "uint256" + } + ], + "name": "distribute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "gov", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastDistributionTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingRewards", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardTracker", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_admin", + "type": "address" + } + ], + "name": "setAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_gov", + "type": "address" + } + ], + "name": "setGov", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "setTokensPerInterval", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "tokensPerInterval", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "updateLastDistributionTime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xa82811369839dc96cebffba5d35701466fd1ef0b88fc0d2c6e77f80fbde2ff56", + "receipt": { + "to": null, + "from": "0x50A8e60041A206AcaA5F844a1104896224be6F39", + "contractAddress": "0x96d38E8e6470871F756F1a2e9dF614BCebd57AE8", + "transactionIndex": 1, + "gasUsed": "701310", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x10e660e6adb766ae3f77b4432d1785945edf2a52e3b3a4017d79bf71424f9f68", + "transactionHash": "0xa82811369839dc96cebffba5d35701466fd1ef0b88fc0d2c6e77f80fbde2ff56", + "logs": [], + "blockNumber": 43369449, + "cumulativeGasUsed": "1019909", + "status": 1, + "byzantium": true + }, + "args": [ + "0x68Db28B700B2AC2A5034A5c8bD70c1Ffc3E587DD", + "0xC28165d2db25De1B258Db835d3557Dee044b1C3a" + ], + "numDeployments": 1, + "solcInputHash": "35d1d20dc9b7194768908e34f12939fd", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rewardToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_rewardTracker\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Distribute\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensPerIntervalChange\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_decimals\",\"type\":\"uint256\"}],\"name\":\"distribute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gov\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastDistributionTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardTracker\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"}],\"name\":\"setAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_gov\",\"type\":\"address\"}],\"name\":\"setGov\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"setTokensPerInterval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokensPerInterval\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateLastDistributionTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/staking/RewardDistributor.sol\":\"RewardDistributor\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@openzeppelin/contracts/security/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n constructor() {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n _nonReentrantBefore();\\n _;\\n _nonReentrantAfter();\\n }\\n\\n function _nonReentrantBefore() private {\\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n }\\n\\n function _nonReentrantAfter() private {\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Returns true if the reentrancy guard is currently set to \\\"entered\\\", which indicates there is a\\n * `nonReentrant` function in the call stack.\\n */\\n function _reentrancyGuardEntered() internal view returns (bool) {\\n return _status == _ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa535a5df777d44e945dd24aa43a11e44b024140fc340ad0dfe42acf4002aade1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n *\\n * ==== Security Considerations\\n *\\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\\n * generally recommended is:\\n *\\n * ```solidity\\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\\n * doThing(..., value);\\n * }\\n *\\n * function doThing(..., uint256 value) public {\\n * token.safeTransferFrom(msg.sender, address(this), value);\\n * ...\\n * }\\n * ```\\n *\\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\\n * {SafeERC20-safeTransferFrom}).\\n *\\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\\n * contracts should have entry points that don't rely on permit.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n *\\n * CAUTION: See Security Considerations above.\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xb264c03a3442eb37a68ad620cefd1182766b58bee6cec40343480392d6b14d69\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/IERC20Permit.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n IERC20Permit token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit(owner, spender, value, deadline, v, r, s);\\n uint256 nonceAfter = token.nonces(owner);\\n require(nonceAfter == nonceBefore + 1, \\\"SafeERC20: permit did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0xabefac93435967b4d36a4fabcbdbb918d1f0b7ae3c3d85bc30923b326c927ed1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"contracts/core/Governable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\ncontract Governable {\\n address public gov;\\n\\n constructor() {\\n gov = msg.sender;\\n }\\n\\n modifier onlyGov() {\\n require(msg.sender == gov, \\\"Governable: forbidden\\\");\\n _;\\n }\\n\\n function setGov(address _gov) external onlyGov {\\n gov = _gov;\\n }\\n}\\n\",\"keccak256\":\"0xcb7c11d1557db3369d984c7e804b1946c79867f3ab2dd2793ad3bb502c6c2383\",\"license\":\"MIT\"},\"contracts/staking/RewardDistributor.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {ReentrancyGuard} from \\\"@openzeppelin/contracts/security/ReentrancyGuard.sol\\\";\\nimport {SafeERC20} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport {IRewardDistributor} from \\\"./interfaces/IRewardDistributor.sol\\\";\\nimport {IRewardTracker} from \\\"./interfaces/IRewardTracker.sol\\\";\\nimport {Governable} from \\\"../core/Governable.sol\\\";\\n\\ncontract RewardDistributor is IRewardDistributor, ReentrancyGuard, Governable {\\n using SafeERC20 for IERC20;\\n\\n address public override rewardToken;\\n uint256 public override tokensPerInterval;\\n uint256 public lastDistributionTime;\\n address public rewardTracker;\\n\\n address public admin;\\n\\n event Distribute(uint256 amount);\\n event TokensPerIntervalChange(uint256 amount);\\n\\n modifier onlyAdmin() {\\n require(msg.sender == admin, \\\"RewardDistributor: forbidden\\\");\\n _;\\n }\\n\\n constructor(address _rewardToken, address _rewardTracker) {\\n rewardToken = _rewardToken;\\n rewardTracker = _rewardTracker;\\n admin = msg.sender;\\n }\\n\\n function setAdmin(address _admin) external onlyGov {\\n admin = _admin;\\n }\\n\\n // to help users who accidentally send their tokens to this contract\\n function withdrawToken(address _token, address _account, uint256 _amount) external onlyGov {\\n IERC20(_token).safeTransfer(_account, _amount);\\n }\\n\\n function updateLastDistributionTime() external onlyAdmin {\\n lastDistributionTime = block.timestamp;\\n }\\n\\n function setTokensPerInterval(uint256 _amount) external onlyAdmin {\\n require(lastDistributionTime != 0, \\\"RewardDistributor: invalid lastDistributionTime\\\");\\n IRewardTracker(rewardTracker).updateRewards();\\n tokensPerInterval = _amount;\\n emit TokensPerIntervalChange(_amount);\\n }\\n\\n function pendingRewards() public view override returns (uint256) {\\n if (block.timestamp == lastDistributionTime) {\\n return 0;\\n }\\n\\n uint256 timeDiff = block.timestamp - lastDistributionTime;\\n return tokensPerInterval * timeDiff;\\n }\\n\\n function distribute(uint256 _amount, uint256 _decimals) external override returns (uint256) {\\n require(msg.sender == rewardTracker, \\\"RewardDistributor: invalid msg.sender\\\");\\n uint256 amount = pendingRewards();\\n if (amount == 0) {\\n return 0;\\n }\\n\\n lastDistributionTime = block.timestamp;\\n\\n uint256 tokenAmount = amount * _amount / (10**_decimals);\\n\\n uint256 balance = IERC20(rewardToken).balanceOf(address(this));\\n require(tokenAmount <= balance, \\\"RewardDistributor: insufficient balance\\\");\\n \\n IERC20(rewardToken).safeTransfer(msg.sender, tokenAmount);\\n\\n emit Distribute(tokenAmount);\\n return amount;\\n }\\n}\\n\",\"keccak256\":\"0x265811718d15ed8b8bccded0a8293c33cfffabea66f45697b61639eec223c06a\",\"license\":\"MIT\"},\"contracts/staking/interfaces/IRewardDistributor.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\ninterface IRewardDistributor {\\n function rewardToken() external view returns (address);\\n function tokensPerInterval() external view returns (uint256);\\n function pendingRewards() external view returns (uint256);\\n function distribute(uint256 _amount, uint256 _decimals) external returns (uint256);\\n}\\n\",\"keccak256\":\"0xdeaca84d9686df6c6a0c41dd9b7a77bd25d15ae053e33f2e86d4006fa87db8c3\",\"license\":\"MIT\"},\"contracts/staking/interfaces/IRewardTracker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\ninterface IRewardTracker {\\n function depositBalances(address _account, address _depositToken) external view returns (uint256);\\n function stakedAmounts(address _account) external view returns (uint256);\\n function updateRewards() external;\\n function stake(address _depositToken, uint256 _amount) external;\\n function stakeForAccount(address _fundingAccount, address _account, address _depositToken, uint256 _amount) external;\\n function unstake(address _depositToken, uint256 _amount) external;\\n function unstakeForAccount(address _account, address _depositToken, uint256 _amount, address _receiver) external;\\n function tokensPerInterval() external view returns (uint256);\\n function claim(address _receiver) external returns (uint256);\\n function claimForAccount(address _account, address _receiver) external returns (uint256);\\n function claimable(address _account) external view returns (uint256);\\n function averageStakedAmounts(address _account) external view returns (uint256);\\n function cumulativeRewards(address _account) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x6e0078848746c69ab4c824269552ce070b6fa449cc6803754265fe63cd1b0424\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6080346100a157601f610a7638819003918201601f19168301916001600160401b038311848410176100a65780849260409485528339810103126100a157610052602061004b836100bc565b92016100bc565b90600160005560018060a01b0319913383600154161760015560018060a01b0380921683600254161760025516816005541617600555339060065416176006556040516109a590816100d18239f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b03821682036100a15756fe6040608081526004908136101561001557600080fd5b600091823560e01c90816301e33667146103d557816312d43a51146103ac57816318e20a03146102825781633ae6d6eb146102555781636bcb411a1461022c578163704b6c02146101dc57816375b17350146101ba5781637625391a1461019757508063a8d9362714610179578063cfad57a214610128578063eded3fda14610105578063f7c618c1146100dd5763f851a440146100b257600080fd5b346100d957816003193601126100d95760065490516001600160a01b039091168152602090f35b5080fd5b50346100d957816003193601126100d95760025490516001600160a01b039091168152602090f35b50346100d957816003193601126100d95760209061012161078c565b9051908152f35b823461017657602036600319011261017657610142610428565b600154906001600160a01b039061015c3383851614610443565b16906bffffffffffffffffffffffff60a01b161760015580f35b80fd5b50346100d957816003193601126100d9576020906003549051908152f35b8284346101765781600319360112610176575061012160209260243590356107b4565b9050346101d857826003193601126101d85760209250549051908152f35b8280fd5b8334610176576020366003190112610176576101f6610428565b6001546001600160a01b0391906102109083163314610443565b166bffffffffffffffffffffffff60a01b600654161760065580f35b5050346100d957816003193601126100d95760055490516001600160a01b039091168152602090f35b8390346100d957816003193601126100d95761027c60018060a01b03600654163314610717565b42905580f35b919050346101d85760203660031901126101d85781359160018060a01b036102af81600654163314610717565b8154156103515790849160055416803b156101d857829082855180958193630f8562c360e21b83525af1801561034757610316575b847f98dc76c39aa5a5dcb749f8750a65db3dfa1e14bcc1591a9c16a7420e5da748f8602086868160035551908152a180f35b67ffffffffffffffff829593951161033457508352918160206102e4565b634e487b7160e01b835260419052602482fd5b83513d87823e3d90fd5b506020608492519162461bcd60e51b8352820152602f60248201527f5265776172644469737472696275746f723a20696e76616c6964206c6173744460448201526e6973747269627574696f6e54696d6560881b6064820152fd5b5050346100d957816003193601126100d95760015490516001600160a01b039091168152602090f35b8334610176576060366003190112610176576103ef610428565b6001600160a01b03906024358281168103610424578261041761042194600154163314610443565b60443592166104bf565b80f35b8380fd5b600435906001600160a01b038216820361043e57565b600080fd5b1561044a57565b60405162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b6044820152606490fd5b90601f8019910116810190811067ffffffffffffffff8211176104a957604052565b634e487b7160e01b600052604160045260246000fd5b60405163a9059cbb60e01b60208083019182526001600160a01b03948516602484015260448084019690965294825292608082019267ffffffffffffffff929190838511838610176104a957169060c08101848110848211176104a9576040528584527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656460a0820152600080958192519082855af1903d15610638573d928311610624579061058e9392916040519261058188601f19601f8401160185610487565b83523d868885013e610643565b805191821591848315610600575b5050509050156105a95750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b9193818094500103126100d95782015190811515820361017657508038808461059c565b634e487b7160e01b85526041600452602485fd5b9061058e9392506060915b919290156106a55750815115610657575090565b3b156106605790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156106b85750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b8285106106fe575050604492506000838284010152601f80199101168101030190fd5b84810182015186860160440152938101938593506106db565b1561071e57565b60405162461bcd60e51b815260206004820152601c60248201527f5265776172644469737472696275746f723a20666f7262696464656e000000006044820152606490fd5b8181029291811591840414171561077657565b634e487b7160e01b600052601160045260246000fd5b6004548042146107ae574203428111610776576107ab90600354610763565b90565b50600090565b60055490916001600160a01b03918216330361091c576107d261078c565b928315610913576107e7904260045584610763565b90604d811161077657600a0a9081156108fd5704906002541690604051916370a0823160e01b83523060048401526020928381602481855afa9081156108f1576000916108c4575b50821161086f5790610865817f4def474aca53bf221d07d9ab0f675b3f6d8d2494b8427271bcf43c018ef1eead949333906104bf565b604051908152a190565b60405162461bcd60e51b815260048101849052602760248201527f5265776172644469737472696275746f723a20696e73756666696369656e742060448201526662616c616e636560c81b6064820152608490fd5b908482813d83116108ea575b6108da8183610487565b810103126101765750513861082f565b503d6108d0565b6040513d6000823e3d90fd5b634e487b7160e01b600052601260045260246000fd5b50505050600090565b60405162461bcd60e51b815260206004820152602560248201527f5265776172644469737472696275746f723a20696e76616c6964206d73672e7360448201526432b73232b960d91b6064820152608490fdfea2646970667358221220143b643604569f6cbd8674d3264e614faea1394a6bb4ae34c7b1c41f479ac78364736f6c63430008130033", + "deployedBytecode": "0x6040608081526004908136101561001557600080fd5b600091823560e01c90816301e33667146103d557816312d43a51146103ac57816318e20a03146102825781633ae6d6eb146102555781636bcb411a1461022c578163704b6c02146101dc57816375b17350146101ba5781637625391a1461019757508063a8d9362714610179578063cfad57a214610128578063eded3fda14610105578063f7c618c1146100dd5763f851a440146100b257600080fd5b346100d957816003193601126100d95760065490516001600160a01b039091168152602090f35b5080fd5b50346100d957816003193601126100d95760025490516001600160a01b039091168152602090f35b50346100d957816003193601126100d95760209061012161078c565b9051908152f35b823461017657602036600319011261017657610142610428565b600154906001600160a01b039061015c3383851614610443565b16906bffffffffffffffffffffffff60a01b161760015580f35b80fd5b50346100d957816003193601126100d9576020906003549051908152f35b8284346101765781600319360112610176575061012160209260243590356107b4565b9050346101d857826003193601126101d85760209250549051908152f35b8280fd5b8334610176576020366003190112610176576101f6610428565b6001546001600160a01b0391906102109083163314610443565b166bffffffffffffffffffffffff60a01b600654161760065580f35b5050346100d957816003193601126100d95760055490516001600160a01b039091168152602090f35b8390346100d957816003193601126100d95761027c60018060a01b03600654163314610717565b42905580f35b919050346101d85760203660031901126101d85781359160018060a01b036102af81600654163314610717565b8154156103515790849160055416803b156101d857829082855180958193630f8562c360e21b83525af1801561034757610316575b847f98dc76c39aa5a5dcb749f8750a65db3dfa1e14bcc1591a9c16a7420e5da748f8602086868160035551908152a180f35b67ffffffffffffffff829593951161033457508352918160206102e4565b634e487b7160e01b835260419052602482fd5b83513d87823e3d90fd5b506020608492519162461bcd60e51b8352820152602f60248201527f5265776172644469737472696275746f723a20696e76616c6964206c6173744460448201526e6973747269627574696f6e54696d6560881b6064820152fd5b5050346100d957816003193601126100d95760015490516001600160a01b039091168152602090f35b8334610176576060366003190112610176576103ef610428565b6001600160a01b03906024358281168103610424578261041761042194600154163314610443565b60443592166104bf565b80f35b8380fd5b600435906001600160a01b038216820361043e57565b600080fd5b1561044a57565b60405162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b6044820152606490fd5b90601f8019910116810190811067ffffffffffffffff8211176104a957604052565b634e487b7160e01b600052604160045260246000fd5b60405163a9059cbb60e01b60208083019182526001600160a01b03948516602484015260448084019690965294825292608082019267ffffffffffffffff929190838511838610176104a957169060c08101848110848211176104a9576040528584527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656460a0820152600080958192519082855af1903d15610638573d928311610624579061058e9392916040519261058188601f19601f8401160185610487565b83523d868885013e610643565b805191821591848315610600575b5050509050156105a95750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b9193818094500103126100d95782015190811515820361017657508038808461059c565b634e487b7160e01b85526041600452602485fd5b9061058e9392506060915b919290156106a55750815115610657575090565b3b156106605790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156106b85750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b8285106106fe575050604492506000838284010152601f80199101168101030190fd5b84810182015186860160440152938101938593506106db565b1561071e57565b60405162461bcd60e51b815260206004820152601c60248201527f5265776172644469737472696275746f723a20666f7262696464656e000000006044820152606490fd5b8181029291811591840414171561077657565b634e487b7160e01b600052601160045260246000fd5b6004548042146107ae574203428111610776576107ab90600354610763565b90565b50600090565b60055490916001600160a01b03918216330361091c576107d261078c565b928315610913576107e7904260045584610763565b90604d811161077657600a0a9081156108fd5704906002541690604051916370a0823160e01b83523060048401526020928381602481855afa9081156108f1576000916108c4575b50821161086f5790610865817f4def474aca53bf221d07d9ab0f675b3f6d8d2494b8427271bcf43c018ef1eead949333906104bf565b604051908152a190565b60405162461bcd60e51b815260048101849052602760248201527f5265776172644469737472696275746f723a20696e73756666696369656e742060448201526662616c616e636560c81b6064820152608490fd5b908482813d83116108ea575b6108da8183610487565b810103126101765750513861082f565b503d6108d0565b6040513d6000823e3d90fd5b634e487b7160e01b600052601260045260246000fd5b50505050600090565b60405162461bcd60e51b815260206004820152602560248201527f5265776172644469737472696275746f723a20696e76616c6964206d73672e7360448201526432b73232b960d91b6064820152608490fdfea2646970667358221220143b643604569f6cbd8674d3264e614faea1394a6bb4ae34c7b1c41f479ac78364736f6c63430008130033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 10, + "contract": "contracts/staking/RewardDistributor.sol:RewardDistributor", + "label": "_status", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 888, + "contract": "contracts/staking/RewardDistributor.sol:RewardDistributor", + "label": "gov", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 980, + "contract": "contracts/staking/RewardDistributor.sol:RewardDistributor", + "label": "rewardToken", + "offset": 0, + "slot": "2", + "type": "t_address" + }, + { + "astId": 983, + "contract": "contracts/staking/RewardDistributor.sol:RewardDistributor", + "label": "tokensPerInterval", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 985, + "contract": "contracts/staking/RewardDistributor.sol:RewardDistributor", + "label": "lastDistributionTime", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 987, + "contract": "contracts/staking/RewardDistributor.sol:RewardDistributor", + "label": "rewardTracker", + "offset": 0, + "slot": "5", + "type": "t_address" + }, + { + "astId": 989, + "contract": "contracts/staking/RewardDistributor.sol:RewardDistributor", + "label": "admin", + "offset": 0, + "slot": "6", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/bsc_test/RewardRouter.json b/deployments/bsc_test/RewardRouter.json new file mode 100644 index 0000000..d6b4c34 --- /dev/null +++ b/deployments/bsc_test/RewardRouter.json @@ -0,0 +1,413 @@ +{ + "address": "0x932956063849FceE07d60D9daee94eC0651810bc", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_cec", + "type": "address" + }, + { + "internalType": "address", + "name": "_esCec", + "type": "address" + }, + { + "internalType": "address", + "name": "_stakedCecTracker", + "type": "address" + }, + { + "internalType": "address", + "name": "_cecVester", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "StakeCec", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "UnstakeCec", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_accounts", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "_amounts", + "type": "uint256[]" + } + ], + "name": "batchStakeCecForAccount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "cec", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cecVester", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "claim", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "claimEsCec", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "esCec", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gov", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_shouldClaimCec", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_shouldStakeCec", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_shouldClaimEsCec", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_shouldStakeEsCec", + "type": "bool" + } + ], + "name": "handleRewards", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_gov", + "type": "address" + } + ], + "name": "setGov", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "stakeCec", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "stakeCecForAccount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "stakeEsCec", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "stakedCecTracker", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "unstakeCec", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "unstakeEsCec", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x7c7d7e75476ac867461da171c840455ff2344fc52bbe973330e8c7aeffa61fde", + "receipt": { + "to": null, + "from": "0x50A8e60041A206AcaA5F844a1104896224be6F39", + "contractAddress": "0x932956063849FceE07d60D9daee94eC0651810bc", + "transactionIndex": 0, + "gasUsed": "917182", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x7207c45d25062cc41ff0db8166b0993e289d8bb9537518c0ab4b741f42a7378c", + "transactionHash": "0x7c7d7e75476ac867461da171c840455ff2344fc52bbe973330e8c7aeffa61fde", + "logs": [], + "blockNumber": 43369456, + "cumulativeGasUsed": "917182", + "status": 1, + "byzantium": true + }, + "args": [ + "0xe34c5ea0c3083d11a735dc0609533b92130319f5", + "0x68Db28B700B2AC2A5034A5c8bD70c1Ffc3E587DD", + "0xC28165d2db25De1B258Db835d3557Dee044b1C3a", + "0x10F883D6e26fBb56Ab20466502BFD9017a1ea144" + ], + "numDeployments": 1, + "solcInputHash": "35d1d20dc9b7194768908e34f12939fd", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_cec\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_esCec\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_stakedCecTracker\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_cecVester\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"StakeCec\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"UnstakeCec\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_accounts\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_amounts\",\"type\":\"uint256[]\"}],\"name\":\"batchStakeCecForAccount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"cec\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"cecVester\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimEsCec\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"esCec\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gov\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_shouldClaimCec\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_shouldStakeCec\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_shouldClaimEsCec\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_shouldStakeEsCec\",\"type\":\"bool\"}],\"name\":\"handleRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_gov\",\"type\":\"address\"}],\"name\":\"setGov\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"stakeCec\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"stakeCecForAccount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"stakeEsCec\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stakedCecTracker\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"unstakeCec\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"unstakeEsCec\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/staking/RewardRouter.sol\":\"RewardRouter\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@openzeppelin/contracts/security/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n constructor() {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n _nonReentrantBefore();\\n _;\\n _nonReentrantAfter();\\n }\\n\\n function _nonReentrantBefore() private {\\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n }\\n\\n function _nonReentrantAfter() private {\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Returns true if the reentrancy guard is currently set to \\\"entered\\\", which indicates there is a\\n * `nonReentrant` function in the call stack.\\n */\\n function _reentrancyGuardEntered() internal view returns (bool) {\\n return _status == _ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa535a5df777d44e945dd24aa43a11e44b024140fc340ad0dfe42acf4002aade1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n *\\n * ==== Security Considerations\\n *\\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\\n * generally recommended is:\\n *\\n * ```solidity\\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\\n * doThing(..., value);\\n * }\\n *\\n * function doThing(..., uint256 value) public {\\n * token.safeTransferFrom(msg.sender, address(this), value);\\n * ...\\n * }\\n * ```\\n *\\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\\n * {SafeERC20-safeTransferFrom}).\\n *\\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\\n * contracts should have entry points that don't rely on permit.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n *\\n * CAUTION: See Security Considerations above.\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xb264c03a3442eb37a68ad620cefd1182766b58bee6cec40343480392d6b14d69\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/IERC20Permit.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n IERC20Permit token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit(owner, spender, value, deadline, v, r, s);\\n uint256 nonceAfter = token.nonces(owner);\\n require(nonceAfter == nonceBefore + 1, \\\"SafeERC20: permit did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0xabefac93435967b4d36a4fabcbdbb918d1f0b7ae3c3d85bc30923b326c927ed1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"contracts/core/Governable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\ncontract Governable {\\n address public gov;\\n\\n constructor() {\\n gov = msg.sender;\\n }\\n\\n modifier onlyGov() {\\n require(msg.sender == gov, \\\"Governable: forbidden\\\");\\n _;\\n }\\n\\n function setGov(address _gov) external onlyGov {\\n gov = _gov;\\n }\\n}\\n\",\"keccak256\":\"0xcb7c11d1557db3369d984c7e804b1946c79867f3ab2dd2793ad3bb502c6c2383\",\"license\":\"MIT\"},\"contracts/staking/RewardRouter.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {ReentrancyGuard} from \\\"@openzeppelin/contracts/security/ReentrancyGuard.sol\\\";\\nimport {SafeERC20} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport {IRewardTracker} from \\\"./interfaces/IRewardTracker.sol\\\";\\nimport {IVester} from \\\"./interfaces/IVester.sol\\\";\\nimport {Governable} from \\\"../core/Governable.sol\\\";\\n\\ncontract RewardRouter is ReentrancyGuard, Governable {\\n using SafeERC20 for IERC20;\\n\\n address public cec;\\n address public esCec;\\n\\n address public stakedCecTracker;\\n address public cecVester;\\n\\n event StakeCec(address account, address token, uint256 amount);\\n event UnstakeCec(address account, address token, uint256 amount);\\n\\n constructor(address _cec, address _esCec, address _stakedCecTracker, address _cecVester) {\\n cec = _cec;\\n esCec = _esCec;\\n stakedCecTracker = _stakedCecTracker;\\n cecVester = _cecVester;\\n }\\n\\n // to help users who accidentally send their tokens to this contract\\n function withdrawToken(address _token, address _account, uint256 _amount) external onlyGov {\\n IERC20(_token).safeTransfer(_account, _amount);\\n }\\n\\n function batchStakeCecForAccount(\\n address[] memory _accounts,\\n uint256[] memory _amounts\\n ) external nonReentrant onlyGov {\\n address _cec = cec;\\n for (uint256 i = 0; i < _accounts.length; i++) {\\n _stakeCec(msg.sender, _accounts[i], _cec, _amounts[i]);\\n }\\n }\\n\\n function stakeCecForAccount(address _account, uint256 _amount) external nonReentrant onlyGov {\\n _stakeCec(msg.sender, _account, cec, _amount);\\n }\\n\\n function stakeCec(uint256 _amount) external nonReentrant {\\n _stakeCec(msg.sender, msg.sender, cec, _amount);\\n }\\n\\n function stakeEsCec(uint256 _amount) external nonReentrant {\\n _stakeCec(msg.sender, msg.sender, esCec, _amount);\\n }\\n\\n function unstakeCec(uint256 _amount) external nonReentrant {\\n _unstakeCec(msg.sender, cec, _amount);\\n }\\n\\n function unstakeEsCec(uint256 _amount) external nonReentrant {\\n _unstakeCec(msg.sender, esCec, _amount);\\n }\\n\\n function claim() external nonReentrant {\\n address account = msg.sender;\\n\\n IRewardTracker(stakedCecTracker).claimForAccount(account, account);\\n }\\n\\n function claimEsCec() external nonReentrant {\\n address account = msg.sender;\\n IRewardTracker(stakedCecTracker).claimForAccount(account, account);\\n }\\n\\n function handleRewards(\\n bool _shouldClaimCec,\\n bool _shouldStakeCec,\\n bool _shouldClaimEsCec,\\n bool _shouldStakeEsCec\\n ) external nonReentrant {\\n address account = msg.sender;\\n\\n uint256 cecAmount = 0;\\n if (_shouldClaimCec) {\\n cecAmount = IVester(cecVester).claimForAccount(account, account);\\n }\\n\\n if (_shouldStakeCec && cecAmount > 0) {\\n _stakeCec(account, account, cec, cecAmount);\\n }\\n\\n uint256 esCecAmount = 0;\\n if (_shouldClaimEsCec) {\\n esCecAmount = IRewardTracker(stakedCecTracker).claimForAccount(account, account);\\n }\\n\\n if (_shouldStakeEsCec && esCecAmount > 0) {\\n _stakeCec(account, account, esCec, esCecAmount);\\n }\\n }\\n\\n function _stakeCec(address _fundingAccount, address _account, address _token, uint256 _amount) private {\\n require(_amount > 0, \\\"invalid _amount\\\");\\n\\n IRewardTracker(stakedCecTracker).stakeForAccount(_fundingAccount, _account, _token, _amount);\\n\\n emit StakeCec(_account, _token, _amount);\\n }\\n\\n function _unstakeCec(address _account, address _token, uint256 _amount) private {\\n require(_amount > 0, \\\"invalid _amount\\\");\\n // uint256 balance = IRewardTracker(stakedCecTracker).stakedAmounts(_account);\\n IRewardTracker(stakedCecTracker).unstakeForAccount(_account, _token, _amount, _account);\\n\\n emit UnstakeCec(_account, _token, _amount);\\n }\\n}\\n\",\"keccak256\":\"0x4452b59598842f909b6cf76056ccab59040999ac35225a3a33b79c5bec6f1072\",\"license\":\"MIT\"},\"contracts/staking/interfaces/IRewardTracker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\ninterface IRewardTracker {\\n function depositBalances(address _account, address _depositToken) external view returns (uint256);\\n function stakedAmounts(address _account) external view returns (uint256);\\n function updateRewards() external;\\n function stake(address _depositToken, uint256 _amount) external;\\n function stakeForAccount(address _fundingAccount, address _account, address _depositToken, uint256 _amount) external;\\n function unstake(address _depositToken, uint256 _amount) external;\\n function unstakeForAccount(address _account, address _depositToken, uint256 _amount, address _receiver) external;\\n function tokensPerInterval() external view returns (uint256);\\n function claim(address _receiver) external returns (uint256);\\n function claimForAccount(address _account, address _receiver) external returns (uint256);\\n function claimable(address _account) external view returns (uint256);\\n function averageStakedAmounts(address _account) external view returns (uint256);\\n function cumulativeRewards(address _account) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x6e0078848746c69ab4c824269552ce070b6fa449cc6803754265fe63cd1b0424\",\"license\":\"MIT\"},\"contracts/staking/interfaces/IVester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\ninterface IVester {\\n function rewardTracker() external view returns (address);\\n\\n function claimForAccount(address _account, address _receiver) external returns (uint256);\\n\\n function claimable(address _account) external view returns (uint256);\\n function cumulativeClaimAmounts(address _account) external view returns (uint256);\\n function claimedAmounts(address _account) external view returns (uint256);\\n function pairAmounts(address _account) external view returns (uint256);\\n function getVestedAmount(address _account) external view returns (uint256);\\n function cumulativeRewardDeductions(address _account) external view returns (uint256);\\n function bonusRewards(address _account) external view returns (uint256);\\n\\n function setCumulativeRewardDeductions(address _account, uint256 _amount) external;\\n function setBonusRewards(address _account, uint256 _amount) external;\\n\\n function getMaxVestableAmount(address _account) external view returns (uint256);\\n function getCombinedAverageStakedAmount(address _account) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xe68b0e76d8db17b13d0b425a329955d00e450c09fa3b9892121c23942b99b512\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6080346100c857601f610e1538819003918201601f19168301916001600160401b038311848410176100cd578084926080946040528339810103126100c857610047816100e3565b610053602083016100e3565b9061006c6060610065604086016100e3565b94016100e3565b90600160005560018060a01b0319933385600154161760015560018060a01b03809481809416876002541617600255168560035416176003551683600454161760045516906005541617600555604051610d1d90816100f88239f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b03821682036100c85756fe6040608081526004908136101561001557600080fd5b600091823560e01c90816301e33667146106c557816305a174c11461069c57816312d43a511461067357816319ff26ae1461064a578163232efcb3146104b05781632d741940146102c2578163319489e61461028e57816334da865014610238578163362a4bb9146102595781634e71d92d1461023857816371dfbd921461020f578163b65b4973146101e3578163b6e0b05a146101ae578163becdd3291461017a57508063cfad57a21461012c5763d4ebb8b9146100d357600080fd5b34610128573660031901126101255761011e6100ed61089a565b6100f5610a5b565b6001546001600160a01b03919061010f9083163314610919565b60243591600254169033610b67565b6001815580f35b80fd5b5080fd5b82346101255760203660031901126101255761014661089a565b600154906001600160a01b03906101603383851614610919565b16906bffffffffffffffffffffffff60a01b161760015580f35b8390346101285760203660031901126101285761011e90610199610a5b565b6003549035906001600160a01b031633610c32565b8390346101285760203660031901126101285761011e906101cd610a5b565b6003549035906001600160a01b03163380610b67565b90503461020b578260031936011261020b575490516001600160a01b03909116815260209150f35b8280fd5b50503461012857816003193601126101285760025490516001600160a01b039091168152602090f35b8334610125578060031936011261012557610251610a5b565b61011e610ab1565b8390346101285760203660031901126101285761011e90610278610a5b565b6002549035906001600160a01b03163380610b67565b8390346101285760203660031901126101285761011e906102ad610a5b565b6002549035906001600160a01b031633610c32565b90503461020b57608036600319011261020b57803591821515830361049a57836024359283151584036101285760443594851515860361020b5760643594851515860361049a57610311610a5b565b839161041e575b80610415575b6103f7575b508194610368575b5050508061035f575b610341575b506001815580f35b60035461035991906001600160a01b03163380610b67565b38610339565b50801515610334565b805483516309f4173d60e11b815233928101838152602080820194909452959650939491928492839003604001918391906001600160a01b03165af19182156103ee575083916103bd575b509038838161032b565b90506020813d82116103e6575b816103d7602093836108df565b8101031261020b5751386103b3565b3d91506103ca565b513d85823e3d90fd5b60025461040f91906001600160a01b03163380610b67565b38610323565b5080151561031e565b60055485516309f4173d60e11b81523385820181815260208082019290925293945090929091839182900360400190829088906001600160a01b03165af19081156104a6578491610471575b5090610318565b90506020813d821161049e575b8161048b602093836108df565b8101031261049a57513861046a565b8380fd5b3d915061047e565b85513d86823e3d90fd5b9190503461020b578060031936011261020b57813567ffffffffffffffff9283821161064657366023830112156106465781810135916104ef83610901565b946104fc855196876108df565b8386526020918287016024809660051b83010191368311610642578601905b82821061061f57505050833590811161061b573660238201121561061b578083013561055261054982610901565b965196876108df565b808652848387019160051b83010191368311610617579697968501905b8282106106085750505050610582610a5b565b60018060a01b03926001958461059d88968754163314610919565b80600254169187985b6105b2575b8787815580f35b8051891015610603576105de826105c98b84610a31565b5116846105d68c88610a31565b519133610b67565b60001989146105f15797860197866105a6565b634e487b7160e01b8852601185528588fd5b6105ab565b8135815290830190830161056f565b8880fd5b8680fd5b81356001600160a01b038116810361063e57815290840190840161051b565b8a80fd5b8980fd5b8480fd5b50503461012857816003193601126101285760035490516001600160a01b039091168152602090f35b50503461012857816003193601126101285760015490516001600160a01b039091168152602090f35b50503461012857816003193601126101285760055490516001600160a01b039091168152602090f35b9190503461020b57606036600319011261020b576106e161089a565b6024916001600160a01b038335818116939084900361061b5761070982600154163314610919565b169181516020938482019263a9059cbb60e01b845286830152604435604483015260448252608082019267ffffffffffffffff92808510848611176108885760c08101858110858211176108765786528685527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656460a082015251899182919082855af1903d15610867573d92831161085557906107c59392918551926107b888601f19601f84011601856108df565b83523d8a8885013e61095d565b8051838115918215610831575b50509050156107df578480f35b5162461bcd60e51b815292830152602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608490fd5b8380929350010312610851578201518015158103610851578083386107d2565b8580fd5b634e487b7160e01b8952604188528689fd5b906107c593925060609161095d565b634e487b7160e01b8b5260418a52888bfd5b634e487b7160e01b8a5260418952878afd5b600435906001600160a01b03821682036108b057565b600080fd5b67ffffffffffffffff81116108c957604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff8211176108c957604052565b67ffffffffffffffff81116108c95760051b60200190565b1561092057565b60405162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b6044820152606490fd5b919290156109bf5750815115610971575090565b3b1561097a5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156109d25750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b828510610a18575050604492506000838284010152601f80199101168101030190fd5b84810182015186860160440152938101938593506109f5565b8051821015610a455760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b600260005414610a6c576002600055565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b600480546040516309f4173d60e11b8152339281018390526024810192909252602090829060449082906000906001600160a01b03165af18015610b1d57610af65750565b602090813d8111610b16575b610b0c81836108df565b810103126108b057565b503d610b02565b6040513d6000823e3d90fd5b15610b3057565b60405162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a590817d85b5bdd5b9d608a1b6044820152606490fd5b92610b73811515610b29565b6004546001600160a01b039490851690813b156108b0576084869160008094604051998a958694631e42d69b60e21b86521660048501528089166024850152891660448401528660648401525af1908115610b1d577f47d4c7c194999b93d76f7d16393f56c8c189d502fea3ff400ec5badfab608c2694610c1e92610c23575b50604080516001600160a01b0394851681529490931660208501529183019190915281906060820190565b0390a1565b610c2c906108b5565b38610bf3565b610c3d831515610b29565b6004546001600160a01b039081169390843b156108b05760009460848692604051978893849263098bf59d60e01b8452808916908160048601528a16602485015287604485015260648401525af1908115610b1d577f50c634fcff06a5b70f80b0a33a6f53cac80744ae146a235b402296908535bf5894610c1e92610c235750604080516001600160a01b039485168152949093166020850152918301919091528190606082019056fea2646970667358221220a34d5f4d5d2e4925d85c25f7d1cefba570019e7290fec5383910baef0794ec0764736f6c63430008130033", + "deployedBytecode": "0x6040608081526004908136101561001557600080fd5b600091823560e01c90816301e33667146106c557816305a174c11461069c57816312d43a511461067357816319ff26ae1461064a578163232efcb3146104b05781632d741940146102c2578163319489e61461028e57816334da865014610238578163362a4bb9146102595781634e71d92d1461023857816371dfbd921461020f578163b65b4973146101e3578163b6e0b05a146101ae578163becdd3291461017a57508063cfad57a21461012c5763d4ebb8b9146100d357600080fd5b34610128573660031901126101255761011e6100ed61089a565b6100f5610a5b565b6001546001600160a01b03919061010f9083163314610919565b60243591600254169033610b67565b6001815580f35b80fd5b5080fd5b82346101255760203660031901126101255761014661089a565b600154906001600160a01b03906101603383851614610919565b16906bffffffffffffffffffffffff60a01b161760015580f35b8390346101285760203660031901126101285761011e90610199610a5b565b6003549035906001600160a01b031633610c32565b8390346101285760203660031901126101285761011e906101cd610a5b565b6003549035906001600160a01b03163380610b67565b90503461020b578260031936011261020b575490516001600160a01b03909116815260209150f35b8280fd5b50503461012857816003193601126101285760025490516001600160a01b039091168152602090f35b8334610125578060031936011261012557610251610a5b565b61011e610ab1565b8390346101285760203660031901126101285761011e90610278610a5b565b6002549035906001600160a01b03163380610b67565b8390346101285760203660031901126101285761011e906102ad610a5b565b6002549035906001600160a01b031633610c32565b90503461020b57608036600319011261020b57803591821515830361049a57836024359283151584036101285760443594851515860361020b5760643594851515860361049a57610311610a5b565b839161041e575b80610415575b6103f7575b508194610368575b5050508061035f575b610341575b506001815580f35b60035461035991906001600160a01b03163380610b67565b38610339565b50801515610334565b805483516309f4173d60e11b815233928101838152602080820194909452959650939491928492839003604001918391906001600160a01b03165af19182156103ee575083916103bd575b509038838161032b565b90506020813d82116103e6575b816103d7602093836108df565b8101031261020b5751386103b3565b3d91506103ca565b513d85823e3d90fd5b60025461040f91906001600160a01b03163380610b67565b38610323565b5080151561031e565b60055485516309f4173d60e11b81523385820181815260208082019290925293945090929091839182900360400190829088906001600160a01b03165af19081156104a6578491610471575b5090610318565b90506020813d821161049e575b8161048b602093836108df565b8101031261049a57513861046a565b8380fd5b3d915061047e565b85513d86823e3d90fd5b9190503461020b578060031936011261020b57813567ffffffffffffffff9283821161064657366023830112156106465781810135916104ef83610901565b946104fc855196876108df565b8386526020918287016024809660051b83010191368311610642578601905b82821061061f57505050833590811161061b573660238201121561061b578083013561055261054982610901565b965196876108df565b808652848387019160051b83010191368311610617579697968501905b8282106106085750505050610582610a5b565b60018060a01b03926001958461059d88968754163314610919565b80600254169187985b6105b2575b8787815580f35b8051891015610603576105de826105c98b84610a31565b5116846105d68c88610a31565b519133610b67565b60001989146105f15797860197866105a6565b634e487b7160e01b8852601185528588fd5b6105ab565b8135815290830190830161056f565b8880fd5b8680fd5b81356001600160a01b038116810361063e57815290840190840161051b565b8a80fd5b8980fd5b8480fd5b50503461012857816003193601126101285760035490516001600160a01b039091168152602090f35b50503461012857816003193601126101285760015490516001600160a01b039091168152602090f35b50503461012857816003193601126101285760055490516001600160a01b039091168152602090f35b9190503461020b57606036600319011261020b576106e161089a565b6024916001600160a01b038335818116939084900361061b5761070982600154163314610919565b169181516020938482019263a9059cbb60e01b845286830152604435604483015260448252608082019267ffffffffffffffff92808510848611176108885760c08101858110858211176108765786528685527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656460a082015251899182919082855af1903d15610867573d92831161085557906107c59392918551926107b888601f19601f84011601856108df565b83523d8a8885013e61095d565b8051838115918215610831575b50509050156107df578480f35b5162461bcd60e51b815292830152602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608490fd5b8380929350010312610851578201518015158103610851578083386107d2565b8580fd5b634e487b7160e01b8952604188528689fd5b906107c593925060609161095d565b634e487b7160e01b8b5260418a52888bfd5b634e487b7160e01b8a5260418952878afd5b600435906001600160a01b03821682036108b057565b600080fd5b67ffffffffffffffff81116108c957604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff8211176108c957604052565b67ffffffffffffffff81116108c95760051b60200190565b1561092057565b60405162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b6044820152606490fd5b919290156109bf5750815115610971575090565b3b1561097a5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156109d25750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b828510610a18575050604492506000838284010152601f80199101168101030190fd5b84810182015186860160440152938101938593506109f5565b8051821015610a455760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b600260005414610a6c576002600055565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b600480546040516309f4173d60e11b8152339281018390526024810192909252602090829060449082906000906001600160a01b03165af18015610b1d57610af65750565b602090813d8111610b16575b610b0c81836108df565b810103126108b057565b503d610b02565b6040513d6000823e3d90fd5b15610b3057565b60405162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a590817d85b5bdd5b9d608a1b6044820152606490fd5b92610b73811515610b29565b6004546001600160a01b039490851690813b156108b0576084869160008094604051998a958694631e42d69b60e21b86521660048501528089166024850152891660448401528660648401525af1908115610b1d577f47d4c7c194999b93d76f7d16393f56c8c189d502fea3ff400ec5badfab608c2694610c1e92610c23575b50604080516001600160a01b0394851681529490931660208501529183019190915281906060820190565b0390a1565b610c2c906108b5565b38610bf3565b610c3d831515610b29565b6004546001600160a01b039081169390843b156108b05760009460848692604051978893849263098bf59d60e01b8452808916908160048601528a16602485015287604485015260648401525af1908115610b1d577f50c634fcff06a5b70f80b0a33a6f53cac80744ae146a235b402296908535bf5894610c1e92610c235750604080516001600160a01b039485168152949093166020850152918301919091528190606082019056fea2646970667358221220a34d5f4d5d2e4925d85c25f7d1cefba570019e7290fec5383910baef0794ec0764736f6c63430008130033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 10, + "contract": "contracts/staking/RewardRouter.sol:RewardRouter", + "label": "_status", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 888, + "contract": "contracts/staking/RewardRouter.sol:RewardRouter", + "label": "gov", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 1234, + "contract": "contracts/staking/RewardRouter.sol:RewardRouter", + "label": "cec", + "offset": 0, + "slot": "2", + "type": "t_address" + }, + { + "astId": 1236, + "contract": "contracts/staking/RewardRouter.sol:RewardRouter", + "label": "esCec", + "offset": 0, + "slot": "3", + "type": "t_address" + }, + { + "astId": 1238, + "contract": "contracts/staking/RewardRouter.sol:RewardRouter", + "label": "stakedCecTracker", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 1240, + "contract": "contracts/staking/RewardRouter.sol:RewardRouter", + "label": "cecVester", + "offset": 0, + "slot": "5", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/bsc_test/RewardTracker.json b/deployments/bsc_test/RewardTracker.json new file mode 100644 index 0000000..4ff9584 --- /dev/null +++ b/deployments/bsc_test/RewardTracker.json @@ -0,0 +1,1198 @@ +{ + "address": "0xC28165d2db25De1B258Db835d3557Dee044b1C3a", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Claim", + "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": "BASIS_POINTS_DIVISOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PRECISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "internalType": "address", + "name": "_spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowances", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "averageStakedAmounts", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balances", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_receiver", + "type": "address" + } + ], + "name": "claim", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "address", + "name": "_receiver", + "type": "address" + } + ], + "name": "claimForAccount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "claimable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "claimableReward", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cumulativeRewardPerToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "cumulativeRewards", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "depositBalances", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "distributor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gov", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "inPrivateClaimingMode", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "inPrivateStakingMode", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "inPrivateTransferMode", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_depositTokens", + "type": "address[]" + }, + { + "internalType": "address", + "name": "_distributor", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "isDepositToken", + "outputs": [ + { + "internalType": "bool", + "name": "status", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "handler", + "type": "address" + } + ], + "name": "isHandler", + "outputs": [ + { + "internalType": "bool", + "name": "status", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "previousCumulatedRewardPerToken", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_depositToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "_isDepositToken", + "type": "bool" + } + ], + "name": "setDepositToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_gov", + "type": "address" + } + ], + "name": "setGov", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_handler", + "type": "address" + }, + { + "internalType": "bool", + "name": "_isActive", + "type": "bool" + } + ], + "name": "setHandler", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_inPrivateClaimingMode", + "type": "bool" + } + ], + "name": "setInPrivateClaimingMode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_inPrivateStakingMode", + "type": "bool" + } + ], + "name": "setInPrivateStakingMode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_inPrivateTransferMode", + "type": "bool" + } + ], + "name": "setInPrivateTransferMode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_depositToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "stake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_fundingAccount", + "type": "address" + }, + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "address", + "name": "_depositToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "stakeForAccount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "stakedAmounts", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tokensPerInterval", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "totalDepositSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_sender", + "type": "address" + }, + { + "internalType": "address", + "name": "_recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_depositToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "unstake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "address", + "name": "_depositToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_receiver", + "type": "address" + } + ], + "name": "unstakeForAccount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "updateRewards", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xd29e8e0c69a5b2155fe93564b0a7b1ea9b05c3afcb89fc8cf60a8ceaa817997e", + "receipt": { + "to": null, + "from": "0x50A8e60041A206AcaA5F844a1104896224be6F39", + "contractAddress": "0xC28165d2db25De1B258Db835d3557Dee044b1C3a", + "transactionIndex": 0, + "gasUsed": "2088810", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xa0fa1b307dc52cfa8cffbfbf30ce2bd37a840750bfb85b115ef2320beea7a690", + "transactionHash": "0xd29e8e0c69a5b2155fe93564b0a7b1ea9b05c3afcb89fc8cf60a8ceaa817997e", + "logs": [], + "blockNumber": 43369446, + "cumulativeGasUsed": "2088810", + "status": 1, + "byzantium": true + }, + "args": [ + "Staked CEC", + "sCEC" + ], + "numDeployments": 1, + "solcInputHash": "35d1d20dc9b7194768908e34f12939fd", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Claim\",\"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\":\"BASIS_POINTS_DIVISOR\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PRECISION\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"averageStakedAmounts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_receiver\",\"type\":\"address\"}],\"name\":\"claim\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_receiver\",\"type\":\"address\"}],\"name\":\"claimForAccount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"claimable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"claimableReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"cumulativeRewardPerToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"cumulativeRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"depositBalances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"distributor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gov\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"inPrivateClaimingMode\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"inPrivateStakingMode\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"inPrivateTransferMode\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_depositTokens\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"_distributor\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"isDepositToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"status\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"handler\",\"type\":\"address\"}],\"name\":\"isHandler\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"status\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isInitialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"previousCumulatedRewardPerToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_depositToken\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_isDepositToken\",\"type\":\"bool\"}],\"name\":\"setDepositToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_gov\",\"type\":\"address\"}],\"name\":\"setGov\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_handler\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_isActive\",\"type\":\"bool\"}],\"name\":\"setHandler\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_inPrivateClaimingMode\",\"type\":\"bool\"}],\"name\":\"setInPrivateClaimingMode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_inPrivateStakingMode\",\"type\":\"bool\"}],\"name\":\"setInPrivateStakingMode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_inPrivateTransferMode\",\"type\":\"bool\"}],\"name\":\"setInPrivateTransferMode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_depositToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"stake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_fundingAccount\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_depositToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"stakeForAccount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"stakedAmounts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokensPerInterval\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"totalDepositSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_depositToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"unstake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_depositToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_receiver\",\"type\":\"address\"}],\"name\":\"unstakeForAccount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{},\"stateVariables\":{\"totalSupply\":{\"details\":\"Returns the amount of tokens in existence.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/staking/RewardTracker.sol\":\"RewardTracker\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@openzeppelin/contracts/security/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n constructor() {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n _nonReentrantBefore();\\n _;\\n _nonReentrantAfter();\\n }\\n\\n function _nonReentrantBefore() private {\\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n }\\n\\n function _nonReentrantAfter() private {\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Returns true if the reentrancy guard is currently set to \\\"entered\\\", which indicates there is a\\n * `nonReentrant` function in the call stack.\\n */\\n function _reentrancyGuardEntered() internal view returns (bool) {\\n return _status == _ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa535a5df777d44e945dd24aa43a11e44b024140fc340ad0dfe42acf4002aade1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n *\\n * ==== Security Considerations\\n *\\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\\n * generally recommended is:\\n *\\n * ```solidity\\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\\n * doThing(..., value);\\n * }\\n *\\n * function doThing(..., uint256 value) public {\\n * token.safeTransferFrom(msg.sender, address(this), value);\\n * ...\\n * }\\n * ```\\n *\\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\\n * {SafeERC20-safeTransferFrom}).\\n *\\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\\n * contracts should have entry points that don't rely on permit.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n *\\n * CAUTION: See Security Considerations above.\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xb264c03a3442eb37a68ad620cefd1182766b58bee6cec40343480392d6b14d69\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/IERC20Permit.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n IERC20Permit token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit(owner, spender, value, deadline, v, r, s);\\n uint256 nonceAfter = token.nonces(owner);\\n require(nonceAfter == nonceBefore + 1, \\\"SafeERC20: permit did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0xabefac93435967b4d36a4fabcbdbb918d1f0b7ae3c3d85bc30923b326c927ed1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"contracts/core/Governable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\ncontract Governable {\\n address public gov;\\n\\n constructor() {\\n gov = msg.sender;\\n }\\n\\n modifier onlyGov() {\\n require(msg.sender == gov, \\\"Governable: forbidden\\\");\\n _;\\n }\\n\\n function setGov(address _gov) external onlyGov {\\n gov = _gov;\\n }\\n}\\n\",\"keccak256\":\"0xcb7c11d1557db3369d984c7e804b1946c79867f3ab2dd2793ad3bb502c6c2383\",\"license\":\"MIT\"},\"contracts/staking/RewardTracker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {ReentrancyGuard} from \\\"@openzeppelin/contracts/security/ReentrancyGuard.sol\\\";\\nimport {SafeERC20} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport {IRewardDistributor} from \\\"./interfaces/IRewardDistributor.sol\\\";\\nimport {IRewardTracker} from \\\"./interfaces/IRewardTracker.sol\\\";\\nimport {Governable} from \\\"../core/Governable.sol\\\";\\n\\ncontract RewardTracker is IERC20, ReentrancyGuard, IRewardTracker, Governable {\\n using SafeERC20 for IERC20;\\n\\n uint256 public constant BASIS_POINTS_DIVISOR = 10000;\\n uint256 public constant PRECISION = 1e30;\\n\\n bool public isInitialized;\\n\\n string public name;\\n string public symbol;\\n uint8 public decimals = 18;\\n uint256 public override totalSupply;\\n mapping(address account => uint256 amount) public balances;\\n mapping(address owner => mapping(address spender => uint256 amount)) public allowances;\\n\\n address public distributor;\\n mapping(address token => bool status) public isDepositToken;\\n mapping(address account => mapping(address token => uint256 amount)) public override depositBalances;\\n mapping(address token => uint256 amount) public totalDepositSupply;\\n \\n uint256 public cumulativeRewardPerToken;\\n mapping(address account => uint256 amount) public override stakedAmounts;\\n mapping(address account => uint256 amount) public claimableReward;\\n mapping(address account => uint256 amount) public previousCumulatedRewardPerToken;\\n mapping(address account => uint256 amount) public override cumulativeRewards;\\n mapping(address account => uint256 amount) public override averageStakedAmounts;\\n\\n bool public inPrivateTransferMode;\\n bool public inPrivateStakingMode;\\n bool public inPrivateClaimingMode;\\n mapping(address handler => bool status) public isHandler;\\n\\n event Claim(address receiver, uint256 amount);\\n\\n constructor(string memory _name, string memory _symbol) {\\n name = _name;\\n symbol = _symbol;\\n }\\n\\n function initialize(address[] memory _depositTokens, address _distributor) external onlyGov {\\n require(!isInitialized, \\\"RewardTracker: already initialized\\\");\\n isInitialized = true;\\n\\n for (uint256 i = 0; i < _depositTokens.length; i++) {\\n address depositToken = _depositTokens[i];\\n isDepositToken[depositToken] = true;\\n }\\n\\n distributor = _distributor;\\n }\\n\\n function setDepositToken(address _depositToken, bool _isDepositToken) external onlyGov {\\n isDepositToken[_depositToken] = _isDepositToken;\\n }\\n\\n function setInPrivateTransferMode(bool _inPrivateTransferMode) external onlyGov {\\n inPrivateTransferMode = _inPrivateTransferMode;\\n }\\n\\n function setInPrivateStakingMode(bool _inPrivateStakingMode) external onlyGov {\\n inPrivateStakingMode = _inPrivateStakingMode;\\n }\\n\\n function setInPrivateClaimingMode(bool _inPrivateClaimingMode) external onlyGov {\\n inPrivateClaimingMode = _inPrivateClaimingMode;\\n }\\n\\n function setHandler(address _handler, bool _isActive) external onlyGov {\\n isHandler[_handler] = _isActive;\\n }\\n\\n // to help users who accidentally send their tokens to this contract\\n function withdrawToken(address _token, address _account, uint256 _amount) external onlyGov {\\n IERC20(_token).safeTransfer(_account, _amount);\\n }\\n\\n function balanceOf(address _account) external view override returns (uint256) {\\n return balances[_account];\\n }\\n\\n function stake(address _depositToken, uint256 _amount) external override nonReentrant {\\n if (inPrivateStakingMode) {\\n revert(\\\"RewardTracker: action not enabled\\\");\\n }\\n _stake(msg.sender, msg.sender, _depositToken, _amount);\\n }\\n\\n function stakeForAccount(\\n address _fundingAccount,\\n address _account,\\n address _depositToken,\\n uint256 _amount\\n ) external override nonReentrant {\\n _validateHandler();\\n _stake(_fundingAccount, _account, _depositToken, _amount);\\n }\\n\\n function unstake(address _depositToken, uint256 _amount) external override nonReentrant {\\n if (inPrivateStakingMode) {\\n revert(\\\"RewardTracker: action not enabled\\\");\\n }\\n _unstake(msg.sender, _depositToken, _amount, msg.sender);\\n }\\n\\n function unstakeForAccount(\\n address _account,\\n address _depositToken,\\n uint256 _amount,\\n address _receiver\\n ) external override nonReentrant {\\n _validateHandler();\\n _unstake(_account, _depositToken, _amount, _receiver);\\n }\\n\\n function transfer(address _recipient, uint256 _amount) external override returns (bool) {\\n _transfer(msg.sender, _recipient, _amount);\\n return true;\\n }\\n\\n function allowance(address _owner, address _spender) external view override returns (uint256) {\\n return allowances[_owner][_spender];\\n }\\n\\n function approve(address _spender, uint256 _amount) external override returns (bool) {\\n _approve(msg.sender, _spender, _amount);\\n return true;\\n }\\n\\n function transferFrom(address _sender, address _recipient, uint256 _amount) external override returns (bool) {\\n if (isHandler[msg.sender]) {\\n _transfer(_sender, _recipient, _amount);\\n return true;\\n }\\n require(allowances[_sender][msg.sender] >= _amount, \\\"RewardTracker: transfer amount exceeds allowance\\\");\\n uint256 nextAllowance = allowances[_sender][msg.sender] - _amount;\\n _approve(_sender, msg.sender, nextAllowance);\\n _transfer(_sender, _recipient, _amount);\\n return true;\\n }\\n\\n function tokensPerInterval() external view override returns (uint256) {\\n return IRewardDistributor(distributor).tokensPerInterval();\\n }\\n\\n function updateRewards() external override nonReentrant {\\n _updateRewards(address(0));\\n }\\n\\n function claim(address _receiver) external override nonReentrant returns (uint256) {\\n if (inPrivateClaimingMode) {\\n revert(\\\"RewardTracker: action not enabled\\\");\\n }\\n return _claim(msg.sender, _receiver);\\n }\\n\\n function claimForAccount(address _account, address _receiver) external override nonReentrant returns (uint256) {\\n _validateHandler();\\n return _claim(_account, _receiver);\\n }\\n\\n function claimable(address _account) public view override returns (uint256) {\\n uint256 stakedAmount = stakedAmounts[_account];\\n if (stakedAmount == 0) {\\n return claimableReward[_account];\\n }\\n uint256 pendingRewards = IRewardDistributor(distributor).pendingRewards() * PRECISION;\\n uint256 nextCumulativeRewardPerToken = cumulativeRewardPerToken + pendingRewards;\\n return\\n claimableReward[_account] +\\n (stakedAmount / (10**decimals) * (nextCumulativeRewardPerToken - previousCumulatedRewardPerToken[_account])) /\\n PRECISION;\\n }\\n\\n function rewardToken() public view returns (address) {\\n return IRewardDistributor(distributor).rewardToken();\\n }\\n\\n function _claim(address _account, address _receiver) private returns (uint256) {\\n _updateRewards(_account);\\n\\n uint256 tokenAmount = claimableReward[_account];\\n claimableReward[_account] = 0;\\n\\n if (tokenAmount > 0) {\\n IERC20(rewardToken()).safeTransfer(_receiver, tokenAmount);\\n emit Claim(_account, tokenAmount);\\n }\\n\\n return tokenAmount;\\n }\\n\\n function _mint(address _account, uint256 _amount) internal {\\n require(_account != address(0), \\\"RewardTracker: mint to the zero address\\\");\\n\\n totalSupply = totalSupply + _amount;\\n balances[_account] = balances[_account] + _amount;\\n\\n emit Transfer(address(0), _account, _amount);\\n }\\n\\n function _burn(address _account, uint256 _amount) internal {\\n require(_account != address(0), \\\"RewardTracker: burn from the zero address\\\");\\n require(balances[_account] >= _amount, \\\"RewardTracker: burn amount exceeds balance\\\");\\n balances[_account] = balances[_account] - _amount;\\n totalSupply = totalSupply / _amount;\\n\\n emit Transfer(_account, address(0), _amount);\\n }\\n\\n function _transfer(address _sender, address _recipient, uint256 _amount) private {\\n require(_sender != address(0), \\\"RewardTracker: transfer from the zero address\\\");\\n require(_recipient != address(0), \\\"RewardTracker: transfer to the zero address\\\");\\n\\n if (inPrivateTransferMode) {\\n _validateHandler();\\n }\\n require(balances[_sender] >= _amount, \\\"RewardTracker: transfer amount exceeds balance\\\");\\n balances[_sender] = balances[_sender] - _amount;\\n balances[_recipient] = balances[_recipient] + _amount;\\n\\n emit Transfer(_sender, _recipient, _amount);\\n }\\n\\n function _approve(address _owner, address _spender, uint256 _amount) private {\\n require(_owner != address(0), \\\"RewardTracker: approve from the zero address\\\");\\n require(_spender != address(0), \\\"RewardTracker: approve to the zero address\\\");\\n\\n allowances[_owner][_spender] = _amount;\\n\\n emit Approval(_owner, _spender, _amount);\\n }\\n\\n function _validateHandler() private view {\\n require(isHandler[msg.sender], \\\"RewardTracker: forbidden\\\");\\n }\\n\\n function _stake(address _fundingAccount, address _account, address _depositToken, uint256 _amount) private {\\n require(_amount > 0, \\\"RewardTracker: invalid _amount\\\");\\n require(isDepositToken[_depositToken], \\\"RewardTracker: invalid _depositToken\\\");\\n\\n IERC20(_depositToken).safeTransferFrom(_fundingAccount, address(this), _amount);\\n\\n _updateRewards(_account);\\n\\n stakedAmounts[_account] = stakedAmounts[_account] + _amount;\\n depositBalances[_account][_depositToken] = depositBalances[_account][_depositToken] + _amount;\\n totalDepositSupply[_depositToken] = totalDepositSupply[_depositToken] + _amount;\\n\\n _mint(_account, _amount);\\n }\\n\\n function _unstake(address _account, address _depositToken, uint256 _amount, address _receiver) private {\\n require(_amount > 0, \\\"RewardTracker: invalid _amount\\\");\\n require(isDepositToken[_depositToken], \\\"RewardTracker: invalid _depositToken\\\");\\n\\n _updateRewards(_account);\\n\\n uint256 stakedAmount = stakedAmounts[_account];\\n require(stakedAmounts[_account] >= _amount, \\\"RewardTracker: _amount exceeds stakedAmount\\\");\\n\\n stakedAmounts[_account] = stakedAmount - _amount;\\n\\n uint256 depositBalance = depositBalances[_account][_depositToken];\\n require(depositBalance >= _amount, \\\"RewardTracker: _amount exceeds depositBalance\\\");\\n depositBalances[_account][_depositToken] = depositBalance - _amount;\\n totalDepositSupply[_depositToken] = totalDepositSupply[_depositToken] - _amount;\\n\\n _burn(_account, _amount);\\n IERC20(_depositToken).safeTransfer(_receiver, _amount);\\n }\\n\\n function _updateRewards(address _account) private {\\n uint256 supply = totalSupply;\\n uint256 blockReward = IRewardDistributor(distributor).distribute(supply, decimals);\\n\\n \\n uint256 _cumulativeRewardPerToken = cumulativeRewardPerToken;\\n if (supply > 0 && blockReward > 0) {\\n _cumulativeRewardPerToken = _cumulativeRewardPerToken + blockReward * PRECISION;\\n cumulativeRewardPerToken = _cumulativeRewardPerToken;\\n }\\n\\n // cumulativeRewardPerToken can only increase\\n // so if cumulativeRewardPerToken is zero, it means there are no rewards yet\\n if (_cumulativeRewardPerToken == 0) {\\n return;\\n }\\n\\n if (_account != address(0)) {\\n uint256 stakedAmount = stakedAmounts[_account];\\n uint256 accountReward = (stakedAmount / (10**decimals) * (_cumulativeRewardPerToken - previousCumulatedRewardPerToken[_account])) /\\n PRECISION;\\n uint256 _claimableReward = claimableReward[_account] + accountReward;\\n\\n claimableReward[_account] = _claimableReward;\\n previousCumulatedRewardPerToken[_account] = _cumulativeRewardPerToken;\\n\\n if (_claimableReward > 0 && stakedAmounts[_account] > 0) {\\n uint256 nextCumulativeReward = cumulativeRewards[_account] + accountReward;\\n\\n averageStakedAmounts[_account] =\\n (averageStakedAmounts[_account] * cumulativeRewards[_account]) /\\n nextCumulativeReward +\\n (stakedAmount / (10**decimals) * accountReward) /\\n nextCumulativeReward;\\n\\n cumulativeRewards[_account] = nextCumulativeReward;\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x23db4794470a78fb40642643b455498045728defc41e5d1977c61b2b50a67484\",\"license\":\"MIT\"},\"contracts/staking/interfaces/IRewardDistributor.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\ninterface IRewardDistributor {\\n function rewardToken() external view returns (address);\\n function tokensPerInterval() external view returns (uint256);\\n function pendingRewards() external view returns (uint256);\\n function distribute(uint256 _amount, uint256 _decimals) external returns (uint256);\\n}\\n\",\"keccak256\":\"0xdeaca84d9686df6c6a0c41dd9b7a77bd25d15ae053e33f2e86d4006fa87db8c3\",\"license\":\"MIT\"},\"contracts/staking/interfaces/IRewardTracker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\ninterface IRewardTracker {\\n function depositBalances(address _account, address _depositToken) external view returns (uint256);\\n function stakedAmounts(address _account) external view returns (uint256);\\n function updateRewards() external;\\n function stake(address _depositToken, uint256 _amount) external;\\n function stakeForAccount(address _fundingAccount, address _account, address _depositToken, uint256 _amount) external;\\n function unstake(address _depositToken, uint256 _amount) external;\\n function unstakeForAccount(address _account, address _depositToken, uint256 _amount, address _receiver) external;\\n function tokensPerInterval() external view returns (uint256);\\n function claim(address _receiver) external returns (uint256);\\n function claimForAccount(address _account, address _receiver) external returns (uint256);\\n function claimable(address _account) external view returns (uint256);\\n function averageStakedAmounts(address _account) external view returns (uint256);\\n function cumulativeRewards(address _account) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x6e0078848746c69ab4c824269552ce070b6fa449cc6803754265fe63cd1b0424\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60806040523462000341576200266b803803806200001d8162000346565b9283398101604082820312620003415781516001600160401b03908181116200034157826200004e91850162000382565b926020928382015183811162000341576200006a920162000382565b6001600081815581546001600160a01b031916331782556004805460ff1916601217815586519096929391908581116200032e57600254938585811c9516801562000323575b8886101462000310578190601f95868111620002bc575b508890868311600114620002565784926200024a575b5050600019600383901b1c191690851b176002555b815194851162000237576003968754908582811c921680156200022c575b88831014620002195750838111620001d1575b50859285116001146200016b5793945084929190836200015f575b50501b9160001990841b1c19161790555b6040516122769081620003f58239f35b0151925038806200013e565b86815285812093958591601f198316915b88838310620001b657505050106200019d575b505050811b0190556200014f565b015160001983861b60f8161c191690553880806200018f565b8587015188559096019594850194879350908101906200017c565b8782528682208480880160051c8201928989106200020f575b0160051c019085905b8281106200020357505062000123565b838155018590620001f3565b92508192620001ea565b634e487b7160e01b835260229052602482fd5b91607f169162000110565b634e487b7160e01b815260418752602490fd5b015190503880620000dd565b600285528985208894509190601f198416865b8c828210620002a557505084116200028b575b505050811b01600255620000f2565b015160001960f88460031b161c191690553880806200027c565b8385015186558b9790950194938401930162000269565b909150600284528884208680850160051c8201928b861062000306575b918991869594930160051c01915b828110620002f7575050620000c7565b868155859450899101620002e7565b92508192620002d9565b634e487b7160e01b835260228952602483fd5b94607f1694620000b0565b634e487b7160e01b825260418852602482fd5b600080fd5b6040519190601f01601f191682016001600160401b038111838210176200036c57604052565b634e487b7160e01b600052604160045260246000fd5b919080601f84011215620003415782516001600160401b0381116200036c57602090620003b8601f8201601f1916830162000346565b92818452828287010111620003415760005b818110620003e057508260009394955001015290565b8581018301518482018401528201620003ca56fe6040608081526004908136101561001557600080fd5b600091823560e01c90816301e3366714610f3b57816306fdde0314610e7c578163095ea7b314610e52578163098bf59d14610dfe57816310c1c10314610dc6578163126082cf14610da957816312d43a5114610d8057816313e82e7a14610d3f57816318160ddd14610d205781631d30d5bc14610cd75781631e83409a14610c7657816323b872dd14610c5157816327e235e314610840578163313ce56714610c305781633792def314610bf8578163392e53cd14610bd15781633cd7f70014610b865781633e158b0c14610b65578163402914f514610b3857816344a0841114610b00578163462d0b2e1461094e57816346ea87af14610910578163552ce1dc146108d857816355b6ed5c146108ba5781635a47a1a71461087857816370a0823114610840578163790b5a6c146107e957816395d89b41146106e65781639cb7de4b14610689578163a318021714610651578163a8d93627146105c2578163a9059cbb14610591578163aaf5eb6814610569578163adc9772e1461052a578163b89e45b3146104ec578163bfe10928146104c3578163c2a672e01461045c57508063c5fa273014610436578063cfad57a2146103e5578063dd62ed3e1461039d578063dfbaefb11461037a578063e44b75581461031b578063e9503425146102e4578063f5d9d63e1461029c578063f5fc50761461027e578063f76033d3146102585763f7c618c11461022857600080fd5b346102545781600319360112610254576020906102436115f8565b90516001600160a01b039091168152f35b5080fd5b503461025457816003193601126102545760209060ff60125460101c1690519015158152f35b5034610254578160031936011261025457602090600c549051908152f35b5034610254578060031936011261025457806020926102b9610f6e565b6102c1610f89565b6001600160a01b039182168352600a865283832091168252845220549051908152f35b50346102545760203660031901126102545760209181906001600160a01b0361030b610f6e565b168152600e845220549051908152f35b503461025457806003193601126102545761037790610338610f6e565b90610341611064565b60015490926001600160a01b039161035c9083163314611073565b168452600960205283209060ff801983541691151516179055565b80f35b503461025457816003193601126102545760209060ff6012541690519015158152f35b5034610254578060031936011261025457806020926103ba610f6e565b6103c2610f89565b6001600160a01b0391821683526007865283832091168252845220549051908152f35b8234610433576020366003190112610433576103ff610f6e565b600154906001600160a01b03906104193383851614611073565b16906bffffffffffffffffffffffff60a01b161760015580f35b80fd5b503461025457816003193601126102545760209060ff60125460081c1690519015158152f35b9050346104bf57816003193601126104bf57610476610f6e565b9161047f61131d565b60ff60125460081c166104a2578361049b336024358682611c91565b6001815580f35b5162461bcd60e51b8152915081906104bb9082016112db565b0390fd5b8280fd5b50503461025457816003193601126102545760085490516001600160a01b039091168152602090f35b5050346102545760203660031901126102545760209160ff9082906001600160a01b03610517610f6e565b1681526009855220541690519015158152f35b9050346104bf57816003193601126104bf57610544610f6e565b9161054d61131d565b60ff60125460081c166104a2578361049b602435853380611ada565b505034610254578160031936011261025457602090516c0c9f2c9cd04674edea400000008152f35b5050346102545780600319360112610254576020906105bb6105b1610f6e565b6024359033611704565b5160018152f35b919050346104bf57826003193601126104bf57600854815163a8d9362760e01b81529260209184919082906001600160a01b03165afa918215610647578392610610575b6020838351908152f35b9091506020813d821161063f575b8161062b60209383610fd4565b810103126104bf5760209250519038610606565b3d915061061e565b81513d85823e3d90fd5b5050346102545760203660031901126102545760209181906001600160a01b03610679610f6e565b1681526011845220549051908152f35b505034610254578060031936011261025457610377906106a7610f6e565b906106b0611064565b60015490926001600160a01b03916106cb9083163314611073565b168452601360205283209060ff801983541691151516179055565b919050346104bf57826003193601126104bf57805191836003549060019082821c9282811680156107df575b60209586861082146107cc57508488529081156107aa5750600114610751575b61074d8686610743828b0383610fd4565b519182918261100c565b0390f35b929550600383527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b828410610797575050508261074d94610743928201019438610732565b805486850188015292860192810161077a565b60ff191687860152505050151560051b83010192506107438261074d38610732565b634e487b7160e01b845260229052602483fd5b93607f1693610712565b833461043357608036600319011261043357610803610f6e565b61080b610f89565b906044356001600160a01b038116810361083c5761049b9261082b61131d565b6108336119d8565b60643592611ada565b8380fd5b5050346102545760203660031901126102545760209181906001600160a01b03610868610f6e565b1681526006845220549051908152f35b833461043357602036600319011261043357610892611055565b6108a760018060a01b03600154163314611073565b60ff801960125416911515161760125580f35b505034610254578060031936011261025457806020926103ba610f6e565b5050346102545760203660031901126102545760209181906001600160a01b03610900610f6e565b168152600b845220549051908152f35b5050346102545760203660031901126102545760209160ff9082906001600160a01b0361093b610f6e565b1681526013855220541690519015158152f35b8391503461025457826003193601126102545780359267ffffffffffffffff80851161083c573660238601121561083c5784830135908111610aed5760059281841b908351966020936109a38585018a610fd4565b88528388016024809483010191368311610ae9578401905b828210610ac6575050506109cd610f89565b9360019384549860018060a01b03976109e9898c163314611073565b60ff8b60a01c16610a795760ff60a01b19909a16600160a01b1786559798899890865b610a29575b600880546001600160a01b031916898b161790558980f35b81518b1015610a74578a811b820183015189168a5260098352838a20805460ff1916881790556000198b14610a62579986019986610a0c565b634e487b7160e01b8a5260118552858afd5b610a11565b835162461bcd60e51b81528086018490526022818801527f526577617264547261636b65723a20616c726561647920696e697469616c697a604482015261195960f21b6064820152608490fd5b81356001600160a01b0381168103610ae55781529085019085016109bb565b8980fd5b8880fd5b634e487b7160e01b845260418352602484fd5b5050346102545760203660031901126102545760209181906001600160a01b03610b28610f6e565b168152600f845220549051908152f35b50503461025457602036600319011261025457602090610b5e610b59610f6e565b6114c7565b9051908152f35b8334610433578060031936011261043357610b7e61131d565b61049b611f1e565b833461043357602036600319011261043357610ba0611055565b610bb560018060a01b03600154163314611073565b62ff000060125491151560101b169062ff000019161760125580f35b50503461025457816003193601126102545760209060ff60015460a01c1690519015158152f35b5050346102545760203660031901126102545760209181906001600160a01b03610c20610f6e565b1681526010845220549051908152f35b8284346104335780600319360112610433575060ff60209254169051908152f35b50503461025457602090610c6d610c6736610f9f565b91611396565b90519015158152f35b83833461025457602036600319011261025457610c91610f6e565b92610c9a61131d565b60ff60125460101c16610cbe57506001610cb66020943361167a565b925551908152f35b905162461bcd60e51b81529081906104bb9082016112db565b833461043357602036600319011261043357610cf1611055565b610d0660018060a01b03600154163314611073565b61ff0060125491151560081b169061ff0019161760125580f35b5050346102545781600319360112610254576020906005549051908152f35b505034610254578060031936011261025457906020916001610cb6610d62610f6e565b610d6a610f89565b90610d7361131d565b610d7b6119d8565b61167a565b50503461025457816003193601126102545760015490516001600160a01b039091168152602090f35b505034610254578160031936011261025457602090516127108152f35b5050346102545760203660031901126102545760209181906001600160a01b03610dee610f6e565b168152600d845220549051908152f35b833461043357608036600319011261043357610e18610f6e565b610e20610f89565b90606435906001600160a01b038216820361083c5761049b92610e4161131d565b610e496119d8565b60443591611c91565b5050346102545780600319360112610254576020906105bb610e72610f6e565b60243590336118c5565b919050346104bf57826003193601126104bf57805191836002549060019082821c928281168015610f31575b60209586861082146107cc57508488529081156107aa5750600114610ed85761074d8686610743828b0383610fd4565b929550600283527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b828410610f1e575050508261074d94610743928201019438610732565b8054868501880152928601928101610f01565b93607f1693610ea8565b833461043357610377610f4d36610f9f565b60015490926001600160a01b0391610f689083163314611073565b166110b7565b600435906001600160a01b0382168203610f8457565b600080fd5b602435906001600160a01b0382168203610f8457565b6060906003190112610f84576001600160a01b03906004358281168103610f8457916024359081168103610f84579060443590565b90601f8019910116810190811067ffffffffffffffff821117610ff657604052565b634e487b7160e01b600052604160045260246000fd5b6020808252825181830181905290939260005b82811061104157505060409293506000838284010152601f8019910116010190565b81810186015184820160400152850161101f565b600435908115158203610f8457565b602435908115158203610f8457565b1561107a57565b60405162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b6044820152606490fd5b60405163a9059cbb60e01b60208201526001600160a01b039290921660248301526044808301939093529181526110f8916110f3606483610fd4565b6110fa565b565b60018060a01b0316906040516040810167ffffffffffffffff9082811082821117610ff6576040526020938483527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564858401526000808587829751910182855af1903d1561123f573d92831161122b57906111959392916040519261118888601f19601f8401160185610fd4565b83523d868885013e61124a565b805191821591848315611207575b5050509050156111b05750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b919381809450010312610254578201519081151582036104335750803880846111a3565b634e487b7160e01b85526041600452602485fd5b906111959392506060915b919290156112ac575081511561125e575090565b3b156112675790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156112bf5750805190602001fd5b60405162461bcd60e51b81529081906104bb906004830161100c565b60809060208152602160208201527f526577617264547261636b65723a20616374696f6e206e6f7420656e61626c656040820152601960fa1b60608201520190565b60026000541461132e576002600055565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b9190820391821161138057565b634e487b7160e01b600052601160045260246000fd5b9291906000933385526020946013865260409560ff8783205416611469576001600160a01b03831680835260078252878320338452825287832054861161140c576114079697836113fb93889361140296526007815282822090338352522054611373565b33836118c5565b611704565b600190565b875162461bcd60e51b815260048101839052603060248201527f526577617264547261636b65723a207472616e7366657220616d6f756e74206560448201526f78636565647320616c6c6f77616e636560801b6064820152608490fd5b5050611407939450611704565b8181029291811591840414171561138057565b9190820180921161138057565b60ff16604d811161138057600a0a90565b81156114b1570490565b634e487b7160e01b600052601260045260246000fd5b6001600160a01b039081166000818152600d602090815260408083205492959492939284156115e95790826004949392600854168251958680926376f69fed60e11b82525afa9384156115df5787946115ac575b506c0c9f2c9cd04674edea4000000093848102908082048614901517156115985791611588916115959798600f61155861158e9796600c54611489565b93868352600e815261157c848420549a61157660ff60045416611496565b906114a7565b96835252205490611373565b90611476565b0490611489565b90565b634e487b7160e01b88526011600452602488fd5b9093508181813d83116115d8575b6115c48183610fd4565b810103126115d45751923861151b565b8680fd5b503d6115ba565b81513d89823e3d90fd5b5093949250600e915052205490565b60085460405163f7c618c160e01b81526001600160a01b03916020908290600490829086165afa90811561166e57600091611634575b50905090565b6020813d8211611666575b8161164c60209383610fd4565b81010312610254575191821682036104335750803861162e565b3d915061163f565b6040513d6000823e3d90fd5b60009161168682612011565b6001600160a01b038281168452600e602052604084208054949055918391826116b1575b5050505090565b826116e0917f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d495610f686115f8565b604080516001600160a01b039290921682526020820192909252a1388181806116aa565b6001600160a01b0390811691821561186a57169182156118115760ff60125416611804575b600090828252602091600683526040908282822054106117a9579081857fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef959493526006845261177c8383832054611373565b8682526006855282822055868152816117988482842054611489565b9188815260068652205551908152a3565b815162461bcd60e51b815260048101859052602e60248201527f526577617264547261636b65723a207472616e7366657220616d6f756e74206560448201526d7863656564732062616c616e636560901b6064820152608490fd5b61180c6119d8565b611729565b60405162461bcd60e51b815260206004820152602b60248201527f526577617264547261636b65723a207472616e7366657220746f20746865207a60448201526a65726f206164647265737360a81b6064820152608490fd5b60405162461bcd60e51b815260206004820152602d60248201527f526577617264547261636b65723a207472616e736665722066726f6d2074686560448201526c207a65726f206164647265737360981b6064820152608490fd5b6001600160a01b0390811691821561197e57169182156119265760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260078252604060002085600052825280604060002055604051908152a3565b60405162461bcd60e51b815260206004820152602a60248201527f526577617264547261636b65723a20617070726f766520746f20746865207a65604482015269726f206164647265737360b01b6064820152608490fd5b60405162461bcd60e51b815260206004820152602c60248201527f526577617264547261636b65723a20617070726f76652066726f6d207468652060448201526b7a65726f206164647265737360a01b6064820152608490fd5b33600052601360205260ff60406000205416156119f157565b60405162461bcd60e51b815260206004820152601860248201527f526577617264547261636b65723a20666f7262696464656e00000000000000006044820152606490fd5b15611a3d57565b60405162461bcd60e51b815260206004820152601e60248201527f526577617264547261636b65723a20696e76616c6964205f616d6f756e7400006044820152606490fd5b15611a8957565b60405162461bcd60e51b8152602060048201526024808201527f526577617264547261636b65723a20696e76616c6964205f6465706f7369745460448201526337b5b2b760e11b6064820152608490fd5b92611ae6811515611a36565b60018060a01b038093169360009385855260209360098552604092611b1060ff8589205416611a82565b83516323b872dd60e01b8782015290831660248201523060448201526064808201869052815260a0810167ffffffffffffffff811182821017611c7d578452611b5990886110fa565b611b6281612011565b1694858552600d8452611b788383872054611489565b868652600d855282862055600a84528185208186528452611b9c8383872054611489565b868652600a8552828620828752855282862055600b8452611bc08383872054611489565b908552600b8452818520558415611c2a57907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9291611c0182600554611489565b60055585855260068352611c188282872054611489565b868652600684528186205551908152a3565b5162461bcd60e51b815260048101839052602760248201527f526577617264547261636b65723a206d696e7420746f20746865207a65726f206044820152666164647265737360c81b6064820152608490fd5b634e487b7160e01b88526041600452602488fd5b939290611c9f831515611a36565b60018060a01b038091169060009082825260209060098252604097611cc960ff8a86205416611a82565b611cd281612011565b1690818352600d815287832054868110611ec65786611cf091611373565b828452600d825288842055600a8152878320848452815287832054868110611e6c5786611d1c91611373565b828452600a8252888420858552825288842055600b8152611d408689852054611373565b848452600b8252888420558115611e175781835260068152858884205410611dc1577fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906110f8979883855260068252611d9d8882872054611373565b8486526006835281862055611db4886005546114a7565b60055551878152a36110b7565b60849088519062461bcd60e51b82526004820152602a60248201527f526577617264547261636b65723a206275726e20616d6f756e7420657863656560448201526964732062616c616e636560b01b6064820152fd5b60849088519062461bcd60e51b82526004820152602960248201527f526577617264547261636b65723a206275726e2066726f6d20746865207a65726044820152686f206164647265737360b81b6064820152fd5b885162461bcd60e51b815260048101839052602d60248201527f526577617264547261636b65723a205f616d6f756e742065786365656473206460448201526c65706f73697442616c616e636560981b6064820152608490fd5b885162461bcd60e51b815260048101839052602b60248201527f526577617264547261636b65723a205f616d6f756e742065786365656473207360448201526a1d185ad959105b5bdd5b9d60aa1b6064820152608490fd5b60055460018060a01b036008541660ff6004541660405190633b129c8d60e11b82528360048301526024820152602081604481600080965af1908115612006578291611fd5575b50600c5492151580611fcc575b611f80575b5050156110f857565b9092916c0c9f2c9cd04674edea4000000091828102928184041490151715611fb857611fad929350611489565b80600c553880611f77565b634e487b7160e01b84526011600452602484fd5b50801515611f72565b90506020813d8211611ffe575b81611fef60209383610fd4565b81010312610254575138611f65565b3d9150611fe2565b6040513d84823e3d90fd5b6005549060018060a01b0380600854169060ff6004541690604093845192633b129c8d60e11b845286600485015260248401526020928381604481600080995af1908115612236578591612205575b50600c54961515806121fc575b6121b2575b5085156121aa571680612087575b5050505050565b808352600d8252838320546c0c9f2c9cd04674edea400000006120ce6120ba6120b460ff60045416611496565b846114a7565b848752600f8652611588888820548a611373565b0495828552600e84526120e48787872054611489565b90838652600e85528187872055600f85528686205515158061219a575b61210c575b50612080565b6010835285858520549061211f91611489565b8096838652601185528187872054601087528888205461213e91611476565b90612148916114a7565b9260045460ff1661215890611496565b612161916114a7565b9061216b91611476565b90612175916114a7565b61217e91611489565b9083526011825283832055601090522055388080808080612106565b50600d8352848420541515612101565b505050505050565b90956c0c9f2c9cd04674edea40000000918281029281840414901517156121e857906121dd91611489565b9485600c5538612072565b634e487b7160e01b85526011600452602485fd5b5080151561206d565b90508381813d831161222f575b61221c8183610fd4565b8101031261222b575138612060565b8480fd5b503d612212565b86513d87823e3d90fdfea2646970667358221220b89c61b0bfd5aac629961bea40c03f673fd85581c5fe23d628bee803cc1ce5ec64736f6c63430008130033", + "deployedBytecode": "0x6040608081526004908136101561001557600080fd5b600091823560e01c90816301e3366714610f3b57816306fdde0314610e7c578163095ea7b314610e52578163098bf59d14610dfe57816310c1c10314610dc6578163126082cf14610da957816312d43a5114610d8057816313e82e7a14610d3f57816318160ddd14610d205781631d30d5bc14610cd75781631e83409a14610c7657816323b872dd14610c5157816327e235e314610840578163313ce56714610c305781633792def314610bf8578163392e53cd14610bd15781633cd7f70014610b865781633e158b0c14610b65578163402914f514610b3857816344a0841114610b00578163462d0b2e1461094e57816346ea87af14610910578163552ce1dc146108d857816355b6ed5c146108ba5781635a47a1a71461087857816370a0823114610840578163790b5a6c146107e957816395d89b41146106e65781639cb7de4b14610689578163a318021714610651578163a8d93627146105c2578163a9059cbb14610591578163aaf5eb6814610569578163adc9772e1461052a578163b89e45b3146104ec578163bfe10928146104c3578163c2a672e01461045c57508063c5fa273014610436578063cfad57a2146103e5578063dd62ed3e1461039d578063dfbaefb11461037a578063e44b75581461031b578063e9503425146102e4578063f5d9d63e1461029c578063f5fc50761461027e578063f76033d3146102585763f7c618c11461022857600080fd5b346102545781600319360112610254576020906102436115f8565b90516001600160a01b039091168152f35b5080fd5b503461025457816003193601126102545760209060ff60125460101c1690519015158152f35b5034610254578160031936011261025457602090600c549051908152f35b5034610254578060031936011261025457806020926102b9610f6e565b6102c1610f89565b6001600160a01b039182168352600a865283832091168252845220549051908152f35b50346102545760203660031901126102545760209181906001600160a01b0361030b610f6e565b168152600e845220549051908152f35b503461025457806003193601126102545761037790610338610f6e565b90610341611064565b60015490926001600160a01b039161035c9083163314611073565b168452600960205283209060ff801983541691151516179055565b80f35b503461025457816003193601126102545760209060ff6012541690519015158152f35b5034610254578060031936011261025457806020926103ba610f6e565b6103c2610f89565b6001600160a01b0391821683526007865283832091168252845220549051908152f35b8234610433576020366003190112610433576103ff610f6e565b600154906001600160a01b03906104193383851614611073565b16906bffffffffffffffffffffffff60a01b161760015580f35b80fd5b503461025457816003193601126102545760209060ff60125460081c1690519015158152f35b9050346104bf57816003193601126104bf57610476610f6e565b9161047f61131d565b60ff60125460081c166104a2578361049b336024358682611c91565b6001815580f35b5162461bcd60e51b8152915081906104bb9082016112db565b0390fd5b8280fd5b50503461025457816003193601126102545760085490516001600160a01b039091168152602090f35b5050346102545760203660031901126102545760209160ff9082906001600160a01b03610517610f6e565b1681526009855220541690519015158152f35b9050346104bf57816003193601126104bf57610544610f6e565b9161054d61131d565b60ff60125460081c166104a2578361049b602435853380611ada565b505034610254578160031936011261025457602090516c0c9f2c9cd04674edea400000008152f35b5050346102545780600319360112610254576020906105bb6105b1610f6e565b6024359033611704565b5160018152f35b919050346104bf57826003193601126104bf57600854815163a8d9362760e01b81529260209184919082906001600160a01b03165afa918215610647578392610610575b6020838351908152f35b9091506020813d821161063f575b8161062b60209383610fd4565b810103126104bf5760209250519038610606565b3d915061061e565b81513d85823e3d90fd5b5050346102545760203660031901126102545760209181906001600160a01b03610679610f6e565b1681526011845220549051908152f35b505034610254578060031936011261025457610377906106a7610f6e565b906106b0611064565b60015490926001600160a01b03916106cb9083163314611073565b168452601360205283209060ff801983541691151516179055565b919050346104bf57826003193601126104bf57805191836003549060019082821c9282811680156107df575b60209586861082146107cc57508488529081156107aa5750600114610751575b61074d8686610743828b0383610fd4565b519182918261100c565b0390f35b929550600383527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b828410610797575050508261074d94610743928201019438610732565b805486850188015292860192810161077a565b60ff191687860152505050151560051b83010192506107438261074d38610732565b634e487b7160e01b845260229052602483fd5b93607f1693610712565b833461043357608036600319011261043357610803610f6e565b61080b610f89565b906044356001600160a01b038116810361083c5761049b9261082b61131d565b6108336119d8565b60643592611ada565b8380fd5b5050346102545760203660031901126102545760209181906001600160a01b03610868610f6e565b1681526006845220549051908152f35b833461043357602036600319011261043357610892611055565b6108a760018060a01b03600154163314611073565b60ff801960125416911515161760125580f35b505034610254578060031936011261025457806020926103ba610f6e565b5050346102545760203660031901126102545760209181906001600160a01b03610900610f6e565b168152600b845220549051908152f35b5050346102545760203660031901126102545760209160ff9082906001600160a01b0361093b610f6e565b1681526013855220541690519015158152f35b8391503461025457826003193601126102545780359267ffffffffffffffff80851161083c573660238601121561083c5784830135908111610aed5760059281841b908351966020936109a38585018a610fd4565b88528388016024809483010191368311610ae9578401905b828210610ac6575050506109cd610f89565b9360019384549860018060a01b03976109e9898c163314611073565b60ff8b60a01c16610a795760ff60a01b19909a16600160a01b1786559798899890865b610a29575b600880546001600160a01b031916898b161790558980f35b81518b1015610a74578a811b820183015189168a5260098352838a20805460ff1916881790556000198b14610a62579986019986610a0c565b634e487b7160e01b8a5260118552858afd5b610a11565b835162461bcd60e51b81528086018490526022818801527f526577617264547261636b65723a20616c726561647920696e697469616c697a604482015261195960f21b6064820152608490fd5b81356001600160a01b0381168103610ae55781529085019085016109bb565b8980fd5b8880fd5b634e487b7160e01b845260418352602484fd5b5050346102545760203660031901126102545760209181906001600160a01b03610b28610f6e565b168152600f845220549051908152f35b50503461025457602036600319011261025457602090610b5e610b59610f6e565b6114c7565b9051908152f35b8334610433578060031936011261043357610b7e61131d565b61049b611f1e565b833461043357602036600319011261043357610ba0611055565b610bb560018060a01b03600154163314611073565b62ff000060125491151560101b169062ff000019161760125580f35b50503461025457816003193601126102545760209060ff60015460a01c1690519015158152f35b5050346102545760203660031901126102545760209181906001600160a01b03610c20610f6e565b1681526010845220549051908152f35b8284346104335780600319360112610433575060ff60209254169051908152f35b50503461025457602090610c6d610c6736610f9f565b91611396565b90519015158152f35b83833461025457602036600319011261025457610c91610f6e565b92610c9a61131d565b60ff60125460101c16610cbe57506001610cb66020943361167a565b925551908152f35b905162461bcd60e51b81529081906104bb9082016112db565b833461043357602036600319011261043357610cf1611055565b610d0660018060a01b03600154163314611073565b61ff0060125491151560081b169061ff0019161760125580f35b5050346102545781600319360112610254576020906005549051908152f35b505034610254578060031936011261025457906020916001610cb6610d62610f6e565b610d6a610f89565b90610d7361131d565b610d7b6119d8565b61167a565b50503461025457816003193601126102545760015490516001600160a01b039091168152602090f35b505034610254578160031936011261025457602090516127108152f35b5050346102545760203660031901126102545760209181906001600160a01b03610dee610f6e565b168152600d845220549051908152f35b833461043357608036600319011261043357610e18610f6e565b610e20610f89565b90606435906001600160a01b038216820361083c5761049b92610e4161131d565b610e496119d8565b60443591611c91565b5050346102545780600319360112610254576020906105bb610e72610f6e565b60243590336118c5565b919050346104bf57826003193601126104bf57805191836002549060019082821c928281168015610f31575b60209586861082146107cc57508488529081156107aa5750600114610ed85761074d8686610743828b0383610fd4565b929550600283527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b828410610f1e575050508261074d94610743928201019438610732565b8054868501880152928601928101610f01565b93607f1693610ea8565b833461043357610377610f4d36610f9f565b60015490926001600160a01b0391610f689083163314611073565b166110b7565b600435906001600160a01b0382168203610f8457565b600080fd5b602435906001600160a01b0382168203610f8457565b6060906003190112610f84576001600160a01b03906004358281168103610f8457916024359081168103610f84579060443590565b90601f8019910116810190811067ffffffffffffffff821117610ff657604052565b634e487b7160e01b600052604160045260246000fd5b6020808252825181830181905290939260005b82811061104157505060409293506000838284010152601f8019910116010190565b81810186015184820160400152850161101f565b600435908115158203610f8457565b602435908115158203610f8457565b1561107a57565b60405162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b6044820152606490fd5b60405163a9059cbb60e01b60208201526001600160a01b039290921660248301526044808301939093529181526110f8916110f3606483610fd4565b6110fa565b565b60018060a01b0316906040516040810167ffffffffffffffff9082811082821117610ff6576040526020938483527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564858401526000808587829751910182855af1903d1561123f573d92831161122b57906111959392916040519261118888601f19601f8401160185610fd4565b83523d868885013e61124a565b805191821591848315611207575b5050509050156111b05750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b919381809450010312610254578201519081151582036104335750803880846111a3565b634e487b7160e01b85526041600452602485fd5b906111959392506060915b919290156112ac575081511561125e575090565b3b156112675790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156112bf5750805190602001fd5b60405162461bcd60e51b81529081906104bb906004830161100c565b60809060208152602160208201527f526577617264547261636b65723a20616374696f6e206e6f7420656e61626c656040820152601960fa1b60608201520190565b60026000541461132e576002600055565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b9190820391821161138057565b634e487b7160e01b600052601160045260246000fd5b9291906000933385526020946013865260409560ff8783205416611469576001600160a01b03831680835260078252878320338452825287832054861161140c576114079697836113fb93889361140296526007815282822090338352522054611373565b33836118c5565b611704565b600190565b875162461bcd60e51b815260048101839052603060248201527f526577617264547261636b65723a207472616e7366657220616d6f756e74206560448201526f78636565647320616c6c6f77616e636560801b6064820152608490fd5b5050611407939450611704565b8181029291811591840414171561138057565b9190820180921161138057565b60ff16604d811161138057600a0a90565b81156114b1570490565b634e487b7160e01b600052601260045260246000fd5b6001600160a01b039081166000818152600d602090815260408083205492959492939284156115e95790826004949392600854168251958680926376f69fed60e11b82525afa9384156115df5787946115ac575b506c0c9f2c9cd04674edea4000000093848102908082048614901517156115985791611588916115959798600f61155861158e9796600c54611489565b93868352600e815261157c848420549a61157660ff60045416611496565b906114a7565b96835252205490611373565b90611476565b0490611489565b90565b634e487b7160e01b88526011600452602488fd5b9093508181813d83116115d8575b6115c48183610fd4565b810103126115d45751923861151b565b8680fd5b503d6115ba565b81513d89823e3d90fd5b5093949250600e915052205490565b60085460405163f7c618c160e01b81526001600160a01b03916020908290600490829086165afa90811561166e57600091611634575b50905090565b6020813d8211611666575b8161164c60209383610fd4565b81010312610254575191821682036104335750803861162e565b3d915061163f565b6040513d6000823e3d90fd5b60009161168682612011565b6001600160a01b038281168452600e602052604084208054949055918391826116b1575b5050505090565b826116e0917f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d495610f686115f8565b604080516001600160a01b039290921682526020820192909252a1388181806116aa565b6001600160a01b0390811691821561186a57169182156118115760ff60125416611804575b600090828252602091600683526040908282822054106117a9579081857fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef959493526006845261177c8383832054611373565b8682526006855282822055868152816117988482842054611489565b9188815260068652205551908152a3565b815162461bcd60e51b815260048101859052602e60248201527f526577617264547261636b65723a207472616e7366657220616d6f756e74206560448201526d7863656564732062616c616e636560901b6064820152608490fd5b61180c6119d8565b611729565b60405162461bcd60e51b815260206004820152602b60248201527f526577617264547261636b65723a207472616e7366657220746f20746865207a60448201526a65726f206164647265737360a81b6064820152608490fd5b60405162461bcd60e51b815260206004820152602d60248201527f526577617264547261636b65723a207472616e736665722066726f6d2074686560448201526c207a65726f206164647265737360981b6064820152608490fd5b6001600160a01b0390811691821561197e57169182156119265760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260078252604060002085600052825280604060002055604051908152a3565b60405162461bcd60e51b815260206004820152602a60248201527f526577617264547261636b65723a20617070726f766520746f20746865207a65604482015269726f206164647265737360b01b6064820152608490fd5b60405162461bcd60e51b815260206004820152602c60248201527f526577617264547261636b65723a20617070726f76652066726f6d207468652060448201526b7a65726f206164647265737360a01b6064820152608490fd5b33600052601360205260ff60406000205416156119f157565b60405162461bcd60e51b815260206004820152601860248201527f526577617264547261636b65723a20666f7262696464656e00000000000000006044820152606490fd5b15611a3d57565b60405162461bcd60e51b815260206004820152601e60248201527f526577617264547261636b65723a20696e76616c6964205f616d6f756e7400006044820152606490fd5b15611a8957565b60405162461bcd60e51b8152602060048201526024808201527f526577617264547261636b65723a20696e76616c6964205f6465706f7369745460448201526337b5b2b760e11b6064820152608490fd5b92611ae6811515611a36565b60018060a01b038093169360009385855260209360098552604092611b1060ff8589205416611a82565b83516323b872dd60e01b8782015290831660248201523060448201526064808201869052815260a0810167ffffffffffffffff811182821017611c7d578452611b5990886110fa565b611b6281612011565b1694858552600d8452611b788383872054611489565b868652600d855282862055600a84528185208186528452611b9c8383872054611489565b868652600a8552828620828752855282862055600b8452611bc08383872054611489565b908552600b8452818520558415611c2a57907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9291611c0182600554611489565b60055585855260068352611c188282872054611489565b868652600684528186205551908152a3565b5162461bcd60e51b815260048101839052602760248201527f526577617264547261636b65723a206d696e7420746f20746865207a65726f206044820152666164647265737360c81b6064820152608490fd5b634e487b7160e01b88526041600452602488fd5b939290611c9f831515611a36565b60018060a01b038091169060009082825260209060098252604097611cc960ff8a86205416611a82565b611cd281612011565b1690818352600d815287832054868110611ec65786611cf091611373565b828452600d825288842055600a8152878320848452815287832054868110611e6c5786611d1c91611373565b828452600a8252888420858552825288842055600b8152611d408689852054611373565b848452600b8252888420558115611e175781835260068152858884205410611dc1577fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906110f8979883855260068252611d9d8882872054611373565b8486526006835281862055611db4886005546114a7565b60055551878152a36110b7565b60849088519062461bcd60e51b82526004820152602a60248201527f526577617264547261636b65723a206275726e20616d6f756e7420657863656560448201526964732062616c616e636560b01b6064820152fd5b60849088519062461bcd60e51b82526004820152602960248201527f526577617264547261636b65723a206275726e2066726f6d20746865207a65726044820152686f206164647265737360b81b6064820152fd5b885162461bcd60e51b815260048101839052602d60248201527f526577617264547261636b65723a205f616d6f756e742065786365656473206460448201526c65706f73697442616c616e636560981b6064820152608490fd5b885162461bcd60e51b815260048101839052602b60248201527f526577617264547261636b65723a205f616d6f756e742065786365656473207360448201526a1d185ad959105b5bdd5b9d60aa1b6064820152608490fd5b60055460018060a01b036008541660ff6004541660405190633b129c8d60e11b82528360048301526024820152602081604481600080965af1908115612006578291611fd5575b50600c5492151580611fcc575b611f80575b5050156110f857565b9092916c0c9f2c9cd04674edea4000000091828102928184041490151715611fb857611fad929350611489565b80600c553880611f77565b634e487b7160e01b84526011600452602484fd5b50801515611f72565b90506020813d8211611ffe575b81611fef60209383610fd4565b81010312610254575138611f65565b3d9150611fe2565b6040513d84823e3d90fd5b6005549060018060a01b0380600854169060ff6004541690604093845192633b129c8d60e11b845286600485015260248401526020928381604481600080995af1908115612236578591612205575b50600c54961515806121fc575b6121b2575b5085156121aa571680612087575b5050505050565b808352600d8252838320546c0c9f2c9cd04674edea400000006120ce6120ba6120b460ff60045416611496565b846114a7565b848752600f8652611588888820548a611373565b0495828552600e84526120e48787872054611489565b90838652600e85528187872055600f85528686205515158061219a575b61210c575b50612080565b6010835285858520549061211f91611489565b8096838652601185528187872054601087528888205461213e91611476565b90612148916114a7565b9260045460ff1661215890611496565b612161916114a7565b9061216b91611476565b90612175916114a7565b61217e91611489565b9083526011825283832055601090522055388080808080612106565b50600d8352848420541515612101565b505050505050565b90956c0c9f2c9cd04674edea40000000918281029281840414901517156121e857906121dd91611489565b9485600c5538612072565b634e487b7160e01b85526011600452602485fd5b5080151561206d565b90508381813d831161222f575b61221c8183610fd4565b8101031261222b575138612060565b8480fd5b503d612212565b86513d87823e3d90fdfea2646970667358221220b89c61b0bfd5aac629961bea40c03f673fd85581c5fe23d628bee803cc1ce5ec64736f6c63430008130033", + "devdoc": { + "events": { + "Approval(address,address,uint256)": { + "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance." + }, + "Transfer(address,address,uint256)": { + "details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero." + } + }, + "kind": "dev", + "methods": {}, + "stateVariables": { + "totalSupply": { + "details": "Returns the amount of tokens in existence." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 10, + "contract": "contracts/staking/RewardTracker.sol:RewardTracker", + "label": "_status", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 888, + "contract": "contracts/staking/RewardTracker.sol:RewardTracker", + "label": "gov", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 1653, + "contract": "contracts/staking/RewardTracker.sol:RewardTracker", + "label": "isInitialized", + "offset": 20, + "slot": "1", + "type": "t_bool" + }, + { + "astId": 1655, + "contract": "contracts/staking/RewardTracker.sol:RewardTracker", + "label": "name", + "offset": 0, + "slot": "2", + "type": "t_string_storage" + }, + { + "astId": 1657, + "contract": "contracts/staking/RewardTracker.sol:RewardTracker", + "label": "symbol", + "offset": 0, + "slot": "3", + "type": "t_string_storage" + }, + { + "astId": 1660, + "contract": "contracts/staking/RewardTracker.sol:RewardTracker", + "label": "decimals", + "offset": 0, + "slot": "4", + "type": "t_uint8" + }, + { + "astId": 1663, + "contract": "contracts/staking/RewardTracker.sol:RewardTracker", + "label": "totalSupply", + "offset": 0, + "slot": "5", + "type": "t_uint256" + }, + { + "astId": 1667, + "contract": "contracts/staking/RewardTracker.sol:RewardTracker", + "label": "balances", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 1673, + "contract": "contracts/staking/RewardTracker.sol:RewardTracker", + "label": "allowances", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 1675, + "contract": "contracts/staking/RewardTracker.sol:RewardTracker", + "label": "distributor", + "offset": 0, + "slot": "8", + "type": "t_address" + }, + { + "astId": 1679, + "contract": "contracts/staking/RewardTracker.sol:RewardTracker", + "label": "isDepositToken", + "offset": 0, + "slot": "9", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 1686, + "contract": "contracts/staking/RewardTracker.sol:RewardTracker", + "label": "depositBalances", + "offset": 0, + "slot": "10", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 1690, + "contract": "contracts/staking/RewardTracker.sol:RewardTracker", + "label": "totalDepositSupply", + "offset": 0, + "slot": "11", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 1692, + "contract": "contracts/staking/RewardTracker.sol:RewardTracker", + "label": "cumulativeRewardPerToken", + "offset": 0, + "slot": "12", + "type": "t_uint256" + }, + { + "astId": 1697, + "contract": "contracts/staking/RewardTracker.sol:RewardTracker", + "label": "stakedAmounts", + "offset": 0, + "slot": "13", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 1701, + "contract": "contracts/staking/RewardTracker.sol:RewardTracker", + "label": "claimableReward", + "offset": 0, + "slot": "14", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 1705, + "contract": "contracts/staking/RewardTracker.sol:RewardTracker", + "label": "previousCumulatedRewardPerToken", + "offset": 0, + "slot": "15", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 1710, + "contract": "contracts/staking/RewardTracker.sol:RewardTracker", + "label": "cumulativeRewards", + "offset": 0, + "slot": "16", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 1715, + "contract": "contracts/staking/RewardTracker.sol:RewardTracker", + "label": "averageStakedAmounts", + "offset": 0, + "slot": "17", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 1717, + "contract": "contracts/staking/RewardTracker.sol:RewardTracker", + "label": "inPrivateTransferMode", + "offset": 0, + "slot": "18", + "type": "t_bool" + }, + { + "astId": 1719, + "contract": "contracts/staking/RewardTracker.sol:RewardTracker", + "label": "inPrivateStakingMode", + "offset": 1, + "slot": "18", + "type": "t_bool" + }, + { + "astId": 1721, + "contract": "contracts/staking/RewardTracker.sol:RewardTracker", + "label": "inPrivateClaimingMode", + "offset": 2, + "slot": "18", + "type": "t_bool" + }, + { + "astId": 1725, + "contract": "contracts/staking/RewardTracker.sol:RewardTracker", + "label": "isHandler", + "offset": 0, + "slot": "19", + "type": "t_mapping(t_address,t_bool)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/bsc_test/TokenClaim.json b/deployments/bsc_test/TokenClaim.json deleted file mode 100644 index f852822..0000000 --- a/deployments/bsc_test/TokenClaim.json +++ /dev/null @@ -1,688 +0,0 @@ -{ - "address": "0xC95bDFAaFBf79b435e4d2bF8d77842fc19e6fE56", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_wallet", - "type": "address" - }, - { - "internalType": "address", - "name": "_token", - "type": "address" - }, - { - "internalType": "address", - "name": "_verifier", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_duration", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "duration", - "type": "uint256" - } - ], - "name": "DurationUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "erc20", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "wallet", - "type": "address" - } - ], - "name": "EventERC20Wallet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "bit", - "type": "uint256" - } - ], - "name": "EventTokenClaimed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "verifier", - "type": "address" - } - ], - "name": "EventVerifierUpdated", - "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" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "_CACHED_CHAIN_ID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "_CACHED_THIS", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "signer", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - } - ], - "name": "checkSigner", - "outputs": [], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256[4]", - "name": "vals", - "type": "uint256[4]" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - } - ], - "name": "claim", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "claimedBitMap", - "outputs": [ - { - "internalType": "uint256", - "name": "claimedBit", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "duration", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "erc20Wallets", - "outputs": [ - { - "internalType": "address", - "name": "wallet", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_user", - "type": "address" - }, - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "address", - "name": "_token", - "type": "address" - }, - { - "internalType": "address", - "name": "_contract", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_chainId", - "type": "uint256" - }, - { - "internalType": "uint256[4]", - "name": "_vals", - "type": "uint256[4]" - } - ], - "name": "getMessageHash", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "minDuration", - "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": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "valNew", - "type": "uint256" - } - ], - "name": "updateDuation", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "erc20", - "type": "address" - }, - { - "internalType": "address", - "name": "wallet", - "type": "address" - } - ], - "name": "updateERC20Wallet", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_verifier", - "type": "address" - } - ], - "name": "updateVerifier", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "verifier", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x7b00d009ec2bcc90f1ebaa1cdcb25154dbfc7af1393b2034d152b60c7bcc03d5", - "receipt": { - "to": null, - "from": "0x50A8e60041A206AcaA5F844a1104896224be6F39", - "contractAddress": "0xC95bDFAaFBf79b435e4d2bF8d77842fc19e6fE56", - "transactionIndex": 5, - "gasUsed": "1299107", - "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000800000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000060000000000000000000000000000000000000020000000004000000000000000000", - "blockHash": "0x36deafa4ea0e22d9eb9c9eb0b7608b59d2ff4daed6efe59455188c7c87a239a8", - "transactionHash": "0x7b00d009ec2bcc90f1ebaa1cdcb25154dbfc7af1393b2034d152b60c7bcc03d5", - "logs": [ - { - "transactionIndex": 5, - "blockNumber": 43167433, - "transactionHash": "0x7b00d009ec2bcc90f1ebaa1cdcb25154dbfc7af1393b2034d152b60c7bcc03d5", - "address": "0xC95bDFAaFBf79b435e4d2bF8d77842fc19e6fE56", - "topics": [ - "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x00000000000000000000000050a8e60041a206acaa5f844a1104896224be6f39" - ], - "data": "0x", - "logIndex": 7, - "blockHash": "0x36deafa4ea0e22d9eb9c9eb0b7608b59d2ff4daed6efe59455188c7c87a239a8" - } - ], - "blockNumber": 43167433, - "cumulativeGasUsed": "1825472", - "status": 1, - "byzantium": true - }, - "args": [ - "0x50A8e60041A206AcaA5F844a1104896224be6F39", - "0x8f34a7b59841bc87f7d80f9858490cc1412d50fb", - "0x50A8e60041A206AcaA5F844a1104896224be6F39", - 3600 - ], - "numDeployments": 1, - "solcInputHash": "8d4e816c22b2b125316667293671f05d", - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_wallet\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_verifier\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_duration\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"}],\"name\":\"DurationUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"erc20\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"wallet\",\"type\":\"address\"}],\"name\":\"EventERC20Wallet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"bit\",\"type\":\"uint256\"}],\"name\":\"EventTokenClaimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"verifier\",\"type\":\"address\"}],\"name\":\"EventVerifierUpdated\",\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"_CACHED_CHAIN_ID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_CACHED_THIS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"checkSigner\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256[4]\",\"name\":\"vals\",\"type\":\"uint256[4]\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"claimedBitMap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"claimedBit\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"duration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"erc20Wallets\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"wallet\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"_vals\",\"type\":\"uint256[4]\"}],\"name\":\"getMessageHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minDuration\",\"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\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"valNew\",\"type\":\"uint256\"}],\"name\":\"updateDuation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"erc20\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"wallet\",\"type\":\"address\"}],\"name\":\"updateERC20Wallet\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_verifier\",\"type\":\"address\"}],\"name\":\"updateVerifier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"verifier\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"}},\"kind\":\"dev\",\"methods\":{\"claim(address,address,uint256[4],bytes)\":{\"details\":\"claim CEC with signature\",\"params\":{\"account\":\"address which eligible to claim, only for event log\",\"signature\":\"signature of claim\",\"token\":\"address of token\",\"vals\":\"array of amount, bit, signTime, saltNonce\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pause()\":{\"details\":\"update pause state\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling 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.\"},\"unpause()\":{\"details\":\"update unpause state\"},\"updateDuation(uint256)\":{\"details\":\"Change duration value\"},\"updateERC20Wallet(address,address)\":{\"details\":\"update ERC20 wallet\"},\"updateVerifier(address)\":{\"details\":\"update verifier address\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/activity/TokenClaim.sol\":\"TokenClaim\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/security/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract Pausable is Context {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n constructor() {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n}\\n\",\"keccak256\":\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\",\"license\":\"MIT\"},\"@openzeppelin/contracts/security/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n constructor() {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n _nonReentrantBefore();\\n _;\\n _nonReentrantAfter();\\n }\\n\\n function _nonReentrantBefore() private {\\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n }\\n\\n function _nonReentrantAfter() private {\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Returns true if the reentrancy guard is currently set to \\\"entered\\\", which indicates there is a\\n * `nonReentrant` function in the call stack.\\n */\\n function _reentrancyGuardEntered() internal view returns (bool) {\\n return _status == _ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa535a5df777d44e945dd24aa43a11e44b024140fc340ad0dfe42acf4002aade1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n *\\n * ==== Security Considerations\\n *\\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\\n * generally recommended is:\\n *\\n * ```solidity\\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\\n * doThing(..., value);\\n * }\\n *\\n * function doThing(..., uint256 value) public {\\n * token.safeTransferFrom(msg.sender, address(this), value);\\n * ...\\n * }\\n * ```\\n *\\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\\n * {SafeERC20-safeTransferFrom}).\\n *\\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\\n * contracts should have entry points that don't rely on permit.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n *\\n * CAUTION: See Security Considerations above.\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xb264c03a3442eb37a68ad620cefd1182766b58bee6cec40343480392d6b14d69\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/IERC20Permit.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n IERC20Permit token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit(owner, spender, value, deadline, v, r, s);\\n uint256 nonceAfter = token.nonces(owner);\\n require(nonceAfter == nonceBefore + 1, \\\"SafeERC20: permit did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0xabefac93435967b4d36a4fabcbdbb918d1f0b7ae3c3d85bc30923b326c927ed1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0xa92e4fa126feb6907daa0513ddd816b2eb91f30a808de54f63c17d0e162c3439\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\")\\n mstore(0x1c, hash)\\n message := keccak256(0x00, 0x3c)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, \\\"\\\\x19\\\\x01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n data := keccak256(ptr, 0x42)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Data with intended validator, created from a\\n * `validator` and `data` according to the version 0 of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x00\\\", validator, data));\\n }\\n}\\n\",\"keccak256\":\"0x809bc3edb4bcbef8263fa616c1b60ee0004b50a8a1bfa164d8f57fd31f520c58\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"contracts/activity/TokenClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\nimport {ReentrancyGuard} from \\\"@openzeppelin/contracts/security/ReentrancyGuard.sol\\\";\\nimport {Pausable} from \\\"@openzeppelin/contracts/security/Pausable.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {SafeERC20} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport {HasSignature} from \\\"../core/HasSignature.sol\\\";\\nimport {TimeChecker} from \\\"../utils/TimeChecker.sol\\\";\\n\\ncontract TokenClaim is HasSignature, ReentrancyGuard, Pausable, TimeChecker {\\n using SafeERC20 for IERC20;\\n\\n uint256 public immutable _CACHED_CHAIN_ID;\\n address public immutable _CACHED_THIS;\\n address public verifier;\\n\\n mapping(address token => address wallet) public erc20Wallets;\\n\\n // store user's claimed status\\n mapping(address user => mapping(address token => uint256 claimedBit)) public claimedBitMap;\\n\\n event EventERC20Wallet(address erc20, address wallet);\\n\\n event EventVerifierUpdated(address indexed verifier);\\n event EventTokenClaimed(address indexed user, address indexed token, address account, uint256 amount, uint256 bit);\\n\\n constructor(address _wallet, address _token, address _verifier, uint256 _duration) TimeChecker(_duration) {\\n _CACHED_CHAIN_ID = block.chainid;\\n _CACHED_THIS = address(this);\\n erc20Wallets[_token] = _wallet;\\n verifier = _verifier;\\n }\\n\\n /**\\n * @dev update verifier address\\n */\\n function updateVerifier(address _verifier) external onlyOwner {\\n require(_verifier != address(0), \\\"TokenClaim: address can not be zero\\\");\\n verifier = _verifier;\\n emit EventVerifierUpdated(_verifier);\\n }\\n\\n /**\\n * @dev update pause state\\n */\\n function pause() external onlyOwner {\\n _pause();\\n }\\n\\n /**\\n * @dev update unpause state\\n */\\n function unpause() external onlyOwner {\\n _unpause();\\n }\\n\\n /**\\n * @dev update ERC20 wallet\\n */\\n function updateERC20Wallet(address erc20, address wallet) external onlyOwner {\\n require(erc20Wallets[erc20] != wallet, \\\"TokenClaim: ERC20 wallet not changed\\\");\\n erc20Wallets[erc20] = wallet;\\n emit EventERC20Wallet(erc20, wallet);\\n }\\n\\n /**\\n * @dev claim CEC with signature\\n * @param account address which eligible to claim, only for event log\\n * @param token address of token\\n * @param vals array of amount, bit, signTime, saltNonce\\n * @param signature signature of claim\\n */\\n\\n function claim(\\n address account,\\n address token,\\n uint256[4] calldata vals, // amount, bit, signTime, saltNonce\\n bytes calldata signature\\n ) external signatureValid(signature) timeValid(vals[2]) nonReentrant whenNotPaused {\\n require(erc20Wallets[token] != address(0), \\\"TokenClaim: token is not supported\\\");\\n require(vals[0] > 0, \\\"TokenClaim: amount is zero\\\");\\n uint256 current = claimedBitMap[account][token];\\n require(current & vals[1] == 0, \\\"TokenClaim: condition check failed\\\");\\n address user = _msgSender();\\n bytes32 criteriaMessageHash = getMessageHash(\\n user,\\n account,\\n token,\\n _CACHED_THIS,\\n _CACHED_CHAIN_ID,\\n vals\\n );\\n checkSigner(verifier, criteriaMessageHash, signature);\\n _useSignature(signature);\\n claimedBitMap[account][token] = current | vals[1];\\n IERC20(token).safeTransferFrom(erc20Wallets[token], user, vals[0]);\\n emit EventTokenClaimed(user, token, account, vals[0], vals[1]);\\n }\\n\\n function getMessageHash(\\n address _user,\\n address _account,\\n address _token,\\n address _contract,\\n uint256 _chainId,\\n uint256[4] calldata _vals\\n ) public pure returns (bytes32) {\\n bytes memory encoded = abi.encodePacked(\\n _user,\\n _account,\\n _token,\\n _contract,\\n _chainId\\n );\\n for (uint256 i = 0; i < _vals.length; i++) {\\n encoded = bytes.concat(encoded, abi.encodePacked(_vals[i]));\\n }\\n return keccak256(encoded);\\n }\\n}\\n\",\"keccak256\":\"0x00f5205a161a46f58e11550d39bf0f6e6016ff22748b3330b785aa0de5c7f7dc\",\"license\":\"MIT\"},\"contracts/core/HasSignature.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\nimport {ECDSA} from \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport {Ownable} from \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\ncontract HasSignature is Ownable {\\n mapping(bytes signature => bool status) private _usedSignatures;\\n\\n function checkSigner(\\n address signer,\\n bytes32 hash,\\n bytes memory signature\\n ) public pure {\\n bytes32 ethSignedMessageHash = ECDSA.toEthSignedMessageHash(hash);\\n\\n address recovered = ECDSA.recover(ethSignedMessageHash, signature);\\n require(recovered == signer, \\\"invalid signature\\\");\\n }\\n\\n modifier signatureValid(bytes calldata signature) {\\n require(\\n !_usedSignatures[signature],\\n \\\"signature used. please send another transaction with new signature\\\"\\n );\\n _;\\n }\\n\\n function _useSignature(bytes calldata signature) internal {\\n if (!_usedSignatures[signature]) {\\n _usedSignatures[signature] = true;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x1999478f082b3dac416b579ea9385736e3015aa27ac7173c67555e21426ede51\",\"license\":\"MIT\"},\"contracts/utils/TimeChecker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\nimport {Ownable} from \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\ncontract TimeChecker is Ownable {\\n uint256 public duration;\\n uint256 public minDuration;\\n\\n event DurationUpdated(uint256 indexed duration);\\n\\n constructor(uint256 _duration) {\\n duration = _duration;\\n minDuration = 30 minutes;\\n }\\n\\n /**\\n * @dev Check if the time is valid\\n */\\n modifier timeValid(uint256 time) {\\n require(\\n time + duration >= block.timestamp,\\n \\\"expired, please send another transaction with new signature\\\"\\n );\\n _;\\n }\\n\\n\\n /**\\n * @dev Change duration value\\n */\\n function updateDuation(uint256 valNew) external onlyOwner {\\n require(valNew > minDuration, \\\"duration too short\\\");\\n duration = valNew;\\n emit DurationUpdated(valNew);\\n }\\n}\\n\",\"keccak256\":\"0xeb1278f24da69d97bd3d0da549e0673fdfa0b319bf4ba2ed6b24fefa870f3af9\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60c03461011c57601f61154338819003918201601f19168301916001600160401b038311848410176101215780849260809460405283398101031261011c5761004781610137565b61005360208301610137565b606061006160408501610137565b93015192600092835494604060018060a01b0319953387891617815581519760018060a01b039687948592833391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08680a3600160025560ff1960035416600355600455610708600555466080523060a052168152600760205220911684825416179055169060065416176006556113f7908161014c823960805181818161046c0152610eb2015260a0518181816102c101526104420152f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b038216820361011c5756fe608080604052600436101561001357600080fd5b60003560e01c9081630fb5a6b414610ed5575080632b437d4814610e9a5780632b7ac3f314610e715780633f4ba83a14610ddd5780634fcbaa1f14610d8c5780635671576114610d6e5780635c975abb14610d4b5780636d04319414610cf1578063715018a614610c985780637f9d309614610c0d5780638456cb5914610bb35780638da5cb5b14610b8a57806391c3d7a314610a9f57806397fc007c146109e5578063c0411364146109aa578063d718f2fe146102f0578063da28b527146102ab578063de76cadb146101b95763f2fde38b146100f057600080fd5b346101b45760203660031901126101b457610109610ef0565b610111610fdf565b6001600160a01b0390811690811561016057600054826001600160601b0360a01b821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b600080fd5b346101b45760403660031901126101b4576101d2610ef0565b6101da610f06565b6101e2610fdf565b6001600160a01b0391821660008181526007602052604090205490929182169116811461025a57816040917f75a33e8174368dc0792ac0a162a518ece06bebca5d2d915bf1a161b4fdc60cbf93600052600760205282600020816001600160601b0360a01b82541617905582519182526020820152a1005b60405162461bcd60e51b8152602060048201526024808201527f546f6b656e436c61696d3a2045524332302077616c6c6574206e6f74206368616044820152631b99d95960e21b6064820152608490fd5b346101b45760003660031901126101b4576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b346101b45760e03660031901126101b457610309610ef0565b610311610f06565b3660c4116101b45760c43567ffffffffffffffff8082116101b457366023830112156101b4578160040135116101b4573660248260040135830101116101b45760ff604051826004013560248401823760208184600401358101600181520301902054166109345760843560045481018091116107895742116108c957600280541461088457600280556103a3611037565b6001600160a01b03828116600090815260076020526040902054161561083457604435156107ef576001600160a01b0383811660009081526008602090815260408083209386168352929052205490606435821661079f576040516001600160601b03193360601b1660208201526001600160601b03198560601b1660348201526001600160601b03198460601b1660488201526001600160601b03197f000000000000000000000000000000000000000000000000000000000000000060601b16605c8201527f000000000000000000000000000000000000000000000000000000000000000060708201526070815261049d81610f1c565b6000905b6004821061071d5780516020909101206006546104db92506001600160a01b0316906104d536600486013560248701610fa8565b91611151565b60ff60405182600401356024840182376020818460040135810160018152030190205416156106ec575b5060018060a01b0383166000526008602052604060002060018060a01b03831660005260205260643517604060002055600760205261060060018060a01b03604060002054166000806040519260208401906323b872dd60e01b8252602485015233604485015260443560648501526064845261058184610f1c565b6040519361058e85610f4e565b60208086527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564908601525190826001600160a01b0388165af13d156106e4573d906105d882610f8c565b916105e66040519384610f6a565b82523d6000602084013e5b6001600160a01b03851661107b565b80519081159182156106c1575b50501561066957604080516001600160a01b03938416815260443560208201526064359181019190915291169033907fc5e576d85788400ff978578cc94a19ee7a30e8ee78d468f20ab2e305bef8411d90606090a36001600255005b60405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608490fd5b81925090602091810103126101b4576020015180151581036101b457838061060d565b6060906105f1565b6020604051828193600401356024820183376004013581016001815203019020600160ff1982541617905583610505565b610776602061076a92604051828101908660051b60440135825283815261074381610f4e565b604051958361075b889551809288808901910161112e565b8401915180938684019061112e565b01038084520182610f6a565b90600019811461078957600101906104a1565b634e487b7160e01b600052601160045260246000fd5b60405162461bcd60e51b815260206004820152602260248201527f546f6b656e436c61696d3a20636f6e646974696f6e20636865636b206661696c604482015261195960f21b6064820152608490fd5b60405162461bcd60e51b815260206004820152601a60248201527f546f6b656e436c61696d3a20616d6f756e74206973207a65726f0000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152602260248201527f546f6b656e436c61696d3a20746f6b656e206973206e6f7420737570706f7274604482015261195960f21b6064820152608490fd5b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b60405162461bcd60e51b815260206004820152603b60248201527f657870697265642c20706c656173652073656e6420616e6f746865722074726160448201527f6e73616374696f6e2077697468206e6577207369676e617475726500000000006064820152608490fd5b60405162461bcd60e51b815260206004820152604260248201527f7369676e617475726520757365642e20706c656173652073656e6420616e6f7460448201527f686572207472616e73616374696f6e2077697468206e6577207369676e617475606482015261726560f01b608482015260a490fd5b346101b45760203660031901126101b45760206001600160a01b03806109ce610ef0565b166000526007825260406000205416604051908152f35b346101b45760203660031901126101b4576109fe610ef0565b610a06610fdf565b6001600160a01b03168015610a4e57600680546001600160a01b031916821790557f4635bfbeab18ad788a7fc2a516293118982d68d953206bd5f8c556890e72d7e5600080a2005b60405162461bcd60e51b815260206004820152602360248201527f546f6b656e436c61696d3a20616464726573732063616e206e6f74206265207a60448201526265726f60e81b6064820152608490fd5b346101b4576101203660031901126101b457610ab9610ef0565b610ac1610f06565b6044356001600160a01b0380821682036101b45760643590811681036101b45736610124116101b457604051926001600160601b0319928380928160209860601b168888015260601b16603486015260601b16604884015260601b16605c820152608435607082015260708152610b3781610f1c565b60005b8260048210610b525790508151910120604051908152f35b610b789061076a9293604051828101908660051b60a40135825283815261074381610f4e565b90600019811461078957600101610b3a565b346101b45760003660031901126101b4576000546040516001600160a01b039091168152602090f35b346101b45760003660031901126101b457610bcc610fdf565b610bd4611037565b600160ff1960035416176003557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b346101b45760203660031901126101b457600435610c29610fdf565b600554811115610c5e57806004557f91abcc2d6823e3a3f11d31b208dd3065d2c6a791f1c7c9fe96a42ce12897eac5600080a2005b60405162461bcd60e51b8152602060048201526012602482015271191d5c985d1a5bdb881d1bdbc81cda1bdc9d60721b6044820152606490fd5b346101b45760003660031901126101b457610cb1610fdf565b600080546001600160a01b0319811682556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b346101b45760603660031901126101b457610d0a610ef0565b6044359067ffffffffffffffff82116101b457366023830112156101b457610d3f610d49923690602481600401359101610fa8565b9060243590611151565b005b346101b45760003660031901126101b457602060ff600354166040519015158152f35b346101b45760003660031901126101b4576020600554604051908152f35b346101b45760403660031901126101b457610da5610ef0565b610dad610f06565b9060018060a01b038091166000526008602052604060002091166000526020526020604060002054604051908152f35b346101b45760003660031901126101b457610df6610fdf565b60035460ff811615610e355760ff19166003557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b60405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606490fd5b346101b45760003660031901126101b4576006546040516001600160a01b039091168152602090f35b346101b45760003660031901126101b45760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b346101b45760003660031901126101b4576020906004548152f35b600435906001600160a01b03821682036101b457565b602435906001600160a01b03821682036101b457565b60a0810190811067ffffffffffffffff821117610f3857604052565b634e487b7160e01b600052604160045260246000fd5b6040810190811067ffffffffffffffff821117610f3857604052565b90601f8019910116810190811067ffffffffffffffff821117610f3857604052565b67ffffffffffffffff8111610f3857601f01601f191660200190565b929192610fb482610f8c565b91610fc26040519384610f6a565b8294818452818301116101b4578281602093846000960137010152565b6000546001600160a01b03163303610ff357565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b60ff6003541661104357565b60405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606490fd5b919290156110dd575081511561108f575090565b3b156110985790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156110f05750805190602001fd5b6044604051809262461bcd60e51b825260206004830152611120815180928160248601526020868601910161112e565b601f01601f19168101030190fd5b60005b8381106111415750506000910152565b8181015183820152602001611131565b906111939261118b917f19457468657265756d205369676e6564204d6573736167653a0a333200000000600052601c52603c6000206112fa565b9290926111e0565b6001600160a01b039081169116036111a757565b60405162461bcd60e51b8152602060048201526011602482015270696e76616c6964207369676e617475726560781b6044820152606490fd5b60058110156112e457806111f15750565b6001810361123e5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606490fd5b6002810361128b5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606490fd5b60031461129457565b60405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608490fd5b634e487b7160e01b600052602160045260246000fd5b90604181511460001461132857611324916020820151906060604084015193015160001a90611332565b9091565b5050600090600290565b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083116113b55791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa156113a85781516001600160a01b038116156113a2579190565b50600190565b50604051903d90823e3d90fd5b5050505060009060039056fea2646970667358221220b87505206a54c1b11f892251a96926990a9357b3d1ee16fa1438bd24ca87e42464736f6c63430008130033", - "deployedBytecode": "0x608080604052600436101561001357600080fd5b60003560e01c9081630fb5a6b414610ed5575080632b437d4814610e9a5780632b7ac3f314610e715780633f4ba83a14610ddd5780634fcbaa1f14610d8c5780635671576114610d6e5780635c975abb14610d4b5780636d04319414610cf1578063715018a614610c985780637f9d309614610c0d5780638456cb5914610bb35780638da5cb5b14610b8a57806391c3d7a314610a9f57806397fc007c146109e5578063c0411364146109aa578063d718f2fe146102f0578063da28b527146102ab578063de76cadb146101b95763f2fde38b146100f057600080fd5b346101b45760203660031901126101b457610109610ef0565b610111610fdf565b6001600160a01b0390811690811561016057600054826001600160601b0360a01b821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b600080fd5b346101b45760403660031901126101b4576101d2610ef0565b6101da610f06565b6101e2610fdf565b6001600160a01b0391821660008181526007602052604090205490929182169116811461025a57816040917f75a33e8174368dc0792ac0a162a518ece06bebca5d2d915bf1a161b4fdc60cbf93600052600760205282600020816001600160601b0360a01b82541617905582519182526020820152a1005b60405162461bcd60e51b8152602060048201526024808201527f546f6b656e436c61696d3a2045524332302077616c6c6574206e6f74206368616044820152631b99d95960e21b6064820152608490fd5b346101b45760003660031901126101b4576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b346101b45760e03660031901126101b457610309610ef0565b610311610f06565b3660c4116101b45760c43567ffffffffffffffff8082116101b457366023830112156101b4578160040135116101b4573660248260040135830101116101b45760ff604051826004013560248401823760208184600401358101600181520301902054166109345760843560045481018091116107895742116108c957600280541461088457600280556103a3611037565b6001600160a01b03828116600090815260076020526040902054161561083457604435156107ef576001600160a01b0383811660009081526008602090815260408083209386168352929052205490606435821661079f576040516001600160601b03193360601b1660208201526001600160601b03198560601b1660348201526001600160601b03198460601b1660488201526001600160601b03197f000000000000000000000000000000000000000000000000000000000000000060601b16605c8201527f000000000000000000000000000000000000000000000000000000000000000060708201526070815261049d81610f1c565b6000905b6004821061071d5780516020909101206006546104db92506001600160a01b0316906104d536600486013560248701610fa8565b91611151565b60ff60405182600401356024840182376020818460040135810160018152030190205416156106ec575b5060018060a01b0383166000526008602052604060002060018060a01b03831660005260205260643517604060002055600760205261060060018060a01b03604060002054166000806040519260208401906323b872dd60e01b8252602485015233604485015260443560648501526064845261058184610f1c565b6040519361058e85610f4e565b60208086527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564908601525190826001600160a01b0388165af13d156106e4573d906105d882610f8c565b916105e66040519384610f6a565b82523d6000602084013e5b6001600160a01b03851661107b565b80519081159182156106c1575b50501561066957604080516001600160a01b03938416815260443560208201526064359181019190915291169033907fc5e576d85788400ff978578cc94a19ee7a30e8ee78d468f20ab2e305bef8411d90606090a36001600255005b60405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608490fd5b81925090602091810103126101b4576020015180151581036101b457838061060d565b6060906105f1565b6020604051828193600401356024820183376004013581016001815203019020600160ff1982541617905583610505565b610776602061076a92604051828101908660051b60440135825283815261074381610f4e565b604051958361075b889551809288808901910161112e565b8401915180938684019061112e565b01038084520182610f6a565b90600019811461078957600101906104a1565b634e487b7160e01b600052601160045260246000fd5b60405162461bcd60e51b815260206004820152602260248201527f546f6b656e436c61696d3a20636f6e646974696f6e20636865636b206661696c604482015261195960f21b6064820152608490fd5b60405162461bcd60e51b815260206004820152601a60248201527f546f6b656e436c61696d3a20616d6f756e74206973207a65726f0000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152602260248201527f546f6b656e436c61696d3a20746f6b656e206973206e6f7420737570706f7274604482015261195960f21b6064820152608490fd5b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b60405162461bcd60e51b815260206004820152603b60248201527f657870697265642c20706c656173652073656e6420616e6f746865722074726160448201527f6e73616374696f6e2077697468206e6577207369676e617475726500000000006064820152608490fd5b60405162461bcd60e51b815260206004820152604260248201527f7369676e617475726520757365642e20706c656173652073656e6420616e6f7460448201527f686572207472616e73616374696f6e2077697468206e6577207369676e617475606482015261726560f01b608482015260a490fd5b346101b45760203660031901126101b45760206001600160a01b03806109ce610ef0565b166000526007825260406000205416604051908152f35b346101b45760203660031901126101b4576109fe610ef0565b610a06610fdf565b6001600160a01b03168015610a4e57600680546001600160a01b031916821790557f4635bfbeab18ad788a7fc2a516293118982d68d953206bd5f8c556890e72d7e5600080a2005b60405162461bcd60e51b815260206004820152602360248201527f546f6b656e436c61696d3a20616464726573732063616e206e6f74206265207a60448201526265726f60e81b6064820152608490fd5b346101b4576101203660031901126101b457610ab9610ef0565b610ac1610f06565b6044356001600160a01b0380821682036101b45760643590811681036101b45736610124116101b457604051926001600160601b0319928380928160209860601b168888015260601b16603486015260601b16604884015260601b16605c820152608435607082015260708152610b3781610f1c565b60005b8260048210610b525790508151910120604051908152f35b610b789061076a9293604051828101908660051b60a40135825283815261074381610f4e565b90600019811461078957600101610b3a565b346101b45760003660031901126101b4576000546040516001600160a01b039091168152602090f35b346101b45760003660031901126101b457610bcc610fdf565b610bd4611037565b600160ff1960035416176003557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b346101b45760203660031901126101b457600435610c29610fdf565b600554811115610c5e57806004557f91abcc2d6823e3a3f11d31b208dd3065d2c6a791f1c7c9fe96a42ce12897eac5600080a2005b60405162461bcd60e51b8152602060048201526012602482015271191d5c985d1a5bdb881d1bdbc81cda1bdc9d60721b6044820152606490fd5b346101b45760003660031901126101b457610cb1610fdf565b600080546001600160a01b0319811682556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b346101b45760603660031901126101b457610d0a610ef0565b6044359067ffffffffffffffff82116101b457366023830112156101b457610d3f610d49923690602481600401359101610fa8565b9060243590611151565b005b346101b45760003660031901126101b457602060ff600354166040519015158152f35b346101b45760003660031901126101b4576020600554604051908152f35b346101b45760403660031901126101b457610da5610ef0565b610dad610f06565b9060018060a01b038091166000526008602052604060002091166000526020526020604060002054604051908152f35b346101b45760003660031901126101b457610df6610fdf565b60035460ff811615610e355760ff19166003557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b60405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606490fd5b346101b45760003660031901126101b4576006546040516001600160a01b039091168152602090f35b346101b45760003660031901126101b45760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b346101b45760003660031901126101b4576020906004548152f35b600435906001600160a01b03821682036101b457565b602435906001600160a01b03821682036101b457565b60a0810190811067ffffffffffffffff821117610f3857604052565b634e487b7160e01b600052604160045260246000fd5b6040810190811067ffffffffffffffff821117610f3857604052565b90601f8019910116810190811067ffffffffffffffff821117610f3857604052565b67ffffffffffffffff8111610f3857601f01601f191660200190565b929192610fb482610f8c565b91610fc26040519384610f6a565b8294818452818301116101b4578281602093846000960137010152565b6000546001600160a01b03163303610ff357565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b60ff6003541661104357565b60405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606490fd5b919290156110dd575081511561108f575090565b3b156110985790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156110f05750805190602001fd5b6044604051809262461bcd60e51b825260206004830152611120815180928160248601526020868601910161112e565b601f01601f19168101030190fd5b60005b8381106111415750506000910152565b8181015183820152602001611131565b906111939261118b917f19457468657265756d205369676e6564204d6573736167653a0a333200000000600052601c52603c6000206112fa565b9290926111e0565b6001600160a01b039081169116036111a757565b60405162461bcd60e51b8152602060048201526011602482015270696e76616c6964207369676e617475726560781b6044820152606490fd5b60058110156112e457806111f15750565b6001810361123e5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606490fd5b6002810361128b5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606490fd5b60031461129457565b60405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608490fd5b634e487b7160e01b600052602160045260246000fd5b90604181511460001461132857611324916020820151906060604084015193015160001a90611332565b9091565b5050600090600290565b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083116113b55791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa156113a85781516001600160a01b038116156113a2579190565b50600190565b50604051903d90823e3d90fd5b5050505060009060039056fea2646970667358221220b87505206a54c1b11f892251a96926990a9357b3d1ee16fa1438bd24ca87e42464736f6c63430008130033", - "devdoc": { - "events": { - "Paused(address)": { - "details": "Emitted when the pause is triggered by `account`." - }, - "Unpaused(address)": { - "details": "Emitted when the pause is lifted by `account`." - } - }, - "kind": "dev", - "methods": { - "claim(address,address,uint256[4],bytes)": { - "details": "claim CEC with signature", - "params": { - "account": "address which eligible to claim, only for event log", - "signature": "signature of claim", - "token": "address of token", - "vals": "array of amount, bit, signTime, saltNonce" - } - }, - "owner()": { - "details": "Returns the address of the current owner." - }, - "pause()": { - "details": "update pause state" - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "renounceOwnership()": { - "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling 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." - }, - "unpause()": { - "details": "update unpause state" - }, - "updateDuation(uint256)": { - "details": "Change duration value" - }, - "updateERC20Wallet(address,address)": { - "details": "update ERC20 wallet" - }, - "updateVerifier(address)": { - "details": "update verifier address" - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 7, - "contract": "contracts/activity/TokenClaim.sol:TokenClaim", - "label": "_owner", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 3174, - "contract": "contracts/activity/TokenClaim.sol:TokenClaim", - "label": "_usedSignatures", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes_memory_ptr,t_bool)" - }, - { - "astId": 231, - "contract": "contracts/activity/TokenClaim.sol:TokenClaim", - "label": "_status", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 130, - "contract": "contracts/activity/TokenClaim.sol:TokenClaim", - "label": "_paused", - "offset": 0, - "slot": "3", - "type": "t_bool" - }, - { - "astId": 3247, - "contract": "contracts/activity/TokenClaim.sol:TokenClaim", - "label": "duration", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 3249, - "contract": "contracts/activity/TokenClaim.sol:TokenClaim", - "label": "minDuration", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 2733, - "contract": "contracts/activity/TokenClaim.sol:TokenClaim", - "label": "verifier", - "offset": 0, - "slot": "6", - "type": "t_address" - }, - { - "astId": 2737, - "contract": "contracts/activity/TokenClaim.sol:TokenClaim", - "label": "erc20Wallets", - "offset": 0, - "slot": "7", - "type": "t_mapping(t_address,t_address)" - }, - { - "astId": 2743, - "contract": "contracts/activity/TokenClaim.sol:TokenClaim", - "label": "claimedBitMap", - "offset": 0, - "slot": "8", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes_memory_ptr": { - "encoding": "bytes", - "label": "bytes", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_address)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => address)", - "numberOfBytes": "32", - "value": "t_address" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_uint256)" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_bytes_memory_ptr,t_bool)": { - "encoding": "mapping", - "key": "t_bytes_memory_ptr", - "label": "mapping(bytes => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} \ No newline at end of file diff --git a/deployments/bsc_test/Vester.json b/deployments/bsc_test/Vester.json new file mode 100644 index 0000000..ddb2f12 --- /dev/null +++ b/deployments/bsc_test/Vester.json @@ -0,0 +1,1207 @@ +{ + "address": "0x10F883D6e26fBb56Ab20466502BFD9017a1ea144", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "uint256", + "name": "_vestingDuration", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_esToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_pairToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_claimableToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_rewardTracker", + "type": "address" + }, + { + "internalType": "bool", + "name": "_needCheckStake", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Claim", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Deposit", + "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": "PairTransfer", + "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" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "claimedAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balances", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "bonusRewards", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "claim", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "address", + "name": "_receiver", + "type": "address" + } + ], + "name": "claimForAccount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "claimable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "claimableToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "claimedAmounts", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "cumulativeClaimAmounts", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "cumulativeRewardDeductions", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "depositForAccount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "esToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "getCombinedAverageStakedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "getMaxVestableAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_esAmount", + "type": "uint256" + } + ], + "name": "getPairAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "getTotalVested", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "getVestedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gov", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "hasPairToken", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "hasRewardTracker", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "handler", + "type": "address" + } + ], + "name": "isHandler", + "outputs": [ + { + "internalType": "bool", + "name": "status", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "lastVestingTimes", + "outputs": [ + { + "internalType": "uint256", + "name": "time", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "needCheckStake", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "pairAmounts", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pairSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pairToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardTracker", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "setBonusRewards", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "setCumulativeRewardDeductions", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_gov", + "type": "address" + } + ], + "name": "setGov", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_handler", + "type": "address" + }, + { + "internalType": "bool", + "name": "_isActive", + "type": "bool" + } + ], + "name": "setHandler", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_rewardTracker", + "type": "address" + } + ], + "name": "setRewardTracker", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "vestingDuration", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x3d72e4119c6285d8b9c370d40df23728a91b88fe8b1ba500e00bb24ea87637b2", + "receipt": { + "to": null, + "from": "0x50A8e60041A206AcaA5F844a1104896224be6F39", + "contractAddress": "0x10F883D6e26fBb56Ab20466502BFD9017a1ea144", + "transactionIndex": 0, + "gasUsed": "1763188", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x9aef7f491be0a18042505cf640ef6c216ddff3964d5eaf263c05eb4c14994f3f", + "transactionHash": "0x3d72e4119c6285d8b9c370d40df23728a91b88fe8b1ba500e00bb24ea87637b2", + "logs": [], + "blockNumber": 43369453, + "cumulativeGasUsed": "1763188", + "status": 1, + "byzantium": true + }, + "args": [ + "Vested CEC", + "veCEC", + 31536000, + "0x68Db28B700B2AC2A5034A5c8bD70c1Ffc3E587DD", + "0x0000000000000000000000000000000000000000", + "0xe34c5ea0c3083d11a735dc0609533b92130319f5", + "0x0000000000000000000000000000000000000000", + false + ], + "numDeployments": 1, + "solcInputHash": "35d1d20dc9b7194768908e34f12939fd", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_vestingDuration\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_esToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_pairToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_claimableToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_rewardTracker\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_needCheckStake\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Claim\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"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\":\"PairTransfer\",\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"claimedAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"bonusRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claim\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_receiver\",\"type\":\"address\"}],\"name\":\"claimForAccount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"claimable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimableToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"claimedAmounts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"cumulativeClaimAmounts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"cumulativeRewardDeductions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"depositForAccount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"esToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"getCombinedAverageStakedAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"getMaxVestableAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_esAmount\",\"type\":\"uint256\"}],\"name\":\"getPairAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"getTotalVested\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"getVestedAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gov\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hasPairToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hasRewardTracker\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"handler\",\"type\":\"address\"}],\"name\":\"isHandler\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"status\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"lastVestingTimes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"needCheckStake\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"pairAmounts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pairSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pairToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardTracker\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"setBonusRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"setCumulativeRewardDeductions\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_gov\",\"type\":\"address\"}],\"name\":\"setGov\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_handler\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_isActive\",\"type\":\"bool\"}],\"name\":\"setHandler\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rewardTracker\",\"type\":\"address\"}],\"name\":\"setRewardTracker\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vestingDuration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{},\"stateVariables\":{\"totalSupply\":{\"details\":\"Returns the amount of tokens in existence.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/staking/Vester.sol\":\"Vester\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@openzeppelin/contracts/security/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n constructor() {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n _nonReentrantBefore();\\n _;\\n _nonReentrantAfter();\\n }\\n\\n function _nonReentrantBefore() private {\\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n }\\n\\n function _nonReentrantAfter() private {\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Returns true if the reentrancy guard is currently set to \\\"entered\\\", which indicates there is a\\n * `nonReentrant` function in the call stack.\\n */\\n function _reentrancyGuardEntered() internal view returns (bool) {\\n return _status == _ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa535a5df777d44e945dd24aa43a11e44b024140fc340ad0dfe42acf4002aade1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n *\\n * ==== Security Considerations\\n *\\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\\n * generally recommended is:\\n *\\n * ```solidity\\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\\n * doThing(..., value);\\n * }\\n *\\n * function doThing(..., uint256 value) public {\\n * token.safeTransferFrom(msg.sender, address(this), value);\\n * ...\\n * }\\n * ```\\n *\\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\\n * {SafeERC20-safeTransferFrom}).\\n *\\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\\n * contracts should have entry points that don't rely on permit.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n *\\n * CAUTION: See Security Considerations above.\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xb264c03a3442eb37a68ad620cefd1182766b58bee6cec40343480392d6b14d69\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/IERC20Permit.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n IERC20Permit token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit(owner, spender, value, deadline, v, r, s);\\n uint256 nonceAfter = token.nonces(owner);\\n require(nonceAfter == nonceBefore + 1, \\\"SafeERC20: permit did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0xabefac93435967b4d36a4fabcbdbb918d1f0b7ae3c3d85bc30923b326c927ed1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"contracts/core/Governable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\ncontract Governable {\\n address public gov;\\n\\n constructor() {\\n gov = msg.sender;\\n }\\n\\n modifier onlyGov() {\\n require(msg.sender == gov, \\\"Governable: forbidden\\\");\\n _;\\n }\\n\\n function setGov(address _gov) external onlyGov {\\n gov = _gov;\\n }\\n}\\n\",\"keccak256\":\"0xcb7c11d1557db3369d984c7e804b1946c79867f3ab2dd2793ad3bb502c6c2383\",\"license\":\"MIT\"},\"contracts/interfaces/IMintable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\ninterface IMintable {\\n function isMinter(address _account) external returns (bool);\\n function setMinter(address _minter, bool _isActive) external;\\n function mint(address _account, uint256 _amount) external;\\n function burn(address _account, uint256 _amount) external;\\n}\",\"keccak256\":\"0x99bccac95e8a4bba811b01e39e40ce5921ec977432696fd492a2a340674e90ae\",\"license\":\"MIT\"},\"contracts/staking/Vester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {ReentrancyGuard} from \\\"@openzeppelin/contracts/security/ReentrancyGuard.sol\\\";\\nimport {SafeERC20} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport {IVester} from \\\"./interfaces/IVester.sol\\\";\\nimport {IRewardTracker} from \\\"./interfaces/IRewardTracker.sol\\\";\\nimport {Governable} from \\\"../core/Governable.sol\\\";\\nimport {IMintable} from \\\"../interfaces/IMintable.sol\\\";\\n\\ncontract Vester is IVester, IERC20, ReentrancyGuard, Governable {\\n using SafeERC20 for IERC20;\\n\\n string public name;\\n string public symbol;\\n uint8 public decimals = 18;\\n uint256 public vestingDuration;\\n address public esToken;\\n address public pairToken;\\n address public claimableToken;\\n\\n address public override rewardTracker;\\n\\n uint256 public override totalSupply;\\n uint256 public pairSupply;\\n bool public needCheckStake;\\n\\n mapping(address account => uint256 amount) public balances;\\n mapping(address account => uint256 amount) public override pairAmounts;\\n mapping(address account => uint256 amount) public override cumulativeClaimAmounts;\\n mapping(address account => uint256 amount) public override claimedAmounts;\\n mapping(address account => uint256 time) public lastVestingTimes;\\n\\n mapping(address account => uint256 amount) public override cumulativeRewardDeductions;\\n mapping(address account => uint256 amount) public override bonusRewards;\\n\\n mapping(address handler => bool status) public isHandler;\\n\\n event Claim(address receiver, uint256 amount);\\n event Deposit(address account, uint256 amount);\\n event Withdraw(address account, uint256 claimedAmount, uint256 balance);\\n event PairTransfer(address indexed from, address indexed to, uint256 value);\\n\\n constructor(\\n string memory _name,\\n string memory _symbol,\\n uint256 _vestingDuration,\\n address _esToken,\\n address _pairToken,\\n address _claimableToken,\\n address _rewardTracker,\\n bool _needCheckStake\\n ) {\\n name = _name;\\n symbol = _symbol;\\n vestingDuration = _vestingDuration;\\n esToken = _esToken;\\n pairToken = _pairToken;\\n claimableToken = _claimableToken;\\n rewardTracker = _rewardTracker;\\n needCheckStake = _needCheckStake;\\n }\\n\\n function setHandler(address _handler, bool _isActive) external onlyGov {\\n isHandler[_handler] = _isActive;\\n }\\n\\n function deposit(uint256 _amount) external nonReentrant {\\n _deposit(msg.sender, _amount);\\n }\\n\\n function depositForAccount(address _account, uint256 _amount) external nonReentrant {\\n _validateHandler();\\n _deposit(_account, _amount);\\n }\\n\\n function claim() external nonReentrant returns (uint256) {\\n return _claim(msg.sender, msg.sender);\\n }\\n\\n function claimForAccount(address _account, address _receiver) external override nonReentrant returns (uint256) {\\n _validateHandler();\\n return _claim(_account, _receiver);\\n }\\n\\n // to help users who accidentally send their tokens to this contract\\n function withdrawToken(address _token, address _account, uint256 _amount) external onlyGov {\\n IERC20(_token).safeTransfer(_account, _amount);\\n }\\n\\n function withdraw() external nonReentrant {\\n address account = msg.sender;\\n address _receiver = account;\\n _claim(account, _receiver);\\n\\n uint256 claimedAmount = cumulativeClaimAmounts[account];\\n uint256 balance = balances[account];\\n uint256 totalVested = balance + claimedAmount;\\n require(totalVested > 0, \\\"Vester: vested amount is zero\\\");\\n\\n if (hasPairToken()) {\\n uint256 pairAmount = pairAmounts[account];\\n _burnPair(account, pairAmount);\\n IERC20(pairToken).safeTransfer(_receiver, pairAmount);\\n }\\n\\n IERC20(esToken).safeTransfer(_receiver, balance);\\n _burn(account, balance);\\n\\n delete cumulativeClaimAmounts[account];\\n delete claimedAmounts[account];\\n delete lastVestingTimes[account];\\n\\n emit Withdraw(account, claimedAmount, balance);\\n }\\n\\n function setRewardTracker(address _rewardTracker) external onlyGov {\\n rewardTracker = _rewardTracker;\\n }\\n\\n function setCumulativeRewardDeductions(address _account, uint256 _amount) external override nonReentrant {\\n _validateHandler();\\n cumulativeRewardDeductions[_account] = _amount;\\n }\\n\\n function setBonusRewards(address _account, uint256 _amount) external override nonReentrant {\\n _validateHandler();\\n bonusRewards[_account] = _amount;\\n }\\n\\n function getMaxVestableAmount(address _account) public view override returns (uint256) {\\n uint256 maxVestableAmount = bonusRewards[_account];\\n\\n if (hasRewardTracker()) {\\n uint256 cumulativeReward = IRewardTracker(rewardTracker).cumulativeRewards(_account);\\n maxVestableAmount = maxVestableAmount + cumulativeReward;\\n }\\n\\n uint256 cumulativeRewardDeduction = cumulativeRewardDeductions[_account];\\n\\n if (maxVestableAmount < cumulativeRewardDeduction) {\\n return 0;\\n }\\n\\n return maxVestableAmount - cumulativeRewardDeduction;\\n }\\n\\n function getCombinedAverageStakedAmount(address _account) public view override returns (uint256) {\\n if (!hasRewardTracker()) {\\n return 0;\\n }\\n \\n uint256 cumulativeReward = IRewardTracker(rewardTracker).cumulativeRewards(_account);\\n if (cumulativeReward == 0) {\\n return 0;\\n }\\n\\n return IRewardTracker(rewardTracker).averageStakedAmounts(_account);\\n }\\n\\n function getPairAmount(address _account, uint256 _esAmount) public view returns (uint256) {\\n if (!hasRewardTracker()) {\\n return 0;\\n }\\n\\n uint256 combinedAverageStakedAmount = getCombinedAverageStakedAmount(_account);\\n if (combinedAverageStakedAmount == 0) {\\n return 0;\\n }\\n\\n uint256 maxVestableAmount = getMaxVestableAmount(_account);\\n if (maxVestableAmount == 0) {\\n return 0;\\n }\\n\\n return (_esAmount * combinedAverageStakedAmount) / maxVestableAmount;\\n }\\n\\n function hasRewardTracker() public view returns (bool) {\\n return rewardTracker != address(0);\\n }\\n\\n function hasPairToken() public view returns (bool) {\\n return pairToken != address(0);\\n }\\n\\n function getTotalVested(address _account) public view returns (uint256) {\\n return balances[_account] + cumulativeClaimAmounts[_account];\\n }\\n\\n function balanceOf(address _account) public view override returns (uint256) {\\n return balances[_account];\\n }\\n\\n // empty implementation, tokens are non-transferrable\\n function transfer(address /* recipient */, uint256 /* amount */) public virtual override returns (bool) {\\n revert(\\\"Vester: non-transferrable\\\");\\n }\\n\\n // empty implementation, tokens are non-transferrable\\n function allowance(address /* owner */, address /* spender */) public view virtual override returns (uint256) {\\n return 0;\\n }\\n\\n // empty implementation, tokens are non-transferrable\\n function approve(address /* spender */, uint256 /* amount */) public virtual override returns (bool) {\\n revert(\\\"Vester: non-transferrable\\\");\\n }\\n\\n // empty implementation, tokens are non-transferrable\\n function transferFrom(\\n address /* sender */,\\n address /* recipient */,\\n uint256 /* amount */\\n ) public virtual override returns (bool) {\\n revert(\\\"Vester: non-transferrable\\\");\\n }\\n\\n function getVestedAmount(address _account) public view override returns (uint256) {\\n uint256 balance = balances[_account];\\n uint256 cumulativeClaimAmount = cumulativeClaimAmounts[_account];\\n return balance + cumulativeClaimAmount;\\n }\\n\\n function _mint(address _account, uint256 _amount) private {\\n require(_account != address(0), \\\"Vester: mint to the zero address\\\");\\n\\n totalSupply = totalSupply + _amount;\\n balances[_account] = balances[_account] + _amount;\\n\\n emit Transfer(address(0), _account, _amount);\\n }\\n\\n function _mintPair(address _account, uint256 _amount) private {\\n require(_account != address(0), \\\"Vester: mint to the zero address\\\");\\n\\n pairSupply = pairSupply + _amount;\\n pairAmounts[_account] = pairAmounts[_account] + _amount;\\n\\n emit PairTransfer(address(0), _account, _amount);\\n }\\n\\n function _burn(address _account, uint256 _amount) private {\\n require(_account != address(0), \\\"Vester: burn from the zero address\\\");\\n require(balances[_account] >= _amount, \\\"Vester: balance is not enough\\\");\\n balances[_account] = balances[_account] - _amount;\\n totalSupply = totalSupply - _amount;\\n\\n emit Transfer(_account, address(0), _amount);\\n }\\n\\n function _burnPair(address _account, uint256 _amount) private {\\n require(_account != address(0), \\\"Vester: burn from the zero address\\\");\\n require(pairAmounts[_account] >= _amount, \\\"Vester: balance is not enough\\\");\\n pairAmounts[_account] = pairAmounts[_account] - _amount;\\n pairSupply = pairSupply - _amount;\\n\\n emit PairTransfer(_account, address(0), _amount);\\n }\\n /**\\n * @dev Deposit ES tokens to the contract\\n */\\n function _deposit(address _account, uint256 _amount) private {\\n require(_amount > 0, \\\"Vester: invalid _amount\\\");\\n _updateVesting(_account);\\n\\n IERC20(esToken).safeTransferFrom(_account, address(this), _amount);\\n\\n _mint(_account, _amount);\\n\\n if (hasPairToken()) {\\n uint256 pairAmount = pairAmounts[_account];\\n uint256 nextPairAmount = getPairAmount(_account, balances[_account]);\\n if (nextPairAmount > pairAmount) {\\n uint256 pairAmountDiff = nextPairAmount - pairAmount;\\n IERC20(pairToken).safeTransferFrom(_account, address(this), pairAmountDiff);\\n _mintPair(_account, pairAmountDiff);\\n }\\n }\\n if (needCheckStake && hasRewardTracker()) {\\n // if u want to transfer 100 esCec to cec, u need to have 100 cec in stake\\n uint256 cecAmount = IRewardTracker(rewardTracker).depositBalances(_account, claimableToken);\\n require(balances[_account] <= cecAmount, \\\"Vester: insufficient cec balance\\\");\\n }\\n uint256 maxAmount = getMaxVestableAmount(_account);\\n require(getTotalVested(_account) <= maxAmount, \\\"Vester: max vestable amount exceeded\\\");\\n\\n emit Deposit(_account, _amount);\\n }\\n\\n function _updateVesting(address _account) private {\\n uint256 amount = _getNextClaimableAmount(_account);\\n lastVestingTimes[_account] = block.timestamp;\\n\\n if (amount == 0) {\\n return;\\n }\\n\\n // transfer claimableAmount from balances to cumulativeClaimAmounts\\n _burn(_account, amount);\\n cumulativeClaimAmounts[_account] = cumulativeClaimAmounts[_account] + amount;\\n\\n IMintable(esToken).burn(address(this), amount);\\n }\\n\\n function _getNextClaimableAmount(address _account) private view returns (uint256) {\\n uint256 timeDiff = block.timestamp - lastVestingTimes[_account];\\n\\n uint256 balance = balances[_account];\\n if (balance == 0) {\\n return 0;\\n }\\n uint256 vestedAmount = getVestedAmount(_account);\\n uint256 claimableAmount = (vestedAmount * timeDiff) / vestingDuration;\\n if (claimableAmount < balance) {\\n return claimableAmount;\\n }\\n\\n return balance;\\n }\\n\\n function claimable(address _account) public view override returns (uint256) {\\n uint256 amount = cumulativeClaimAmounts[_account] - claimedAmounts[_account];\\n uint256 nextClaimable = _getNextClaimableAmount(_account);\\n return amount + nextClaimable;\\n }\\n\\n function _claim(address _account, address _receiver) private returns (uint256) {\\n _updateVesting(_account);\\n uint256 amount = claimable(_account);\\n claimedAmounts[_account] = claimedAmounts[_account] + amount;\\n IERC20(claimableToken).safeTransfer(_receiver, amount);\\n emit Claim(_account, amount);\\n return amount;\\n }\\n\\n function _validateHandler() private view {\\n require(isHandler[msg.sender], \\\"Vester: forbidden\\\");\\n }\\n}\\n\",\"keccak256\":\"0x43ffe0eff4523a3c6df42791a3f1c492e2f077c9c98b5f41793e04ec27682d00\",\"license\":\"MIT\"},\"contracts/staking/interfaces/IRewardTracker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\ninterface IRewardTracker {\\n function depositBalances(address _account, address _depositToken) external view returns (uint256);\\n function stakedAmounts(address _account) external view returns (uint256);\\n function updateRewards() external;\\n function stake(address _depositToken, uint256 _amount) external;\\n function stakeForAccount(address _fundingAccount, address _account, address _depositToken, uint256 _amount) external;\\n function unstake(address _depositToken, uint256 _amount) external;\\n function unstakeForAccount(address _account, address _depositToken, uint256 _amount, address _receiver) external;\\n function tokensPerInterval() external view returns (uint256);\\n function claim(address _receiver) external returns (uint256);\\n function claimForAccount(address _account, address _receiver) external returns (uint256);\\n function claimable(address _account) external view returns (uint256);\\n function averageStakedAmounts(address _account) external view returns (uint256);\\n function cumulativeRewards(address _account) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x6e0078848746c69ab4c824269552ce070b6fa449cc6803754265fe63cd1b0424\",\"license\":\"MIT\"},\"contracts/staking/interfaces/IVester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\ninterface IVester {\\n function rewardTracker() external view returns (address);\\n\\n function claimForAccount(address _account, address _receiver) external returns (uint256);\\n\\n function claimable(address _account) external view returns (uint256);\\n function cumulativeClaimAmounts(address _account) external view returns (uint256);\\n function claimedAmounts(address _account) external view returns (uint256);\\n function pairAmounts(address _account) external view returns (uint256);\\n function getVestedAmount(address _account) external view returns (uint256);\\n function cumulativeRewardDeductions(address _account) external view returns (uint256);\\n function bonusRewards(address _account) external view returns (uint256);\\n\\n function setCumulativeRewardDeductions(address _account, uint256 _amount) external;\\n function setBonusRewards(address _account, uint256 _amount) external;\\n\\n function getMaxVestableAmount(address _account) external view returns (uint256);\\n function getCombinedAverageStakedAmount(address _account) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xe68b0e76d8db17b13d0b425a329955d00e450c09fa3b9892121c23942b99b512\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6080604052346200046c5762002062803803806200001d8162000471565b928339810190610100818303126200046c5780516001600160401b0381116200046c57826200004e91830162000497565b602082015190926001600160401b0382116200046c576200007191830162000497565b90604081015191620000866060830162000509565b90620000956080840162000509565b93620000a460a0850162000509565b9160e0620000b560c0870162000509565b9501519687151588036200046c576001600081905580546001600160a01b031916331790556004805460ff191660121790558051906001600160401b0382116200035d5760025490600182811c9216801562000461575b60208310146200033c5781601f849311620003fd575b50602090601f83116001146200037f5760009262000373575b50508160011b916000199060031b1c1916176002555b8051906001600160401b0382116200035d5760035490600182811c9216801562000352575b60208310146200033c5781601f849311620002ca575b50602090601f83116001146200023b576000926200022f575b50508160011b916000199060031b1c1916176003555b600555600680546001600160a01b03199081166001600160a01b039485161790915560078054821695841695909517909455600880548516918316919091179055600980549093169116179055600c805491151560ff1660ff1992909216919091179055604051611b2390816200051f8239f35b015190503880620001a5565b6003600090815293507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b91905b601f1984168510620002ae576001945083601f1981161062000294575b505050811b01600355620001bb565b015160001960f88460031b161c1916905538808062000285565b8181015183556020948501946001909301929091019062000268565b60036000529091507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b601f840160051c81016020851062000334575b90849392915b601f830160051c82018110620003245750506200018c565b600081558594506001016200030c565b508062000306565b634e487b7160e01b600052602260045260246000fd5b91607f169162000176565b634e487b7160e01b600052604160045260246000fd5b0151905038806200013b565b6002600090815293506000805160206200204283398151915291905b601f1984168510620003e1576001945083601f19811610620003c7575b505050811b0160025562000151565b015160001960f88460031b161c19169055388080620003b8565b818101518355602094850194600190930192909101906200039b565b600260005290915060008051602062002042833981519152601f840160051c8101916020851062000456575b90601f859493920160051c01905b81811062000446575062000122565b6000815584935060010162000437565b909150819062000429565b91607f16916200010c565b600080fd5b6040519190601f01601f191682016001600160401b038111838210176200035d57604052565b919080601f840112156200046c5782516001600160401b0381116200035d57602090620004cd601f8201601f1916830162000471565b928184528282870101116200046c5760005b818110620004f557508260009394955001015290565b8581018301518482018401528201620004df565b51906001600160a01b03821682036200046c5756fe6040608081526004908136101561001557600080fd5b600091823560e01c90816301e3366714610c9b57816306fdde0314610bdc57816308f26c7614610bb6578163095ea7b3146104505781630db9ea4a14610b7e57816312d43a5114610b5557816313e82e7a14610b145781631514617e14610af557816315e90a4114610ad657816316ca05c514610aad57816318160ddd14610a8e57816323b872dd14610a7757816327e235e314610677578163313ce56714610a56578163342fcda914610a21578163387a785d146109e95781633ccfd60b1461083d5781633de35b7914610814578163402914f5146107ee57816341f22724146107a657816345f01ee61461078057816346ea87af146107425781634e71d92d146107105781635d50e729146106d85781636bcb411a146106af57816370a082311461067757816371417b321461063f5781637cf8f3b21461061657816393035473146105f557816395d89b41146104ee5781639cb7de4b1461048d578163a2545fa514610455578163a9059cbb14610450578163ac110d141461042c578163b5ff136d146103f4578163b6b55f25146103c757508063cfad57a214610379578063d5a73fdd1461034d578063d75abb5714610323578063d89b7007146102dc578063dd62ed3e146102af578063f2293bb01461025c578063f421f62a146102325763f6d6d5aa1461020757600080fd5b3461022e578160031936011261022e5760085490516001600160a01b039091168152602090f35b5080fd5b503461022e578160031936011261022e5760095490516001600160a01b0390911615158152602090f35b82346102ac5760203660031901126102ac57610276610cd1565b6001546001600160a01b0391906102909083163314610dd7565b166bffffffffffffffffffffffff60a01b600954161760095580f35b80fd5b503461022e578060031936011261022e57906020916102cc610cd1565b506102d5610cec565b5051908152f35b503461022e578060031936011261022e576102f5610cd1565b6102fd610e1b565b610305611a9b565b6001600160a01b031682526012602052812060243590556001815580f35b503461022e578160031936011261022e5760075490516001600160a01b0390911615158152602090f35b503461022e57602036600319011261022e5760209061037261036d610cd1565b611308565b9051908152f35b82346102ac5760203660031901126102ac57610393610cd1565b600154906001600160a01b03906103ad3383851614610dd7565b16906bffffffffffffffffffffffff60a01b161760015580f35b83903461022e57602036600319011261022e576103ed906103e6610e1b565b35336114a4565b6001815580f35b50503461022e57602036600319011261022e5760209181906001600160a01b0361041c610cd1565b168152600f845220549051908152f35b50503461022e578160031936011261022e5760209060ff600c541690519015158152f35b610db8565b50503461022e57602036600319011261022e5760209181906001600160a01b0361047d610cd1565b1681526013845220549051908152f35b50503461022e578060031936011261022e576104a7610cd1565b90602435918215158093036104ea576001546001600160a01b0391906104d09083163314610dd7565b168352601460205282209060ff8019835416911617905580f35b8380fd5b919050346105f157826003193601126105f157805191836003549060019082821c9282811680156105e7575b60209586861082146105d457508488529081156105b25750600114610559575b610555868661054b828b0383610d37565b5191829182610d6f565b0390f35b929550600383527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b82841061059f57505050826105559461054b92820101943861053a565b8054868501880152928601928101610582565b60ff191687860152505050151560051b830101925061054b826105553861053a565b634e487b7160e01b845260229052602483fd5b93607f169361051a565b8280fd5b50503461022e57602036600319011261022e5760209061037261036d610cd1565b50503461022e578060031936011261022e57602090610372610636610cd1565b602435906112bb565b50503461022e57602036600319011261022e5760209181906001600160a01b03610667610cd1565b1681526010845220549051908152f35b50503461022e57602036600319011261022e5760209181906001600160a01b0361069f610cd1565b168152600d845220549051908152f35b50503461022e578160031936011261022e5760095490516001600160a01b039091168152602090f35b50503461022e57602036600319011261022e5760209181906001600160a01b03610700610cd1565b168152600e845220549051908152f35b50503461022e578160031936011261022e579060209161072e610e1b565b600161073a3333611a07565b925551908152f35b50503461022e57602036600319011261022e5760209160ff9082906001600160a01b0361076d610cd1565b1681526014855220541690519015158152f35b50503461022e57602036600319011261022e576020906103726107a1610cd1565b61119e565b50503461022e578060031936011261022e576107c0610cd1565b6107c8610e1b565b6107d0611a9b565b6001600160a01b031682526013602052812060243590556001815580f35b50503461022e57602036600319011261022e5760209061037261080f610cd1565b6119c9565b50503461022e578160031936011261022e5760075490516001600160a01b039091168152602090f35b9050346105f157826003193601126105f157610857610e1b565b6108613333611a07565b50338352602091600f835280842054600d845281852054926108838285611099565b156109a65750917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b56893916060936108d08360018060a01b03806007541661090c575b339060065416610e71565b6108da833361141a565b338752600f84528682812055601084528682812055601184528682812055815193338552840152820152a16001815580f35b338a52600e87526109a1856109518c8281205492839161092d331515611377565b338152600e8d52610943838383205410156113ce565b338152600e8d5220546110bc565b338d52600e8a52878d205561096881600b546110bc565b600b558b87518281527f659523c479d006050ebc0d0e48fea36d1b2c5d45b2f31402ac6f8671fc84cc048b3392a3338360075416610e71565b6108c5565b825162461bcd60e51b8152908101859052601d60248201527f5665737465723a2076657374656420616d6f756e74206973207a65726f0000006044820152606490fd5b50503461022e57602036600319011261022e5760209181906001600160a01b03610a11610cd1565b1681526012845220549051908152f35b50503461022e573660031901126102ac576103ed610a3d610cd1565b610a45610e1b565b610a4d611a9b565b602435906114a4565b8284346102ac57806003193601126102ac575060ff60209254169051908152f35b83346102ac57610a8636610d02565b505050611332565b50503461022e578160031936011261022e57602090600a549051908152f35b50503461022e578160031936011261022e5760065490516001600160a01b039091168152602090f35b50503461022e578160031936011261022e57602090600b549051908152f35b50503461022e578160031936011261022e576020906005549051908152f35b50503461022e578060031936011261022e5790602091600161073a610b37610cd1565b610b3f610cec565b90610b48610e1b565b610b50611a9b565b611a07565b50503461022e578160031936011261022e5760015490516001600160a01b039091168152602090f35b50503461022e57602036600319011261022e5760209181906001600160a01b03610ba6610cd1565b1681526011845220549051908152f35b50503461022e57602036600319011261022e57602090610372610bd7610cd1565b6110c9565b919050346105f157826003193601126105f157805191836002549060019082821c928281168015610c91575b60209586861082146105d457508488529081156105b25750600114610c3857610555868661054b828b0383610d37565b929550600283527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b828410610c7e57505050826105559461054b92820101943861053a565b8054868501880152928601928101610c61565b93607f1693610c08565b83346102ac57610cce610cad36610d02565b60015490926001600160a01b0391610cc89083163314610dd7565b16610e71565b80f35b600435906001600160a01b0382168203610ce757565b600080fd5b602435906001600160a01b0382168203610ce757565b6060906003190112610ce7576001600160a01b03906004358281168103610ce757916024359081168103610ce7579060443590565b90601f8019910116810190811067ffffffffffffffff821117610d5957604052565b634e487b7160e01b600052604160045260246000fd5b6020808252825181830181905290939260005b828110610da457505060409293506000838284010152601f8019910116010190565b818101860151848201604001528501610d82565b34610ce7576040366003190112610ce757610dd1610cd1565b50611332565b15610dde57565b60405162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b6044820152606490fd5b600260005414610e2c576002600055565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b60405163a9059cbb60e01b60208201526001600160a01b03929092166024830152604480830193909352918152610eb291610ead606483610d37565b610eb4565b565b60018060a01b0316906040516040810167ffffffffffffffff9082811082821117610d59576040526020938483527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564858401526000808587829751910182855af1903d15610ff9573d928311610fe55790610f4f93929160405192610f4288601f19601f8401160185610d37565b83523d868885013e611004565b805191821591848315610fc1575b505050905015610f6a5750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b91938180945001031261022e578201519081151582036102ac575080388084610f5d565b634e487b7160e01b85526041600452602485fd5b90610f4f9392506060915b919290156110665750815115611018575090565b3b156110215790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156110795750805190602001fd5b60405162461bcd60e51b81529081906110959060048301610d6f565b0390fd5b919082018092116110a657565b634e487b7160e01b600052601160045260246000fd5b919082039182116110a657565b6001600160a01b039081166000818152601360209081526040822054600954929490939192168061111b575b508352601290526040822054908181106111165761111392506110bc565b90565b505090565b92826024929460405193848092633792def360e01b82528860048301525afa91821561119357859261115e575b506012929161115691611099565b9290916110f5565b9091508281813d831161118c575b6111768183610d37565b81010312611188575190611156611148565b8480fd5b503d61116c565b6040513d87823e3d90fd5b6009546001600160a01b039081169190821561125357604051633792def360e01b81529116600482018190526020918281602481875afa9081156112475760009161125b575b501561125357819060246040518095819363a318021760e01b835260048301525afa9081156112475760009161121b575b50905090565b82813d8311611240575b61122f8183610d37565b810103126102ac5750518038611215565b503d611225565b6040513d6000823e3d90fd5b505050600090565b908382813d8311611281575b6112718183610d37565b810103126102ac575051386111e4565b503d611267565b818102929181159184041417156110a657565b81156112a5570490565b634e487b7160e01b600052601260045260246000fd5b6009549091906001600160a01b031615611301576112d88261119e565b918215611253576112e8906110c9565b90811561125357611113926112fc91611288565b61129b565b5050600090565b60018060a01b0316600052600d602052611113604060002054600f60205260406000205490611099565b60405162461bcd60e51b815260206004820152601960248201527f5665737465723a206e6f6e2d7472616e736665727261626c65000000000000006044820152606490fd5b1561137e57565b60405162461bcd60e51b815260206004820152602260248201527f5665737465723a206275726e2066726f6d20746865207a65726f206164647265604482015261737360f01b6064820152608490fd5b156113d557565b60405162461bcd60e51b815260206004820152601d60248201527f5665737465723a2062616c616e6365206973206e6f7420656e6f7567680000006044820152606490fd5b6001600160a01b031661142e811515611377565b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020600093838552600d825261146b81604087205410156113ce565b838552600d82526114808160408720546110bc565b848652600d8352604086205561149881600a546110bc565b600a55604051908152a3565b9190801561179c576114b583611885565b60018060a01b03926114ce8285600654168330916117e1565b838116936114dd85151561183a565b6114e983600a54611099565b600a55600090858252602091600d83526040966115098689842054611099565b818352600d85528883205580827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef868b518a8152a380828460075416806116e6575b50505060ff600c5416806116d9575b611606575b50505061156b826110c9565b61157483611308565b116115b7575092516001600160a01b0390931683526020830152907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c90604090a1565b60849085519062461bcd60e51b825260048201526024808201527f5665737465723a206d6178207665737461626c6520616d6f756e7420657863656044820152631959195960e21b6064820152fd5b838360095416936008541660448a5180968193637aeceb1f60e11b835286600484015260248301525afa9283156116cf5790829189939461169a575b508152600d84522054116116585738808061155f565b60649085519062461bcd60e51b825280600483015260248201527f5665737465723a20696e73756666696369656e74206365632062616c616e63656044820152fd5b8580929550819394503d83116116c8575b6116b58183610d37565b8101031261022e57908791519238611642565b503d6116ab565b88513d84823e3d90fd5b508260095416151561155a565b828252600e8752868b83205491600d82528c8a61170682872054826112bb565b91858311611719575b505050505061154b565b61175561174a7f659523c479d006050ebc0d0e48fea36d1b2c5d45b2f31402ac6f8671fc84cc049761177e956110bc565b8095819430916117e1565b61176088151561183a565b61176c82600b54611099565b600b55878752600e8552862054611099565b858552600e83528d8520558c51908152a38082388681808a8e61170f565b60405162461bcd60e51b815260206004820152601760248201527f5665737465723a20696e76616c6964205f616d6f756e740000000000000000006044820152606490fd5b6040516323b872dd60e01b60208201526001600160a01b03928316602482015292909116604483015260648083019390935291815260a081019181831067ffffffffffffffff841117610d5957610eb292604052610eb4565b1561184157565b606460405162461bcd60e51b815260206004820152602060248201527f5665737465723a206d696e7420746f20746865207a65726f20616464726573736044820152fd5b61188e81611962565b6001600160a01b0380831660008181526011602052604080822042905590949093929190831561195a57836118c29161141a565b808552600f6020526118d78385872054611099565b908552600f602052838520556006541690813b156104ea578251632770a7eb60e21b81523060048201526024810191909152929081908490604490829084905af1801561194e5761192757505050565b67ffffffffffffffff831161193a575052565b634e487b7160e01b81526041600452602490fd5b509051903d90823e3d90fd5b505050505050565b6001600160a01b03811660008181526011602052604090205461198590426110bc565b90600052600d602052604060002054918215611253576119b9916119ab6119b092611308565b611288565b6005549061129b565b8181106119c4575090565b905090565b6111139060018060a01b038116600052600f602052611a016119fb6040600020546010602052604060002054906110bc565b91611962565b90611099565b611a7d917f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d491611a3681611885565b611a3f816119c9565b9384809360018060a01b03808516806000526010602052611a6584604060002054611099565b90600052601060205260406000205560085416610e71565b604080516001600160a01b039290921682526020820192909252a190565b33600052601460205260ff6040600020541615611ab457565b60405162461bcd60e51b81526020600482015260116024820152702b32b9ba32b91d103337b93134b23232b760791b6044820152606490fdfea26469706673582212204ec2e325de603c91d8517820fdaa605484edead3ee87bf9d525ddac83ce788e764736f6c63430008130033405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace", + "deployedBytecode": "0x6040608081526004908136101561001557600080fd5b600091823560e01c90816301e3366714610c9b57816306fdde0314610bdc57816308f26c7614610bb6578163095ea7b3146104505781630db9ea4a14610b7e57816312d43a5114610b5557816313e82e7a14610b145781631514617e14610af557816315e90a4114610ad657816316ca05c514610aad57816318160ddd14610a8e57816323b872dd14610a7757816327e235e314610677578163313ce56714610a56578163342fcda914610a21578163387a785d146109e95781633ccfd60b1461083d5781633de35b7914610814578163402914f5146107ee57816341f22724146107a657816345f01ee61461078057816346ea87af146107425781634e71d92d146107105781635d50e729146106d85781636bcb411a146106af57816370a082311461067757816371417b321461063f5781637cf8f3b21461061657816393035473146105f557816395d89b41146104ee5781639cb7de4b1461048d578163a2545fa514610455578163a9059cbb14610450578163ac110d141461042c578163b5ff136d146103f4578163b6b55f25146103c757508063cfad57a214610379578063d5a73fdd1461034d578063d75abb5714610323578063d89b7007146102dc578063dd62ed3e146102af578063f2293bb01461025c578063f421f62a146102325763f6d6d5aa1461020757600080fd5b3461022e578160031936011261022e5760085490516001600160a01b039091168152602090f35b5080fd5b503461022e578160031936011261022e5760095490516001600160a01b0390911615158152602090f35b82346102ac5760203660031901126102ac57610276610cd1565b6001546001600160a01b0391906102909083163314610dd7565b166bffffffffffffffffffffffff60a01b600954161760095580f35b80fd5b503461022e578060031936011261022e57906020916102cc610cd1565b506102d5610cec565b5051908152f35b503461022e578060031936011261022e576102f5610cd1565b6102fd610e1b565b610305611a9b565b6001600160a01b031682526012602052812060243590556001815580f35b503461022e578160031936011261022e5760075490516001600160a01b0390911615158152602090f35b503461022e57602036600319011261022e5760209061037261036d610cd1565b611308565b9051908152f35b82346102ac5760203660031901126102ac57610393610cd1565b600154906001600160a01b03906103ad3383851614610dd7565b16906bffffffffffffffffffffffff60a01b161760015580f35b83903461022e57602036600319011261022e576103ed906103e6610e1b565b35336114a4565b6001815580f35b50503461022e57602036600319011261022e5760209181906001600160a01b0361041c610cd1565b168152600f845220549051908152f35b50503461022e578160031936011261022e5760209060ff600c541690519015158152f35b610db8565b50503461022e57602036600319011261022e5760209181906001600160a01b0361047d610cd1565b1681526013845220549051908152f35b50503461022e578060031936011261022e576104a7610cd1565b90602435918215158093036104ea576001546001600160a01b0391906104d09083163314610dd7565b168352601460205282209060ff8019835416911617905580f35b8380fd5b919050346105f157826003193601126105f157805191836003549060019082821c9282811680156105e7575b60209586861082146105d457508488529081156105b25750600114610559575b610555868661054b828b0383610d37565b5191829182610d6f565b0390f35b929550600383527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b82841061059f57505050826105559461054b92820101943861053a565b8054868501880152928601928101610582565b60ff191687860152505050151560051b830101925061054b826105553861053a565b634e487b7160e01b845260229052602483fd5b93607f169361051a565b8280fd5b50503461022e57602036600319011261022e5760209061037261036d610cd1565b50503461022e578060031936011261022e57602090610372610636610cd1565b602435906112bb565b50503461022e57602036600319011261022e5760209181906001600160a01b03610667610cd1565b1681526010845220549051908152f35b50503461022e57602036600319011261022e5760209181906001600160a01b0361069f610cd1565b168152600d845220549051908152f35b50503461022e578160031936011261022e5760095490516001600160a01b039091168152602090f35b50503461022e57602036600319011261022e5760209181906001600160a01b03610700610cd1565b168152600e845220549051908152f35b50503461022e578160031936011261022e579060209161072e610e1b565b600161073a3333611a07565b925551908152f35b50503461022e57602036600319011261022e5760209160ff9082906001600160a01b0361076d610cd1565b1681526014855220541690519015158152f35b50503461022e57602036600319011261022e576020906103726107a1610cd1565b61119e565b50503461022e578060031936011261022e576107c0610cd1565b6107c8610e1b565b6107d0611a9b565b6001600160a01b031682526013602052812060243590556001815580f35b50503461022e57602036600319011261022e5760209061037261080f610cd1565b6119c9565b50503461022e578160031936011261022e5760075490516001600160a01b039091168152602090f35b9050346105f157826003193601126105f157610857610e1b565b6108613333611a07565b50338352602091600f835280842054600d845281852054926108838285611099565b156109a65750917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b56893916060936108d08360018060a01b03806007541661090c575b339060065416610e71565b6108da833361141a565b338752600f84528682812055601084528682812055601184528682812055815193338552840152820152a16001815580f35b338a52600e87526109a1856109518c8281205492839161092d331515611377565b338152600e8d52610943838383205410156113ce565b338152600e8d5220546110bc565b338d52600e8a52878d205561096881600b546110bc565b600b558b87518281527f659523c479d006050ebc0d0e48fea36d1b2c5d45b2f31402ac6f8671fc84cc048b3392a3338360075416610e71565b6108c5565b825162461bcd60e51b8152908101859052601d60248201527f5665737465723a2076657374656420616d6f756e74206973207a65726f0000006044820152606490fd5b50503461022e57602036600319011261022e5760209181906001600160a01b03610a11610cd1565b1681526012845220549051908152f35b50503461022e573660031901126102ac576103ed610a3d610cd1565b610a45610e1b565b610a4d611a9b565b602435906114a4565b8284346102ac57806003193601126102ac575060ff60209254169051908152f35b83346102ac57610a8636610d02565b505050611332565b50503461022e578160031936011261022e57602090600a549051908152f35b50503461022e578160031936011261022e5760065490516001600160a01b039091168152602090f35b50503461022e578160031936011261022e57602090600b549051908152f35b50503461022e578160031936011261022e576020906005549051908152f35b50503461022e578060031936011261022e5790602091600161073a610b37610cd1565b610b3f610cec565b90610b48610e1b565b610b50611a9b565b611a07565b50503461022e578160031936011261022e5760015490516001600160a01b039091168152602090f35b50503461022e57602036600319011261022e5760209181906001600160a01b03610ba6610cd1565b1681526011845220549051908152f35b50503461022e57602036600319011261022e57602090610372610bd7610cd1565b6110c9565b919050346105f157826003193601126105f157805191836002549060019082821c928281168015610c91575b60209586861082146105d457508488529081156105b25750600114610c3857610555868661054b828b0383610d37565b929550600283527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b828410610c7e57505050826105559461054b92820101943861053a565b8054868501880152928601928101610c61565b93607f1693610c08565b83346102ac57610cce610cad36610d02565b60015490926001600160a01b0391610cc89083163314610dd7565b16610e71565b80f35b600435906001600160a01b0382168203610ce757565b600080fd5b602435906001600160a01b0382168203610ce757565b6060906003190112610ce7576001600160a01b03906004358281168103610ce757916024359081168103610ce7579060443590565b90601f8019910116810190811067ffffffffffffffff821117610d5957604052565b634e487b7160e01b600052604160045260246000fd5b6020808252825181830181905290939260005b828110610da457505060409293506000838284010152601f8019910116010190565b818101860151848201604001528501610d82565b34610ce7576040366003190112610ce757610dd1610cd1565b50611332565b15610dde57565b60405162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b6044820152606490fd5b600260005414610e2c576002600055565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b60405163a9059cbb60e01b60208201526001600160a01b03929092166024830152604480830193909352918152610eb291610ead606483610d37565b610eb4565b565b60018060a01b0316906040516040810167ffffffffffffffff9082811082821117610d59576040526020938483527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564858401526000808587829751910182855af1903d15610ff9573d928311610fe55790610f4f93929160405192610f4288601f19601f8401160185610d37565b83523d868885013e611004565b805191821591848315610fc1575b505050905015610f6a5750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b91938180945001031261022e578201519081151582036102ac575080388084610f5d565b634e487b7160e01b85526041600452602485fd5b90610f4f9392506060915b919290156110665750815115611018575090565b3b156110215790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156110795750805190602001fd5b60405162461bcd60e51b81529081906110959060048301610d6f565b0390fd5b919082018092116110a657565b634e487b7160e01b600052601160045260246000fd5b919082039182116110a657565b6001600160a01b039081166000818152601360209081526040822054600954929490939192168061111b575b508352601290526040822054908181106111165761111392506110bc565b90565b505090565b92826024929460405193848092633792def360e01b82528860048301525afa91821561119357859261115e575b506012929161115691611099565b9290916110f5565b9091508281813d831161118c575b6111768183610d37565b81010312611188575190611156611148565b8480fd5b503d61116c565b6040513d87823e3d90fd5b6009546001600160a01b039081169190821561125357604051633792def360e01b81529116600482018190526020918281602481875afa9081156112475760009161125b575b501561125357819060246040518095819363a318021760e01b835260048301525afa9081156112475760009161121b575b50905090565b82813d8311611240575b61122f8183610d37565b810103126102ac5750518038611215565b503d611225565b6040513d6000823e3d90fd5b505050600090565b908382813d8311611281575b6112718183610d37565b810103126102ac575051386111e4565b503d611267565b818102929181159184041417156110a657565b81156112a5570490565b634e487b7160e01b600052601260045260246000fd5b6009549091906001600160a01b031615611301576112d88261119e565b918215611253576112e8906110c9565b90811561125357611113926112fc91611288565b61129b565b5050600090565b60018060a01b0316600052600d602052611113604060002054600f60205260406000205490611099565b60405162461bcd60e51b815260206004820152601960248201527f5665737465723a206e6f6e2d7472616e736665727261626c65000000000000006044820152606490fd5b1561137e57565b60405162461bcd60e51b815260206004820152602260248201527f5665737465723a206275726e2066726f6d20746865207a65726f206164647265604482015261737360f01b6064820152608490fd5b156113d557565b60405162461bcd60e51b815260206004820152601d60248201527f5665737465723a2062616c616e6365206973206e6f7420656e6f7567680000006044820152606490fd5b6001600160a01b031661142e811515611377565b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020600093838552600d825261146b81604087205410156113ce565b838552600d82526114808160408720546110bc565b848652600d8352604086205561149881600a546110bc565b600a55604051908152a3565b9190801561179c576114b583611885565b60018060a01b03926114ce8285600654168330916117e1565b838116936114dd85151561183a565b6114e983600a54611099565b600a55600090858252602091600d83526040966115098689842054611099565b818352600d85528883205580827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef868b518a8152a380828460075416806116e6575b50505060ff600c5416806116d9575b611606575b50505061156b826110c9565b61157483611308565b116115b7575092516001600160a01b0390931683526020830152907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c90604090a1565b60849085519062461bcd60e51b825260048201526024808201527f5665737465723a206d6178207665737461626c6520616d6f756e7420657863656044820152631959195960e21b6064820152fd5b838360095416936008541660448a5180968193637aeceb1f60e11b835286600484015260248301525afa9283156116cf5790829189939461169a575b508152600d84522054116116585738808061155f565b60649085519062461bcd60e51b825280600483015260248201527f5665737465723a20696e73756666696369656e74206365632062616c616e63656044820152fd5b8580929550819394503d83116116c8575b6116b58183610d37565b8101031261022e57908791519238611642565b503d6116ab565b88513d84823e3d90fd5b508260095416151561155a565b828252600e8752868b83205491600d82528c8a61170682872054826112bb565b91858311611719575b505050505061154b565b61175561174a7f659523c479d006050ebc0d0e48fea36d1b2c5d45b2f31402ac6f8671fc84cc049761177e956110bc565b8095819430916117e1565b61176088151561183a565b61176c82600b54611099565b600b55878752600e8552862054611099565b858552600e83528d8520558c51908152a38082388681808a8e61170f565b60405162461bcd60e51b815260206004820152601760248201527f5665737465723a20696e76616c6964205f616d6f756e740000000000000000006044820152606490fd5b6040516323b872dd60e01b60208201526001600160a01b03928316602482015292909116604483015260648083019390935291815260a081019181831067ffffffffffffffff841117610d5957610eb292604052610eb4565b1561184157565b606460405162461bcd60e51b815260206004820152602060248201527f5665737465723a206d696e7420746f20746865207a65726f20616464726573736044820152fd5b61188e81611962565b6001600160a01b0380831660008181526011602052604080822042905590949093929190831561195a57836118c29161141a565b808552600f6020526118d78385872054611099565b908552600f602052838520556006541690813b156104ea578251632770a7eb60e21b81523060048201526024810191909152929081908490604490829084905af1801561194e5761192757505050565b67ffffffffffffffff831161193a575052565b634e487b7160e01b81526041600452602490fd5b509051903d90823e3d90fd5b505050505050565b6001600160a01b03811660008181526011602052604090205461198590426110bc565b90600052600d602052604060002054918215611253576119b9916119ab6119b092611308565b611288565b6005549061129b565b8181106119c4575090565b905090565b6111139060018060a01b038116600052600f602052611a016119fb6040600020546010602052604060002054906110bc565b91611962565b90611099565b611a7d917f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d491611a3681611885565b611a3f816119c9565b9384809360018060a01b03808516806000526010602052611a6584604060002054611099565b90600052601060205260406000205560085416610e71565b604080516001600160a01b039290921682526020820192909252a190565b33600052601460205260ff6040600020541615611ab457565b60405162461bcd60e51b81526020600482015260116024820152702b32b9ba32b91d103337b93134b23232b760791b6044820152606490fdfea26469706673582212204ec2e325de603c91d8517820fdaa605484edead3ee87bf9d525ddac83ce788e764736f6c63430008130033", + "devdoc": { + "events": { + "Approval(address,address,uint256)": { + "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance." + }, + "Transfer(address,address,uint256)": { + "details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero." + } + }, + "kind": "dev", + "methods": {}, + "stateVariables": { + "totalSupply": { + "details": "Returns the amount of tokens in existence." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 10, + "contract": "contracts/staking/Vester.sol:Vester", + "label": "_status", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 888, + "contract": "contracts/staking/Vester.sol:Vester", + "label": "gov", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 2907, + "contract": "contracts/staking/Vester.sol:Vester", + "label": "name", + "offset": 0, + "slot": "2", + "type": "t_string_storage" + }, + { + "astId": 2909, + "contract": "contracts/staking/Vester.sol:Vester", + "label": "symbol", + "offset": 0, + "slot": "3", + "type": "t_string_storage" + }, + { + "astId": 2912, + "contract": "contracts/staking/Vester.sol:Vester", + "label": "decimals", + "offset": 0, + "slot": "4", + "type": "t_uint8" + }, + { + "astId": 2914, + "contract": "contracts/staking/Vester.sol:Vester", + "label": "vestingDuration", + "offset": 0, + "slot": "5", + "type": "t_uint256" + }, + { + "astId": 2916, + "contract": "contracts/staking/Vester.sol:Vester", + "label": "esToken", + "offset": 0, + "slot": "6", + "type": "t_address" + }, + { + "astId": 2918, + "contract": "contracts/staking/Vester.sol:Vester", + "label": "pairToken", + "offset": 0, + "slot": "7", + "type": "t_address" + }, + { + "astId": 2920, + "contract": "contracts/staking/Vester.sol:Vester", + "label": "claimableToken", + "offset": 0, + "slot": "8", + "type": "t_address" + }, + { + "astId": 2923, + "contract": "contracts/staking/Vester.sol:Vester", + "label": "rewardTracker", + "offset": 0, + "slot": "9", + "type": "t_address" + }, + { + "astId": 2926, + "contract": "contracts/staking/Vester.sol:Vester", + "label": "totalSupply", + "offset": 0, + "slot": "10", + "type": "t_uint256" + }, + { + "astId": 2928, + "contract": "contracts/staking/Vester.sol:Vester", + "label": "pairSupply", + "offset": 0, + "slot": "11", + "type": "t_uint256" + }, + { + "astId": 2930, + "contract": "contracts/staking/Vester.sol:Vester", + "label": "needCheckStake", + "offset": 0, + "slot": "12", + "type": "t_bool" + }, + { + "astId": 2934, + "contract": "contracts/staking/Vester.sol:Vester", + "label": "balances", + "offset": 0, + "slot": "13", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 2939, + "contract": "contracts/staking/Vester.sol:Vester", + "label": "pairAmounts", + "offset": 0, + "slot": "14", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 2944, + "contract": "contracts/staking/Vester.sol:Vester", + "label": "cumulativeClaimAmounts", + "offset": 0, + "slot": "15", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 2949, + "contract": "contracts/staking/Vester.sol:Vester", + "label": "claimedAmounts", + "offset": 0, + "slot": "16", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 2953, + "contract": "contracts/staking/Vester.sol:Vester", + "label": "lastVestingTimes", + "offset": 0, + "slot": "17", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 2958, + "contract": "contracts/staking/Vester.sol:Vester", + "label": "cumulativeRewardDeductions", + "offset": 0, + "slot": "18", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 2963, + "contract": "contracts/staking/Vester.sol:Vester", + "label": "bonusRewards", + "offset": 0, + "slot": "19", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 2967, + "contract": "contracts/staking/Vester.sol:Vester", + "label": "isHandler", + "offset": 0, + "slot": "20", + "type": "t_mapping(t_address,t_bool)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/bsc_test/solcInputs/1b5451948df002b329e5d71e4ffbd43e.json b/deployments/bsc_test/solcInputs/1b5451948df002b329e5d71e4ffbd43e.json new file mode 100644 index 0000000..d4f1582 --- /dev/null +++ b/deployments/bsc_test/solcInputs/1b5451948df002b329e5d71e4ffbd43e.json @@ -0,0 +1,66 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `amount`.\n */\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n */\n function _transfer(address from, address to, uint256 amount) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[from] = fromBalance - amount;\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\n // decrementing then incrementing.\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n unchecked {\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\n _balances[account] += amount;\n }\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n // Overflow not possible: amount <= accountBalance <= totalSupply.\n _totalSupply -= amount;\n }\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n *\n * Does not update the allowance amount in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Might emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n *\n * ==== Security Considerations\n *\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\n * generally recommended is:\n *\n * ```solidity\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\n * doThing(..., value);\n * }\n *\n * function doThing(..., uint256 value) public {\n * token.safeTransferFrom(msg.sender, address(this), value);\n * ...\n * }\n * ```\n *\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\n * {SafeERC20-safeTransferFrom}).\n *\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\n * contracts should have entry points that don't rely on permit.\n */\ninterface IERC20Permit {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n *\n * CAUTION: See Security Considerations above.\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../extensions/IERC20Permit.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using Address for address;\n\n /**\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n /**\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n */\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n /**\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 oldAllowance = token.allowance(address(this), spender);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\n }\n\n /**\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\n }\n }\n\n /**\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n * to be set to zero before setting it to a non-zero value, such as USDT.\n */\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\n\n if (!_callOptionalReturnBool(token, approvalCall)) {\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\n _callOptionalReturn(token, approvalCall);\n }\n }\n\n /**\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\n * Revert on invalid signature.\n */\n function safePermit(\n IERC20Permit token,\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal {\n uint256 nonceBefore = token.nonces(owner);\n token.permit(owner, spender, value, deadline, v, r, s);\n uint256 nonceAfter = token.nonces(owner);\n require(nonceAfter == nonceBefore + 1, \"SafeERC20: permit did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n *\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\n */\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\n // and not revert is the subcall reverts.\n\n (bool success, bytes memory returndata) = address(token).call(data);\n return\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "contracts/core/Governable.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\n\ncontract Governable {\n address public gov;\n\n constructor() {\n gov = msg.sender;\n }\n\n modifier onlyGov() {\n require(msg.sender == gov, \"Governable: forbidden\");\n _;\n }\n\n function setGov(address _gov) external onlyGov {\n gov = _gov;\n }\n}\n" + }, + "contracts/interfaces/IMintable.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\n\ninterface IMintable {\n function isMinter(address _account) external returns (bool);\n function setMinter(address _minter, bool _isActive) external;\n function mint(address _account, uint256 _amount) external;\n function burn(address _account, uint256 _amount) external;\n}" + }, + "contracts/tokens/erc20/EsToken.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.19;\n\nimport {ERC20} from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport {IMintable} from \"../../interfaces/IMintable.sol\";\nimport {Governable} from \"../../core/Governable.sol\";\n\ncontract EsToken is ERC20, IMintable, Governable {\n bool public inPrivateTransferMode;\n\n mapping(address account => bool status) public override isMinter;\n\n mapping(address account => bool status) public isHandler;\n\n constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) {}\n\n modifier onlyMinter() {\n require(isMinter[msg.sender], \"EsToken: forbidden\");\n _;\n }\n\n function setMinter(address _minter, bool _isActive) external override onlyGov {\n isMinter[_minter] = _isActive;\n }\n\n function mint(address _account, uint256 _amount) external override onlyMinter {\n _mint(_account, _amount);\n }\n\n function burn(address _account, uint256 _amount) external override onlyMinter {\n _burn(_account, _amount);\n }\n\n function setInPrivateTransferMode(bool _inPrivateTransferMode) external onlyGov {\n inPrivateTransferMode = _inPrivateTransferMode;\n }\n\n function setHandler(address _handler, bool _isActive) external onlyGov {\n isHandler[_handler] = _isActive;\n }\n\n function transferFrom(address _sender, address _recipient, uint256 _amount) public override returns (bool) {\n if (isHandler[msg.sender]) {\n _transfer(_sender, _recipient, _amount);\n return true;\n }\n _spendAllowance(_sender, msg.sender, _amount);\n _transfer(_sender, _recipient, _amount);\n return true;\n }\n\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal override {\n if (inPrivateTransferMode) {\n require(isHandler[msg.sender], \"EsToken: msg.sender not whitelisted\");\n }\n super._beforeTokenTransfer(from, to, amount);\n }\n}\n" + }, + "contracts/tokens/erc20/EsToken2.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.19;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {IMintable} from \"../../interfaces/IMintable.sol\";\nimport {Governable} from \"../../core/Governable.sol\";\n\ncontract EsToken2 is IERC20, IMintable, Governable {\n using SafeERC20 for IERC20;\n\n string public name;\n string public symbol;\n uint8 public decimals = 18;\n\n uint256 public override totalSupply;\n bool public inPrivateTransferMode;\n\n mapping(address => uint256) public balances;\n mapping(address => mapping(address => uint256)) public allowances;\n mapping(address => bool) public nonStakingAccounts;\n mapping(address => bool) public admins;\n\n mapping(address => bool) public override isMinter;\n\n mapping(address => bool) public isHandler;\n\n constructor(string memory _name, string memory _symbol) {\n name = _name;\n symbol = _symbol;\n }\n\n modifier onlyMinter() {\n require(isMinter[msg.sender], \"EsToken: forbidden\");\n _;\n }\n\n modifier onlyAdmin() {\n require(admins[msg.sender], \"BaseToken: forbidden\");\n _;\n }\n\n function setMinter(address _minter, bool _isActive) external override onlyGov {\n isMinter[_minter] = _isActive;\n }\n\n function addAdmin(address _account) external onlyGov {\n admins[_account] = true;\n }\n\n function removeAdmin(address _account) external onlyGov {\n admins[_account] = false;\n }\n\n function mint(address _account, uint256 _amount) external override onlyMinter {\n _mint(_account, _amount);\n }\n\n function burn(address _account, uint256 _amount) external override onlyMinter {\n _burn(_account, _amount);\n }\n\n function setInPrivateTransferMode(bool _inPrivateTransferMode) external onlyGov {\n inPrivateTransferMode = _inPrivateTransferMode;\n }\n\n function setHandler(address _handler, bool _isActive) external onlyGov {\n isHandler[_handler] = _isActive;\n }\n\n function balanceOf(address _account) external view override returns (uint256) {\n return balances[_account];\n }\n\n function stakedBalance(address _account) external view returns (uint256) {\n if (nonStakingAccounts[_account]) {\n return 0;\n }\n return balances[_account];\n }\n\n function transfer(address _recipient, uint256 _amount) external override returns (bool) {\n _transfer(msg.sender, _recipient, _amount);\n return true;\n }\n\n function allowance(address _owner, address _spender) external view override returns (uint256) {\n return allowances[_owner][_spender];\n }\n\n function approve(address _spender, uint256 _amount) external override returns (bool) {\n _approve(msg.sender, _spender, _amount);\n return true;\n }\n\n function transferFrom(address _sender, address _recipient, uint256 _amount) external override returns (bool) {\n if (isHandler[msg.sender]) {\n _transfer(_sender, _recipient, _amount);\n return true;\n }\n require(allowances[_sender][msg.sender] >= _amount, \"EsToken: transfer amount exceeds allowance\");\n uint256 nextAllowance = allowances[_sender][msg.sender] - _amount;\n _approve(_sender, msg.sender, nextAllowance);\n _transfer(_sender, _recipient, _amount);\n return true;\n }\n\n function _mint(address _account, uint256 _amount) internal {\n require(_account != address(0), \"EsToken: mint to the zero address\");\n\n totalSupply = totalSupply + _amount;\n balances[_account] = balances[_account] + _amount;\n\n emit Transfer(address(0), _account, _amount);\n }\n\n function _burn(address _account, uint256 _amount) internal {\n require(_account != address(0), \"EsToken: burn from the zero address\");\n\n require(balances[_account] >= _amount, \"EsToken: burn amount exceeds balance\");\n balances[_account] = balances[_account] - _amount;\n totalSupply = totalSupply - _amount;\n\n emit Transfer(_account, address(0), _amount);\n }\n\n function _transfer(address _sender, address _recipient, uint256 _amount) private {\n require(_sender != address(0), \"EsToken: transfer from the zero address\");\n require(_recipient != address(0), \"EsToken: transfer to the zero address\");\n\n if (inPrivateTransferMode) {\n require(isHandler[msg.sender], \"EsToken: msg.sender not whitelisted\");\n }\n\n require(balances[_sender] >= _amount, \"EsToken: transfer amount exceeds balance\");\n balances[_sender] = balances[_sender] - _amount;\n balances[_recipient] = balances[_recipient] + _amount;\n\n emit Transfer(_sender, _recipient, _amount);\n }\n\n function _approve(address _owner, address _spender, uint256 _amount) private {\n require(_owner != address(0), \"EsToken: approve from the zero address\");\n require(_spender != address(0), \"EsToken: approve to the zero address\");\n\n allowances[_owner][_spender] = _amount;\n\n emit Approval(_owner, _spender, _amount);\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "viaIR": true, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/bsc_test/solcInputs/35d1d20dc9b7194768908e34f12939fd.json b/deployments/bsc_test/solcInputs/35d1d20dc9b7194768908e34f12939fd.json new file mode 100644 index 0000000..4446532 --- /dev/null +++ b/deployments/bsc_test/solcInputs/35d1d20dc9b7194768908e34f12939fd.json @@ -0,0 +1,75 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts/security/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuard {\n // Booleans are more expensive than uint256 or any type that takes up a full\n // word because each write operation emits an extra SLOAD to first read the\n // slot's contents, replace the bits taken up by the boolean, and then write\n // back. This is the compiler's defense against contract upgrades and\n // pointer aliasing, and it cannot be disabled.\n\n // The values being non-zero value makes deployment a bit more expensive,\n // but in exchange the refund on every call to nonReentrant will be lower in\n // amount. Since refunds are capped to a percentage of the total\n // transaction's gas, it is best to keep them low in cases like this one, to\n // increase the likelihood of the full refund coming into effect.\n uint256 private constant _NOT_ENTERED = 1;\n uint256 private constant _ENTERED = 2;\n\n uint256 private _status;\n\n constructor() {\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and making it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n _nonReentrantBefore();\n _;\n _nonReentrantAfter();\n }\n\n function _nonReentrantBefore() private {\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\n require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n // Any calls to nonReentrant after this point will fail\n _status = _ENTERED;\n }\n\n function _nonReentrantAfter() private {\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n * `nonReentrant` function in the call stack.\n */\n function _reentrancyGuardEntered() internal view returns (bool) {\n return _status == _ENTERED;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n *\n * ==== Security Considerations\n *\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\n * generally recommended is:\n *\n * ```solidity\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\n * doThing(..., value);\n * }\n *\n * function doThing(..., uint256 value) public {\n * token.safeTransferFrom(msg.sender, address(this), value);\n * ...\n * }\n * ```\n *\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\n * {SafeERC20-safeTransferFrom}).\n *\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\n * contracts should have entry points that don't rely on permit.\n */\ninterface IERC20Permit {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n *\n * CAUTION: See Security Considerations above.\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../extensions/IERC20Permit.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using Address for address;\n\n /**\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n /**\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n */\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n /**\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 oldAllowance = token.allowance(address(this), spender);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\n }\n\n /**\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\n }\n }\n\n /**\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n * to be set to zero before setting it to a non-zero value, such as USDT.\n */\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\n\n if (!_callOptionalReturnBool(token, approvalCall)) {\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\n _callOptionalReturn(token, approvalCall);\n }\n }\n\n /**\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\n * Revert on invalid signature.\n */\n function safePermit(\n IERC20Permit token,\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal {\n uint256 nonceBefore = token.nonces(owner);\n token.permit(owner, spender, value, deadline, v, r, s);\n uint256 nonceAfter = token.nonces(owner);\n require(nonceAfter == nonceBefore + 1, \"SafeERC20: permit did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n *\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\n */\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\n // and not revert is the subcall reverts.\n\n (bool success, bytes memory returndata) = address(token).call(data);\n return\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "contracts/core/Governable.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\n\ncontract Governable {\n address public gov;\n\n constructor() {\n gov = msg.sender;\n }\n\n modifier onlyGov() {\n require(msg.sender == gov, \"Governable: forbidden\");\n _;\n }\n\n function setGov(address _gov) external onlyGov {\n gov = _gov;\n }\n}\n" + }, + "contracts/interfaces/IMintable.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\n\ninterface IMintable {\n function isMinter(address _account) external returns (bool);\n function setMinter(address _minter, bool _isActive) external;\n function mint(address _account, uint256 _amount) external;\n function burn(address _account, uint256 _amount) external;\n}" + }, + "contracts/staking/interfaces/IRewardDistributor.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\n\ninterface IRewardDistributor {\n function rewardToken() external view returns (address);\n function tokensPerInterval() external view returns (uint256);\n function pendingRewards() external view returns (uint256);\n function distribute(uint256 _amount, uint256 _decimals) external returns (uint256);\n}\n" + }, + "contracts/staking/interfaces/IRewardTracker.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\n\ninterface IRewardTracker {\n function depositBalances(address _account, address _depositToken) external view returns (uint256);\n function stakedAmounts(address _account) external view returns (uint256);\n function updateRewards() external;\n function stake(address _depositToken, uint256 _amount) external;\n function stakeForAccount(address _fundingAccount, address _account, address _depositToken, uint256 _amount) external;\n function unstake(address _depositToken, uint256 _amount) external;\n function unstakeForAccount(address _account, address _depositToken, uint256 _amount, address _receiver) external;\n function tokensPerInterval() external view returns (uint256);\n function claim(address _receiver) external returns (uint256);\n function claimForAccount(address _account, address _receiver) external returns (uint256);\n function claimable(address _account) external view returns (uint256);\n function averageStakedAmounts(address _account) external view returns (uint256);\n function cumulativeRewards(address _account) external view returns (uint256);\n}\n" + }, + "contracts/staking/interfaces/IVester.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\n\ninterface IVester {\n function rewardTracker() external view returns (address);\n\n function claimForAccount(address _account, address _receiver) external returns (uint256);\n\n function claimable(address _account) external view returns (uint256);\n function cumulativeClaimAmounts(address _account) external view returns (uint256);\n function claimedAmounts(address _account) external view returns (uint256);\n function pairAmounts(address _account) external view returns (uint256);\n function getVestedAmount(address _account) external view returns (uint256);\n function cumulativeRewardDeductions(address _account) external view returns (uint256);\n function bonusRewards(address _account) external view returns (uint256);\n\n function setCumulativeRewardDeductions(address _account, uint256 _amount) external;\n function setBonusRewards(address _account, uint256 _amount) external;\n\n function getMaxVestableAmount(address _account) external view returns (uint256);\n function getCombinedAverageStakedAmount(address _account) external view returns (uint256);\n}\n" + }, + "contracts/staking/RewardDistributor.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {ReentrancyGuard} from \"@openzeppelin/contracts/security/ReentrancyGuard.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\nimport {IRewardDistributor} from \"./interfaces/IRewardDistributor.sol\";\nimport {IRewardTracker} from \"./interfaces/IRewardTracker.sol\";\nimport {Governable} from \"../core/Governable.sol\";\n\ncontract RewardDistributor is IRewardDistributor, ReentrancyGuard, Governable {\n using SafeERC20 for IERC20;\n\n address public override rewardToken;\n uint256 public override tokensPerInterval;\n uint256 public lastDistributionTime;\n address public rewardTracker;\n\n address public admin;\n\n event Distribute(uint256 amount);\n event TokensPerIntervalChange(uint256 amount);\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"RewardDistributor: forbidden\");\n _;\n }\n\n constructor(address _rewardToken, address _rewardTracker) {\n rewardToken = _rewardToken;\n rewardTracker = _rewardTracker;\n admin = msg.sender;\n }\n\n function setAdmin(address _admin) external onlyGov {\n admin = _admin;\n }\n\n // to help users who accidentally send their tokens to this contract\n function withdrawToken(address _token, address _account, uint256 _amount) external onlyGov {\n IERC20(_token).safeTransfer(_account, _amount);\n }\n\n function updateLastDistributionTime() external onlyAdmin {\n lastDistributionTime = block.timestamp;\n }\n\n function setTokensPerInterval(uint256 _amount) external onlyAdmin {\n require(lastDistributionTime != 0, \"RewardDistributor: invalid lastDistributionTime\");\n IRewardTracker(rewardTracker).updateRewards();\n tokensPerInterval = _amount;\n emit TokensPerIntervalChange(_amount);\n }\n\n function pendingRewards() public view override returns (uint256) {\n if (block.timestamp == lastDistributionTime) {\n return 0;\n }\n\n uint256 timeDiff = block.timestamp - lastDistributionTime;\n return tokensPerInterval * timeDiff;\n }\n\n function distribute(uint256 _amount, uint256 _decimals) external override returns (uint256) {\n require(msg.sender == rewardTracker, \"RewardDistributor: invalid msg.sender\");\n uint256 amount = pendingRewards();\n if (amount == 0) {\n return 0;\n }\n\n lastDistributionTime = block.timestamp;\n\n uint256 tokenAmount = amount * _amount / (10**_decimals);\n\n uint256 balance = IERC20(rewardToken).balanceOf(address(this));\n require(tokenAmount <= balance, \"RewardDistributor: insufficient balance\");\n \n IERC20(rewardToken).safeTransfer(msg.sender, tokenAmount);\n\n emit Distribute(tokenAmount);\n return amount;\n }\n}\n" + }, + "contracts/staking/RewardRouter.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {ReentrancyGuard} from \"@openzeppelin/contracts/security/ReentrancyGuard.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\nimport {IRewardTracker} from \"./interfaces/IRewardTracker.sol\";\nimport {IVester} from \"./interfaces/IVester.sol\";\nimport {Governable} from \"../core/Governable.sol\";\n\ncontract RewardRouter is ReentrancyGuard, Governable {\n using SafeERC20 for IERC20;\n\n address public cec;\n address public esCec;\n\n address public stakedCecTracker;\n address public cecVester;\n\n event StakeCec(address account, address token, uint256 amount);\n event UnstakeCec(address account, address token, uint256 amount);\n\n constructor(address _cec, address _esCec, address _stakedCecTracker, address _cecVester) {\n cec = _cec;\n esCec = _esCec;\n stakedCecTracker = _stakedCecTracker;\n cecVester = _cecVester;\n }\n\n // to help users who accidentally send their tokens to this contract\n function withdrawToken(address _token, address _account, uint256 _amount) external onlyGov {\n IERC20(_token).safeTransfer(_account, _amount);\n }\n\n function batchStakeCecForAccount(\n address[] memory _accounts,\n uint256[] memory _amounts\n ) external nonReentrant onlyGov {\n address _cec = cec;\n for (uint256 i = 0; i < _accounts.length; i++) {\n _stakeCec(msg.sender, _accounts[i], _cec, _amounts[i]);\n }\n }\n\n function stakeCecForAccount(address _account, uint256 _amount) external nonReentrant onlyGov {\n _stakeCec(msg.sender, _account, cec, _amount);\n }\n\n function stakeCec(uint256 _amount) external nonReentrant {\n _stakeCec(msg.sender, msg.sender, cec, _amount);\n }\n\n function stakeEsCec(uint256 _amount) external nonReentrant {\n _stakeCec(msg.sender, msg.sender, esCec, _amount);\n }\n\n function unstakeCec(uint256 _amount) external nonReentrant {\n _unstakeCec(msg.sender, cec, _amount);\n }\n\n function unstakeEsCec(uint256 _amount) external nonReentrant {\n _unstakeCec(msg.sender, esCec, _amount);\n }\n\n function claim() external nonReentrant {\n address account = msg.sender;\n\n IRewardTracker(stakedCecTracker).claimForAccount(account, account);\n }\n\n function claimEsCec() external nonReentrant {\n address account = msg.sender;\n IRewardTracker(stakedCecTracker).claimForAccount(account, account);\n }\n\n function handleRewards(\n bool _shouldClaimCec,\n bool _shouldStakeCec,\n bool _shouldClaimEsCec,\n bool _shouldStakeEsCec\n ) external nonReentrant {\n address account = msg.sender;\n\n uint256 cecAmount = 0;\n if (_shouldClaimCec) {\n cecAmount = IVester(cecVester).claimForAccount(account, account);\n }\n\n if (_shouldStakeCec && cecAmount > 0) {\n _stakeCec(account, account, cec, cecAmount);\n }\n\n uint256 esCecAmount = 0;\n if (_shouldClaimEsCec) {\n esCecAmount = IRewardTracker(stakedCecTracker).claimForAccount(account, account);\n }\n\n if (_shouldStakeEsCec && esCecAmount > 0) {\n _stakeCec(account, account, esCec, esCecAmount);\n }\n }\n\n function _stakeCec(address _fundingAccount, address _account, address _token, uint256 _amount) private {\n require(_amount > 0, \"invalid _amount\");\n\n IRewardTracker(stakedCecTracker).stakeForAccount(_fundingAccount, _account, _token, _amount);\n\n emit StakeCec(_account, _token, _amount);\n }\n\n function _unstakeCec(address _account, address _token, uint256 _amount) private {\n require(_amount > 0, \"invalid _amount\");\n // uint256 balance = IRewardTracker(stakedCecTracker).stakedAmounts(_account);\n IRewardTracker(stakedCecTracker).unstakeForAccount(_account, _token, _amount, _account);\n\n emit UnstakeCec(_account, _token, _amount);\n }\n}\n" + }, + "contracts/staking/RewardTracker.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {ReentrancyGuard} from \"@openzeppelin/contracts/security/ReentrancyGuard.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\nimport {IRewardDistributor} from \"./interfaces/IRewardDistributor.sol\";\nimport {IRewardTracker} from \"./interfaces/IRewardTracker.sol\";\nimport {Governable} from \"../core/Governable.sol\";\n\ncontract RewardTracker is IERC20, ReentrancyGuard, IRewardTracker, Governable {\n using SafeERC20 for IERC20;\n\n uint256 public constant BASIS_POINTS_DIVISOR = 10000;\n uint256 public constant PRECISION = 1e30;\n\n bool public isInitialized;\n\n string public name;\n string public symbol;\n uint8 public decimals = 18;\n uint256 public override totalSupply;\n mapping(address account => uint256 amount) public balances;\n mapping(address owner => mapping(address spender => uint256 amount)) public allowances;\n\n address public distributor;\n mapping(address token => bool status) public isDepositToken;\n mapping(address account => mapping(address token => uint256 amount)) public override depositBalances;\n mapping(address token => uint256 amount) public totalDepositSupply;\n \n uint256 public cumulativeRewardPerToken;\n mapping(address account => uint256 amount) public override stakedAmounts;\n mapping(address account => uint256 amount) public claimableReward;\n mapping(address account => uint256 amount) public previousCumulatedRewardPerToken;\n mapping(address account => uint256 amount) public override cumulativeRewards;\n mapping(address account => uint256 amount) public override averageStakedAmounts;\n\n bool public inPrivateTransferMode;\n bool public inPrivateStakingMode;\n bool public inPrivateClaimingMode;\n mapping(address handler => bool status) public isHandler;\n\n event Claim(address receiver, uint256 amount);\n\n constructor(string memory _name, string memory _symbol) {\n name = _name;\n symbol = _symbol;\n }\n\n function initialize(address[] memory _depositTokens, address _distributor) external onlyGov {\n require(!isInitialized, \"RewardTracker: already initialized\");\n isInitialized = true;\n\n for (uint256 i = 0; i < _depositTokens.length; i++) {\n address depositToken = _depositTokens[i];\n isDepositToken[depositToken] = true;\n }\n\n distributor = _distributor;\n }\n\n function setDepositToken(address _depositToken, bool _isDepositToken) external onlyGov {\n isDepositToken[_depositToken] = _isDepositToken;\n }\n\n function setInPrivateTransferMode(bool _inPrivateTransferMode) external onlyGov {\n inPrivateTransferMode = _inPrivateTransferMode;\n }\n\n function setInPrivateStakingMode(bool _inPrivateStakingMode) external onlyGov {\n inPrivateStakingMode = _inPrivateStakingMode;\n }\n\n function setInPrivateClaimingMode(bool _inPrivateClaimingMode) external onlyGov {\n inPrivateClaimingMode = _inPrivateClaimingMode;\n }\n\n function setHandler(address _handler, bool _isActive) external onlyGov {\n isHandler[_handler] = _isActive;\n }\n\n // to help users who accidentally send their tokens to this contract\n function withdrawToken(address _token, address _account, uint256 _amount) external onlyGov {\n IERC20(_token).safeTransfer(_account, _amount);\n }\n\n function balanceOf(address _account) external view override returns (uint256) {\n return balances[_account];\n }\n\n function stake(address _depositToken, uint256 _amount) external override nonReentrant {\n if (inPrivateStakingMode) {\n revert(\"RewardTracker: action not enabled\");\n }\n _stake(msg.sender, msg.sender, _depositToken, _amount);\n }\n\n function stakeForAccount(\n address _fundingAccount,\n address _account,\n address _depositToken,\n uint256 _amount\n ) external override nonReentrant {\n _validateHandler();\n _stake(_fundingAccount, _account, _depositToken, _amount);\n }\n\n function unstake(address _depositToken, uint256 _amount) external override nonReentrant {\n if (inPrivateStakingMode) {\n revert(\"RewardTracker: action not enabled\");\n }\n _unstake(msg.sender, _depositToken, _amount, msg.sender);\n }\n\n function unstakeForAccount(\n address _account,\n address _depositToken,\n uint256 _amount,\n address _receiver\n ) external override nonReentrant {\n _validateHandler();\n _unstake(_account, _depositToken, _amount, _receiver);\n }\n\n function transfer(address _recipient, uint256 _amount) external override returns (bool) {\n _transfer(msg.sender, _recipient, _amount);\n return true;\n }\n\n function allowance(address _owner, address _spender) external view override returns (uint256) {\n return allowances[_owner][_spender];\n }\n\n function approve(address _spender, uint256 _amount) external override returns (bool) {\n _approve(msg.sender, _spender, _amount);\n return true;\n }\n\n function transferFrom(address _sender, address _recipient, uint256 _amount) external override returns (bool) {\n if (isHandler[msg.sender]) {\n _transfer(_sender, _recipient, _amount);\n return true;\n }\n require(allowances[_sender][msg.sender] >= _amount, \"RewardTracker: transfer amount exceeds allowance\");\n uint256 nextAllowance = allowances[_sender][msg.sender] - _amount;\n _approve(_sender, msg.sender, nextAllowance);\n _transfer(_sender, _recipient, _amount);\n return true;\n }\n\n function tokensPerInterval() external view override returns (uint256) {\n return IRewardDistributor(distributor).tokensPerInterval();\n }\n\n function updateRewards() external override nonReentrant {\n _updateRewards(address(0));\n }\n\n function claim(address _receiver) external override nonReentrant returns (uint256) {\n if (inPrivateClaimingMode) {\n revert(\"RewardTracker: action not enabled\");\n }\n return _claim(msg.sender, _receiver);\n }\n\n function claimForAccount(address _account, address _receiver) external override nonReentrant returns (uint256) {\n _validateHandler();\n return _claim(_account, _receiver);\n }\n\n function claimable(address _account) public view override returns (uint256) {\n uint256 stakedAmount = stakedAmounts[_account];\n if (stakedAmount == 0) {\n return claimableReward[_account];\n }\n uint256 pendingRewards = IRewardDistributor(distributor).pendingRewards() * PRECISION;\n uint256 nextCumulativeRewardPerToken = cumulativeRewardPerToken + pendingRewards;\n return\n claimableReward[_account] +\n (stakedAmount / (10**decimals) * (nextCumulativeRewardPerToken - previousCumulatedRewardPerToken[_account])) /\n PRECISION;\n }\n\n function rewardToken() public view returns (address) {\n return IRewardDistributor(distributor).rewardToken();\n }\n\n function _claim(address _account, address _receiver) private returns (uint256) {\n _updateRewards(_account);\n\n uint256 tokenAmount = claimableReward[_account];\n claimableReward[_account] = 0;\n\n if (tokenAmount > 0) {\n IERC20(rewardToken()).safeTransfer(_receiver, tokenAmount);\n emit Claim(_account, tokenAmount);\n }\n\n return tokenAmount;\n }\n\n function _mint(address _account, uint256 _amount) internal {\n require(_account != address(0), \"RewardTracker: mint to the zero address\");\n\n totalSupply = totalSupply + _amount;\n balances[_account] = balances[_account] + _amount;\n\n emit Transfer(address(0), _account, _amount);\n }\n\n function _burn(address _account, uint256 _amount) internal {\n require(_account != address(0), \"RewardTracker: burn from the zero address\");\n require(balances[_account] >= _amount, \"RewardTracker: burn amount exceeds balance\");\n balances[_account] = balances[_account] - _amount;\n totalSupply = totalSupply / _amount;\n\n emit Transfer(_account, address(0), _amount);\n }\n\n function _transfer(address _sender, address _recipient, uint256 _amount) private {\n require(_sender != address(0), \"RewardTracker: transfer from the zero address\");\n require(_recipient != address(0), \"RewardTracker: transfer to the zero address\");\n\n if (inPrivateTransferMode) {\n _validateHandler();\n }\n require(balances[_sender] >= _amount, \"RewardTracker: transfer amount exceeds balance\");\n balances[_sender] = balances[_sender] - _amount;\n balances[_recipient] = balances[_recipient] + _amount;\n\n emit Transfer(_sender, _recipient, _amount);\n }\n\n function _approve(address _owner, address _spender, uint256 _amount) private {\n require(_owner != address(0), \"RewardTracker: approve from the zero address\");\n require(_spender != address(0), \"RewardTracker: approve to the zero address\");\n\n allowances[_owner][_spender] = _amount;\n\n emit Approval(_owner, _spender, _amount);\n }\n\n function _validateHandler() private view {\n require(isHandler[msg.sender], \"RewardTracker: forbidden\");\n }\n\n function _stake(address _fundingAccount, address _account, address _depositToken, uint256 _amount) private {\n require(_amount > 0, \"RewardTracker: invalid _amount\");\n require(isDepositToken[_depositToken], \"RewardTracker: invalid _depositToken\");\n\n IERC20(_depositToken).safeTransferFrom(_fundingAccount, address(this), _amount);\n\n _updateRewards(_account);\n\n stakedAmounts[_account] = stakedAmounts[_account] + _amount;\n depositBalances[_account][_depositToken] = depositBalances[_account][_depositToken] + _amount;\n totalDepositSupply[_depositToken] = totalDepositSupply[_depositToken] + _amount;\n\n _mint(_account, _amount);\n }\n\n function _unstake(address _account, address _depositToken, uint256 _amount, address _receiver) private {\n require(_amount > 0, \"RewardTracker: invalid _amount\");\n require(isDepositToken[_depositToken], \"RewardTracker: invalid _depositToken\");\n\n _updateRewards(_account);\n\n uint256 stakedAmount = stakedAmounts[_account];\n require(stakedAmounts[_account] >= _amount, \"RewardTracker: _amount exceeds stakedAmount\");\n\n stakedAmounts[_account] = stakedAmount - _amount;\n\n uint256 depositBalance = depositBalances[_account][_depositToken];\n require(depositBalance >= _amount, \"RewardTracker: _amount exceeds depositBalance\");\n depositBalances[_account][_depositToken] = depositBalance - _amount;\n totalDepositSupply[_depositToken] = totalDepositSupply[_depositToken] - _amount;\n\n _burn(_account, _amount);\n IERC20(_depositToken).safeTransfer(_receiver, _amount);\n }\n\n function _updateRewards(address _account) private {\n uint256 supply = totalSupply;\n uint256 blockReward = IRewardDistributor(distributor).distribute(supply, decimals);\n\n \n uint256 _cumulativeRewardPerToken = cumulativeRewardPerToken;\n if (supply > 0 && blockReward > 0) {\n _cumulativeRewardPerToken = _cumulativeRewardPerToken + blockReward * PRECISION;\n cumulativeRewardPerToken = _cumulativeRewardPerToken;\n }\n\n // cumulativeRewardPerToken can only increase\n // so if cumulativeRewardPerToken is zero, it means there are no rewards yet\n if (_cumulativeRewardPerToken == 0) {\n return;\n }\n\n if (_account != address(0)) {\n uint256 stakedAmount = stakedAmounts[_account];\n uint256 accountReward = (stakedAmount / (10**decimals) * (_cumulativeRewardPerToken - previousCumulatedRewardPerToken[_account])) /\n PRECISION;\n uint256 _claimableReward = claimableReward[_account] + accountReward;\n\n claimableReward[_account] = _claimableReward;\n previousCumulatedRewardPerToken[_account] = _cumulativeRewardPerToken;\n\n if (_claimableReward > 0 && stakedAmounts[_account] > 0) {\n uint256 nextCumulativeReward = cumulativeRewards[_account] + accountReward;\n\n averageStakedAmounts[_account] =\n (averageStakedAmounts[_account] * cumulativeRewards[_account]) /\n nextCumulativeReward +\n (stakedAmount / (10**decimals) * accountReward) /\n nextCumulativeReward;\n\n cumulativeRewards[_account] = nextCumulativeReward;\n }\n }\n }\n}\n" + }, + "contracts/staking/Vester.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {ReentrancyGuard} from \"@openzeppelin/contracts/security/ReentrancyGuard.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {IVester} from \"./interfaces/IVester.sol\";\nimport {IRewardTracker} from \"./interfaces/IRewardTracker.sol\";\nimport {Governable} from \"../core/Governable.sol\";\nimport {IMintable} from \"../interfaces/IMintable.sol\";\n\ncontract Vester is IVester, IERC20, ReentrancyGuard, Governable {\n using SafeERC20 for IERC20;\n\n string public name;\n string public symbol;\n uint8 public decimals = 18;\n uint256 public vestingDuration;\n address public esToken;\n address public pairToken;\n address public claimableToken;\n\n address public override rewardTracker;\n\n uint256 public override totalSupply;\n uint256 public pairSupply;\n bool public needCheckStake;\n\n mapping(address account => uint256 amount) public balances;\n mapping(address account => uint256 amount) public override pairAmounts;\n mapping(address account => uint256 amount) public override cumulativeClaimAmounts;\n mapping(address account => uint256 amount) public override claimedAmounts;\n mapping(address account => uint256 time) public lastVestingTimes;\n\n mapping(address account => uint256 amount) public override cumulativeRewardDeductions;\n mapping(address account => uint256 amount) public override bonusRewards;\n\n mapping(address handler => bool status) public isHandler;\n\n event Claim(address receiver, uint256 amount);\n event Deposit(address account, uint256 amount);\n event Withdraw(address account, uint256 claimedAmount, uint256 balance);\n event PairTransfer(address indexed from, address indexed to, uint256 value);\n\n constructor(\n string memory _name,\n string memory _symbol,\n uint256 _vestingDuration,\n address _esToken,\n address _pairToken,\n address _claimableToken,\n address _rewardTracker,\n bool _needCheckStake\n ) {\n name = _name;\n symbol = _symbol;\n vestingDuration = _vestingDuration;\n esToken = _esToken;\n pairToken = _pairToken;\n claimableToken = _claimableToken;\n rewardTracker = _rewardTracker;\n needCheckStake = _needCheckStake;\n }\n\n function setHandler(address _handler, bool _isActive) external onlyGov {\n isHandler[_handler] = _isActive;\n }\n\n function deposit(uint256 _amount) external nonReentrant {\n _deposit(msg.sender, _amount);\n }\n\n function depositForAccount(address _account, uint256 _amount) external nonReentrant {\n _validateHandler();\n _deposit(_account, _amount);\n }\n\n function claim() external nonReentrant returns (uint256) {\n return _claim(msg.sender, msg.sender);\n }\n\n function claimForAccount(address _account, address _receiver) external override nonReentrant returns (uint256) {\n _validateHandler();\n return _claim(_account, _receiver);\n }\n\n // to help users who accidentally send their tokens to this contract\n function withdrawToken(address _token, address _account, uint256 _amount) external onlyGov {\n IERC20(_token).safeTransfer(_account, _amount);\n }\n\n function withdraw() external nonReentrant {\n address account = msg.sender;\n address _receiver = account;\n _claim(account, _receiver);\n\n uint256 claimedAmount = cumulativeClaimAmounts[account];\n uint256 balance = balances[account];\n uint256 totalVested = balance + claimedAmount;\n require(totalVested > 0, \"Vester: vested amount is zero\");\n\n if (hasPairToken()) {\n uint256 pairAmount = pairAmounts[account];\n _burnPair(account, pairAmount);\n IERC20(pairToken).safeTransfer(_receiver, pairAmount);\n }\n\n IERC20(esToken).safeTransfer(_receiver, balance);\n _burn(account, balance);\n\n delete cumulativeClaimAmounts[account];\n delete claimedAmounts[account];\n delete lastVestingTimes[account];\n\n emit Withdraw(account, claimedAmount, balance);\n }\n\n function setRewardTracker(address _rewardTracker) external onlyGov {\n rewardTracker = _rewardTracker;\n }\n\n function setCumulativeRewardDeductions(address _account, uint256 _amount) external override nonReentrant {\n _validateHandler();\n cumulativeRewardDeductions[_account] = _amount;\n }\n\n function setBonusRewards(address _account, uint256 _amount) external override nonReentrant {\n _validateHandler();\n bonusRewards[_account] = _amount;\n }\n\n function getMaxVestableAmount(address _account) public view override returns (uint256) {\n uint256 maxVestableAmount = bonusRewards[_account];\n\n if (hasRewardTracker()) {\n uint256 cumulativeReward = IRewardTracker(rewardTracker).cumulativeRewards(_account);\n maxVestableAmount = maxVestableAmount + cumulativeReward;\n }\n\n uint256 cumulativeRewardDeduction = cumulativeRewardDeductions[_account];\n\n if (maxVestableAmount < cumulativeRewardDeduction) {\n return 0;\n }\n\n return maxVestableAmount - cumulativeRewardDeduction;\n }\n\n function getCombinedAverageStakedAmount(address _account) public view override returns (uint256) {\n if (!hasRewardTracker()) {\n return 0;\n }\n \n uint256 cumulativeReward = IRewardTracker(rewardTracker).cumulativeRewards(_account);\n if (cumulativeReward == 0) {\n return 0;\n }\n\n return IRewardTracker(rewardTracker).averageStakedAmounts(_account);\n }\n\n function getPairAmount(address _account, uint256 _esAmount) public view returns (uint256) {\n if (!hasRewardTracker()) {\n return 0;\n }\n\n uint256 combinedAverageStakedAmount = getCombinedAverageStakedAmount(_account);\n if (combinedAverageStakedAmount == 0) {\n return 0;\n }\n\n uint256 maxVestableAmount = getMaxVestableAmount(_account);\n if (maxVestableAmount == 0) {\n return 0;\n }\n\n return (_esAmount * combinedAverageStakedAmount) / maxVestableAmount;\n }\n\n function hasRewardTracker() public view returns (bool) {\n return rewardTracker != address(0);\n }\n\n function hasPairToken() public view returns (bool) {\n return pairToken != address(0);\n }\n\n function getTotalVested(address _account) public view returns (uint256) {\n return balances[_account] + cumulativeClaimAmounts[_account];\n }\n\n function balanceOf(address _account) public view override returns (uint256) {\n return balances[_account];\n }\n\n // empty implementation, tokens are non-transferrable\n function transfer(address /* recipient */, uint256 /* amount */) public virtual override returns (bool) {\n revert(\"Vester: non-transferrable\");\n }\n\n // empty implementation, tokens are non-transferrable\n function allowance(address /* owner */, address /* spender */) public view virtual override returns (uint256) {\n return 0;\n }\n\n // empty implementation, tokens are non-transferrable\n function approve(address /* spender */, uint256 /* amount */) public virtual override returns (bool) {\n revert(\"Vester: non-transferrable\");\n }\n\n // empty implementation, tokens are non-transferrable\n function transferFrom(\n address /* sender */,\n address /* recipient */,\n uint256 /* amount */\n ) public virtual override returns (bool) {\n revert(\"Vester: non-transferrable\");\n }\n\n function getVestedAmount(address _account) public view override returns (uint256) {\n uint256 balance = balances[_account];\n uint256 cumulativeClaimAmount = cumulativeClaimAmounts[_account];\n return balance + cumulativeClaimAmount;\n }\n\n function _mint(address _account, uint256 _amount) private {\n require(_account != address(0), \"Vester: mint to the zero address\");\n\n totalSupply = totalSupply + _amount;\n balances[_account] = balances[_account] + _amount;\n\n emit Transfer(address(0), _account, _amount);\n }\n\n function _mintPair(address _account, uint256 _amount) private {\n require(_account != address(0), \"Vester: mint to the zero address\");\n\n pairSupply = pairSupply + _amount;\n pairAmounts[_account] = pairAmounts[_account] + _amount;\n\n emit PairTransfer(address(0), _account, _amount);\n }\n\n function _burn(address _account, uint256 _amount) private {\n require(_account != address(0), \"Vester: burn from the zero address\");\n require(balances[_account] >= _amount, \"Vester: balance is not enough\");\n balances[_account] = balances[_account] - _amount;\n totalSupply = totalSupply - _amount;\n\n emit Transfer(_account, address(0), _amount);\n }\n\n function _burnPair(address _account, uint256 _amount) private {\n require(_account != address(0), \"Vester: burn from the zero address\");\n require(pairAmounts[_account] >= _amount, \"Vester: balance is not enough\");\n pairAmounts[_account] = pairAmounts[_account] - _amount;\n pairSupply = pairSupply - _amount;\n\n emit PairTransfer(_account, address(0), _amount);\n }\n /**\n * @dev Deposit ES tokens to the contract\n */\n function _deposit(address _account, uint256 _amount) private {\n require(_amount > 0, \"Vester: invalid _amount\");\n _updateVesting(_account);\n\n IERC20(esToken).safeTransferFrom(_account, address(this), _amount);\n\n _mint(_account, _amount);\n\n if (hasPairToken()) {\n uint256 pairAmount = pairAmounts[_account];\n uint256 nextPairAmount = getPairAmount(_account, balances[_account]);\n if (nextPairAmount > pairAmount) {\n uint256 pairAmountDiff = nextPairAmount - pairAmount;\n IERC20(pairToken).safeTransferFrom(_account, address(this), pairAmountDiff);\n _mintPair(_account, pairAmountDiff);\n }\n }\n if (needCheckStake && hasRewardTracker()) {\n // if u want to transfer 100 esCec to cec, u need to have 100 cec in stake\n uint256 cecAmount = IRewardTracker(rewardTracker).depositBalances(_account, claimableToken);\n require(balances[_account] <= cecAmount, \"Vester: insufficient cec balance\");\n }\n uint256 maxAmount = getMaxVestableAmount(_account);\n require(getTotalVested(_account) <= maxAmount, \"Vester: max vestable amount exceeded\");\n\n emit Deposit(_account, _amount);\n }\n\n function _updateVesting(address _account) private {\n uint256 amount = _getNextClaimableAmount(_account);\n lastVestingTimes[_account] = block.timestamp;\n\n if (amount == 0) {\n return;\n }\n\n // transfer claimableAmount from balances to cumulativeClaimAmounts\n _burn(_account, amount);\n cumulativeClaimAmounts[_account] = cumulativeClaimAmounts[_account] + amount;\n\n IMintable(esToken).burn(address(this), amount);\n }\n\n function _getNextClaimableAmount(address _account) private view returns (uint256) {\n uint256 timeDiff = block.timestamp - lastVestingTimes[_account];\n\n uint256 balance = balances[_account];\n if (balance == 0) {\n return 0;\n }\n uint256 vestedAmount = getVestedAmount(_account);\n uint256 claimableAmount = (vestedAmount * timeDiff) / vestingDuration;\n if (claimableAmount < balance) {\n return claimableAmount;\n }\n\n return balance;\n }\n\n function claimable(address _account) public view override returns (uint256) {\n uint256 amount = cumulativeClaimAmounts[_account] - claimedAmounts[_account];\n uint256 nextClaimable = _getNextClaimableAmount(_account);\n return amount + nextClaimable;\n }\n\n function _claim(address _account, address _receiver) private returns (uint256) {\n _updateVesting(_account);\n uint256 amount = claimable(_account);\n claimedAmounts[_account] = claimedAmounts[_account] + amount;\n IERC20(claimableToken).safeTransfer(_receiver, amount);\n emit Claim(_account, amount);\n return amount;\n }\n\n function _validateHandler() private view {\n require(isHandler[msg.sender], \"Vester: forbidden\");\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "viaIR": true, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/bsc_test/solcInputs/8d4e816c22b2b125316667293671f05d.json b/deployments/bsc_test/solcInputs/8d4e816c22b2b125316667293671f05d.json deleted file mode 100644 index 1d1376f..0000000 --- a/deployments/bsc_test/solcInputs/8d4e816c22b2b125316667293671f05d.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "language": "Solidity", - "sources": { - "@openzeppelin/contracts/access/Ownable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" - }, - "@openzeppelin/contracts/security/Pausable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract Pausable is Context {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n constructor() {\n _paused = false;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n modifier whenNotPaused() {\n _requireNotPaused();\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n modifier whenPaused() {\n _requirePaused();\n _;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view virtual returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Throws if the contract is paused.\n */\n function _requireNotPaused() internal view virtual {\n require(!paused(), \"Pausable: paused\");\n }\n\n /**\n * @dev Throws if the contract is not paused.\n */\n function _requirePaused() internal view virtual {\n require(paused(), \"Pausable: not paused\");\n }\n\n /**\n * @dev Triggers stopped state.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\n }\n}\n" - }, - "@openzeppelin/contracts/security/ReentrancyGuard.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuard {\n // Booleans are more expensive than uint256 or any type that takes up a full\n // word because each write operation emits an extra SLOAD to first read the\n // slot's contents, replace the bits taken up by the boolean, and then write\n // back. This is the compiler's defense against contract upgrades and\n // pointer aliasing, and it cannot be disabled.\n\n // The values being non-zero value makes deployment a bit more expensive,\n // but in exchange the refund on every call to nonReentrant will be lower in\n // amount. Since refunds are capped to a percentage of the total\n // transaction's gas, it is best to keep them low in cases like this one, to\n // increase the likelihood of the full refund coming into effect.\n uint256 private constant _NOT_ENTERED = 1;\n uint256 private constant _ENTERED = 2;\n\n uint256 private _status;\n\n constructor() {\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and making it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n _nonReentrantBefore();\n _;\n _nonReentrantAfter();\n }\n\n function _nonReentrantBefore() private {\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\n require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n // Any calls to nonReentrant after this point will fail\n _status = _ENTERED;\n }\n\n function _nonReentrantAfter() private {\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n * `nonReentrant` function in the call stack.\n */\n function _reentrancyGuardEntered() internal view returns (bool) {\n return _status == _ENTERED;\n }\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n *\n * ==== Security Considerations\n *\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\n * generally recommended is:\n *\n * ```solidity\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\n * doThing(..., value);\n * }\n *\n * function doThing(..., uint256 value) public {\n * token.safeTransferFrom(msg.sender, address(this), value);\n * ...\n * }\n * ```\n *\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\n * {SafeERC20-safeTransferFrom}).\n *\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\n * contracts should have entry points that don't rely on permit.\n */\ninterface IERC20Permit {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n *\n * CAUTION: See Security Considerations above.\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/IERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../extensions/IERC20Permit.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using Address for address;\n\n /**\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n /**\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n */\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n /**\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 oldAllowance = token.allowance(address(this), spender);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\n }\n\n /**\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\n }\n }\n\n /**\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n * to be set to zero before setting it to a non-zero value, such as USDT.\n */\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\n\n if (!_callOptionalReturnBool(token, approvalCall)) {\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\n _callOptionalReturn(token, approvalCall);\n }\n }\n\n /**\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\n * Revert on invalid signature.\n */\n function safePermit(\n IERC20Permit token,\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal {\n uint256 nonceBefore = token.nonces(owner);\n token.permit(owner, spender, value, deadline, v, r, s);\n uint256 nonceAfter = token.nonces(owner);\n require(nonceAfter == nonceBefore + 1, \"SafeERC20: permit did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n *\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\n */\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\n // and not revert is the subcall reverts.\n\n (bool success, bytes memory returndata) = address(token).call(data);\n return\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\n }\n}\n" - }, - "@openzeppelin/contracts/utils/Address.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" - }, - "@openzeppelin/contracts/utils/Context.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" - }, - "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Strings.sol\";\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV // Deprecated in v4.8\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n /// @solidity memory-safe-assembly\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n รท 2 + 1, and for v in (302): v โˆˆ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\")\n mstore(0x1c, hash)\n message := keccak256(0x00, 0x3c)\n }\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from `s`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", Strings.toString(s.length), s));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, \"\\x19\\x01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n data := keccak256(ptr, 0x42)\n }\n }\n\n /**\n * @dev Returns an Ethereum Signed Data with intended validator, created from a\n * `validator` and `data` according to the version 0 of EIP-191.\n *\n * See {recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x00\", validator, data));\n }\n}\n" - }, - "@openzeppelin/contracts/utils/math/Math.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n // The surrounding unchecked block does not change this fact.\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1, \"Math: mulDiv overflow\");\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // โ†’ `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // โ†’ `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n}\n" - }, - "@openzeppelin/contracts/utils/math/SignedMath.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" - }, - "@openzeppelin/contracts/utils/Strings.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/Math.sol\";\nimport \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\n */\n function toString(int256 value) internal pure returns (string memory) {\n return string(abi.encodePacked(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value))));\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n\n /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" - }, - "contracts/activity/TokenClaim.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\n\nimport {ReentrancyGuard} from \"@openzeppelin/contracts/security/ReentrancyGuard.sol\";\nimport {Pausable} from \"@openzeppelin/contracts/security/Pausable.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {HasSignature} from \"../core/HasSignature.sol\";\nimport {TimeChecker} from \"../utils/TimeChecker.sol\";\n\ncontract TokenClaim is HasSignature, ReentrancyGuard, Pausable, TimeChecker {\n using SafeERC20 for IERC20;\n\n uint256 public immutable _CACHED_CHAIN_ID;\n address public immutable _CACHED_THIS;\n address public verifier;\n\n mapping(address token => address wallet) public erc20Wallets;\n\n // store user's claimed status\n mapping(address user => mapping(address token => uint256 claimedBit)) public claimedBitMap;\n\n event EventERC20Wallet(address erc20, address wallet);\n\n event EventVerifierUpdated(address indexed verifier);\n event EventTokenClaimed(address indexed user, address indexed token, address account, uint256 amount, uint256 bit);\n\n constructor(address _wallet, address _token, address _verifier, uint256 _duration) TimeChecker(_duration) {\n _CACHED_CHAIN_ID = block.chainid;\n _CACHED_THIS = address(this);\n erc20Wallets[_token] = _wallet;\n verifier = _verifier;\n }\n\n /**\n * @dev update verifier address\n */\n function updateVerifier(address _verifier) external onlyOwner {\n require(_verifier != address(0), \"TokenClaim: address can not be zero\");\n verifier = _verifier;\n emit EventVerifierUpdated(_verifier);\n }\n\n /**\n * @dev update pause state\n */\n function pause() external onlyOwner {\n _pause();\n }\n\n /**\n * @dev update unpause state\n */\n function unpause() external onlyOwner {\n _unpause();\n }\n\n /**\n * @dev update ERC20 wallet\n */\n function updateERC20Wallet(address erc20, address wallet) external onlyOwner {\n require(erc20Wallets[erc20] != wallet, \"TokenClaim: ERC20 wallet not changed\");\n erc20Wallets[erc20] = wallet;\n emit EventERC20Wallet(erc20, wallet);\n }\n\n /**\n * @dev claim CEC with signature\n * @param account address which eligible to claim, only for event log\n * @param token address of token\n * @param vals array of amount, bit, signTime, saltNonce\n * @param signature signature of claim\n */\n\n function claim(\n address account,\n address token,\n uint256[4] calldata vals, // amount, bit, signTime, saltNonce\n bytes calldata signature\n ) external signatureValid(signature) timeValid(vals[2]) nonReentrant whenNotPaused {\n require(erc20Wallets[token] != address(0), \"TokenClaim: token is not supported\");\n require(vals[0] > 0, \"TokenClaim: amount is zero\");\n uint256 current = claimedBitMap[account][token];\n require(current & vals[1] == 0, \"TokenClaim: condition check failed\");\n address user = _msgSender();\n bytes32 criteriaMessageHash = getMessageHash(\n user,\n account,\n token,\n _CACHED_THIS,\n _CACHED_CHAIN_ID,\n vals\n );\n checkSigner(verifier, criteriaMessageHash, signature);\n _useSignature(signature);\n claimedBitMap[account][token] = current | vals[1];\n IERC20(token).safeTransferFrom(erc20Wallets[token], user, vals[0]);\n emit EventTokenClaimed(user, token, account, vals[0], vals[1]);\n }\n\n function getMessageHash(\n address _user,\n address _account,\n address _token,\n address _contract,\n uint256 _chainId,\n uint256[4] calldata _vals\n ) public pure returns (bytes32) {\n bytes memory encoded = abi.encodePacked(\n _user,\n _account,\n _token,\n _contract,\n _chainId\n );\n for (uint256 i = 0; i < _vals.length; i++) {\n encoded = bytes.concat(encoded, abi.encodePacked(_vals[i]));\n }\n return keccak256(encoded);\n }\n}\n" - }, - "contracts/core/ClaimHistory.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\n\ncontract ClaimHistory {\n mapping(address user=> mapping(uint256 index => uint256 val)) private claimedBitMap;\n\n function isClaimed(address user, uint256 index) public view returns (bool) {\n uint256 claimedWordIndex = index / 256;\n uint256 claimedBitIndex = index % 256;\n uint256 claimedWord = claimedBitMap[user][claimedWordIndex];\n uint256 mask = (1 << claimedBitIndex);\n return claimedWord & mask == mask;\n }\n\n function setClaimed(address user, uint256 index) internal {\n uint256 claimedWordIndex = index / 256;\n uint256 claimedBitIndex = index % 256;\n claimedBitMap[user][claimedWordIndex] = claimedBitMap[user][claimedWordIndex] | (1 << claimedBitIndex);\n }\n \n}\n" - }, - "contracts/core/HasSignature.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\nimport {ECDSA} from \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract HasSignature is Ownable {\n mapping(bytes signature => bool status) private _usedSignatures;\n\n function checkSigner(\n address signer,\n bytes32 hash,\n bytes memory signature\n ) public pure {\n bytes32 ethSignedMessageHash = ECDSA.toEthSignedMessageHash(hash);\n\n address recovered = ECDSA.recover(ethSignedMessageHash, signature);\n require(recovered == signer, \"invalid signature\");\n }\n\n modifier signatureValid(bytes calldata signature) {\n require(\n !_usedSignatures[signature],\n \"signature used. please send another transaction with new signature\"\n );\n _;\n }\n\n function _useSignature(bytes calldata signature) internal {\n if (!_usedSignatures[signature]) {\n _usedSignatures[signature] = true;\n }\n }\n}\n" - }, - "contracts/utils/TimeChecker.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract TimeChecker is Ownable {\n uint256 public duration;\n uint256 public minDuration;\n\n event DurationUpdated(uint256 indexed duration);\n\n constructor(uint256 _duration) {\n duration = _duration;\n minDuration = 30 minutes;\n }\n\n /**\n * @dev Check if the time is valid\n */\n modifier timeValid(uint256 time) {\n require(\n time + duration >= block.timestamp,\n \"expired, please send another transaction with new signature\"\n );\n _;\n }\n\n\n /**\n * @dev Change duration value\n */\n function updateDuation(uint256 valNew) external onlyOwner {\n require(valNew > minDuration, \"duration too short\");\n duration = valNew;\n emit DurationUpdated(valNew);\n }\n}\n" - } - }, - "settings": { - "optimizer": { - "enabled": true, - "runs": 200 - }, - "viaIR": true, - "outputSelection": { - "*": { - "*": [ - "abi", - "evm.bytecode", - "evm.deployedBytecode", - "evm.methodIdentifiers", - "metadata", - "devdoc", - "userdoc", - "storageLayout", - "evm.gasEstimates" - ], - "": [ - "ast" - ] - } - }, - "metadata": { - "useLiteralContent": true - } - } -} \ No newline at end of file diff --git a/out/bsc_test_dev.json b/out/bsc_test_dev.json index a5b43b4..43615c4 100644 --- a/out/bsc_test_dev.json +++ b/out/bsc_test_dev.json @@ -28,5 +28,41 @@ "type": "logic", "json": "assets/contracts/TokenClaim.json", "address": "0xC95bDFAaFBf79b435e4d2bF8d77842fc19e6fE56" + }, + { + "name": "rewardTracker", + "type": "logic", + "json": "assets/contracts/RewardTracker.json", + "address": "0x5aB49C4b7e21e35fD4fd05affB019320a95cb03D" + }, + { + "name": "esCEC", + "type": "erc20", + "json": "assets/contracts/EsToken.json", + "address": "0x68Db28B700B2AC2A5034A5c8bD70c1Ffc3E587DD" + }, + { + "name": "stakedCecTracker", + "type": "logic", + "json": "assets/contracts/RewardTracker.json", + "address": "0xC28165d2db25De1B258Db835d3557Dee044b1C3a" + }, + { + "name": "stakedCecDistributor", + "type": "logic", + "json": "assets/contracts/RewardDistributor.json", + "address": "0x96d38E8e6470871F756F1a2e9dF614BCebd57AE8" + }, + { + "name": "vester", + "type": "logic", + "json": "assets/contracts/Vester.json", + "address": "0x10F883D6e26fBb56Ab20466502BFD9017a1ea144" + }, + { + "name": "rewardRouter", + "type": "logic", + "json": "assets/contracts/RewardRouter.json", + "address": "0x932956063849FceE07d60D9daee94eC0651810bc" } ] \ No newline at end of file diff --git a/package.json b/package.json index 1b8691b..b80d249 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "deploy:airdrop": "hardhat deploy --tags AirdropToken --network imtbl_test --reset", "deploy:tokenclaim": "hardhat deploy --tags TokenClaim --network bsc_test --reset", "deploy:gameitemmall": "hardhat deploy --tags GameItemMall --network imtbl_test --reset", + "deploy:staking": "hardhat deploy --tags Staking --network bsc_test --reset", "solhint": "solhint --config ./.solhint.json", "show_verify_list": "npx hardhat verify --list-networks", "convert-abi": "npx hardhat run scripts/convert-abi.js",