Boosting Controller

BoostingController.vy #

vyper: 0.2.10

Events #

Boost

  • coin : address, notIndexed
  • account : address, notIndexed
  • amount : uint256, notIndexed

Unboost

  • coin : address, notIndexed
  • account : address, notIndexed
  • amount : uint256, notIndexed

CommitOwnership

  • admin : address, notIndexed

ApplyOwnership

  • admin : address, notIndexed

Methods #

boost #

type: nonpayable function

Boost reward using tokens _coin with amount _amount for user msg.sender

Arguments:

  • _coin: - Coin which is used to boost

  • _amount: - Amount which is used to boost

  • _lockTime: - Time for locking boost tokens

  • _gasToken: - Gas token for tx cost reduction

boost #

type: nonpayable function

Arguments:

  • _coin: - Coin which is used to boost

  • _amount: - Amount which is used to boost

  • _lockTime: - Time for locking boost tokens

  • _gasToken: - Gas token for tx cost reduction

unboost #

type: nonpayable function

Unboost for account msg.sender and withdraw all available tokens _coin

Only possible with unlocked amount, withdraw all amount

Arguments:

  • _coin: - Coin which is used to unboost

  • _gasToken: - Gas token for tx cost reduction

unboost #

type: nonpayable function

Only possible with unlocked amount, withdraw all amount

Arguments:

  • _coin: - Coin which is used to unboost

  • _gasToken: - Gas token for tx cost reduction

availableToUnboost #

type: view function gas: 2680

Check for available withdrawal amount in tokens _coin for account _account

Arguments:

  • _coin: - Coin which is used to unboost

  • _account: - Account who is unboosting

Returns:

  • _0 - Unlocked amount to withdraw

accountBoostIntegral #

type: nonpayable function gas: 395133

Returns current boost integral for account _account

Arguments:

  • _account: - Account to get its boost integral for

Returns:

  • _0 - Account boost integral

updateBoostIntegral #

type: nonpayable function gas: 77308

Returns common boost integral

Returns:

  • _0 - Common boost integral

transferOwnership #

type: nonpayable function gas: 37771

Sets new future owner address

Callable by owner only

Arguments:

  • _futureOwner: - New future owner address

applyOwnership #

type: nonpayable function gas: 38627

Applies new future owner address as current owner

Callable by owner only

init #

type: nonpayable constructor

Contract constructor

ABI #

