Curve Staker

stakers/CurveStaker.vy #

vyper: 0.2.10

Events #

CommitOwnership

  • owner : address, notIndexed

ApplyOwnership

  • owner : address, notIndexed

Methods #

ABI #

[
  {
    "name": "CommitOwnership",
    "inputs": [
      {
        "name": "owner",
        "type": "address",
        "indexed": false
      }
    ],
    "anonymous": false,
    "type": "event"
  },
  {
    "name": "ApplyOwnership",
    "inputs": [
      {
        "name": "owner",
        "type": "address",
        "indexed": false
      }
    ],
    "anonymous": false,
    "type": "event"
  },
  {
    "stateMutability": "nonpayable",
    "type": "constructor",
    "inputs": [
      {
        "name": "_stakeContract",
        "type": "address"
      },
      {
        "name": "_stakeToken",
        "type": "address"
      },
      {
        "name": "_rewardToken",
        "type": "address"
      },
      {
        "name": "_votingEscrowContract",
        "type": "address"
      }
    ],
    "outputs": []
  },
  {
    "stateMutability": "nonpayable",
    "type": "function",
    "name": "setLockingPeriod",
    "inputs": [
      {
        "name": "_lockingPeriod",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "gas": 36328
  },
  {
    "stateMutability": "nonpayable",
    "type": "function",
    "name": "setReaperStrategy",
    "inputs": [
      {
        "name": "_reaperStrategy",
        "type": "address"
      }
    ],
    "outputs": [],
    "gas": 36401
  },
  {
    "stateMutability": "nonpayable",
    "type": "function",
    "name": "stake",
    "inputs": [
      {
        "name": "_amount",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "gas": 60372
  },
  {
    "stateMutability": "nonpayable",
    "type": "function",
    "name": "unstake",
    "inputs": [
      {
        "name": "_amount",
        "type": "uint256"
      }
    ],
    "outputs": []
  },
  {
    "stateMutability": "nonpayable",
    "type": "function",
    "name": "unstake",
    "inputs": [
      {
        "name": "_amount",
        "type": "uint256"
      },
      {
        "name": "_recipient",
        "type": "address"
      }
    ],
    "outputs": []
  },
  {
    "stateMutability": "nonpayable",
    "type": "function",
    "name": "claim",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ]
  },
  {
    "stateMutability": "nonpayable",
    "type": "function",
    "name": "claim",
    "inputs": [
      {
        "name": "_recipient",
        "type": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ]
  },
  {
    "stateMutability": "nonpayable",
    "type": "function",
    "name": "depositToEscrow",
    "inputs": [
      {
        "name": "_crvValue",
        "type": "uint256"
      }
    ],
    "outputs": []
  },
  {
    "stateMutability": "nonpayable",
    "type": "function",
    "name": "depositToEscrow",
    "inputs": [
      {
        "name": "_crvValue",
        "type": "uint256"
      },
      {
        "name": "_renewal",
        "type": "bool"
      }
    ],
    "outputs": []
  },
  {
    "stateMutability": "nonpayable",
    "type": "function",
    "name": "withdrawFromEscrow",
    "inputs": [],
    "outputs": [],
    "gas": 80438
  },
  {
    "stateMutability": "nonpayable",
    "type": "function",
    "name": "transferOwnership",
    "inputs": [
      {
        "name": "_futureOwner",
        "type": "address"
      }
    ],
    "outputs": [],
    "gas": 37831
  },
  {
    "stateMutability": "nonpayable",
    "type": "function",
    "name": "applyOwnership",
    "inputs": [],
    "outputs": [],
    "gas": 38687
  },
  {
    "stateMutability": "view",
    "type": "function",
    "name": "reaperStrategy",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address"
      }
    ],
    "gas": 1358
  },
  {
    "stateMutability": "view",
    "type": "function",
    "name": "stakeToken",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address"
      }
    ],
    "gas": 1388
  },
  {
    "stateMutability": "view",
    "type": "function",
    "name": "rewardToken",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address"
      }
    ],
    "gas": 1418
  },
  {
    "stateMutability": "view",
    "type": "function",
    "name": "stakeContract",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address"
      }
    ],
    "gas": 1448
  },
  {
    "stateMutability": "view",
    "type": "function",
    "name": "votingEscrowContract",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address"
      }
    ],
    "gas": 1478
  },
  {
    "stateMutability": "view",
    "type": "function",
    "name": "lockedFundsFor",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "gas": 1723
  },
  {
    "stateMutability": "view",
    "type": "function",
    "name": "lockUntilTimestampFor",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "gas": 1753
  },
  {
    "stateMutability": "view",
    "type": "function",
    "name": "lockingPeriod",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "gas": 1568
  },
  {
    "stateMutability": "view",
    "type": "function",
    "name": "lockUntilTimestamp",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "gas": 1598
  },
  {
    "stateMutability": "view",
    "type": "function",
    "name": "owner",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address"
      }
    ],
    "gas": 1628
  },
  {
    "stateMutability": "view",
    "type": "function",
    "name": "futureOwner",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address"
      }
    ],
    "gas": 1658
  }
]

