ETH Price: $3,398.31 (-1.45%)
Gas: 2 Gwei

Contract

0x4aa2afd5616bEEC2321a9EfD7349400d4F18566A
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Mint201945902024-06-29 3:14:358 hrs ago1719630875IN
0x4aa2afd5...d4F18566A
0 ETH0.00039041.53509369
Mint201792682024-06-26 23:53:352 days ago1719446015IN
0x4aa2afd5...d4F18566A
0 ETH0.00124324.8350857
Mint201676782024-06-25 9:03:354 days ago1719306215IN
0x4aa2afd5...d4F18566A
0 ETH0.001026653.99289825
Mint201547632024-06-23 13:43:355 days ago1719150215IN
0x4aa2afd5...d4F18566A
0 ETH0.001406965.02825179
Mint201515872024-06-23 3:02:356 days ago1719111755IN
0x4aa2afd5...d4F18566A
0 ETH0.000462611.76178351
Mint201357102024-06-20 21:46:598 days ago1718920019IN
0x4aa2afd5...d4F18566A
0 ETH0.002430815.64235606
Mint201112882024-06-17 11:44:4712 days ago1718624687IN
0x4aa2afd5...d4F18566A
0 ETH0.000866313.48936351
Mint201101132024-06-17 7:47:3512 days ago1718610455IN
0x4aa2afd5...d4F18566A
0 ETH0.001337065.44668076
Mint201101052024-06-17 7:45:5912 days ago1718610359IN
0x4aa2afd5...d4F18566A
0 ETH0.001441165.48841956
Mint201096162024-06-17 6:07:3512 days ago1718604455IN
0x4aa2afd5...d4F18566A
0 ETH0.000806283.28275957
Mint201091642024-06-17 4:36:2312 days ago1718598983IN
0x4aa2afd5...d4F18566A
0 ETH0.001049563.71562179
Mint200995592024-06-15 20:23:5913 days ago1718483039IN
0x4aa2afd5...d4F18566A
0 ETH0.000860573.50380102
Mint200945342024-06-15 3:30:3514 days ago1718422235IN
0x4aa2afd5...d4F18566A
0 ETH0.002771796.56082433
Mint200904922024-06-14 13:57:5914 days ago1718373479IN
0x4aa2afd5...d4F18566A
0 ETH0.0059576413.22226259
Mint200562532024-06-09 19:07:4719 days ago1717960067IN
0x4aa2afd5...d4F18566A
0 ETH0.001590336.47866043
Mint200441792024-06-08 2:38:5921 days ago1717814339IN
0x4aa2afd5...d4F18566A
0 ETH0.003283437.2871886
Mint200015952024-06-02 3:57:1127 days ago1717300631IN
0x4aa2afd5...d4F18566A
0 ETH0.001799457.24788575
Mint199860202024-05-30 23:45:3529 days ago1717112735IN
0x4aa2afd5...d4F18566A
0 ETH0.003726588.59696538
Mint199507912024-05-26 1:32:4734 days ago1716687167IN
0x4aa2afd5...d4F18566A
0 ETH0.001554295.50245044
Mint199372602024-05-24 4:09:2336 days ago1716523763IN
0x4aa2afd5...d4F18566A
0 ETH0.003920429.47615783
Mint199170042024-05-21 8:10:5939 days ago1716279059IN
0x4aa2afd5...d4F18566A
0 ETH0.002100668
Mint199090142024-05-20 5:20:4740 days ago1716182447IN
0x4aa2afd5...d4F18566A
0 ETH0.000733472.79193744
Mint199072032024-05-19 23:16:3540 days ago1716160595IN
0x4aa2afd5...d4F18566A
0 ETH0.000800172.91799746
Mint198845552024-05-16 19:14:3543 days ago1715886875IN
0x4aa2afd5...d4F18566A
0 ETH0.002158588.22090237
Mint198728582024-05-15 4:01:4745 days ago1715745707IN
0x4aa2afd5...d4F18566A
0 ETH0.00112714.29253703
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Vyper_contract