[
  {
    "name": "Boost",
    "inputs": [
      {
        "name": "coin",
        "type": "address",
        "indexed": false
      },
      {
        "name": "account",
        "type": "address",
        "indexed": false
      },
      {
        "name": "amount",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false,
    "type": "event"
  },
  {
    "name": "Unboost",
    "inputs": [
      {
        "name": "coin",
        "type": "address",
        "indexed": false
      },
      {
        "name": "account",
        "type": "address",
        "indexed": false
      },
      {
        "name": "amount",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false,
    "type": "event"
  },
  {
    "name": "CommitOwnership",
    "inputs": [
      {
        "name": "admin",
        "type": "address",
        "indexed": false
      }
    ],
    "anonymous": false,
    "type": "event"
  },
  {
    "name": "ApplyOwnership",
    "inputs": [
      {
        "name": "admin",
        "type": "address",
        "indexed": false
      }
    ],
    "anonymous": false,
    "type": "event"
  },
  {
    "stateMutability": "nonpayable",
    "type": "constructor",
    "inputs": [
      {
        "name": "_farmToken",
        "type": "address"
      },
      {
        "name": "_gasTokenCheckList",
        "type": "address"
      }
    ],
    "outputs": []
  },
  {
    "stateMutability": "nonpayable",
    "type": "function",
    "name": "boost",
    "inputs": [
      {
        "name": "_coin",
        "type": "address"
      },
      {
        "name": "_amount",
        "type": "uint256"
      },
      {
        "name": "_lockTime",
        "type": "uint256"
      }
    ],
    "outputs": []
  },
  {
    "stateMutability": "nonpayable",
    "type": "function",
    "name": "boost",
    "inputs": [
      {
        "name": "_coin",
        "type": "address"
      },
      {
        "name": "_amount",
        "type": "uint256"
      },
      {
        "name": "_lockTime",
        "type": "uint256"
      },
      {
        "name": "_gasToken",
        "type": "address"
      }
    ],
    "outputs": []
  },
  {
    "stateMutability": "nonpayable",
    "type": "function",
    "name": "unboost",
    "inputs": [
      {
        "name": "_coin",
        "type": "address"
      }
    ],
    "outputs": []
  },
  {
    "stateMutability": "nonpayable",
    "type": "function",
    "name": "unboost",
    "inputs": [
      {
        "name": "_coin",
        "type": "address"
      },
      {
        "name": "_gasToken",
        "type": "address"
      }
    ],
    "outputs": []
  },
  {
    "stateMutability": "view",
    "type": "function",
    "name": "availableToUnboost",
    "inputs": [
      {
        "name": "_coin",
        "type": "address"
      },
      {
        "name": "_account",
        "type": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "gas": 2680
  },
  {
    "stateMutability": "nonpayable",
    "type": "function",
    "name": "accountBoostIntegral",
    "inputs": [
      {
        "name": "_account",
        "type": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "gas": 395133
  },
  {
    "stateMutability": "nonpayable",
    "type": "function",
    "name": "updateBoostIntegral",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "gas": 77308
  },
  {
    "stateMutability": "nonpayable",
    "type": "function",
    "name": "transferOwnership",
    "inputs": [
      {
        "name": "_futureOwner",
        "type": "address"
      }
    ],
    "outputs": [],
    "gas": 37771
  },
  {
    "stateMutability": "nonpayable",
    "type": "function",
    "name": "applyOwnership",
    "inputs": [],
    "outputs": [],
    "gas": 38627
  },
  {
    "stateMutability": "nonpayable",
    "type": "function",
    "name": "setBoostingToken",
    "inputs": [
      {
        "name": "_boostingToken",
        "type": "address"
      }
    ],
    "outputs": [],
    "gas": 37503
  },
  {
    "stateMutability": "view",
    "type": "function",
    "name": "owner",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address"
      }
    ],
    "gas": 1328
  },
  {
    "stateMutability": "view",
    "type": "function",
    "name": "futureOwner",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address"
      }
    ],
    "gas": 1358
  },
  {
    "stateMutability": "view",
    "type": "function",
    "name": "farmToken",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address"
      }
    ],
    "gas": 1388
  },
  {
    "stateMutability": "view",
    "type": "function",
    "name": "gasTokenCheckList",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address"
      }
    ],
    "gas": 1418
  },
  {
    "stateMutability": "view",
    "type": "function",
    "name": "boostingToken",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address"
      }
    ],
    "gas": 1448
  },
  {
    "stateMutability": "view",
    "type": "function",
    "name": "boostIntegral",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "gas": 1478
  },
  {
    "stateMutability": "view",
    "type": "function",
    "name": "lastBoostTimestamp",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "gas": 1508
  },
  {
    "stateMutability": "view",
    "type": "function",
    "name": "boosts",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      }
    ],
    "outputs": [
      {
        "name": "targetAmount",
        "type": "uint256"
      },
      {
        "name": "instantAmount",
        "type": "uint256"
      },
      {
        "name": "warmupTime",
        "type": "uint256"
      },
      {
        "name": "finishTime",
        "type": "uint256"
      }
    ],
    "gas": 4951
  },
  {
    "stateMutability": "view",
    "type": "function",
    "name": "boostIntegralFor",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "gas": 1783
  },
  {
    "stateMutability": "view",
    "type": "function",
    "name": "lastBoostTimestampFor",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "gas": 1813
  },
  {
    "stateMutability": "view",
    "type": "function",
    "name": "balances",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      },
      {
        "name": "arg1",
        "type": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "gas": 2058
  },
  {
    "stateMutability": "view",
    "type": "function",
    "name": "coinBalances",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "gas": 1873
  }
]

Byte code #

