Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 1,447 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Mint | 19902253 | 219 days ago | IN | 0 ETH | 0.00170257 | ||||
Mint | 19891616 | 220 days ago | IN | 0 ETH | 0.00214637 | ||||
Mint | 19887376 | 221 days ago | IN | 0 ETH | 0.00433335 | ||||
Mint | 19873861 | 223 days ago | IN | 0 ETH | 0.00215609 | ||||
Mint | 19825530 | 229 days ago | IN | 0 ETH | 0.00218676 | ||||
Mint | 19794488 | 234 days ago | IN | 0 ETH | 0.00207864 | ||||
Mint | 19737988 | 242 days ago | IN | 0 ETH | 0.00277722 | ||||
Mint | 19719034 | 244 days ago | IN | 0 ETH | 0.01539652 | ||||
Mint | 19719026 | 244 days ago | IN | 0 ETH | 0.01213646 | ||||
Mint | 19716860 | 245 days ago | IN | 0 ETH | 0.0037287 | ||||
Mint Many | 19622688 | 258 days ago | IN | 0 ETH | 0.00876814 | ||||
Mint | 19558474 | 267 days ago | IN | 0 ETH | 0.00988522 | ||||
Mint | 19558463 | 267 days ago | IN | 0 ETH | 0.00780767 | ||||
Mint | 19477556 | 278 days ago | IN | 0 ETH | 0.01478823 | ||||
Mint | 19467170 | 280 days ago | IN | 0 ETH | 0.00998086 | ||||
Mint | 19467169 | 280 days ago | IN | 0 ETH | 0.01553045 | ||||
Mint | 19303902 | 303 days ago | IN | 0 ETH | 0.00913407 | ||||
Mint Many | 19238023 | 312 days ago | IN | 0 ETH | 0.00962375 | ||||
Mint | 19225906 | 313 days ago | IN | 0 ETH | 0.00871282 | ||||
Mint | 19165803 | 322 days ago | IN | 0 ETH | 0.00662654 | ||||
Mint Many | 19145338 | 325 days ago | IN | 0 ETH | 0.00689274 | ||||
Mint | 19138805 | 326 days ago | IN | 0 ETH | 0.01653022 | ||||
Mint | 19123126 | 328 days ago | IN | 0 ETH | 0.00815149 | ||||
Mint | 19119984 | 328 days ago | IN | 0 ETH | 0.0148692 | ||||
Mint Many | 19116896 | 329 days ago | IN | 0 ETH | 0.00745997 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
Minter
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: LGPL-3.0 pragma solidity 0.8.17; import "./interfaces/ILT.sol"; import "./interfaces/IGaugeController.sol"; interface LiquidityGauge { function integrateFraction(address addr) external view returns (uint256); function userCheckpoint(address addr) external returns (bool); } contract Minter { event Minted(address indexed recipient, address gauge, uint256 minted); event ToogleApproveMint(address sender, address indexed mintingUser, bool status); address public immutable token; address public immutable controller; // user -> gauge -> value mapping(address => mapping(address => uint256)) public minted; // minter -> user -> can mint? mapping(address => mapping(address => bool)) public allowedToMintFor; /* * @notice Contract constructor * @param _token LT Token Address * @param _controller gauge Controller Address */ constructor(address _token, address _controller) { token = _token; controller = _controller; } /** * @notice Mint everything which belongs to `msg.sender` and send to them * @param gaugeAddress `LiquidityGauge` address to get mintable amount from */ function mint(address gaugeAddress) external { _mintFor(gaugeAddress, msg.sender); } /** * @notice Mint everything which belongs to `msg.sender` across multiple gauges * @param gaugeAddressList List of `LiquidityGauge` addresses */ function mintMany(address[] memory gaugeAddressList) external { for (uint256 i = 0; i < gaugeAddressList.length && i < 128; i++) { if (gaugeAddressList[i] == address(0)) { continue; } _mintFor(gaugeAddressList[i], msg.sender); } } /** * @notice Mint tokens for `_for` * @dev Only possible when `msg.sender` has been approved via `toggle_approve_mint` * @param gaugeAddress `LiquidityGauge` address to get mintable amount from * @param _for Address to mint to */ function mintFor(address gaugeAddress, address _for) external { if (allowedToMintFor[msg.sender][_for]) { _mintFor(gaugeAddress, _for); } } /** * @notice allow `mintingUser` to mint for `msg.sender` * @param mintingUser Address to toggle permission for */ function toggleApproveMint(address mintingUser) external { bool flag = allowedToMintFor[mintingUser][msg.sender]; allowedToMintFor[mintingUser][msg.sender] = !flag; emit ToogleApproveMint(msg.sender, mintingUser, !flag); } function _mintFor(address gaugeAddr, address _for) internal { ///Gomnoc not adde require(IGaugeController(controller).gaugeTypes(gaugeAddr) >= 0, "CE000"); bool success = LiquidityGauge(gaugeAddr).userCheckpoint(_for); require(success, "CHECK FAILED"); uint256 totalMint = LiquidityGauge(gaugeAddr).integrateFraction(_for); uint256 toMint = totalMint - minted[_for][gaugeAddr]; if (toMint != 0) { minted[_for][gaugeAddr] = totalMint; bool success = ILT(token).mint(_for, toMint); require(success, "MINT FAILED"); emit Minted(_for, gaugeAddr, toMint); } } }
// SPDX-License-Identifier: LGPL-3.0 pragma solidity 0.8.17; interface IGaugeController { struct Point { uint256 bias; uint256 slope; } struct VotedSlope { uint256 slope; uint256 power; uint256 end; } struct UserPoint { uint256 bias; uint256 slope; uint256 ts; uint256 blk; } event AddType(string name, int128 type_id); event NewTypeWeight(int128 indexed type_id, uint256 time, uint256 weight, uint256 total_weight); event NewGaugeWeight(address indexed gauge_address, uint256 time, uint256 weight, uint256 total_weight); event VoteForGauge(address indexed user, address indexed gauge_address, uint256 time, uint256 weight); event NewGauge(address indexed gauge_address, int128 gauge_type, uint256 weight); /** * @notice Get gauge type for address * @param _addr Gauge address * @return Gauge type id */ function gaugeTypes(address _addr) external view returns (int128); /** * @notice Add gauge `addr` of type `gauge_type` with weight `weight` * @param addr Gauge address * @param gaugeType Gauge type * @param weight Gauge weight */ function addGauge(address addr, int128 gaugeType, uint256 weight) external; /** * @notice Checkpoint to fill data common for all gauges */ function checkpoint() external; /** * @notice Checkpoint to fill data for both a specific gauge and common for all gauge * @param addr Gauge address */ function checkpointGauge(address addr) external; /** * @notice Get Gauge relative weight (not more than 1.0) normalized to 1e18(e.g. 1.0 == 1e18). Inflation which will be received by * it is inflation_rate * relative_weight / 1e18 * @param gaugeAddress Gauge address * @param time Relative weight at the specified timestamp in the past or present * @return Value of relative weight normalized to 1e18 */ function gaugeRelativeWeight(address gaugeAddress, uint256 time) external view returns (uint256); /** * @notice Get gauge weight normalized to 1e18 and also fill all the unfilled values for type and gauge records * @dev Any address can call, however nothing is recorded if the values are filled already * @param gaugeAddress Gauge address * @param time Relative weight at the specified timestamp in the past or present * @return Value of relative weight normalized to 1e18 */ function gaugeRelativeWeightWrite(address gaugeAddress, uint256 time) external returns (uint256); /** * @notice Add gauge type with name `_name` and weight `weight` * @dev only owner call * @param _name Name of gauge type * @param weight Weight of gauge type */ function addType(string memory _name, uint256 weight) external; /** * @notice Change gauge type `type_id` weight to `weight` * @dev only owner call * @param type_id Gauge type id * @param weight New Gauge weight */ function changeTypeWeight(int128 type_id, uint256 weight) external; /** * @notice Change weight of gauge `addr` to `weight` * @param gaugeAddress `Gauge` contract address * @param weight New Gauge weight */ function changeGaugeWeight(address gaugeAddress, uint256 weight) external; /** * @notice Allocate voting power for changing pool weights * @param gaugeAddress Gauge which `msg.sender` votes for * @param userWeight Weight for a gauge in bps (units of 0.01%). Minimal is 0.01%. Ignored if 0. * example: 10%=1000,3%=300,0.01%=1,100%=10000 */ function voteForGaugeWeights(address gaugeAddress, uint256 userWeight) external; /** * @notice Get current gauge weight * @param addr Gauge address * @return Gauge weight */ function getGaugeWeight(address addr) external view returns (uint256); /** * @notice Get current type weight * @param type_id Type id * @return Type weight */ function getTypeWeight(int128 type_id) external view returns (uint256); /** * @notice Get current total (type-weighted) weight * @return Total weight */ function getTotalWeight() external view returns (uint256); /** * @notice Get sum of gauge weights per type * @param type_id Type id * @return Sum of gauge weights */ function getWeightsSumPreType(int128 type_id) external view returns (uint256); function votingEscrow() external view returns (address); }
// SPDX-License-Identifier: LGPL-3.0 pragma solidity 0.8.17; interface ILT { /** * @dev Emitted when LT inflation rate update * * Note once a year */ event UpdateMiningParameters(uint256 time, uint256 rate, uint256 supply); /** * @dev Emitted when set LT minter,can set the minter only once, at creation */ event SetMinter(address indexed minter); function rate() external view returns (uint256); /** * @notice Update mining rate and supply at the start of the epoch * @dev Callable by any address, but only once per epoch * Total supply becomes slightly larger if this function is called late */ function updateMiningParameters() external; /** * @notice Get timestamp of the next mining epoch start while simultaneously updating mining parameters * @return Timestamp of the next epoch */ function futureEpochTimeWrite() external returns (uint256); /** * @notice Current number of tokens in existence (claimed or unclaimed) */ function availableSupply() external view returns (uint256); /** * @notice How much supply is mintable from start timestamp till end timestamp * @param start Start of the time interval (timestamp) * @param end End of the time interval (timestamp) * @return Tokens mintable from `start` till `end` */ function mintableInTimeframe(uint256 start, uint256 end) external view returns (uint256); /** * @notice Set the minter address * @dev Only callable once, when minter has not yet been set * @param _minter Address of the minter */ function setMinter(address _minter) external; /** * @notice Mint `value` tokens and assign them to `to` * @dev Emits a Transfer event originating from 0x00 * @param to The account that will receive the created tokens * @param value The amount that will be created * @return bool success */ function mint(address to, uint256 value) external returns (bool); /** * @notice Burn `value` tokens belonging to `msg.sender` * @dev Emits a Transfer event with a destination of 0x00 * @param value The amount that will be burned * @return bool success */ function burn(uint256 value) external returns (bool); }
{ "optimizer": { "enabled": true, "runs": 200 }, "viaIR": true, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_controller","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"address","name":"gauge","type":"address"},{"indexed":false,"internalType":"uint256","name":"minted","type":"uint256"}],"name":"Minted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"mintingUser","type":"address"},{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"ToogleApproveMint","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowedToMintFor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"controller","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"gaugeAddress","type":"address"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"gaugeAddress","type":"address"},{"internalType":"address","name":"_for","type":"address"}],"name":"mintFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"gaugeAddressList","type":"address[]"}],"name":"mintMany","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"minted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"mintingUser","type":"address"}],"name":"toggleApproveMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60c03461008657601f6108bc38819003918201601f19168301916001600160401b0383118484101761008b57808492604094855283398101031261008657610052602061004b836100a1565b92016100a1565b9060805260a05260405161080690816100b68239608051818181609001526105d8015260a05181818160d701526104b80152f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b03821682036100865756fe608060408181526004918236101561001657600080fd5b600092833560e01c9182630f3ec9981461034c57508163388de6ce146102fe578163397ada21146101d2575080636a627842146101a85780637504a15d1461014d5780638b752bb014610106578063f77c4791146100c35763fc0c546a1461007d57600080fd5b346100bf57816003193601126100bf57517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b5080fd5b50346100bf57816003193601126100bf57517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b50346100bf57806003193601126100bf57806020926101236103db565b61012b6103f6565b6001600160a01b03918216835282865283832091168252845220549051908152f35b50346100bf57806003193601126100bf576101666103db565b9060ff6101716103f6565b338552600160209081528386206001600160a01b038316875290529184205416610199578280f35b6101a291610486565b38808280f35b82346101cf5760203660031901126101cf576101cc6101c56103db565b3390610486565b80f35b80fd5b905082346101cf57602091826003193601126100bf5767ffffffffffffffff9281358481116102fa57366023820112156102fa57808301359485116102e7578460051b9551946102248388018761040c565b855281850160248097830101913683116102e3578701905b8282106102c05750505050815b83518110806102b6575b156102b2576001600160a01b038061026b8387610444565b5116156102ac576102899033906102828488610444565b5116610486565b600019811461029a57600101610249565b634e487b7160e01b8352601182528483fd5b50610289565b8280f35b5060808110610253565b81356001600160a01b03811681036102df57815290830190830161023c565b8680fd5b8580fd5b634e487b7160e01b845260418352602484fd5b8380fd5b5050346100bf57806003193601126100bf5760ff8160209361031e6103db565b6103266103f6565b6001600160a01b0391821683526001875283832091168252855220549151911615158152f35b915050346103d757602091826003193601126102fa577f328a156285132f909915921730bfbf5ca38f5689956669bab3ce64ff4c45523e916001600160a01b036103946103db565b169384865260018152828620338752815260ff8387205416159085875260018152838720338852815283872060ff1981541660ff8416179055338352820152a280f35b8280fd5b600435906001600160a01b03821682036103f157565b600080fd5b602435906001600160a01b03821682036103f157565b90601f8019910116810190811067ffffffffffffffff82111761042e57604052565b634e487b7160e01b600052604160045260246000fd5b80518210156104585760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b908160209103126103f1575180151581036103f15790565b9190604092835190631c490c5d60e31b825260018060a01b0380821692600491848383015260209060249282818581857f0000000000000000000000000000000000000000000000000000000000000000165afa9081156107c55760009161078d575b50600090600f0b1261076357885163b07b709b60e01b815281881685820181905297908381868160008c5af190811561070a57600091610746575b501561071557895163caa0b9ed60e01b8152858101899052838186818b5afa90811561070a576000916106dd575b5088600052600084528a6000208860005284528a600020549788820398828a116106c957820361058b575b505050505050505050509050565b60008a81528086528c81209181529085528b8120919091558a516340c10f1960e01b81526001600160a01b03909216868301908152602081018990529192849284928391829060400103927f0000000000000000000000000000000000000000000000000000000000000000165af19081156106be57600091610691575b501561066357505094516001600160a01b039190911681526020810191909152919250907f9d228d69b5fdb8d273a2336f8fb8612d039631024ea9bf09c424a9503aa078f090604090a2803880808080808080808061057d565b875162461bcd60e51b815292830152600b908201526a135253950811905253115160aa1b6044820152606490fd5b6106b19150823d84116106b7575b6106a9818361040c565b81019061046e565b38610609565b503d61069f565b89513d6000823e3d90fd5b86601189634e487b7160e01b600052526000fd5b908482813d8311610703575b6106f3818361040c565b810103126101cf57505138610552565b503d6106e9565b8b513d6000823e3d90fd5b895162461bcd60e51b8152808601849052600c818601526b10d21150d2c811905253115160a21b6044820152606490fd5b61075d9150843d86116106b7576106a9818361040c565b38610524565b885162461bcd60e51b815280850183905260058185015264043453030360dc1b6044820152606490fd5b8381813d83116107be575b6107a2818361040c565b810103126100bf57519081600f0b82036101cf575060006104e9565b503d610798565b8a513d6000823e3d90fdfea2646970667358221220a5a3fe46e170e4682ff680508db0411b7da1e304e41d90a1d5c78d0c8d4a115764736f6c634300081100330000000000000000000000009ed1439d328647bdb148c20316ea024c719a735b000000000000000000000000a8b2706b45eb95e5d14f8c29a3c5cf0cd5b4dd7e
Deployed Bytecode
0x608060408181526004918236101561001657600080fd5b600092833560e01c9182630f3ec9981461034c57508163388de6ce146102fe578163397ada21146101d2575080636a627842146101a85780637504a15d1461014d5780638b752bb014610106578063f77c4791146100c35763fc0c546a1461007d57600080fd5b346100bf57816003193601126100bf57517f0000000000000000000000009ed1439d328647bdb148c20316ea024c719a735b6001600160a01b03168152602090f35b5080fd5b50346100bf57816003193601126100bf57517f000000000000000000000000a8b2706b45eb95e5d14f8c29a3c5cf0cd5b4dd7e6001600160a01b03168152602090f35b50346100bf57806003193601126100bf57806020926101236103db565b61012b6103f6565b6001600160a01b03918216835282865283832091168252845220549051908152f35b50346100bf57806003193601126100bf576101666103db565b9060ff6101716103f6565b338552600160209081528386206001600160a01b038316875290529184205416610199578280f35b6101a291610486565b38808280f35b82346101cf5760203660031901126101cf576101cc6101c56103db565b3390610486565b80f35b80fd5b905082346101cf57602091826003193601126100bf5767ffffffffffffffff9281358481116102fa57366023820112156102fa57808301359485116102e7578460051b9551946102248388018761040c565b855281850160248097830101913683116102e3578701905b8282106102c05750505050815b83518110806102b6575b156102b2576001600160a01b038061026b8387610444565b5116156102ac576102899033906102828488610444565b5116610486565b600019811461029a57600101610249565b634e487b7160e01b8352601182528483fd5b50610289565b8280f35b5060808110610253565b81356001600160a01b03811681036102df57815290830190830161023c565b8680fd5b8580fd5b634e487b7160e01b845260418352602484fd5b8380fd5b5050346100bf57806003193601126100bf5760ff8160209361031e6103db565b6103266103f6565b6001600160a01b0391821683526001875283832091168252855220549151911615158152f35b915050346103d757602091826003193601126102fa577f328a156285132f909915921730bfbf5ca38f5689956669bab3ce64ff4c45523e916001600160a01b036103946103db565b169384865260018152828620338752815260ff8387205416159085875260018152838720338852815283872060ff1981541660ff8416179055338352820152a280f35b8280fd5b600435906001600160a01b03821682036103f157565b600080fd5b602435906001600160a01b03821682036103f157565b90601f8019910116810190811067ffffffffffffffff82111761042e57604052565b634e487b7160e01b600052604160045260246000fd5b80518210156104585760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b908160209103126103f1575180151581036103f15790565b9190604092835190631c490c5d60e31b825260018060a01b0380821692600491848383015260209060249282818581857f000000000000000000000000a8b2706b45eb95e5d14f8c29a3c5cf0cd5b4dd7e165afa9081156107c55760009161078d575b50600090600f0b1261076357885163b07b709b60e01b815281881685820181905297908381868160008c5af190811561070a57600091610746575b501561071557895163caa0b9ed60e01b8152858101899052838186818b5afa90811561070a576000916106dd575b5088600052600084528a6000208860005284528a600020549788820398828a116106c957820361058b575b505050505050505050509050565b60008a81528086528c81209181529085528b8120919091558a516340c10f1960e01b81526001600160a01b03909216868301908152602081018990529192849284928391829060400103927f0000000000000000000000009ed1439d328647bdb148c20316ea024c719a735b165af19081156106be57600091610691575b501561066357505094516001600160a01b039190911681526020810191909152919250907f9d228d69b5fdb8d273a2336f8fb8612d039631024ea9bf09c424a9503aa078f090604090a2803880808080808080808061057d565b875162461bcd60e51b815292830152600b908201526a135253950811905253115160aa1b6044820152606490fd5b6106b19150823d84116106b7575b6106a9818361040c565b81019061046e565b38610609565b503d61069f565b89513d6000823e3d90fd5b86601189634e487b7160e01b600052526000fd5b908482813d8311610703575b6106f3818361040c565b810103126101cf57505138610552565b503d6106e9565b8b513d6000823e3d90fd5b895162461bcd60e51b8152808601849052600c818601526b10d21150d2c811905253115160a21b6044820152606490fd5b61075d9150843d86116106b7576106a9818361040c565b38610524565b885162461bcd60e51b815280850183905260058185015264043453030360dc1b6044820152606490fd5b8381813d83116107be575b6107a2818361040c565b810103126100bf57519081600f0b82036101cf575060006104e9565b503d610798565b8a513d6000823e3d90fdfea2646970667358221220a5a3fe46e170e4682ff680508db0411b7da1e304e41d90a1d5c78d0c8d4a115764736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000009ed1439d328647bdb148c20316ea024c719a735b000000000000000000000000a8b2706b45eb95e5d14f8c29a3c5cf0cd5b4dd7e
-----Decoded View---------------
Arg [0] : _token (address): 0x9ed1439D328647BDb148c20316eA024c719a735b
Arg [1] : _controller (address): 0xA8b2706B45EB95E5D14f8C29a3C5Cf0Cd5B4Dd7E
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000009ed1439d328647bdb148c20316ea024c719a735b
Arg [1] : 000000000000000000000000a8b2706b45eb95e5d14f8c29a3c5cf0cd5b4dd7e
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.