Compiler Version
vyper:0.3.1

Optimization Enabled:
N/A

Other Settings:
MIT license

Contract Source Code (Vyper language format)

# @version 0.3.1
"""
@title Token Minter
@author Curve Finance
@license MIT
"""

# Original idea and credit:
# Curve Finance's Token Minter
# https://resources.curve.fi/base-features/understanding-gauges
# https://github.com/curvefi/curve-dao-contracts/blob/master/contracts/Minter.vy
# This contract is an almost-identical fork of Curve's contract

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


token: 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__(_token: address, _controller: address):
    self.token = _token
    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.token).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":"_token","type":"address"},{"name":"_controller","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"mint","inputs":[{"name":"gauge_addr","type":"address"}],"outputs":[],"gas":112442},{"stateMutability":"nonpayable","type":"function","name":"mint_many","inputs":[{"name":"gauge_addrs","type":"address[8]"}],"outputs":[],"gas":499092},{"stateMutability":"nonpayable","type":"function","name":"mint_for","inputs":[{"name":"gauge_addr","type":"address"},{"name":"_for","type":"address"}],"outputs":[],"gas":115035},{"stateMutability":"nonpayable","type":"function","name":"toggle_approve_mint","inputs":[{"name":"minting_user","type":"address"}],"outputs":[],"gas":38051},{"stateMutability":"view","type":"function","name":"token","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2580},{"stateMutability":"view","type":"function","name":"controller","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2610},{"stateMutability":"view","type":"function","name":"minted","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3172},{"stateMutability":"view","type":"function","name":"allowed_to_mint_for","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"address"}],"outputs":[{"name":"","type":"bool"}],"gas":3202}]

60206105076080396080518060a01c6105025760e05260206020610507016080396080518060a01c610502576101005260e051600155610100516002556104ea56600436101561000d576102f6565b60046000601c37600051346104a457636a627842811861005d576004358060a01c6104a4576101c0526000546104a45760016000556101c05160e05233610100526100566102fc565b6000600055005b63a51e19048118610154576004358060a01c6104a4576101c0526024358060a01c6104a4576101e0526044358060a01c6104a457610200526064358060a01c6104a457610220526084358060a01c6104a4576102405260a4358060a01c6104a4576102605260c4358060a01c6104a4576102805260e4358060a01c6104a4576102a0526000546104a45760016000556102c060006008818352015b6101c06102c05160088110156104a45760200201516101165761014b565b6101c06102c05160088110156104a457602002015160e052336101005261013b6102fc565b81516001018083528114156100f8575b50506000600055005b6327f18ae381186101ca576004358060a01c6104a4576101c0526024358060a01c6104a4576101e0526000546104a457600160005560043360a05260805260406080206101e05160a052608052604060802054156101c3576101c05160e0526101e051610100526101c36102fc565b6000600055005b63dd289d608118610220576004358060a01c6104a45760e052600460e05160a05260805260406080203360a05260805260406080205415600460e05160a05260805260406080203360a052608052604060802055005b63fc0c546a81186102375760015460e052602060e0f35b63f77c4791811861024e5760025460e052602060e0f35b638b752bb081186102a1576004358060a01c6104a45760e0526024358060a01c6104a45761010052600360e05160a05260805260406080206101005160a052608052604060802054610120526020610120f35b63a099003381186102f4576004358060a01c6104a45760e0526024358060a01c6104a45761010052600460e05160a05260805260406080206101005160a052608052604060802054610120526020610120f35b505b60006000fd5b6000633f9095b76101205260e051610140526020610120602461013c6002545afa61032c573d600060003e3d6000fd5b601f3d11156104a45761012051126104a457634b8200936101205261010051610140526020610120602461013c600060e0515af161036f573d600060003e3d6000fd5b601f3d11156104a4576101205063094007076101405261010051610160526020610140602461015c60e0515afa6103ab573d600060003e3d6000fd5b601f3d11156104a45761014051610120526101205160036101005160a052608052604060802060e05160a0526080526040608020548082106104a4578082039050905061014052600061014051146104a2576340c10f19610160526101005161018052610140516101a0526020610160604461017c60006001545af1610436573d600060003e3d6000fd5b601f3d11156104a457610160506101205160036101005160a052608052604060802060e05160a052608052604060802055610100517f9d228d69b5fdb8d273a2336f8fb8612d039631024ea9bf09c424a9503aa078f060e0516101605261012051610180526040610160a25b565b600080fd5b6100416104ea036100416000396100416104ea036000f35b600080fd00000000000000000000000072953a5c32413614d24c29c84a66ae4b59581bbf000000000000000000000000b992e8e1943f40f89301ab89a5c254f567af5b63

