Contract
0x42B458056f887Fd665ed6f160A59Afe932e1F559
6
My Name Tag:
Not Available, login to update
[ Download CSV Export ]
Latest 1 internal transaction
Parent Txn Hash | Block | From | To | Value | |||
---|---|---|---|---|---|---|---|
0xe94cedee730c83fe14151a0db538f5139a38d7527081dc2695d6297f505dffe0 | 24455168 | 424 days 19 hrs ago | 0xb16a11442878d6f1ef202ae63233a7c13e98fd7f | Contract Creation | 0 FTM |
[ Download CSV Export ]
Contract Source Code Verified (Exact Match)
Contract Name:
Vyper_contract
Compiler Version
vyper:0.2.12
Contract Source Code (Vyper language format)
# @version 0.2.12 """ @title Token Minter @author Hundred Finance @license MIT """ interface LiquidityGauge: # Presumably, other gauges will provide the same interfaces def integrate_fraction(addr: address) -> uint256: view def user_checkpoint(addr: address) -> bool: nonpayable interface MERC20: def mint(_to: address, _value: uint256) -> bool: nonpayable interface GaugeController: def gauge_types(addr: address) -> int128: view event Minted: recipient: indexed(address) gauge: address minted: uint256 treasury: public(address) controller: public(address) # user -> gauge -> value minted: public(HashMap[address, HashMap[address, uint256]]) # minter -> user -> can mint? allowed_to_mint_for: public(HashMap[address, HashMap[address, bool]]) @external def __init__(_treasury: address, _controller: address): self.treasury = _treasury self.controller = _controller @internal def _mint_for(gauge_addr: address, _for: address): assert GaugeController(self.controller).gauge_types(gauge_addr) >= 0 # dev: gauge is not added LiquidityGauge(gauge_addr).user_checkpoint(_for) total_mint: uint256 = LiquidityGauge(gauge_addr).integrate_fraction(_for) to_mint: uint256 = total_mint - self.minted[_for][gauge_addr] if to_mint != 0: MERC20(self.treasury).mint(_for, to_mint) self.minted[_for][gauge_addr] = total_mint log Minted(_for, gauge_addr, total_mint) @external @nonreentrant('lock') def mint(gauge_addr: address): """ @notice Mint everything which belongs to `msg.sender` and send to them @param gauge_addr `LiquidityGauge` address to get mintable amount from """ self._mint_for(gauge_addr, msg.sender) @external @nonreentrant('lock') def mint_many(gauge_addrs: address[8]): """ @notice Mint everything which belongs to `msg.sender` across multiple gauges @param gauge_addrs List of `LiquidityGauge` addresses """ for i in range(8): if gauge_addrs[i] == ZERO_ADDRESS: break self._mint_for(gauge_addrs[i], msg.sender) @external @nonreentrant('lock') def mint_for(gauge_addr: address, _for: address): """ @notice Mint tokens for `_for` @dev Only possible when `msg.sender` has been approved via `toggle_approve_mint` @param gauge_addr `LiquidityGauge` address to get mintable amount from @param _for Address to mint to """ if self.allowed_to_mint_for[msg.sender][_for]: self._mint_for(gauge_addr, _for) @external def toggle_approve_mint(minting_user: address): """ @notice allow `minting_user` to mint for `msg.sender` @param minting_user Address to toggle permission for """ self.allowed_to_mint_for[minting_user][msg.sender] = not self.allowed_to_mint_for[minting_user][msg.sender]
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"name":"Minted","inputs":[{"name":"recipient","type":"address","indexed":true},{"name":"gauge","type":"address","indexed":false},{"name":"minted","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"stateMutability":"nonpayable","type":"constructor","inputs":[{"name":"_treasury","type":"address"},{"name":"_controller","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"mint","inputs":[{"name":"gauge_addr","type":"address"}],"outputs":[],"gas":112051},{"stateMutability":"nonpayable","type":"function","name":"mint_many","inputs":[{"name":"gauge_addrs","type":"address[8]"}],"outputs":[],"gas":495727},{"stateMutability":"nonpayable","type":"function","name":"mint_for","inputs":[{"name":"gauge_addr","type":"address"},{"name":"_for","type":"address"}],"outputs":[],"gas":114593},{"stateMutability":"nonpayable","type":"function","name":"toggle_approve_mint","inputs":[{"name":"minting_user","type":"address"}],"outputs":[],"gas":37994},{"stateMutability":"view","type":"function","name":"treasury","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2508},{"stateMutability":"view","type":"function","name":"controller","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2538},{"stateMutability":"view","type":"function","name":"minted","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":2998},{"stateMutability":"view","type":"function","name":"allowed_to_mint_for","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"address"}],"outputs":[{"name":"","type":"bool"}],"gas":3028}]
Contract Creation Code
604061054b61014039602061054b60c03960c05160a01c1561002057600080fd5b6020602061054b0160c03960c05160a01c1561003b57600080fd5b610140516000556101605160015561053356600436101561000d57610310565b600035601c52600051341561002157600080fd5b636a627842811415610076576004541561003a57600080fd5b600160045560043560a01c1561004f57600080fd5b600435610140523361016052610160516101405160065801610316565b6000506000600455005b63a51e1904811415610153576004541561008f57600080fd5b60016004556000610120525b610120516004013560a01c156100b057600080fd5b60206101205101610120526101006101205110156100cd5761009b565b61014060006008818352015b600461014051600881106100ec57600080fd5b602002013515156100fc5761014a565b610140516004610140516008811061011357600080fd5b6020020135610160523361018052610180516101605160065801610316565b610140526000505b81516001018083528114156100d9575b50506000600455005b6327f18ae38114156101dd576004541561016c57600080fd5b600160045560043560a01c1561018157600080fd5b60243560a01c1561019157600080fd5b60033360e05260c052604060c02060243560e05260c052604060c02054156101d6576004356101405260243561016052610160516101405160065801610316565b6000505b6000600455005b63dd289d608114156102365760043560a01c156101f957600080fd5b600360043560e05260c052604060c0203360e05260c052604060c0205415600360043560e05260c052604060c0203360e05260c052604060c02055005b6361d027b381141561024e5760005460005260206000f35b63f77c47918114156102665760015460005260206000f35b638b752bb08114156102ba5760043560a01c1561028257600080fd5b60243560a01c1561029257600080fd5b600260043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f35b63a099003381141561030e5760043560a01c156102d657600080fd5b60243560a01c156102e657600080fd5b600360043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f35b505b60006000fd5b610180526101405261016052600060206102206024633f9095b76101a052610140516101c0526101bc6001545afa61034d57600080fd5b601f3d1161035a57600080fd5b60005061022051121561036c57600080fd5b60206102206024634b8200936101a052610160516101c0526101bc6000610140515af161039857600080fd5b601f3d116103a557600080fd5b600050610220506020610240602463094007076101c052610160516101e0526101dc610140515afa6103d657600080fd5b601f3d116103e357600080fd5b600050610240516101a0526101a05160026101605160e05260c052604060c0206101405160e05260c052604060c020548082101561042057600080fd5b808203905090506101c05260006101c05118156104df57602061028060446340c10f196101e05261016051610200526101c051610220526101fc60006000545af161046a57600080fd5b601f3d1161047757600080fd5b600050610280506101a05160026101605160e05260c052604060c0206101405160e05260c052604060c02055610140516101e0526101a05161020052610160517f9d228d69b5fdb8d273a2336f8fb8612d039631024ea9bf09c424a9503aa078f060406101e0a25b61018051565b61004e6105330361004e60003961004e610533036000f300000000000000000000000029ddb4c4f9baae366dbd40eff79d364e004425b0000000000000000000000000b1c4426c86082d91a6c097fc588e5d5d8dd1f5a8
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000029ddb4c4f9baae366dbd40eff79d364e004425b0000000000000000000000000b1c4426c86082d91a6c097fc588e5d5d8dd1f5a8
-----Decoded View---------------
Arg [0] : _treasury (address): 0x29ddb4c4f9baae366dbd40eff79d364e004425b0
Arg [1] : _controller (address): 0xb1c4426c86082d91a6c097fc588e5d5d8dd1f5a8
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000029ddb4c4f9baae366dbd40eff79d364e004425b0
Arg [1] : 000000000000000000000000b1c4426c86082d91a6c097fc588e5d5d8dd1f5a8
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Validator ID :
0 FTM
Amount Staked
0
Amount Delegated
0
Staking Total
0
Staking Start Epoch
0
Staking Start Time
0
Proof of Importance
0
Origination Score
0
Validation Score
0
Active
0
Online
0
Downtime
0 s
Address | Amount | claimed Rewards | Created On Epoch | Created On |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.