Byte code #

0x60806110dc6101403960206110dc60c03960c05160a01c1561002057600080fd5b602060206110dc0160c03960c05160a01c1561003b57600080fd5b602060406110dc0160c03960c05160a01c1561005657600080fd5b602060606110dc0160c03960c05160a01c1561007157600080fd5b600061016051141515156100c4576308c379a06101c05260206101e052601c610200527f5374616b65546f6b656e20706172616d20697320726571756972656400000000610220526102005060646101dcfd5b60006101805114151515610117576308c379a06101c05260206101e052601d610200527f526577617264546f6b656e20706172616d206973207265717569726564000000610220526102005060646101dcfd5b6000610140511415151561016a576308c379a06101c05260206101e052601f610200527f5374616b65436f6e747261637420706172616d20697320726571756972656400610220526102005060646101dcfd5b60006101a051141515156101e2576308c379a06101c05260206101e0526026610200527f566f74696e67457363726f77436f6e747261637420706172616d206973207265610220527f7175697265640000000000000000000000000000000000000000000000000000610240526102005060846101dcfd5b6101605160015561018051600255610140516003556101a0516004556301e13380600755336009556110c456600436101561000d57610dbd565b600035601c52600051341561002157600080fd5b6326b321d1811415610115576009543314151561007d576308c379a061014052602061016052600a610180527f6f776e6572206f6e6c79000000000000000000000000000000000000000000006101a05261018050606461015cfd5b60043562278d0011151561009a57630784ce00600435111561009d565b60005b151561010d576308c379a0610140526020610160526021610180527f6d6f6e7468203c3d206c6f636b696e6720706572696f64203c3d2034207965616101a0527f72000000000000000000000000000000000000000000000000000000000000006101c05261018050608461015cfd5b600435600755005b63be7621f38114156101985760043560a01c1561013157600080fd5b60095433141515610181576308c379a061014052602061016052600a610180527f6f776e6572206f6e6c79000000000000000000000000000000000000000000006101a05261018050606461015cfd5b60006004351861019057600080fd5b600435600055005b63a694fc3a81141561024357600b54156101b157600080fd5b6001600b5560005433141515610206576308c379a0610140526020610160526013610180527f7265617065725374726174656779206f6e6c79000000000000000000000000006101a05261018050606461015cfd5b6003543b61021357600080fd5b60006000602463b6b55f25610140526004356101605261015c60006003545af161023c57600080fd5b6000600b55005b632e17de7881141561025957336101405261028a565b638381e1828114156102855760243560a01c1561027557600080fd5b602060246101403760005061028a565b610377565b600b541561029757600080fd5b6001600b556000546101605261016051331415156102f4576308c379a06101805260206101a05260136101c0527f7265617065725374726174656779206f6e6c79000000000000000000000000006101e0526101c050606461019cfd5b6003543b61030157600080fd5b600060006024632e1a7d4d610180526004356101a05261019c60006003545af161032a57600080fd5b6020610220604463a9059cbb61018052610140516101a0526004356101c05261019c60006001545af161035c57600080fd5b601f3d1161036957600080fd5b600050610220506000600b55005b634e71d92d81141561038d5733610140526103be565b631e83409a8114156103b95760043560a01c156103a957600080fd5b60206004610140376000506103be565b610571565b600b54156103cb57600080fd5b6001600b556000546101605260035461018052610160513314151561042f576308c379a06101a05260206101c05260136101e0527f7265617065725374726174656779206f6e6c7900000000000000000000000000610200526101e05060646101bcfd5b6020610240602463331345836101c052306101e0526101dc610180515afa61045657600080fd5b601f3d1161046357600080fd5b600050610240516101a05260006101a051111561055f576020610220600463075461726101c0526101dc610180515afa61049c57600080fd5b601f3d116104a957600080fd5b600050610220513b6104ba57600080fd5b600060006024636a62784261024052610180516102605261025c60006020610220600463075461726101c0526101dc610180515afa6104f857600080fd5b601f3d1161050557600080fd5b600050610220515af161051757600080fd5b6020610260604463a9059cbb6101c052610140516101e0526101a051610200526101dc60006002545af161054a57600080fd5b601f3d1161055757600080fd5b600050610260505b6101a0516000526000600b5560206000f35b63daa41e70811415610588576000610140526105b9565b6376d4ef6b8114156105b45760243560011c156105a457600080fd5b60206024610140376000506105b9565b61093c565b600b54156105c657600080fd5b6001600b55600060043511151561061c576308c379a06101605260206101805260126101a0527f6e6f7468696e6720746f206465706f73697400000000000000000000000000006101c0526101a050606461017cfd5b60053360e05260c052604060c020546101605260063360e05260c052604060c020546101805261014051151561079a57600061016051111561066357610180514211610666565b60005b1515156106d7576308c379a06101a05260206101c052602f6101e0527f7769746864726177616c20756e6c6f636b656420616d6f756e74206f72207265610200527f6e6577616c206973206e65656465640000000000000000000000000000000000610220526101e05060846101bcfd5b602061026060646323b872dd6101a052336101c052306101e052600435610200526101bc60006002545af161070b57600080fd5b601f3d1161071857600080fd5b6000506102605161072857600080fd5b6101405161016051610180516004356101a0526101a05160065801610dc3565b61018052610160526101405260005060053360e05260c052604060c020805460043581818301101561077957600080fd5b8082019050905081555060085460063360e05260c052604060c02055610935565b60006101605111156107b1576101805142116107b4565b60005b15156107ff576308c379a06101a05260206101c052601e6101e0527f6e6f20756e6c6f636b656420616d6f756e7420666f722072656e6577616c0000610200526101e05060646101bcfd5b6101605160043510151515610878576308c379a06101a05260206101c052602a6101e0527f7769746864726177616c20657874726120756e6c6f636b656420616d6f756e74610200527f206973206e656564656400000000000000000000000000000000000000000000610220526101e05060846101bcfd5b602061026060646323b872dd6101a052336101c052306101e05260043561016051808210156108a657600080fd5b80820390509050610200526101bc60006002545af16108c457600080fd5b601f3d116108d157600080fd5b600050610260516108e157600080fd5b6101405161016051610180516004356101a0526101a05160065801610dc3565b61018052610160526101405260005060043560053360e05260c052604060c0205560085460063360e05260c052604060c020555b6000600b55005b63b725d672811415610ae757600b541561095557600080fd5b6001600b5560053360e05260c052604060c02054610140526000610140511115156109bf576308c379a06101605260206101805260136101a0527f6e6f7468696e6720746f207769746864726177000000000000000000000000006101c0526101a050606461017cfd5b60063360e05260c052604060c0205442111515610a1b576308c379a06101605260206101805260126101a0527f7769746864726177206973206c6f636b656400000000000000000000000000006101c0526101a050606461017cfd5b6020610200604463a9059cbb610160523361018052610140516101a05261017c60006002545af1610a4b57600080fd5b601f3d11610a5857600080fd5b600050610200511515610acf576308c379a061022052602061024052602b610260527f6e6577206c6f636b206372656174696f6e206973206e6565646564206265666f610280527f72652077697468647261770000000000000000000000000000000000000000006102a05261026050608461023cfd5b600060053360e05260c052604060c020556000600b55005b63f2fde38b811415610b895760043560a01c15610b0357600080fd5b60095433141515610b53576308c379a061014052602061016052600a610180527f6f776e6572206f6e6c79000000000000000000000000000000000000000000006101a05261018050606461015cfd5b600435600a55600435610140527f2f56810a6bf40af059b96d3aea4db54081f378029a518390491093a7b67032e96020610140a1005b6301190207811415610c775760095433141515610be5576308c379a061014052602061016052600a610180527f6f776e6572206f6e6c79000000000000000000000000000000000000000000006101a05261018050606461015cfd5b600a546101405260006101405114151515610c3f576308c379a061016052602061018052600d6101a0527f6f776e6572206e6f7420736574000000000000000000000000000000000000006101c0526101a050606461017cfd5b6101405160095561014051610160527febee2d5739011062cb4f14113f3b36bf0ffe3da5c0568f64189d1012a11891056020610160a1005b637e6c55a1811415610c8f5760005460005260206000f35b6351ed6a30811415610ca75760015460005260206000f35b63f7c618c1811415610cbf5760025460005260206000f35b631a186227811415610cd75760035460005260206000f35b638b260af1811415610cef5760045460005260206000f35b635885aa3d811415610d255760043560a01c15610d0b57600080fd5b600560043560e05260c052604060c0205460005260206000f35b63dedab7cd811415610d5b5760043560a01c15610d4157600080fd5b600660043560e05260c052604060c0205460005260206000f35b63550066d5811415610d735760075460005260206000f35b636ae61012811415610d8b5760085460005260206000f35b638da5cb5b811415610da35760095460005260206000f35b63b9e9d1aa811415610dbb57600a5460005260206000f35b505b60006000fd5b6101605261014052600854421115610e785760006008541115610e0f576004543b610ded57600080fd5b600060006004633ccfd60b6101805261019c60006004545af1610e0f57600080fd5b42600754818183011015610e2257600080fd5b8082019050905061018052610180516008556004543b610e4157600080fd5b6000600060446365fc38736101a052610140516101c052610180516101e0526101bc60006004545af1610e7357600080fd5b610eaf565b6004543b610e8557600080fd5b600060006024634957677c61018052610140516101a05261019c60006004545af1610eaf57600080fd5b61016051565b61020f6110c40361020f60003961020f6110c4036000f3