UNPKG

@cartesi/staking-pool

Version:
278 lines 12.2 kB
{ "contractName": "StakingPoolData", "sourceName": "contracts/StakingPoolData.sol", "abi": [ { "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": "amount", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_amount", "type": "uint256" } ], "name": "amountToShares", "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": "paused", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "pos", "outputs": [ { "internalType": "contract IPoS", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "requiredLiquidity", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "shares", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_shares", "type": "uint256" } ], "name": "sharesToAmount", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "userBalance", "outputs": [ { "internalType": "uint256", "name": "balance", "type": "uint256" }, { "internalType": "uint256", "name": "shares", "type": "uint256" }, { "internalType": "uint256", "name": "depositTimestamp", "type": "uint256" } ], "stateMutability": "view", "type": "function" } ], "bytecode": "0x608060405234801561001057600080fd5b506105a6806100206000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80638da5cb5b116100715780638da5cb5b14610147578063aa8c217c1461016c578063b811540e14610175578063c56551b614610188578063e366b7bb1461019b578063f2fde38b146101a457600080fd5b80630103c92b146100ae57806303314efa146100fd578063555d8ebb146101145780635c975abb14610127578063715018a61461013d575b600080fd5b6100dd6100bc3660046104bf565b609b6020526000908152604090208054600182015460029092015490919083565b604080519384526020840192909252908201526060015b60405180910390f35b61010660975481565b6040519081526020016100f4565b6101066101223660046104e8565b6101b7565b60335460ff1660405190151581526020016100f4565b6101456101f4565b005b6065546001600160a01b03165b6040516001600160a01b0390911681526020016100f4565b61010660985481565b6101066101833660046104e8565b61025f565b609a54610154906001600160a01b031681565b61010660995481565b6101456101b23660046104bf565b610296565b6000609754600014156101d3576101cd82610361565b92915050565b6101cd6097546101ee6098548561039590919063ffffffff16565b906103cf565b6065546001600160a01b031633146102535760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b61025d6000610412565b565b600060985460001415610275576101cd82610464565b6101cd6098546102906097548561047490919063ffffffff16565b9061049c565b6065546001600160a01b031633146102f05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161024a565b6001600160a01b0381166103555760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161024a565b61035e81610412565b50565b6000806103736002633b9aca00610519565b9050633b9aca006103848483610501565b61038e9190610519565b9392505050565b60006b033b2e3c9fd0803ce80000006103ae838561053b565b6103c560026b033b2e3c9fd0803ce8000000610519565b6103849190610501565b6000806103dd600284610519565b9050826103f66b033b2e3c9fd0803ce80000008661053b565b6104009083610501565b61040a9190610519565b949350505050565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006101cd633b9aca008361053b565b6000670de0b6b3a7640000610489838561053b565b6103c56002670de0b6b3a7640000610519565b6000806104aa600284610519565b9050826103f6670de0b6b3a76400008661053b565b6000602082840312156104d157600080fd5b81356001600160a01b038116811461038e57600080fd5b6000602082840312156104fa57600080fd5b5035919050565b600082198211156105145761051461055a565b500190565b60008261053657634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156105555761055561055a565b500290565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220b5b4c13b4dbe2731f5a13ea46bca1c832be95e85432a1a2e5078cd37865d5e2164736f6c63430008070033", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80638da5cb5b116100715780638da5cb5b14610147578063aa8c217c1461016c578063b811540e14610175578063c56551b614610188578063e366b7bb1461019b578063f2fde38b146101a457600080fd5b80630103c92b146100ae57806303314efa146100fd578063555d8ebb146101145780635c975abb14610127578063715018a61461013d575b600080fd5b6100dd6100bc3660046104bf565b609b6020526000908152604090208054600182015460029092015490919083565b604080519384526020840192909252908201526060015b60405180910390f35b61010660975481565b6040519081526020016100f4565b6101066101223660046104e8565b6101b7565b60335460ff1660405190151581526020016100f4565b6101456101f4565b005b6065546001600160a01b03165b6040516001600160a01b0390911681526020016100f4565b61010660985481565b6101066101833660046104e8565b61025f565b609a54610154906001600160a01b031681565b61010660995481565b6101456101b23660046104bf565b610296565b6000609754600014156101d3576101cd82610361565b92915050565b6101cd6097546101ee6098548561039590919063ffffffff16565b906103cf565b6065546001600160a01b031633146102535760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b61025d6000610412565b565b600060985460001415610275576101cd82610464565b6101cd6098546102906097548561047490919063ffffffff16565b9061049c565b6065546001600160a01b031633146102f05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161024a565b6001600160a01b0381166103555760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161024a565b61035e81610412565b50565b6000806103736002633b9aca00610519565b9050633b9aca006103848483610501565b61038e9190610519565b9392505050565b60006b033b2e3c9fd0803ce80000006103ae838561053b565b6103c560026b033b2e3c9fd0803ce8000000610519565b6103849190610501565b6000806103dd600284610519565b9050826103f66b033b2e3c9fd0803ce80000008661053b565b6104009083610501565b61040a9190610519565b949350505050565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006101cd633b9aca008361053b565b6000670de0b6b3a7640000610489838561053b565b6103c56002670de0b6b3a7640000610519565b6000806104aa600284610519565b9050826103f6670de0b6b3a76400008661053b565b6000602082840312156104d157600080fd5b81356001600160a01b038116811461038e57600080fd5b6000602082840312156104fa57600080fd5b5035919050565b600082198211156105145761051461055a565b500190565b60008261053657634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156105555761055561055a565b500290565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220b5b4c13b4dbe2731f5a13ea46bca1c832be95e85432a1a2e5078cd37865d5e2164736f6c63430008070033", "linkReferences": {}, "deployedLinkReferences": {}, "devdoc": { "kind": "dev", "methods": { "owner()": { "details": "Returns the address of the current owner." }, "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 anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing 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." } }, "version": 1 }, "userdoc": { "kind": "user", "methods": {}, "version": 1 }, "evm": { "gasEstimates": { "creation": { "codeDepositCost": "289200", "executionCost": "331", "totalCost": "289531" }, "external": { "amount()": "2317", "amountToShares(uint256)": "infinite", "owner()": "2320", "paused()": "2359", "pos()": "2403", "renounceOwnership()": "28206", "requiredLiquidity()": "2383", "shares()": "2318", "sharesToAmount(uint256)": "infinite", "transferOwnership(address)": "28387", "userBalance(address)": "6749" } }, "methodIdentifiers": { "amount()": "aa8c217c", "amountToShares(uint256)": "b811540e", "owner()": "8da5cb5b", "paused()": "5c975abb", "pos()": "c56551b6", "renounceOwnership()": "715018a6", "requiredLiquidity()": "e366b7bb", "shares()": "03314efa", "sharesToAmount(uint256)": "555d8ebb", "transferOwnership(address)": "f2fde38b", "userBalance(address)": "0103c92b" } } }