tokens/StakableERC20.vy #
vyper:
0.2.10
Events #
Transfer
sender
: address, indexedreceiver
: address, indexedvalue
: uint256, notIndexed
Approval
owner
: address, indexedspender
: address, indexedvalue
: uint256, notIndexed
Deprecate
account
: address, indexed
Reward
id
: uint256, notIndexedamount
: uint256, notIndexed
Methods #
ABI #
[
{
"name": "Transfer",
"inputs": [
{
"name": "sender",
"type": "address",
"indexed": true
},
{
"name": "receiver",
"type": "address",
"indexed": true
},
{
"name": "value",
"type": "uint256",
"indexed": false
}
],
"anonymous": false,
"type": "event"
},
{
"name": "Approval",
"inputs": [
{
"name": "owner",
"type": "address",
"indexed": true
},
{
"name": "spender",
"type": "address",
"indexed": true
},
{
"name": "value",
"type": "uint256",
"indexed": false
}
],
"anonymous": false,
"type": "event"
},
{
"name": "Deprecate",
"inputs": [
{
"name": "account",
"type": "address",
"indexed": true
}
],
"anonymous": false,
"type": "event"
},
{
"name": "Reward",
"inputs": [
{
"name": "id",
"type": "uint256",
"indexed": false
},
{
"name": "amount",
"type": "uint256",
"indexed": false
}
],
"anonymous": false,
"type": "event"
},
{
"stateMutability": "nonpayable",
"type": "constructor",
"inputs": [
{
"name": "_name",
"type": "string"
},
{
"name": "_symbol",
"type": "string"
},
{
"name": "_decimals",
"type": "uint256"
}
],
"outputs": []
},
{
"stateMutability": "view",
"type": "function",
"name": "balanceOf",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256"
}
]
},
{
"stateMutability": "view",
"type": "function",
"name": "balanceOf",
"inputs": [
{
"name": "_account",
"type": "address"
}
],
"outputs": [
{
"name": "",
"type": "uint256"
}
]
},
{
"stateMutability": "nonpayable",
"type": "function",
"name": "deposit",
"inputs": [
{
"name": "_account",
"type": "address"
},
{
"name": "_amount",
"type": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "bool"
}
],
"gas": 159480
},
{
"stateMutability": "nonpayable",
"type": "function",
"name": "stake",
"inputs": [
{
"name": "_reward",
"type": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "bool"
}
],
"gas": 135270
},
{
"stateMutability": "nonpayable",
"type": "function",
"name": "withdraw",
"inputs": [
{
"name": "_account",
"type": "address"
}
],
"outputs": [
{
"name": "",
"type": "bool"
}
],
"gas": 121450
},
{
"stateMutability": "nonpayable",
"type": "function",
"name": "approve",
"inputs": [
{
"name": "_spender",
"type": "address"
},
{
"name": "_amount",
"type": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "bool"
}
],
"gas": 39711
},
{
"stateMutability": "nonpayable",
"type": "function",
"name": "transfer",
"inputs": [
{
"name": "_recipient",
"type": "address"
},
{
"name": "_amount",
"type": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "bool"
}
],
"gas": 241356
},
{
"stateMutability": "nonpayable",
"type": "function",
"name": "transferFrom",
"inputs": [
{
"name": "_sender",
"type": "address"
},
{
"name": "_recipient",
"type": "address"
},
{
"name": "_amount",
"type": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "bool"
}
],
"gas": 281985
},
{
"stateMutability": "view",
"type": "function",
"name": "totalSupply",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"gas": 2271
},
{
"stateMutability": "nonpayable",
"type": "function",
"name": "transferOwnership",
"inputs": [
{
"name": "_newOwner",
"type": "address"
}
],
"outputs": [],
"gas": 36628
},
{
"stateMutability": "nonpayable",
"type": "function",
"name": "setAdmin",
"inputs": [
{
"name": "_newAdmin",
"type": "address"
}
],
"outputs": [],
"gas": 37505
},
{
"stateMutability": "nonpayable",
"type": "function",
"name": "deprecate",
"inputs": [],
"outputs": [],
"gas": 38454
},
{
"stateMutability": "view",
"type": "function",
"name": "owner",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address"
}
],
"gas": 1418
},
{
"stateMutability": "view",
"type": "function",
"name": "admin",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address"
}
],
"gas": 1448
},
{
"stateMutability": "view",
"type": "function",
"name": "name",
"inputs": [],
"outputs": [
{
"name": "",
"type": "string"
}
],
"gas": 6903
},
{
"stateMutability": "view",
"type": "function",
"name": "symbol",
"inputs": [],
"outputs": [
{
"name": "",
"type": "string"
}
],
"gas": 6933
},
{
"stateMutability": "view",
"type": "function",
"name": "decimals",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"gas": 1538
},
{
"stateMutability": "view",
"type": "function",
"name": "isDeprecated",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bool"
}
],
"gas": 1568
},
{
"stateMutability": "view",
"type": "function",
"name": "percents",
"inputs": [
{
"name": "arg0",
"type": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"gas": 1707
},
{
"stateMutability": "view",
"type": "function",
"name": "percentsLength",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"gas": 1628
},
{
"stateMutability": "view",
"type": "function",
"name": "deposits",
"inputs": [
{
"name": "arg0",
"type": "address"
}
],
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"gas": 1873
},
{
"stateMutability": "view",
"type": "function",
"name": "rewardIndexForAccount",
"inputs": [
{
"name": "arg0",
"type": "address"
}
],
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"gas": 1903
},
{
"stateMutability": "view",
"type": "function",
"name": "allowance",
"inputs": [
{
"name": "arg0",
"type": "address"
},
{
"name": "arg1",
"type": "address"
}
],
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"gas": 2148
}
]
Byte code #
0x6060611ab06101403960406020611ab060c03960c051611ab0016101a03960206020611ab060c03960c05160040135111561003957600080fd5b602860206020611ab00160c03960c051611ab00161020039600860206020611ab00160c03960c05160040135111561007057600080fd5b6101a080600260c052602060c020602082510161012060006002818352015b826101205160200211156100a2576100c4565b61012051602002850151610120518501555b815160010180835281141561008f575b50505050505061020080600360c052602060c020602082510161012060006002818352015b826101205160200211156100fc5761011e565b61012051602002850151610120518501555b81516001018083528114156100e9575b5050505050506101805160045564e8d4a51000600660c052602060c02055600160075533600055611a9856600436101561000d5761108e565b600035601c52600051341561002157600080fd5b63722713f7811415610037573361014052610068565b6370a082318114156100635760043560a01c1561005357600080fd5b6020600461014037600050610068565b610096565b6101405161014051610160526101605160065801611094565b6101c052610140526101c05160005260206000f35b6347e7ef248114156103f95760043560a01c156100b257600080fd5b3360005414156100c35760016100c9565b33600154145b1515610114576308c379a0610140526020610160526013610180527f6f776e6572206f722061646d696e206f6e6c79000000000000000000000000006101a05261018050606461015cfd5b600554151515610163576308c379a061014052602061016052600a610180527f64657072656361746564000000000000000000000000000000000000000000006101a05261018050606461015cfd5b60006024351115156101b4576308c379a061014052602061016052600b610180527f616d6f756e7420697320300000000000000000000000000000000000000000006101a05261018050606461015cfd5b600060043514151515610206576308c379a061014052602061016052600c610180527f7a65726f206164647265737300000000000000000000000000000000000000006101a05261018050606461015cfd5b600c54610140526101405160243581818301101561022357600080fd5b80820190509050600c55600860043560e05260c052604060c02054610160526101605115156102cc576101405161016051600435610180526101805160065801611094565b6101e05261016052610140526101e051600b60043560e05260c052604060c0205560075460018082101561029b57600080fd5b80820390509050600960043560e05260c052604060c02055602435600860043560e05260c052604060c020556103bb565b600960043560e05260c052604060c02054610180526007546001808210156102f357600080fd5b80820390509050610180511415610337576101605160243581818301101561031a57600080fd5b80820190509050600860043560e05260c052604060c020556103bb565b6101405161016051610180516004356101a0526101a05160065801611094565b6102005261018052610160526101405261020051600b60043560e05260c052604060c0205560075460018082101561038e57600080fd5b80820390509050600960043560e05260c052604060c02055602435600860043560e05260c052604060c020555b6024356101805260043560007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020610180a3600160005260206000f35b63a694fc3a8114156107345733600054141561041657600161041c565b33600154145b1515610467576308c379a0610140526020610160526013610180527f6f776e6572206f722061646d696e206f6e6c79000000000000000000000000006101a05261018050606461015cfd5b6005541515156104b6576308c379a061014052602061016052600a610180527f64657072656361746564000000000000000000000000000000000000000000006101a05261018050606461015cfd5b6000600435111515610507576308c379a061014052602061016052600b610180527f72657761726420697320300000000000000000000000000000000000000000006101a05261018050606461015cfd5b600d5461014052600c546101605260075461018052610140511515610589576101805160018082101561053957600080fd5b80820390509050670de0b6b3a7640000811061055457600080fd5b600660c052602060c020015461018051670de0b6b3a7640000811061057857600080fd5b600660c052602060c0200155610696565b6101805160018082101561059c57600080fd5b80820390509050670de0b6b3a764000081106105b757600080fd5b600660c052602060c02001546101a05260043564e8d4a5100080820282158284830414176105e457600080fd5b809050905090506101405180806105fa57600080fd5b82049050905064e8d4a5100081818301101561061557600080fd5b808201905090506101c0526101c0516101a051808202821582848304141761063c57600080fd5b8090509050905064e8d4a510008082049050905061018051670de0b6b3a7640000811061066857600080fd5b600660c052602060c02001556101405160043581818301101561068a57600080fd5b80820190509050610140525b6101805160018181830110156106ab57600080fd5b8082019050905060075561014051610160518181830110156106cc57600080fd5b80820190509050600d556000600c556101805160018181830110156106f057600080fd5b808201905090506101a0526004356101c0527f45cad8c10023de80f4c0672ff6c283b671e11aa93c92b9380cdf060d2790da5260406101a0a1600160005260206000f35b6351cff8d98114156109b15760043560a01c1561075057600080fd5b336000541415610761576001610767565b33600154145b15156107b2576308c379a0610140526020610160526013610180527f6f776e6572206f722061646d696e206f6e6c79000000000000000000000000006101a05261018050606461015cfd5b600554151515610801576308c379a061014052602061016052600a610180527f64657072656361746564000000000000000000000000000000000000000000006101a05261018050606461015cfd5b600860043560e05260c052604060c0205461014052600960043560e05260c052604060c020546101605260075460018082101561083d57600080fd5b808203905090506101605114156108f457600b60043560e05260c052604060c0205461018052600d8054610180518082101561087857600080fd5b80820390509050815550600c8054610140518082101561089757600080fd5b8082039050905081555061018051610140518181830110156108b857600080fd5b808201905090506101c05260006004357fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206101c0a3610980565b6101405161016051610180516004356101a0526101a05160065801611094565b610200526101805261016052610140526102005161018052600d8054610180518082101561094157600080fd5b80820390509050815550610180516101a05260006004357fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206101a0a35b6000600b60043560e05260c052604060c020556000600860043560e05260c052604060c02055600160005260206000f35b63095ea7b3811415610a035760043560a01c156109cd57600080fd5b336101405260043561016052602435610180526101805161016051610140516006580161132f565b600050600160005260206000f35b63a9059cbb811415610a555760043560a01c15610a1f57600080fd5b3361014052600435610160526024356101805261018051610160516101405160065801611496565b600050600160005260206000f35b6323b872dd811415610b675760043560a01c15610a7157600080fd5b60243560a01c15610a8157600080fd5b600060043514151515610ad3576308c379a0610140526020610160526016610180527f73656e646572206973207a65726f2061646472657373000000000000000000006101a05261018050606461015cfd5b60043561014052602435610160526044356101805261018051610160516101405160065801611496565b600050600435610140523361016052600a60043560e05260c052604060c0203360e05260c052604060c0205460443580821015610b3957600080fd5b80820390509050610180526101805161016051610140516006580161132f565b600050600160005260206000f35b6318160ddd811415610b9857600d54600c54818183011015610b8857600080fd5b8082019050905060005260206000f35b63f2fde38b811415610c5e5760043560a01c15610bb457600080fd5b33600054141515610c04576308c379a061014052602061016052600a610180527f6f776e6572206f6e6c79000000000000000000000000000000000000000000006101a05261018050606461015cfd5b600060043514151515610c56576308c379a061014052602061016052600c610180527f7a65726f206164647265737300000000000000000000000000000000000000006101a05261018050606461015cfd5b600435600055005b63704b6c02811415610d365760043560a01c15610c7a57600080fd5b336000541415610c8b576001610c91565b33600154145b1515610cdc576308c379a0610140526020610160526013610180527f6f776e6572206f722061646d696e206f6e6c79000000000000000000000000006101a05261018050606461015cfd5b600060043514151515610d2e576308c379a061014052602061016052600c610180527f7a65726f206164647265737300000000000000000000000000000000000000006101a05261018050606461015cfd5b600435600155005b630fcc0c28811415610dd257336000541415610d53576001610d59565b33600154145b1515610da4576308c379a0610140526020610160526013610180527f6f6e6c79206f776e6572206f722061646d696e000000000000000000000000006101a05261018050606461015cfd5b6001600555337fcc358699805e9a8b7f77b522628c7cb9abd07d9efb86b6fb616af1609036a99e60006000a2005b638da5cb5b811415610dea5760005460005260206000f35b63f851a440811415610e025760015460005260206000f35b6306fdde03811415610ea75760028060c052602060c020610180602082540161012060006002818352015b82610120516020021115610e4057610e62565b61012051850154610120516020028501525b8151600101808352811415610e2d575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f35b6395d89b41811415610f4c5760038060c052602060c020610180602082540161012060006002818352015b82610120516020021115610ee557610f07565b61012051850154610120516020028501525b8151600101808352811415610ed2575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f35b63313ce567811415610f645760045460005260206000f35b63c7178230811415610f7c5760055460005260206000f35b638db1342d811415610fb457600435670de0b6b3a76400008110610f9f57600080fd5b600660c052602060c020015460005260206000f35b630eef161a811415610fcc5760075460005260206000f35b63fc7e286d8114156110025760043560a01c15610fe857600080fd5b600860043560e05260c052604060c0205460005260206000f35b63fab3ea8a8114156110385760043560a01c1561101e57600080fd5b600960043560e05260c052604060c0205460005260206000f35b63dd62ed3e81141561108c5760043560a01c1561105457600080fd5b60243560a01c1561106457600080fd5b600a60043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f35b505b60006000fd5b6101605261014052600b6101405160e05260c052604060c020546101805260086101405160e05260c052604060c020546101a0526007546101c0526101805115156110e3576101a051156110e6565b60005b156110f957600060005260005161016051565b60096101405160e05260c052604060c020546101e0526101c05160018082101561112257600080fd5b808203905090506101e051141561115d57610180516101a05181818301101561114a57600080fd5b8082019050905060005260005161016051565b6101a0511515611205576101c05160018082101561117a57600080fd5b80820390509050670de0b6b3a7640000811061119557600080fd5b600660c052602060c02001546101805180820282158284830414176111b957600080fd5b809050905090506101e051670de0b6b3a764000081106111d857600080fd5b600660c052602060c020015480806111ef57600080fd5b820490509050600052600051610160515661132d565b6101c05160018082101561121857600080fd5b80820390509050670de0b6b3a7640000811061123357600080fd5b600660c052602060c0200154610200526101a05161020051808202821582848304141761125f57600080fd5b809050905090506101e051600181818301101561127b57600080fd5b80820190509050670de0b6b3a7640000811061129657600080fd5b600660c052602060c020015480806112ad57600080fd5b820490509050610180516102005180820282158284830414176112cf57600080fd5b809050905090506101e051670de0b6b3a764000081106112ee57600080fd5b600660c052602060c0200154808061130557600080fd5b82049050905081818301101561131a57600080fd5b8082019050905060005260005161016051565b005b6101a05261014052610160526101805260055415151561138e576308c379a06101c05260206101e052600a610200527f6465707265636174656400000000000000000000000000000000000000000000610220526102005060646101dcfd5b600061014051141515156113e1576308c379a06101c05260206101e0526015610200527f6f776e6572206973207a65726f20616464726573730000000000000000000000610220526102005060646101dcfd5b60006101605114151515611434576308c379a06101c05260206101e0526017610200527f7370656e646572206973207a65726f2061646472657373000000000000000000610220526102005060646101dcfd5b61018051600a6101405160e05260c052604060c0206101605160e05260c052604060c02055610180516101c05261016051610140517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560206101c0a36101a051565b6101a0526101405261016052610180526005541515156114f5576308c379a06101c05260206101e052600a610200527f6465707265636174656400000000000000000000000000000000000000000000610220526102005060646101dcfd5b60006101605114151515611548576308c379a06101c05260206101e0526019610200527f726563697069656e74206973207a65726f206164647265737300000000000000610220526102005060646101dcfd5b60086101405160e05260c052604060c020546101c05260096101405160e05260c052604060c020546101e052600754610200526000610220526101c05115156115925760016115b3565b610200516001808210156115a557600080fd5b808203905090506101e05114155b15611684576101405161016051610180516101a0516101c0516101e051610200516102205161014051610240526102405160065801611094565b6102a05261022052610200526101e0526101c0526101a0526101805261016052610140526102a051610180518082101561162657600080fd5b80820390509050600b6101405160e05260c052604060c020556102005160018082101561165257600080fd5b8082039050905060096101405160e05260c052604060c02055600060086101405160e05260c052604060c0205561173f565b6101c051610180511115156116ce576101c05161018051808210156116a857600080fd5b8082039050905060086101405160e05260c052604060c02055610180516102205261173f565b600b6101405160e05260c052604060c02054610180516101c051808210156116f557600080fd5b808203905090508082101561170957600080fd5b80820390509050600b6101405160e05260c052604060c02055600060086101405160e05260c052604060c020556101c051610220525b60086101605160e05260c052604060c020546101c05260096101605160e05260c052604060c020546101e0526101c051151561177c57600161179d565b6102005160018082101561178f57600080fd5b808203905090506101e05114155b1561188a576101405161016051610180516101a0516101c0516101e051610200516102205161016051610240526102405160065801611094565b6102a05261022052610200526101e0526101c0526101a0526101805261016052610140526102a05161018051610220518082101561181457600080fd5b8082039050905081818301101561182a57600080fd5b80820190509050600b6101605160e05260c052604060c020556102005160018082101561185657600080fd5b8082039050905060096101605160e05260c052604060c020556102205160086101605160e05260c052604060c02055611911565b600b6101605160e05260c052604060c020546101805161022051808210156118b157600080fd5b808203905090508181830110156118c757600080fd5b80820190509050600b6101605160e05260c052604060c020556101c051610220518181830110156118f757600080fd5b8082019050905060086101605160e05260c052604060c020555b610180516102405261016051610140517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020610240a36101a051565b61014a611a980361014a60003961014a611a98036000f3