Contract 0x42B458056f887Fd665ed6f160A59Afe932e1F559 6

 

Contract Overview

Hundred Finance: Minter
Balance:
0 FTM

FTM Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xdd737346804903a01e05e546437e49bdd5c5b69e434fa2e0f861d3abf9348cd0Mint542478972023-01-23 3:14:1415 days 5 hrs ago0xf6d6128bda3e16923aec500a8e8c4fd6fd588a75 IN  Hundred Finance: Minter0 FTM0.017391842016
0xdf84fff849b2bffa7d4127adead42df9098148b385b55102b12110fada794ba8Mint528508752022-12-25 18:33:5943 days 13 hrs ago0x0ee63ff2fa85fd1d57beb3ff055567b3293f2367 IN  Hundred Finance: Minter0 FTM0.00660342879
0x57dd823ce8dc3d86f67f7c55cbeb94e7295a428b68b4f910f27fdac61c29c3aaMint524861422022-12-17 22:48:2651 days 9 hrs ago0x3d6991085ab1ae3926cb96f25684c40a364b6856 IN  Hundred Finance: Minter0 FTM0.01650380825
0x68c4f8ef4c590988fd2872e9d0d3b13fa712fddaa1ddc0b4813fc21773a7373eMint515990382022-11-29 10:29:4269 days 21 hrs ago0x30beea416fb2599c8df88a1ee1c8e3b9392ab1ce IN  Hundred Finance: Minter0 FTM0.02194294038
0xf2868e5fb0a1966e6526308b84c23035e00a2c945d814375179a77ac3a522ac0Mint515684982022-11-28 21:16:1370 days 11 hrs ago0x3be960f410100916b49c41bb8fc52eb5511ef307 IN  Hundred Finance: Minter0 FTM0.024075696595
0xba3e4068fb468fe98a67b328b992e4719772f87bdaeadb5a71a057ba3b4c5747Mint_many511747352022-11-20 7:41:0679 days 46 mins ago0xbc94ca1c2c78de1abf0475cd0907b461abe77ad0 IN  Hundred Finance: Minter0 FTM0.13321612534
0xfebdb92e2dd5de0207ba9dc687f8f711315ef24ea2a899b366fd8211f952a6d2Mint506063072022-11-08 7:25:3591 days 1 hr ago0xfe434009693bbd116f7c36686483dc067bc04229 IN  Hundred Finance: Minter0 FTM0.048409392985
0x83104d564603a7a4ae0c3b6c904349ef188c5e5ef365468ffb94a2a95189ea09Mint504943382022-11-05 14:34:3193 days 17 hrs ago0xac600528f0db09ccaf68a5ac7c67f9da52699447 IN  Hundred Finance: Minter0 FTM0.076470766743
0x71671df90b95ba5b3cd3599ffe5beeb7f13abdd31d35f58a178dc3cdeec81a10Mint504150062022-11-03 5:26:2496 days 3 hrs ago0xd0fe971732e547059ea6009c79a2d6155bdb41a4 IN  Hundred Finance: Minter0 FTM0.114905447283
0xfe9782339e6c58707df093adea8b612a108ad998a2aaa4a12382880607023ad2Mint504149252022-11-03 5:23:3696 days 3 hrs ago0xd0fe971732e547059ea6009c79a2d6155bdb41a4 IN  Hundred Finance: Minter0 FTM0.175814074823
0xdec756b2fafcf8cdf81c05cb74f6229b6a2171f51f5dac7418dee3500a4a3a96Mint503878022022-11-02 11:25:0596 days 21 hrs ago0x6f16d3e230b6e875c4997adc4a824abc92766d31 IN  Hundred Finance: Minter0 FTM0.078154126556
0x7f1144f0b45cb014e031bb37bbd831d9221a8245ee4d616ed5f59f4340aff64fMint502697162022-10-30 15:43:2699 days 16 hrs ago0x02ed8c15ca2ea858f9bf0b50198b5d00ce047c69 IN  Hundred Finance: Minter0 FTM0.026935038814
0x3f98ada770a3e8829d07b3bf2431d62940718acccd53d99b45f865a66f144c64Mint_many498337072022-10-23 12:24:13106 days 20 hrs ago0x5387c75f3b46434a669a3e856c470e5a899aec8c IN  Hundred Finance: Minter0 FTM0.0022832025
0x1c738db35630f2961314e5d513b4e7271764df92e958c177dbd6eac0c2e355e4Mint497984402022-10-23 0:52:50107 days 7 hrs ago0x1470f5fd536dacded7e08627c0f9732b7a460abd IN  Hundred Finance: Minter0 FTM0.000667743429
0xbe19c74304c4425504e44810ac58971b5a1dc2b12e0725d080c623b82f5caa5fMint_many497657312022-10-22 14:05:28107 days 18 hrs ago0x485fcd5c4a1af2f5bb196307bcf5eba074737761 IN  Hundred Finance: Minter0 FTM0.004049473636
0xe9312bee6e19689fef92ed789d823dbc696237eaf4cbe159c39170abe00d4b3dMint497657112022-10-22 14:04:56107 days 18 hrs ago0x485fcd5c4a1af2f5bb196307bcf5eba074737761 IN  Hundred Finance: Minter0 FTM0.00068916612
0x6de2e2b7b1708678e3759b7f864b09586f53573782c66743a1e2330845e5d05eMint497256172022-10-22 0:49:17108 days 7 hrs ago0x2a52706e8b16f30b431527ba84dc1efc47cf99e6 IN  Hundred Finance: Minter0 FTM0.001237675
0xcec6ba12c66ef9065b859039618b0dd53b62a3c0c9eff04e9aefdae2904f79eaMint494793622022-10-18 20:15:20111 days 12 hrs ago0x82156c79a3c84c51f0f3ed0d269183543c35824c IN  Hundred Finance: Minter0 FTM0.001041577811
0xff473f12064a2c3715d53c8e0f71e35989042c8d3ffb193bd343aaf62d23ec7eMint493533422022-10-17 4:01:21113 days 4 hrs ago0xa866a01250b9000d2acd2bb5750efe60257a3a54 IN  Hundred Finance: Minter0 FTM0.001253995
0xed98e6079fb69c27207746bb1b1e2a22e177a57f19f3fdecba4fe7d75c70416dMint483996772022-10-04 13:35:45125 days 18 hrs ago0xffd7fd0b03b42f12c2079d2717f504fae5597e56 IN  Hundred Finance: Minter0 FTM0.011254993713
0xcf5ebf586d79a9f2306f1af3672e19a046cf1d83b424ce3e46ba9f3af4e3222fMint477757272022-09-26 7:53:50134 days 33 mins ago0x568e5ff82ebf6ed3fc2ca610da0ca8a7923b4889 IN  Hundred Finance: Minter0 FTM0.000740189771
0xc82c8c2bf16dfdd511a3809f5e5839a9e795f331e0f7ae053d2821a05cd84bacMint_many475695872022-09-23 16:07:06136 days 16 hrs ago0x77299cf68685b96a529d392c7d8edfc94cbdcc15 IN  Hundred Finance: Minter0 FTM0.002368207084
0xec4e6d280736119eed0eff16d6643b5495c509220a534cf54e69bd18d144c57aMint469442242022-09-14 18:16:24145 days 14 hrs ago0x0b49d9a73d09b0370e6c259bfc56c1f5f1cc8df5 IN  Hundred Finance: Minter0 FTM0.495794425117
0xcbac50d688d9b732abf55510abc52d2bfa5c4bfcdc749ac55099c0aefc77b765Mint469319622022-09-14 13:29:48145 days 18 hrs ago0xf2de46d9154eaaa516227cbb95f63e3574c839db IN  Hundred Finance: Minter0 FTM0.000724245322
0xdeb2f20256239425429937101b42635b15691c60bbcd4b7a0b4cb430ea0c429cMint461912522022-09-02 8:35:57157 days 23 hrs ago0xf799308c9e07437a9974cda2d17fbd8747a6978d IN  Hundred Finance: Minter0 FTM0.0006262925
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0xe94cedee730c83fe14151a0db538f5139a38d7527081dc2695d6297f505dffe0244551682021-12-09 13:00:03424 days 19 hrs ago 0xb16a11442878d6f1ef202ae63233a7c13e98fd7f  Contract Creation0 FTM
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Vyper_contract

Compiler Version
vyper:0.2.12

Optimization Enabled:
N/A

Other Settings:
MIT license

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

Contract ABI

[{"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}]

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


Block Transaction Gas Used Reward
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
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.