UNPKG

@gooddollar/goodcontracts

Version:
2 lines (1 loc) 9.32 kB
{"contractName":"AbstractGoodStaking","abi":[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"intrestToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"intrestTokenValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokenValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokenPrecisionLoss","type":"uint256"}],"name":"InterestCollected","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"staker","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"remainingBalance","type":"uint256"}],"name":"StakeWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"staker","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Staked","type":"event"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakers","outputs":[{"internalType":"uint256","name":"stakedToken","type":"uint256"},{"internalType":"uint256","name":"lastStake","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdrawStake","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"currentTokenWorth","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"currentUBIInterest","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"collectUBIInterest","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint32","name":"","type":"uint32"}],"payable":false,"stateMutability":"nonpayable","type":"function"}],"metadata":"{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"intrestToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"intrestTokenValue\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenValue\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenPrecisionLoss\",\"type\":\"uint256\"}],\"name\":\"InterestCollected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"remainingBalance\",\"type\":\"uint256\"}],\"name\":\"StakeWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Staked\",\"type\":\"event\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"collectUBIInterest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentTokenWorth\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentUBIInterest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stake\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"stakers\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"stakedToken\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastStake\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"withdrawStake\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"collectUBIInterest(address)\":{\"details\":\"collect gained interest by fundmanager\",\"params\":{\"recipient\":\"of intrestToken gains\"},\"return\":\"Intrest gained on lending the tokens.Intrest gained on lending the tokens in terms of token rate.Token's precision loss due to decimal difference.average intrest donation ratio.\"},\"currentTokenWorth()\":{\"details\":\"calculates the holding of intrestToken by staking contract in terms of token value.\",\"return\":\"It will return the token worth of intrest token that contract is holding.\"},\"currentUBIInterest()\":{\"details\":\"calculates the tokenGain, intrestTokenGain and precisionLossToken\",\"return\":\"Intrest gained on lending the tokens.Intrest gained on lending the tokens in terms of token rate.Token's precision loss due to decimal difference.\"},\"stake(uint256)\":{\"details\":\"stake some tokens\",\"params\":{\"amount\":\"of Tokens to stake\"}},\"withdrawStake()\":{\"details\":\"withdraw staked tokens\"}},\"title\":\"Abstract contract that holds all the data, events and functions for staking contract. The staking contract will inherit this interface\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/stakingModel/contracts/AbstractGoodStaking.sol\":\"AbstractGoodStaking\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/stakingModel/contracts/AbstractGoodStaking.sol\":{\"keccak256\":\"0xc643ae3414da5106369e6ccef59e2d48cddf24a84a4c1d19aeba40f40e3e04c6\",\"urls\":[\"bzz-raw://c60810ba3a3a92532ddd129c99ad727dc23d6f8fe94050796bde02f5f54cc21a\",\"dweb:/ipfs/QmQ92c7u8vi5Dc56MqeVx6hJsEjx3GFgBC47hKMHzbVwij\"]}},\"version\":1}","sourceMap":"184:3472:20:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;184:3472:20;;;;;;;","compiler":{"name":"solc","version":"0.5.16+commit.9c3226ce.Emscripten.clang"},"networks":{},"schemaVersion":"3.2.2","updatedAt":"2021-08-23T07:33:52.216Z","devdoc":{"methods":{"collectUBIInterest(address)":{"details":"collect gained interest by fundmanager","params":{"recipient":"of intrestToken gains"},"return":"Intrest gained on lending the tokens.Intrest gained on lending the tokens in terms of token rate.Token's precision loss due to decimal difference.average intrest donation ratio."},"currentTokenWorth()":{"details":"calculates the holding of intrestToken by staking contract in terms of token value.","return":"It will return the token worth of intrest token that contract is holding."},"currentUBIInterest()":{"details":"calculates the tokenGain, intrestTokenGain and precisionLossToken","return":"Intrest gained on lending the tokens.Intrest gained on lending the tokens in terms of token rate.Token's precision loss due to decimal difference."},"stake(uint256)":{"details":"stake some tokens","params":{"amount":"of Tokens to stake"}},"withdrawStake()":{"details":"withdraw staked tokens"}},"title":"Abstract contract that holds all the data, events and functions for staking contract. The staking contract will inherit this interface"}}