0x6040611a67610140396020611a6760c03960c05160a01c1561002057600080fd5b60206020611a670160c03960c05160a01c1561003b57600080fd5b6000610140511415151561008e576308c379a06101805260206101a05260146101c0527f6661726d546f6b656e206973206e6f74207365740000000000000000000000006101e0526101c050606461019cfd5b600061016051141515156100e1576308c379a06101805260206101a052601c6101c0527f676173546f6b656e436865636b4c697374206973206e6f7420736574000000006101e0526101c050606461019cfd5b610140516002556101605160035533600055611a4f56600436101561000d57610d5a565b600035601c52600051341561002157600080fd5b63a2114cdb81141561003857600061014052610069565b63b4b3c2498114156100645760643560a01c1561005457600080fd5b6020606461014037600050610069565b6104a7565b600c541561007657600080fd5b6001600c5560043560a01c1561008b57600080fd5b5a610160526004546101805262127500604435101515156100eb576308c379a06101a05260206101c05260156101e0527f6c6f636b74696d6520697320746f6f2073686f72740000000000000000000000610200526101e05060646101bcfd5b60025460043514156100fe57600161011a565b610180516004351415610117576000600435141561011a565b60005b1515610165576308c379a06101a05260206101c052600c6101e0527f696e76616c696420636f696e0000000000000000000000000000000000000000610200526101e05060646101bcfd5b6101405161016051610180516006580161113e565b6101a0526101805261016052610140526101a050610140516101605161018051336101a0526101a05160065801611261565b6102005261018052610160526101405261020050600a60043560e05260c052604060c0203360e05260c052604060c02080546024358181830110156101f057600080fd5b80820190509050815550600b60043560e05260c052604060c020805460243581818301101561021e57600080fd5b808201905090508155506101a060073360e05260c052604060c0208060c052602060c02054825260018160c052602060c0200154826020015260028160c052602060c0200154826040015260038160c052602060c020015482606001525050600161022052610180516004351415610297576002610220525b60073360e05260c052604060c02060c052602060c02080546024356102205180820282158284830414176102ca57600080fd5b809050905090508181830110156102e057600080fd5b8082019050905081555042621275008181830110156102fe57600080fd5b80820190509050600260073360e05260c052604060c02060c052602060c0200155426212750081818301101561033357600080fd5b8082019050905060443581818301101561034c57600080fd5b808201905090506102005160443581818301101561036957600080fd5b808201905090508082101561037e5780610380565b815b90509050600360073360e05260c052604060c02060c052602060c0200155602061030060646323b872dd61024052336102605230610280526024356102a05261025c60006004355af16103d257600080fd5b601f3d116103df57600080fd5b600050610300516103ef57600080fd5b600435610240523361026052602435610280527f4b4156d5be698c8844504189091c585fd0b982fcaf9c0cd7ef8d9924525a13306060610240a16101405161016051610180516101a0516101c0516101e0516102005161022051610140516102a052336102c052610160516102e052608461030052610300516102e0516102c0516102a05160065801610d60565b61022052610200526101e0526101c0526101a0526101805261016052610140526000506000600c55005b639b2033f68114156104be576000610140526104ef565b6380ac53ed8114156104ea5760243560a01c156104da57600080fd5b60206024610140376000506104ef565b610790565b600c54156104fc57600080fd5b6001600c5560043560a01c1561051157600080fd5b42600360073360e05260c052604060c02060c052602060c0200154101515610578576308c379a06101605260206101805260116101a0527f746f6b656e7320617265206c6f636b65640000000000000000000000000000006101c0526101a050606461017cfd5b5a61016052600a60043560e05260c052604060c0203360e05260c052604060c02054610180526101405161016051610180516006580161113e565b6101a0526101805261016052610140526101a050610140516101605161018051336101a0526101a05160065801611261565b6102005261018052610160526101405261020050600b60043560e05260c052604060c0208054610180518082101561061c57600080fd5b808203905090508155506000600a60043560e05260c052604060c0203360e05260c052604060c02055600060073360e05260c052604060c02060c052602060c020556000600160073360e05260c052604060c02060c052602060c02001556000600260073360e05260c052604060c02060c052602060c02001556000600360073360e05260c052604060c02060c052602060c02001556020610240604463a9059cbb6101a052336101c052610180516101e0526101bc60006004355af16106e257600080fd5b601f3d116106ef57600080fd5b600050610240516106ff57600080fd5b6004356101a052336101c052610180516101e0527f40ec1c8b0f1c16036c67546d05f04f6eb39416cd05e819cb9592ac5288cf024660606101a0a16101405161016051610180516101405161020052336102205261016051610240526044610260526102605161024051610220516102005160065801610d60565b6101805261016052610140526000506000600c55005b634c56dbd88114156108135760043560a01c156107ac57600080fd5b60243560a01c156107bc57600080fd5b426003600760243560e05260c052604060c02060c052602060c02001541015156107eb57600060005260206000f35b600a60043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f35b63650b109c8114156108545760043560a01c1561082f57600080fd5b600435610140526101405160065801611261565b6101a0526101a05160005260206000f35b6364049deb81141561087a576006580161113e565b610140526101405160005260206000f35b63f2fde38b81141561091c5760043560a01c1561089657600080fd5b600054331415156108e6576308c379a061014052602061016052600a610180527f6f776e6572206f6e6c79000000000000000000000000000000000000000000006101a05261018050606461015cfd5b600435600155600435610140527f2f56810a6bf40af059b96d3aea4db54081f378029a518390491093a7b67032e96020610140a1005b6301190207811415610a0a5760005433141515610978576308c379a061014052602061016052600a610180527f6f776e6572206f6e6c79000000000000000000000000000000000000000000006101a05261018050606461015cfd5b60015461014052600061014051141515156109d2576308c379a061016052602061018052600d6101a0527f6f776e6572206e6f7420736574000000000000000000000000000000000000006101c0526101a050606461017cfd5b6101405160005561014051610160527febee2d5739011062cb4f14113f3b36bf0ffe3da5c0568f64189d1012a11891056020610160a1005b62a0f314811415610b1e5760043560a01c15610a2557600080fd5b60005433141515610a75576308c379a061014052602061016052600a610180527f6f776e6572206f6e6c79000000000000000000000000000000000000000000006101a05261018050606461015cfd5b600060043514151515610ac7576308c379a061014052602061016052600c610180527f7a65726f206164647265737300000000000000000000000000000000000000006101a05261018050606461015cfd5b600454151515610b16576308c379a061014052602061016052600d610180527f736574206f6e6c79206f6e6365000000000000000000000000000000000000006101a05261018050606461015cfd5b600435600455005b638da5cb5b811415610b365760005460005260206000f35b63b9e9d1aa811415610b4e5760015460005260206000f35b63c2442f93811415610b665760025460005260206000f35b63382807d4811415610b7e5760035460005260206000f35b637c690600811415610b965760045460005260206000f35b630b7242dd811415610bae5760055460005260206000f35b635a278f9b811415610bc65760065460005260206000f35b63fdabc986811415610c625760043560a01c15610be257600080fd5b600760043560e05260c052604060c0206101408080808460c052602060c0205481525050602081019050808060018560c052602060c020015481525050602081019050808060028560c052602060c020015481525050602081019050808060038560c052602060c02001548152505060809050905060c05260c051610140f35b63fca226c2811415610c985760043560a01c15610c7e57600080fd5b600860043560e05260c052604060c0205460005260206000f35b63ef60c22e811415610cce5760043560a01c15610cb457600080fd5b600960043560e05260c052604060c0205460005260206000f35b63c23f001f811415610d225760043560a01c15610cea57600080fd5b60243560a01c15610cfa57600080fd5b600a60043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f35b63613b0c03811415610d585760043560a01c15610d3e57600080fd5b600b60043560e05260c052604060c0205460005260206000f35b505b60006000fd5b6101c0526101405261016052610180526101a052610140511515610d84576101c051565b6020610260602463c2bc2efc6101e05261014051610200526101fc6003545afa610dad57600080fd5b601f3d11610dba57600080fd5b600050610260511515610e0c576308c379a06102805260206102a05260156102c0527f756e737570706f727465642067617320746f6b656e00000000000000000000006102e0526102c050606461029cfd5b61520861018051818183011015610e2257600080fd5b808201905090505a80821015610e3757600080fd5b8082039050905060106101a0518082028215828483041417610e5857600080fd5b80905090509050818183011015610e6e57600080fd5b808201905090506101e05260206102a0604463079d229f6102005261016051610220526101e05161374a818183011015610ea757600080fd5b8082019050905061a0aa808204905090506102405261021c6000610140515af1610ed057600080fd5b601f3d11610edd57600080fd5b6000506102a0506101c051565b6101e0526101405261016052610180526101a0526101c052610180516101a05110151515610f57576308c379a0610200526020610220526013610240527f72657665727465642074696d657374616d7073000000000000000000000000006102605261024050606461021cfd5b6101c05161018051111515610f75576101a0516101c0511115610f78565b60005b1515610fc3576308c379a0610200526020610220526011610240527f74206e6f7420696e20696e74657276616c0000000000000000000000000000006102605261024050606461021cfd5b610180516101a0511415610fdf5760006000526000516101e051565b6101605161014051111515611098576101c051610180518082101561100357600080fd5b8082039050905061016051610140518082101561101f57600080fd5b80820390509050808202821582848304141761103a57600080fd5b809050905090506101a051610180518082101561105657600080fd5b80820390509050808061106857600080fd5b8204905090506101405181818301101561108157600080fd5b808201905090506000526000516101e0515661113c565b610140516101c05161018051808210156110b157600080fd5b808203905090506101405161016051808210156110cd57600080fd5b8082039050905080820282158284830414176110e857600080fd5b809050905090506101a051610180518082101561110457600080fd5b80820390509050808061111657600080fd5b8204905090508082101561112957600080fd5b808203905090506000526000516101e051565b005b610140526006546101605260055461018052600061016051111561124d576004546101a0526001600b60025460e05260c052604060c02054808202821582848304141761118a57600080fd5b809050905090506101c05260006101a05118156111ef576101c080516002600b6101a05160e05260c052604060c0205480820282158284830414176111ce57600080fd5b809050905090508181830110156111e457600080fd5b808201905090508152505b61018080516101c05142610160518082101561120a57600080fd5b80820390509050808202821582848304141761122557600080fd5b8090509050905081818301101561123b57600080fd5b80820190509050815250610180516005555b426006556101805160005260005161014051565b610160526101405260086101405160e05260c052604060c02054610180526101a060076101405160e05260c052604060c0208060c052602060c02054825260018160c052602060c0200154826020015260028160c052602060c0200154826040015260038160c052602060c020015482606001525050610200511515611323576000600160076101405160e05260c052604060c02060c052602060c02001554260096101405160e05260c052604060c020556101805160005260005161016051565b60096101405160e05260c052604060c0205461022052426101e05111156114ad576101405161016051610180516101a0516101c0516101e0516102005161022051610240516101c051610260526101a05161028052610220516102a0526101e0516102c052426102e0526102e0516102c0516102a051610280516102605160065801610eea565b610340526102405261022052610200526101e0526101c0526101a05261018052610160526101405261034051610240526101808051610240516101c0518181830110156113f657600080fd5b8082019050905042610220518082101561140f57600080fd5b80820390509050808202821582848304141761142a57600080fd5b8090509050905060028082049050905081818301101561144957600080fd5b8082019050905081525061024051600160076101405160e05260c052604060c02060c052602060c02001556101805160086101405160e05260c052604060c020554260096101405160e05260c052604060c020556101805160005260005161016051565b42600360076101405160e05260c052604060c02060c052602060c02001541115611709576101e05161022051101561156c5761018080516101c0516101a0518181830110156114fb57600080fd5b808201905090506101e051610220518082101561151757600080fd5b80820390509050808202821582848304141761153257600080fd5b8090509050905060028082049050905081818301101561155157600080fd5b808201905090508152506101a0516101c0526101e051610220525b6101405161016051610180516101a0516101c0516101e0516102005161022051610240516101c051610260526101a0516706f05b59d3b2000080820282158284830414176115b957600080fd5b80905090509050670de0b6b3a76400008082049050905061028052610220516102a052610200516102c052426102e0526102e0516102c0516102a051610280516102605160065801610eea565b610340526102405261022052610200526101e0526101c0526101a052610180526101605261014052610340516102405261018080516101c0516102405181818301101561165257600080fd5b8082019050905042610220518082101561166b57600080fd5b80820390509050808202821582848304141761168657600080fd5b809050905090506002808204905090508181830110156116a557600080fd5b8082019050905081525061024051600160076101405160e05260c052604060c02060c052602060c02001556101805160086101405160e05260c052604060c020554260096101405160e05260c052604060c020556101805160005260005161016051565b6101e0516102205110156117a45761018080516101c0516101a05181818301101561173357600080fd5b808201905090506101e051610220518082101561174f57600080fd5b80820390509050808202821582848304141761176a57600080fd5b8090509050905060028082049050905081818301101561178957600080fd5b808201905090508152506101a0516101c0526101e051610220525b610200516102205110156118a75761018080516101c0516101a0516706f05b59d3b2000080820282158284830414176117dc57600080fd5b80905090509050670de0b6b3a76400008082049050905081818301101561180257600080fd5b8082019050905061020051610220518082101561181e57600080fd5b80820390509050808202821582848304141761183957600080fd5b8090509050905060028082049050905081818301101561185857600080fd5b808201905090508152506101a0516706f05b59d3b20000808202821582848304141761188357600080fd5b80905090509050670de0b6b3a7640000808204905090506101c05261020051610220525b61018080516101c0514261022051808210156118c257600080fd5b8082039050905080820282158284830414176118dd57600080fd5b809050905090508181830110156118f357600080fd5b808201905090508152506101805160086101405160e05260c052604060c020556101c051600160076101405160e05260c052604060c02060c052602060c02001554260096101405160e05260c052604060c020556101805160005260005161016051565b6100f8611a4f036100f86000396100f8611a4f036000f3