UNPKG

@cartesi/staking-pool

Version:
526 lines 29.4 kB
{ "contractName": "StakingPoolUserImpl", "sourceName": "contracts/StakingPoolUserImpl.sol", "abi": [ { "inputs": [ { "internalType": "address", "name": "_ctsi", "type": "address" }, { "internalType": "uint256", "name": "_lockTime", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "stakeTimestamp", "type": "uint256" } ], "name": "Deposit", "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": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "shares", "type": "uint256" } ], "name": "Stake", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "account", "type": "address" } ], "name": "Unpaused", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "shares", "type": "uint256" } ], "name": "Unstake", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "Withdraw", "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": [ { "internalType": "uint256", "name": "_amount", "type": "uint256" } ], "name": "deposit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "getWithdrawBalance", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "lockTime", "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": "uint256", "name": "_amount", "type": "uint256" } ], "name": "stake", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_shares", "type": "uint256" } ], "name": "unstake", "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" }, { "inputs": [ { "internalType": "uint256", "name": "_amount", "type": "uint256" } ], "name": "withdraw", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "bytecode": "0x60c060405234801561001057600080fd5b506040516110d93803806110d983398101604081905261002f9161004a565b60609190911b6001600160601b03191660805260a052610084565b6000806040838503121561005d57600080fd5b82516001600160a01b038116811461007457600080fd5b6020939093015192949293505050565b60805160601c60a0516110116100c86000396000818161017b015281816108280152610b9e0152600081816104f9015281816106430152610ad601526110116000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c8063715018a6116100a2578063b6b55f2511610071578063b6b55f251461023f578063b811540e14610252578063c56551b614610265578063e366b7bb14610278578063f2fde38b1461028157600080fd5b8063715018a6146101f65780638da5cb5b146101fe578063a694fc3a14610223578063aa8c217c1461023657600080fd5b80632e1a7d4d116100de5780632e1a7d4d146101b2578063555d8ebb146101c55780635c975abb146101d8578063710fe6f8146101ee57600080fd5b80630103c92b1461011057806303314efa1461015f5780630d668087146101765780632e17de781461019d575b600080fd5b61013f61011e366004610e38565b609b6020526000908152604090208054600182015460029092015490919083565b604080519384526020840192909252908201526060015b60405180910390f35b61016860975481565b604051908152602001610156565b6101687f000000000000000000000000000000000000000000000000000000000000000081565b6101b06101ab366004610e83565b610294565b005b6101b06101c0366004610e83565b61043a565b6101686101d3366004610e83565b6105d3565b60335460ff166040519015158152602001610156565b610168610610565b6101b06106d7565b6065546001600160a01b03165b6040516001600160a01b039091168152602001610156565b6101b0610231366004610e83565b61073d565b61016860985481565b6101b061024d366004610e83565b610a06565b610168610260366004610e83565b610bd8565b609a5461020b906001600160a01b031681565b61016860995481565b6101b061028f366004610e38565b610c0f565b336000908152609b602052604090208161030b5760405162461bcd60e51b815260206004820152602d60248201527f5374616b696e67506f6f6c55736572496d706c3a20696e76616c696420616d6f60448201526c756e74206f662073686172657360981b60648201526084015b60405180910390fd5b81816001015410156103705760405162461bcd60e51b815260206004820152602860248201527f5374616b696e67506f6f6c55736572496d706c3a20696e73756666696369656e604482015267742073686172657360c01b6064820152608401610302565b818160010160008282546103849190610fae565b9091555060009050610395836105d3565b905082609760008282546103a99190610fae565b9250508190555080609860008282546103c29190610fae565b90915550508154819083906000906103db908490610f55565b9250508190555080609960008282546103f49190610f55565b9091555050604080518281526020810185905233917ff960dbf9e5d0682f7a298ed974e33a28b4464914b7a2bfac12ae419a9afeb28091015b60405180910390a2505050565b336000908152609b6020526040902080546104ab5760405162461bcd60e51b815260206004820152602b60248201527f5374616b696e67506f6f6c55736572496d706c3a206e6f2062616c616e63652060448201526a746f20776974686472617760a81b6064820152608401610302565b818160000160008282546104bf9190610fae565b9250508190555081609960008282546104d89190610fae565b909155505060405163a9059cbb60e01b8152336004820152602481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb90604401602060405180830381600087803b15801561054557600080fd5b505af1158015610559573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061057d9190610e61565b6105995760405162461bcd60e51b815260040161030290610eb5565b60405182815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364906020015b60405180910390a25050565b6000609754600014156105ef576105e982610cda565b92915050565b6105e960975461060a60985485610d0e90919063ffffffff16565b90610d48565b336000908152609b6020526040808220805491516370a0823160e01b815230600482015290919083906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a082319060240160206040518083038186803b15801561068557600080fd5b505afa158015610699573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106bd9190610e9c565b9050818110156106cd57806106cf565b815b935050505090565b6065546001600160a01b031633146107315760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610302565b61073b6000610d8b565b565b60335460ff16156107835760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610302565b336000908152609b60205260409020816107af5760405162461bcd60e51b815260040161030290610f03565b80548211156108265760405162461bcd60e51b815260206004820152603c60248201527f5374616b696e67506f6f6c55736572496d706c3a206e6f7420656e6f7567682060448201527f746f6b656e7320617661696c61626c6520666f72207374616b696e67000000006064820152608401610302565b7f000000000000000000000000000000000000000000000000000000000000000081600201546108569190610f55565b4210156108d65760405162461bcd60e51b815260206004820152604260248201527f5374616b696e67506f6f6c55736572496d706c3a206e6f7420656e6f7567682060448201527f74696d6520686173207061737365642073696e6365206c617374206465706f736064820152611a5d60f21b608482015260a401610302565b60006108e183610bd8565b9050600081116109515760405162461bcd60e51b815260206004820152603560248201527f5374616b696e67506f6f6c55736572496d706c3a207374616b65206e6f7420656044820152746e6f75676820746f20656d6974203120736861726560581b6064820152608401610302565b808260010160008282546109659190610f55565b909155505081548390839060009061097e908490610fae565b9250508190555082609860008282546109979190610f55565b9250508190555080609760008282546109b09190610f55565b9250508190555082609960008282546109c99190610fae565b9091555050604080518481526020810183905233917f5af417134f72a9d41143ace85b0a26dce6f550f894f2cbc1eeee8810603d91b6910161042d565b60335460ff1615610a4c5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610302565b60008111610a6c5760405162461bcd60e51b815260040161030290610f03565b336000908152609b60205260408120805490918391839190610a8f908490610f55565b909155505042600282015560998054839190600090610aaf908490610f55565b90915550506040516323b872dd60e01b8152336004820152306024820152604481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd90606401602060405180830381600087803b158015610b2257600080fd5b505af1158015610b36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b5a9190610e61565b610b765760405162461bcd60e51b815260040161030290610eb5565b337f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1583610bc37f000000000000000000000000000000000000000000000000000000000000000042610f55565b604080519283526020830191909152016105c7565b600060985460001415610bee576105e982610ddd565b6105e9609854610c0960975485610ded90919063ffffffff16565b90610e15565b6065546001600160a01b03163314610c695760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610302565b6001600160a01b038116610cce5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610302565b610cd781610d8b565b50565b600080610cec6002633b9aca00610f6d565b9050633b9aca00610cfd8483610f55565b610d079190610f6d565b9392505050565b60006b033b2e3c9fd0803ce8000000610d278385610f8f565b610d3e60026b033b2e3c9fd0803ce8000000610f6d565b610cfd9190610f55565b600080610d56600284610f6d565b905082610d6f6b033b2e3c9fd0803ce800000086610f8f565b610d799083610f55565b610d839190610f6d565b949350505050565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006105e9633b9aca0083610f8f565b6000670de0b6b3a7640000610e028385610f8f565b610d3e6002670de0b6b3a7640000610f6d565b600080610e23600284610f6d565b905082610d6f670de0b6b3a764000086610f8f565b600060208284031215610e4a57600080fd5b81356001600160a01b0381168114610d0757600080fd5b600060208284031215610e7357600080fd5b81518015158114610d0757600080fd5b600060208284031215610e9557600080fd5b5035919050565b600060208284031215610eae57600080fd5b5051919050565b6020808252602e908201527f5374616b696e67506f6f6c55736572496d706c3a206661696c656420746f207460408201526d72616e7366657220746f6b656e7360901b606082015260800190565b60208082526032908201527f5374616b696e67506f6f6c55736572496d706c3a20616d6f756e74206d75737460408201527102062652067726561746572207468616e20360741b606082015260800190565b60008219821115610f6857610f68610fc5565b500190565b600082610f8a57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615610fa957610fa9610fc5565b500290565b600082821015610fc057610fc0610fc5565b500390565b634e487b7160e01b600052601160045260246000fdfea264697066735822122005dd731c383c5470328fdfd9b5fb63e78eb53f72aa5f507f631c67b95028fbd364736f6c63430008070033", "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061010b5760003560e01c8063715018a6116100a2578063b6b55f2511610071578063b6b55f251461023f578063b811540e14610252578063c56551b614610265578063e366b7bb14610278578063f2fde38b1461028157600080fd5b8063715018a6146101f65780638da5cb5b146101fe578063a694fc3a14610223578063aa8c217c1461023657600080fd5b80632e1a7d4d116100de5780632e1a7d4d146101b2578063555d8ebb146101c55780635c975abb146101d8578063710fe6f8146101ee57600080fd5b80630103c92b1461011057806303314efa1461015f5780630d668087146101765780632e17de781461019d575b600080fd5b61013f61011e366004610e38565b609b6020526000908152604090208054600182015460029092015490919083565b604080519384526020840192909252908201526060015b60405180910390f35b61016860975481565b604051908152602001610156565b6101687f000000000000000000000000000000000000000000000000000000000000000081565b6101b06101ab366004610e83565b610294565b005b6101b06101c0366004610e83565b61043a565b6101686101d3366004610e83565b6105d3565b60335460ff166040519015158152602001610156565b610168610610565b6101b06106d7565b6065546001600160a01b03165b6040516001600160a01b039091168152602001610156565b6101b0610231366004610e83565b61073d565b61016860985481565b6101b061024d366004610e83565b610a06565b610168610260366004610e83565b610bd8565b609a5461020b906001600160a01b031681565b61016860995481565b6101b061028f366004610e38565b610c0f565b336000908152609b602052604090208161030b5760405162461bcd60e51b815260206004820152602d60248201527f5374616b696e67506f6f6c55736572496d706c3a20696e76616c696420616d6f60448201526c756e74206f662073686172657360981b60648201526084015b60405180910390fd5b81816001015410156103705760405162461bcd60e51b815260206004820152602860248201527f5374616b696e67506f6f6c55736572496d706c3a20696e73756666696369656e604482015267742073686172657360c01b6064820152608401610302565b818160010160008282546103849190610fae565b9091555060009050610395836105d3565b905082609760008282546103a99190610fae565b9250508190555080609860008282546103c29190610fae565b90915550508154819083906000906103db908490610f55565b9250508190555080609960008282546103f49190610f55565b9091555050604080518281526020810185905233917ff960dbf9e5d0682f7a298ed974e33a28b4464914b7a2bfac12ae419a9afeb28091015b60405180910390a2505050565b336000908152609b6020526040902080546104ab5760405162461bcd60e51b815260206004820152602b60248201527f5374616b696e67506f6f6c55736572496d706c3a206e6f2062616c616e63652060448201526a746f20776974686472617760a81b6064820152608401610302565b818160000160008282546104bf9190610fae565b9250508190555081609960008282546104d89190610fae565b909155505060405163a9059cbb60e01b8152336004820152602481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb90604401602060405180830381600087803b15801561054557600080fd5b505af1158015610559573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061057d9190610e61565b6105995760405162461bcd60e51b815260040161030290610eb5565b60405182815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364906020015b60405180910390a25050565b6000609754600014156105ef576105e982610cda565b92915050565b6105e960975461060a60985485610d0e90919063ffffffff16565b90610d48565b336000908152609b6020526040808220805491516370a0823160e01b815230600482015290919083906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a082319060240160206040518083038186803b15801561068557600080fd5b505afa158015610699573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106bd9190610e9c565b9050818110156106cd57806106cf565b815b935050505090565b6065546001600160a01b031633146107315760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610302565b61073b6000610d8b565b565b60335460ff16156107835760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610302565b336000908152609b60205260409020816107af5760405162461bcd60e51b815260040161030290610f03565b80548211156108265760405162461bcd60e51b815260206004820152603c60248201527f5374616b696e67506f6f6c55736572496d706c3a206e6f7420656e6f7567682060448201527f746f6b656e7320617661696c61626c6520666f72207374616b696e67000000006064820152608401610302565b7f000000000000000000000000000000000000000000000000000000000000000081600201546108569190610f55565b4210156108d65760405162461bcd60e51b815260206004820152604260248201527f5374616b696e67506f6f6c55736572496d706c3a206e6f7420656e6f7567682060448201527f74696d6520686173207061737365642073696e6365206c617374206465706f736064820152611a5d60f21b608482015260a401610302565b60006108e183610bd8565b9050600081116109515760405162461bcd60e51b815260206004820152603560248201527f5374616b696e67506f6f6c55736572496d706c3a207374616b65206e6f7420656044820152746e6f75676820746f20656d6974203120736861726560581b6064820152608401610302565b808260010160008282546109659190610f55565b909155505081548390839060009061097e908490610fae565b9250508190555082609860008282546109979190610f55565b9250508190555080609760008282546109b09190610f55565b9250508190555082609960008282546109c99190610fae565b9091555050604080518481526020810183905233917f5af417134f72a9d41143ace85b0a26dce6f550f894f2cbc1eeee8810603d91b6910161042d565b60335460ff1615610a4c5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610302565b60008111610a6c5760405162461bcd60e51b815260040161030290610f03565b336000908152609b60205260408120805490918391839190610a8f908490610f55565b909155505042600282015560998054839190600090610aaf908490610f55565b90915550506040516323b872dd60e01b8152336004820152306024820152604481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd90606401602060405180830381600087803b158015610b2257600080fd5b505af1158015610b36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b5a9190610e61565b610b765760405162461bcd60e51b815260040161030290610eb5565b337f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1583610bc37f000000000000000000000000000000000000000000000000000000000000000042610f55565b604080519283526020830191909152016105c7565b600060985460001415610bee576105e982610ddd565b6105e9609854610c0960975485610ded90919063ffffffff16565b90610e15565b6065546001600160a01b03163314610c695760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610302565b6001600160a01b038116610cce5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610302565b610cd781610d8b565b50565b600080610cec6002633b9aca00610f6d565b9050633b9aca00610cfd8483610f55565b610d079190610f6d565b9392505050565b60006b033b2e3c9fd0803ce8000000610d278385610f8f565b610d3e60026b033b2e3c9fd0803ce8000000610f6d565b610cfd9190610f55565b600080610d56600284610f6d565b905082610d6f6b033b2e3c9fd0803ce800000086610f8f565b610d799083610f55565b610d839190610f6d565b949350505050565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006105e9633b9aca0083610f8f565b6000670de0b6b3a7640000610e028385610f8f565b610d3e6002670de0b6b3a7640000610f6d565b600080610e23600284610f6d565b905082610d6f670de0b6b3a764000086610f8f565b600060208284031215610e4a57600080fd5b81356001600160a01b0381168114610d0757600080fd5b600060208284031215610e7357600080fd5b81518015158114610d0757600080fd5b600060208284031215610e9557600080fd5b5035919050565b600060208284031215610eae57600080fd5b5051919050565b6020808252602e908201527f5374616b696e67506f6f6c55736572496d706c3a206661696c656420746f207460408201526d72616e7366657220746f6b656e7360901b606082015260800190565b60208082526032908201527f5374616b696e67506f6f6c55736572496d706c3a20616d6f756e74206d75737460408201527102062652067726561746572207468616e20360741b606082015260800190565b60008219821115610f6857610f68610fc5565b500190565b600082610f8a57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615610fa957610fa9610fc5565b500290565b600082821015610fc057610fc0610fc5565b500390565b634e487b7160e01b600052601160045260246000fdfea264697066735822122005dd731c383c5470328fdfd9b5fb63e78eb53f72aa5f507f631c67b95028fbd364736f6c63430008070033", "linkReferences": {}, "deployedLinkReferences": {}, "devdoc": { "kind": "dev", "methods": { "constructor": { "details": "Constructor", "params": { "_ctsi": "The contract that provides the staking pool's token", "_lockTime": "The user deposit lock period" } }, "getWithdrawBalance()": { "details": "there is no way to know the exact time in the future the requested tokens will be available", "returns": { "_0": "the amount of tokens that can be immediately withdrawn by the calling user" } }, "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." }, "stake(uint256)": { "params": { "_amount": "amount of tokens to convert from user's balance" } }, "transferOwnership(address)": { "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." }, "withdraw(uint256)": { "details": "this will transfer all free tokens for the calling user" } }, "version": 1 }, "userdoc": { "events": { "Deposit(address,uint256,uint256)": { "notice": "Tokens were deposited, available for staking or withdrawal" }, "Stake(address,uint256,uint256)": { "notice": "Tokens were deposited, they count as shares immediatly" }, "Unstake(address,uint256,uint256)": { "notice": "Request to unstake tokens. Additional liquidity requested for the pool" }, "Withdraw(address,uint256)": { "notice": "Withdraw performed by a user" } }, "kind": "user", "methods": { "getWithdrawBalance()": { "notice": "Returns the amount of tokens that can be immediately withdrawn by the calling user" }, "stake(uint256)": { "notice": "Stake an amount of tokens, immediately earning pool shares in returns" }, "unstake(uint256)": { "notice": "allow for users to defined exactly how many shares they want to unstake. Estimated value is then emitted on Unstake event" }, "withdraw(uint256)": { "notice": "Transfer tokens back to calling user wallet" } }, "version": 1 }, "evm": { "gasEstimates": { "creation": { "codeDepositCost": "822600", "executionCost": "infinite", "totalCost": "infinite" }, "external": { "amount()": "2384", "amountToShares(uint256)": "infinite", "deposit(uint256)": "infinite", "getWithdrawBalance()": "infinite", "lockTime()": "infinite", "owner()": "2365", "paused()": "2359", "pos()": "2403", "renounceOwnership()": "28140", "requiredLiquidity()": "2383", "shares()": "2341", "sharesToAmount(uint256)": "infinite", "stake(uint256)": "infinite", "transferOwnership(address)": "28387", "unstake(uint256)": "infinite", "userBalance(address)": "6772", "withdraw(uint256)": "infinite" } }, "methodIdentifiers": { "amount()": "aa8c217c", "amountToShares(uint256)": "b811540e", "deposit(uint256)": "b6b55f25", "getWithdrawBalance()": "710fe6f8", "lockTime()": "0d668087", "owner()": "8da5cb5b", "paused()": "5c975abb", "pos()": "c56551b6", "renounceOwnership()": "715018a6", "requiredLiquidity()": "e366b7bb", "shares()": "03314efa", "sharesToAmount(uint256)": "555d8ebb", "stake(uint256)": "a694fc3a", "transferOwnership(address)": "f2fde38b", "unstake(uint256)": "2e17de78", "userBalance(address)": "0103c92b", "withdraw(uint256)": "2e1a7d4d" } } }