Deployed Bytecode

0x600436101561000d576102f6565b60046000601c37600051346104a457636a627842811861005d576004358060a01c6104a4576101c0526000546104a45760016000556101c05160e05233610100526100566102fc565b6000600055005b63a51e19048118610154576004358060a01c6104a4576101c0526024358060a01c6104a4576101e0526044358060a01c6104a457610200526064358060a01c6104a457610220526084358060a01c6104a4576102405260a4358060a01c6104a4576102605260c4358060a01c6104a4576102805260e4358060a01c6104a4576102a0526000546104a45760016000556102c060006008818352015b6101c06102c05160088110156104a45760200201516101165761014b565b6101c06102c05160088110156104a457602002015160e052336101005261013b6102fc565b81516001018083528114156100f8575b50506000600055005b6327f18ae381186101ca576004358060a01c6104a4576101c0526024358060a01c6104a4576101e0526000546104a457600160005560043360a05260805260406080206101e05160a052608052604060802054156101c3576101c05160e0526101e051610100526101c36102fc565b6000600055005b63dd289d608118610220576004358060a01c6104a45760e052600460e05160a05260805260406080203360a05260805260406080205415600460e05160a05260805260406080203360a052608052604060802055005b63fc0c546a81186102375760015460e052602060e0f35b63f77c4791811861024e5760025460e052602060e0f35b638b752bb081186102a1576004358060a01c6104a45760e0526024358060a01c6104a45761010052600360e05160a05260805260406080206101005160a052608052604060802054610120526020610120f35b63a099003381186102f4576004358060a01c6104a45760e0526024358060a01c6104a45761010052600460e05160a05260805260406080206101005160a052608052604060802054610120526020610120f35b505b60006000fd5b6000633f9095b76101205260e051610140526020610120602461013c6002545afa61032c573d600060003e3d6000fd5b601f3d11156104a45761012051126104a457634b8200936101205261010051610140526020610120602461013c600060e0515af161036f573d600060003e3d6000fd5b601f3d11156104a4576101205063094007076101405261010051610160526020610140602461015c60e0515afa6103ab573d600060003e3d6000fd5b601f3d11156104a45761014051610120526101205160036101005160a052608052604060802060e05160a0526080526040608020548082106104a4578082039050905061014052600061014051146104a2576340c10f19610160526101005161018052610140516101a0526020610160604461017c60006001545af1610436573d600060003e3d6000fd5b601f3d11156104a457610160506101205160036101005160a052608052604060802060e05160a052608052604060802055610100517f9d228d69b5fdb8d273a2336f8fb8612d039631024ea9bf09c424a9503aa078f060e0516101605261012051610180526040610160a25b565b600080fd

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000072953a5c32413614d24c29c84a66ae4b59581bbf000000000000000000000000b992e8e1943f40f89301ab89a5c254f567af5b63

-----Decoded View---------------
Arg [0] : _token (address): 0x72953a5C32413614d24C29c84a66AE4B59581Bbf
Arg [1] : _controller (address): 0xB992E8E1943f40f89301aB89A5C254F567aF5b63

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000072953a5c32413614d24c29c84a66ae4b59581bbf
Arg [1] : 000000000000000000000000b992e8e1943f40f89301ab89a5c254f567af5b63


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

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ 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.