FTM Price: $0.99 (-3.29%)
Gas: 35 GWei

Contract

0x2105dE165eD364919703186905B9BB5B8015F13c
 

Overview

FTM Balance

Fantom LogoFantom LogoFantom Logo0 FTM

FTM Value

$0.00

Sponsored

Transaction Hash
Method
Block
From
To
Value
Mint_many778370782024-03-20 23:48:338 days ago1710978513IN
0x2105dE16...B8015F13c
0 FTM0.40432811832.85053036
Mint_many773399422024-03-14 18:49:1814 days ago1710442158IN
0x2105dE16...B8015F13c
0 FTM0.1214948718.70185107
Mint735703842024-01-01 20:14:3987 days ago1704140079IN
0x2105dE16...B8015F13c
0 FTM0.1124312952.79019952
Mint724821882023-12-13 14:34:56106 days ago1702478096IN
0x2105dE16...B8015F13c
0 FTM0.021044644.9971925
Mint705285212023-11-12 16:15:24137 days ago1699805724IN
0x2105dE16...B8015F13c
0 FTM0.017864236.86572506
Mint661121222023-07-20 19:10:38252 days ago1689880238IN
0x2105dE16...B8015F13c
0 FTM0.0265442463.39635258
Mint582339922023-03-23 22:20:52371 days ago1679610052IN
0x2105dE16...B8015F13c
0 FTM0.0186496533.7157404
Mint_many555641152023-02-11 14:38:17411 days ago1676126297IN
0x2105dE16...B8015F13c
0 FTM0.0111961527.96355134
Mint552087462023-02-06 17:24:44416 days ago1675704284IN
0x2105dE16...B8015F13c
0 FTM0.03783085117.19923435
Mint552086772023-02-06 17:23:24416 days ago1675704204IN
0x2105dE16...B8015F13c
0 FTM0.03975454116.96263555
Mint549688302023-02-03 6:04:25420 days ago1675404265IN
0x2105dE16...B8015F13c
0 FTM0.05478566138.43294128
Mint549598932023-02-03 3:03:08420 days ago1675393388IN
0x2105dE16...B8015F13c
0 FTM0.07188586136.67970262
Mint_many546159952023-01-28 21:32:04425 days ago1674941524IN
0x2105dE16...B8015F13c
0 FTM0.0195802640.52894256
Mint545649082023-01-27 23:38:10426 days ago1674862690IN
0x2105dE16...B8015F13c
0 FTM0.0166571240.86052875
Mint545617332023-01-27 22:09:01426 days ago1674857341IN
0x2105dE16...B8015F13c
0 FTM0.0174560442.08781372
Mint_many545572392023-01-27 20:15:23426 days ago1674850523IN
0x2105dE16...B8015F13c
0 FTM0.0167816444.40163774
Mint_many544010432023-01-25 11:38:28428 days ago1674646708IN
0x2105dE16...B8015F13c
0 FTM0.0096716628.1294462
Mint540099602023-01-18 23:20:42435 days ago1674084042IN
0x2105dE16...B8015F13c
0 FTM0.0143919240.71001629
Mint537533092023-01-14 12:32:08439 days ago1673699528IN
0x2105dE16...B8015F13c
0 FTM0.34852227730.24897919
Mint537532902023-01-14 12:31:49439 days ago1673699509IN
0x2105dE16...B8015F13c
0 FTM0.3180855730.24897919
Mint_many530834722023-01-02 0:02:26452 days ago1672617746IN
0x2105dE16...B8015F13c
0 FTM0.0643047885.52157156
Mint530834522023-01-02 0:01:05452 days ago1672617665IN
0x2105dE16...B8015F13c
0 FTM0.0220510962.65085254
Mint530834352023-01-02 0:00:07452 days ago1672617607IN
0x2105dE16...B8015F13c
0 FTM0.0265802664.24652256
Mint530834242023-01-01 23:58:44452 days ago1672617524IN
0x2105dE16...B8015F13c
0 FTM0.0159169945.0042024
Mint530834212023-01-01 23:58:30452 days ago1672617510IN
0x2105dE16...B8015F13c
0 FTM0.0258463873.07884654
View all transactions

Latest 1 internal transaction

Parent Txn Hash Block From To Value
357256062022-04-10 15:26:27718 days ago1649604387  Contract Creation0 FTM
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xFa0F5d0c...d45B3659a
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
Vyper_contract

Compiler Version
vyper:0.2.15

Optimization Enabled:
N/A

Other Settings:
MIT license

Contract Source Code (Vyper language format)

# @version 0.2.15
"""
@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}]

Deployed Bytecode

0x600436101561000d576102b8565b600035601c526000513461046157636a6278428114156100645760005461046157600160005560043560a01c610461576004356101405233610160526101605161014051600658016102be565b6000506000600055005b63a51e190481141561012b576001546104615760016001556000610120525b610120516004013560a01c6104615760206101205101610120526101006101205110156100af57610083565b61014060006008818352015b60046101405160088110156104615760200201356100d857610122565b6101405160046101405160088110156104615760200201356101605233610180526101805161016051600658016102be565b610140526000505b81516001018083528114156100bb575b50506000600155005b6327f18ae38114156101a35760025461046157600160025560043560a01c6104615760243560a01c6104615760063360e05260c052604060c02060243560e05260c052604060c020541561019c5760043561014052602435610160526101605161014051600658016102be565b6000505b6000600255005b63dd289d608114156101f65760043560a01c61046157600660043560e05260c052604060c0203360e05260c052604060c0205415600660043560e05260c052604060c0203360e05260c052604060c02055005b6361d027b381141561020e5760035460005260206000f35b63f77c47918114156102265760045460005260206000f35b638b752bb081141561026e5760043560a01c6104615760243560a01c61046157600560043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f35b63a09900338114156102b65760043560a01c6104615760243560a01c61046157600660043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f35b505b60006000fd5b610180526101405261016052600060206102206024633f9095b76101a052610140516101c0526101bc6004545afa1561046157601f3d11156104615760005061022051126104615760206102206024634b8200936101a052610160516101c0526101bc6000610140515af11561046157601f3d111561046157600050610220506020610240602463094007076101c052610160516101e0526101dc610140515afa1561046157601f3d111561046157600050610240516101a0526101a05160056101605160e05260c052604060c0206101405160e05260c052604060c0205480821061046157808203905090506101c05260006101c051181561045b57602061028060446340c10f196101e05261016051610200526101c051610220526101fc60006003545af11561046157601f3d111561046157600050610280506101a05160056101605160e05260c052604060c0206101405160e05260c052604060c02055610140516101e0526101a05161020052610160517f9d228d69b5fdb8d273a2336f8fb8612d039631024ea9bf09c424a9503aa078f060406101e0a25b61018051565b600080fd

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.