ERC-20
DeFi
Overview
Max Total Supply
1,578,323.131481596244740294 vsdCRV
Holders
16 (0.00%)
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
0.000000790278020399 vsdCRVValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Source Code Verified (Exact Match)
Contract Name:
vsdToken
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity 0.8.19; import "src/interfaces/IBooster.sol"; import "src/interfaces/IDepositor.sol"; import "src/interfaces/ILiquidityGauge.sol"; import {ERC20} from "solady/tokens/ERC20.sol"; import {SafeTransferLib} from "solady/utils/SafeTransferLib.sol"; /// @title vsdToken /// @notice Contract that accepts tokens, sdTokens, and sdTokens gauges, against vsdToken. /// @author StakeDAO /// @custom:contact [email protected] contract vsdToken is ERC20 { using SafeTransferLib for ERC20; /// @notice Address of the locker token. address immutable token; /// @notice Address of the sdToken corresponding to the token. address immutable sdToken; /// @notice Address of the veSDT booster contract. address immutable booster; /// @notice Address of the gauge contract where sdToken is deposited. address public gauge; /// @notice Address of the depositor contract. address public depositor; /// @notice Address of the governance. address public governance; /// @notice Address of the future governance contract. address public futureGovernance; /// @notice Throws if caller is not the governance. error GOVERNANCE(); /// @notice Event emitted when governance is changed. /// @param newGovernance Address of the new governance. event GovernanceChanged(address indexed newGovernance); //////////////////////////////////////////////////////////////// /// --- MODIFIERS /////////////////////////////////////////////////////////////// modifier onlyGovernance() { if (msg.sender != governance) revert GOVERNANCE(); _; } constructor(address _token, address _depositor, address _booster, address _sdToken, address _gauge) { token = _token; gauge = _gauge; booster = _booster; sdToken = _sdToken; depositor = _depositor; governance = msg.sender; SafeTransferLib.safeApprove(_sdToken, _gauge, type(uint256).max); SafeTransferLib.safeApprove(_token, _depositor, type(uint256).max); } /// @notice Deposit token through the depositor contract and stake the tokens in the gauge on behalf of the booster contract. /// @param _amount Amount of tokens to deposit. function deposit(uint256 _amount) external { /// Transfer the tokens to this contract. SafeTransferLib.safeTransferFrom(token, msg.sender, address(this), _amount); /// Check for any incentive tokens sitting in the depositor contract. uint256 _incentiveToken = IDepositor(depositor).incentiveToken(); /// Deposit and stake the tokens on behalf the booster contract. IDepositor(depositor).deposit(_amount, true, true, booster); /// Mint vsdTokens to the user + any incentive tokens. _mint(msg.sender, _amount + _incentiveToken); } /// @notice Deposit sdToken Gauge to the booster contract. /// @param _amount Amount of sdToken to deposit. function depositGauge(uint256 _amount) external { /// Transfer the tokens directly to the booster contract. SafeTransferLib.safeTransferFrom(gauge, msg.sender, booster, _amount); /// Mint vsdTokens to the user. _mint(msg.sender, _amount); } /// @notice Deposit sdToken, stake them in the gauge on behalf of the booster contract. function depositSdToken(uint256 _amount) external { /// Transfer the tokens to this contract. SafeTransferLib.safeTransferFrom(sdToken, msg.sender, address(this), _amount); /// Stake sdToken in the gauge on behalf of the booster contract. ILiquidityGauge(gauge).deposit(_amount, booster); /// Mint vsdTokens to the user. _mint(msg.sender, _amount); } /// @notice Withdraw sdToken from the booster contract. /// @param _amount Amount of sdToken to withdraw. /// @param _unstake Boolean indicating whether to unstake the tokens from the gauge and receive sdToken. function withdraw(uint256 _amount, bool _unstake) external { /// Burn vsdTokens from the user. _burn(msg.sender, _amount); /// Withdraw the tokens from the gauge. IBooster(booster).withdraw(gauge, _amount); /// Unstake the tokens from the gauge. if (_unstake) { ILiquidityGauge(gauge).withdraw(_amount); /// Transfer the tokens to the user. SafeTransferLib.safeTransfer(sdToken, msg.sender, _amount); } else { /// Transfer the tokens to the user. SafeTransferLib.safeTransfer(gauge, msg.sender, _amount); } } /// @notice Returns the name of the contract. (ERC20) function name() public view override returns (string memory) { return string(abi.encodePacked("Vote Boosted ", ERC20(sdToken).symbol())); } /// @notice Returns the symbol of the contract. (ERC20) function symbol() public view override returns (string memory) { return string(abi.encodePacked("v", ERC20(sdToken).symbol())); } /// @notice Returns the decimals of the contract. (ERC20) function decimals() public view override returns (uint8) { return ERC20(sdToken).decimals(); } //////////////////////////////////////////////////////////////// /// --- GOVERNANCE /////////////////////////////////////////////////////////////// /// @notice Sets the depositor address. function setDepositor(address _depositor) external onlyGovernance { /// Remove the approval from the old depositor. SafeTransferLib.safeApprove(token, depositor, 0); /// Update the depositor address. depositor = _depositor; /// Approve the new depositor to spend the token. SafeTransferLib.safeApprove(token, _depositor, type(uint256).max); } /// @notice Sets the gauge address. /// @param _gauge Address of the gauge contract. /// @dev In order to update the gauge address, we need to migrate from the old gauge to the new one by withdrawing. function setGauge(address _gauge) external onlyGovernance { uint256 _totalSupply = totalSupply(); /// Withdraw the tokens from the booster contract. IBooster(booster).withdraw(gauge, _totalSupply); /// Unstake the tokens from the gauge. ILiquidityGauge(gauge).withdraw(_totalSupply); /// Remove the approval from the old gauge. SafeTransferLib.safeApprove(sdToken, gauge, 0); /// Set the new gauge address. gauge = _gauge; /// Approve the new gauge to spend the sdToken. SafeTransferLib.safeApprove(sdToken, _gauge, type(uint256).max); /// Stake the tokens in the new gauge on behalf of the booster contract. ILiquidityGauge(_gauge).deposit(_totalSupply, booster); } /// @notice Transfer the governance to a new address. /// @param _governance Address of the new governance. function transferGovernance(address _governance) external onlyGovernance { futureGovernance = _governance; } /// @notice Accept the governance transfer. function acceptGovernance() external { if (msg.sender != futureGovernance) revert GOVERNANCE(); governance = msg.sender; futureGovernance = address(0); emit GovernanceChanged(msg.sender); } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity 0.8.19; interface IBooster { function withdraw(address _gauge, uint256 _amount) external; }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity 0.8.19; interface IDepositor { function deposit(uint256 _amount, bool _lock, bool _stake, address _user) external; function incentiveToken() external view returns (uint256); }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity 0.8.19; interface ILiquidityGauge { function deposit(uint256 _amount, address _user) external; function withdraw(uint256 _amount) external; function claim_rewards(address _addr, address _receiver) external; function claimable_reward(address _addr, address _token) external view returns (uint256); function balanceOf(address _addr) external view returns (uint256); function working_balances(address _addr) external view returns (uint256); function working_supply() external view returns (uint256); function totalSupply() external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @notice Simple ERC20 + EIP-2612 implementation. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/tokens/ERC20.sol) /// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol) /// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol) /// /// @dev Note: /// - The ERC20 standard allows minting and transferring to and from the zero address, /// minting and transferring zero tokens, as well as self-approvals. /// For performance, this implementation WILL NOT revert for such actions. /// Please add any checks with overrides if desired. /// - The `permit` function uses the ecrecover precompile (0x1). /// /// If you are overriding: /// - NEVER violate the ERC20 invariant: /// the total sum of all balances must be equal to `totalSupply()`. /// - Check that the overridden function is actually used in the function you want to /// change the behavior of. Much of the code has been manually inlined for performance. abstract contract ERC20 { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CUSTOM ERRORS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The total supply has overflowed. error TotalSupplyOverflow(); /// @dev The allowance has overflowed. error AllowanceOverflow(); /// @dev The allowance has underflowed. error AllowanceUnderflow(); /// @dev Insufficient balance. error InsufficientBalance(); /// @dev Insufficient allowance. error InsufficientAllowance(); /// @dev The permit is invalid. error InvalidPermit(); /// @dev The permit has expired. error PermitExpired(); /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* EVENTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Emitted when `amount` tokens is transferred from `from` to `to`. event Transfer(address indexed from, address indexed to, uint256 amount); /// @dev Emitted when `amount` tokens is approved by `owner` to be used by `spender`. event Approval(address indexed owner, address indexed spender, uint256 amount); /// @dev `keccak256(bytes("Transfer(address,address,uint256)"))`. uint256 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; /// @dev `keccak256(bytes("Approval(address,address,uint256)"))`. uint256 private constant _APPROVAL_EVENT_SIGNATURE = 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* STORAGE */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The storage slot for the total supply. uint256 private constant _TOTAL_SUPPLY_SLOT = 0x05345cdf77eb68f44c; /// @dev The balance slot of `owner` is given by: /// ``` /// mstore(0x0c, _BALANCE_SLOT_SEED) /// mstore(0x00, owner) /// let balanceSlot := keccak256(0x0c, 0x20) /// ``` uint256 private constant _BALANCE_SLOT_SEED = 0x87a211a2; /// @dev The allowance slot of (`owner`, `spender`) is given by: /// ``` /// mstore(0x20, spender) /// mstore(0x0c, _ALLOWANCE_SLOT_SEED) /// mstore(0x00, owner) /// let allowanceSlot := keccak256(0x0c, 0x34) /// ``` uint256 private constant _ALLOWANCE_SLOT_SEED = 0x7f5e9f20; /// @dev The nonce slot of `owner` is given by: /// ``` /// mstore(0x0c, _NONCES_SLOT_SEED) /// mstore(0x00, owner) /// let nonceSlot := keccak256(0x0c, 0x20) /// ``` uint256 private constant _NONCES_SLOT_SEED = 0x38377508; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CONSTANTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev `(_NONCES_SLOT_SEED << 16) | 0x1901`. uint256 private constant _NONCES_SLOT_SEED_WITH_SIGNATURE_PREFIX = 0x383775081901; /// @dev `keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)")`. bytes32 private constant _DOMAIN_TYPEHASH = 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f; /// @dev `keccak256("1")`. bytes32 private constant _VERSION_HASH = 0xc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6; /// @dev `keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)")`. bytes32 private constant _PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* ERC20 METADATA */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Returns the name of the token. function name() public view virtual returns (string memory); /// @dev Returns the symbol of the token. function symbol() public view virtual returns (string memory); /// @dev Returns the decimals places of the token. function decimals() public view virtual returns (uint8) { return 18; } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* ERC20 */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Returns the amount of tokens in existence. function totalSupply() public view virtual returns (uint256 result) { /// @solidity memory-safe-assembly assembly { result := sload(_TOTAL_SUPPLY_SLOT) } } /// @dev Returns the amount of tokens owned by `owner`. function balanceOf(address owner) public view virtual returns (uint256 result) { /// @solidity memory-safe-assembly assembly { mstore(0x0c, _BALANCE_SLOT_SEED) mstore(0x00, owner) result := sload(keccak256(0x0c, 0x20)) } } /// @dev Returns the amount of tokens that `spender` can spend on behalf of `owner`. function allowance(address owner, address spender) public view virtual returns (uint256 result) { /// @solidity memory-safe-assembly assembly { mstore(0x20, spender) mstore(0x0c, _ALLOWANCE_SLOT_SEED) mstore(0x00, owner) result := sload(keccak256(0x0c, 0x34)) } } /// @dev Sets `amount` as the allowance of `spender` over the caller's tokens. /// /// Emits a {Approval} event. function approve(address spender, uint256 amount) public virtual returns (bool) { /// @solidity memory-safe-assembly assembly { // Compute the allowance slot and store the amount. mstore(0x20, spender) mstore(0x0c, _ALLOWANCE_SLOT_SEED) mstore(0x00, caller()) sstore(keccak256(0x0c, 0x34), amount) // Emit the {Approval} event. mstore(0x00, amount) log3(0x00, 0x20, _APPROVAL_EVENT_SIGNATURE, caller(), shr(96, mload(0x2c))) } return true; } /// @dev Transfer `amount` tokens from the caller to `to`. /// /// Requirements: /// - `from` must at least have `amount`. /// /// Emits a {Transfer} event. function transfer(address to, uint256 amount) public virtual returns (bool) { _beforeTokenTransfer(msg.sender, to, amount); /// @solidity memory-safe-assembly assembly { // Compute the balance slot and load its value. mstore(0x0c, _BALANCE_SLOT_SEED) mstore(0x00, caller()) let fromBalanceSlot := keccak256(0x0c, 0x20) let fromBalance := sload(fromBalanceSlot) // Revert if insufficient balance. if gt(amount, fromBalance) { mstore(0x00, 0xf4d678b8) // `InsufficientBalance()`. revert(0x1c, 0x04) } // Subtract and store the updated balance. sstore(fromBalanceSlot, sub(fromBalance, amount)) // Compute the balance slot of `to`. mstore(0x00, to) let toBalanceSlot := keccak256(0x0c, 0x20) // Add and store the updated balance of `to`. // Will not overflow because the sum of all user balances // cannot exceed the maximum uint256 value. sstore(toBalanceSlot, add(sload(toBalanceSlot), amount)) // Emit the {Transfer} event. mstore(0x20, amount) log3(0x20, 0x20, _TRANSFER_EVENT_SIGNATURE, caller(), shr(96, mload(0x0c))) } _afterTokenTransfer(msg.sender, to, amount); return true; } /// @dev Transfers `amount` tokens from `from` to `to`. /// /// Note: Does not update the allowance if it is the maximum uint256 value. /// /// Requirements: /// - `from` must at least have `amount`. /// - The caller must have at least `amount` of allowance to transfer the tokens of `from`. /// /// Emits a {Transfer} event. function transferFrom(address from, address to, uint256 amount) public virtual returns (bool) { _beforeTokenTransfer(from, to, amount); /// @solidity memory-safe-assembly assembly { let from_ := shl(96, from) // Compute the allowance slot and load its value. mstore(0x20, caller()) mstore(0x0c, or(from_, _ALLOWANCE_SLOT_SEED)) let allowanceSlot := keccak256(0x0c, 0x34) let allowance_ := sload(allowanceSlot) // If the allowance is not the maximum uint256 value. if add(allowance_, 1) { // Revert if the amount to be transferred exceeds the allowance. if gt(amount, allowance_) { mstore(0x00, 0x13be252b) // `InsufficientAllowance()`. revert(0x1c, 0x04) } // Subtract and store the updated allowance. sstore(allowanceSlot, sub(allowance_, amount)) } // Compute the balance slot and load its value. mstore(0x0c, or(from_, _BALANCE_SLOT_SEED)) let fromBalanceSlot := keccak256(0x0c, 0x20) let fromBalance := sload(fromBalanceSlot) // Revert if insufficient balance. if gt(amount, fromBalance) { mstore(0x00, 0xf4d678b8) // `InsufficientBalance()`. revert(0x1c, 0x04) } // Subtract and store the updated balance. sstore(fromBalanceSlot, sub(fromBalance, amount)) // Compute the balance slot of `to`. mstore(0x00, to) let toBalanceSlot := keccak256(0x0c, 0x20) // Add and store the updated balance of `to`. // Will not overflow because the sum of all user balances // cannot exceed the maximum uint256 value. sstore(toBalanceSlot, add(sload(toBalanceSlot), amount)) // Emit the {Transfer} event. mstore(0x20, amount) log3(0x20, 0x20, _TRANSFER_EVENT_SIGNATURE, shr(96, from_), shr(96, mload(0x0c))) } _afterTokenTransfer(from, to, amount); return true; } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* EIP-2612 */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev For more performance, override to return the constant value /// of `keccak256(bytes(name()))` if `name()` will never change. function _constantNameHash() internal view virtual returns (bytes32 result) {} /// @dev Returns the current nonce for `owner`. /// This value is used to compute the signature for EIP-2612 permit. function nonces(address owner) public view virtual returns (uint256 result) { /// @solidity memory-safe-assembly assembly { // Compute the nonce slot and load its value. mstore(0x0c, _NONCES_SLOT_SEED) mstore(0x00, owner) result := sload(keccak256(0x0c, 0x20)) } } /// @dev Sets `value` as the allowance of `spender` over the tokens of `owner`, /// authorized by a signed approval by `owner`. /// /// Emits a {Approval} event. function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public virtual { bytes32 nameHash = _constantNameHash(); // We simply calculate it on-the-fly to allow for cases where the `name` may change. if (nameHash == bytes32(0)) nameHash = keccak256(bytes(name())); /// @solidity memory-safe-assembly assembly { // Revert if the block timestamp is greater than `deadline`. if gt(timestamp(), deadline) { mstore(0x00, 0x1a15a3cc) // `PermitExpired()`. revert(0x1c, 0x04) } let m := mload(0x40) // Grab the free memory pointer. // Clean the upper 96 bits. owner := shr(96, shl(96, owner)) spender := shr(96, shl(96, spender)) // Compute the nonce slot and load its value. mstore(0x0e, _NONCES_SLOT_SEED_WITH_SIGNATURE_PREFIX) mstore(0x00, owner) let nonceSlot := keccak256(0x0c, 0x20) let nonceValue := sload(nonceSlot) // Prepare the domain separator. mstore(m, _DOMAIN_TYPEHASH) mstore(add(m, 0x20), nameHash) mstore(add(m, 0x40), _VERSION_HASH) mstore(add(m, 0x60), chainid()) mstore(add(m, 0x80), address()) mstore(0x2e, keccak256(m, 0xa0)) // Prepare the struct hash. mstore(m, _PERMIT_TYPEHASH) mstore(add(m, 0x20), owner) mstore(add(m, 0x40), spender) mstore(add(m, 0x60), value) mstore(add(m, 0x80), nonceValue) mstore(add(m, 0xa0), deadline) mstore(0x4e, keccak256(m, 0xc0)) // Prepare the ecrecover calldata. mstore(0x00, keccak256(0x2c, 0x42)) mstore(0x20, and(0xff, v)) mstore(0x40, r) mstore(0x60, s) let t := staticcall(gas(), 1, 0, 0x80, 0x20, 0x20) // If the ecrecover fails, the returndatasize will be 0x00, // `owner` will be checked if it equals the hash at 0x00, // which evaluates to false (i.e. 0), and we will revert. // If the ecrecover succeeds, the returndatasize will be 0x20, // `owner` will be compared against the returned address at 0x20. if iszero(eq(mload(returndatasize()), owner)) { mstore(0x00, 0xddafbaef) // `InvalidPermit()`. revert(0x1c, 0x04) } // Increment and store the updated nonce. sstore(nonceSlot, add(nonceValue, t)) // `t` is 1 if ecrecover succeeds. // Compute the allowance slot and store the value. // The `owner` is already at slot 0x20. mstore(0x40, or(shl(160, _ALLOWANCE_SLOT_SEED), spender)) sstore(keccak256(0x2c, 0x34), value) // Emit the {Approval} event. log3(add(m, 0x60), 0x20, _APPROVAL_EVENT_SIGNATURE, owner, spender) mstore(0x40, m) // Restore the free memory pointer. mstore(0x60, 0) // Restore the zero pointer. } } /// @dev Returns the EIP-712 domain separator for the EIP-2612 permit. function DOMAIN_SEPARATOR() public view virtual returns (bytes32 result) { bytes32 nameHash = _constantNameHash(); // We simply calculate it on-the-fly to allow for cases where the `name` may change. if (nameHash == bytes32(0)) nameHash = keccak256(bytes(name())); /// @solidity memory-safe-assembly assembly { let m := mload(0x40) // Grab the free memory pointer. mstore(m, _DOMAIN_TYPEHASH) mstore(add(m, 0x20), nameHash) mstore(add(m, 0x40), _VERSION_HASH) mstore(add(m, 0x60), chainid()) mstore(add(m, 0x80), address()) result := keccak256(m, 0xa0) } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* INTERNAL MINT FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Mints `amount` tokens to `to`, increasing the total supply. /// /// Emits a {Transfer} event. function _mint(address to, uint256 amount) internal virtual { _beforeTokenTransfer(address(0), to, amount); /// @solidity memory-safe-assembly assembly { let totalSupplyBefore := sload(_TOTAL_SUPPLY_SLOT) let totalSupplyAfter := add(totalSupplyBefore, amount) // Revert if the total supply overflows. if lt(totalSupplyAfter, totalSupplyBefore) { mstore(0x00, 0xe5cfe957) // `TotalSupplyOverflow()`. revert(0x1c, 0x04) } // Store the updated total supply. sstore(_TOTAL_SUPPLY_SLOT, totalSupplyAfter) // Compute the balance slot and load its value. mstore(0x0c, _BALANCE_SLOT_SEED) mstore(0x00, to) let toBalanceSlot := keccak256(0x0c, 0x20) // Add and store the updated balance. sstore(toBalanceSlot, add(sload(toBalanceSlot), amount)) // Emit the {Transfer} event. mstore(0x20, amount) log3(0x20, 0x20, _TRANSFER_EVENT_SIGNATURE, 0, shr(96, mload(0x0c))) } _afterTokenTransfer(address(0), to, amount); } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* INTERNAL BURN FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Burns `amount` tokens from `from`, reducing the total supply. /// /// Emits a {Transfer} event. function _burn(address from, uint256 amount) internal virtual { _beforeTokenTransfer(from, address(0), amount); /// @solidity memory-safe-assembly assembly { // Compute the balance slot and load its value. mstore(0x0c, _BALANCE_SLOT_SEED) mstore(0x00, from) let fromBalanceSlot := keccak256(0x0c, 0x20) let fromBalance := sload(fromBalanceSlot) // Revert if insufficient balance. if gt(amount, fromBalance) { mstore(0x00, 0xf4d678b8) // `InsufficientBalance()`. revert(0x1c, 0x04) } // Subtract and store the updated balance. sstore(fromBalanceSlot, sub(fromBalance, amount)) // Subtract and store the updated total supply. sstore(_TOTAL_SUPPLY_SLOT, sub(sload(_TOTAL_SUPPLY_SLOT), amount)) // Emit the {Transfer} event. mstore(0x00, amount) log3(0x00, 0x20, _TRANSFER_EVENT_SIGNATURE, shr(96, shl(96, from)), 0) } _afterTokenTransfer(from, address(0), amount); } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* INTERNAL TRANSFER FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Moves `amount` of tokens from `from` to `to`. function _transfer(address from, address to, uint256 amount) internal virtual { _beforeTokenTransfer(from, to, amount); /// @solidity memory-safe-assembly assembly { let from_ := shl(96, from) // Compute the balance slot and load its value. mstore(0x0c, or(from_, _BALANCE_SLOT_SEED)) let fromBalanceSlot := keccak256(0x0c, 0x20) let fromBalance := sload(fromBalanceSlot) // Revert if insufficient balance. if gt(amount, fromBalance) { mstore(0x00, 0xf4d678b8) // `InsufficientBalance()`. revert(0x1c, 0x04) } // Subtract and store the updated balance. sstore(fromBalanceSlot, sub(fromBalance, amount)) // Compute the balance slot of `to`. mstore(0x00, to) let toBalanceSlot := keccak256(0x0c, 0x20) // Add and store the updated balance of `to`. // Will not overflow because the sum of all user balances // cannot exceed the maximum uint256 value. sstore(toBalanceSlot, add(sload(toBalanceSlot), amount)) // Emit the {Transfer} event. mstore(0x20, amount) log3(0x20, 0x20, _TRANSFER_EVENT_SIGNATURE, shr(96, from_), shr(96, mload(0x0c))) } _afterTokenTransfer(from, to, amount); } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* INTERNAL ALLOWANCE FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Updates the allowance of `owner` for `spender` based on spent `amount`. function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { /// @solidity memory-safe-assembly assembly { // Compute the allowance slot and load its value. mstore(0x20, spender) mstore(0x0c, _ALLOWANCE_SLOT_SEED) mstore(0x00, owner) let allowanceSlot := keccak256(0x0c, 0x34) let allowance_ := sload(allowanceSlot) // If the allowance is not the maximum uint256 value. if add(allowance_, 1) { // Revert if the amount to be transferred exceeds the allowance. if gt(amount, allowance_) { mstore(0x00, 0x13be252b) // `InsufficientAllowance()`. revert(0x1c, 0x04) } // Subtract and store the updated allowance. sstore(allowanceSlot, sub(allowance_, amount)) } } } /// @dev Sets `amount` as the allowance of `spender` over the tokens of `owner`. /// /// Emits a {Approval} event. function _approve(address owner, address spender, uint256 amount) internal virtual { /// @solidity memory-safe-assembly assembly { let owner_ := shl(96, owner) // Compute the allowance slot and store the amount. mstore(0x20, spender) mstore(0x0c, or(owner_, _ALLOWANCE_SLOT_SEED)) sstore(keccak256(0x0c, 0x34), amount) // Emit the {Approval} event. mstore(0x00, amount) log3(0x00, 0x20, _APPROVAL_EVENT_SIGNATURE, shr(96, owner_), shr(96, mload(0x2c))) } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* HOOKS TO OVERRIDE */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Hook that is called before any transfer of tokens. /// This includes minting and burning. function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {} /// @dev Hook that is called after any transfer of tokens. /// This includes minting and burning. function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/SafeTransferLib.sol) /// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.sol) /// /// @dev Note: /// - For ETH transfers, please use `forceSafeTransferETH` for DoS protection. /// - For ERC20s, this implementation won't check that a token has code, /// responsibility is delegated to the caller. library SafeTransferLib { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CUSTOM ERRORS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The ETH transfer has failed. error ETHTransferFailed(); /// @dev The ERC20 `transferFrom` has failed. error TransferFromFailed(); /// @dev The ERC20 `transfer` has failed. error TransferFailed(); /// @dev The ERC20 `approve` has failed. error ApproveFailed(); /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CONSTANTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Suggested gas stipend for contract receiving ETH that disallows any storage writes. uint256 internal constant GAS_STIPEND_NO_STORAGE_WRITES = 2300; /// @dev Suggested gas stipend for contract receiving ETH to perform a few /// storage reads and writes, but low enough to prevent griefing. uint256 internal constant GAS_STIPEND_NO_GRIEF = 100000; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* ETH OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ // If the ETH transfer MUST succeed with a reasonable gas budget, use the force variants. // // The regular variants: // - Forwards all remaining gas to the target. // - Reverts if the target reverts. // - Reverts if the current contract has insufficient balance. // // The force variants: // - Forwards with an optional gas stipend // (defaults to `GAS_STIPEND_NO_GRIEF`, which is sufficient for most cases). // - If the target reverts, or if the gas stipend is exhausted, // creates a temporary contract to force send the ETH via `SELFDESTRUCT`. // Future compatible with `SENDALL`: https://eips.ethereum.org/EIPS/eip-4758. // - Reverts if the current contract has insufficient balance. // // The try variants: // - Forwards with a mandatory gas stipend. // - Instead of reverting, returns whether the transfer succeeded. /// @dev Sends `amount` (in wei) ETH to `to`. function safeTransferETH(address to, uint256 amount) internal { /// @solidity memory-safe-assembly assembly { if iszero(call(gas(), to, amount, codesize(), 0x00, codesize(), 0x00)) { mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`. revert(0x1c, 0x04) } } } /// @dev Sends all the ETH in the current contract to `to`. function safeTransferAllETH(address to) internal { /// @solidity memory-safe-assembly assembly { // Transfer all the ETH and check if it succeeded or not. if iszero(call(gas(), to, selfbalance(), codesize(), 0x00, codesize(), 0x00)) { mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`. revert(0x1c, 0x04) } } } /// @dev Force sends `amount` (in wei) ETH to `to`, with a `gasStipend`. function forceSafeTransferETH(address to, uint256 amount, uint256 gasStipend) internal { /// @solidity memory-safe-assembly assembly { if lt(selfbalance(), amount) { mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`. revert(0x1c, 0x04) } if iszero(call(gasStipend, to, amount, codesize(), 0x00, codesize(), 0x00)) { mstore(0x00, to) // Store the address in scratch space. mstore8(0x0b, 0x73) // Opcode `PUSH20`. mstore8(0x20, 0xff) // Opcode `SELFDESTRUCT`. if iszero(create(amount, 0x0b, 0x16)) { revert(codesize(), codesize()) } // For gas estimation. } } } /// @dev Force sends all the ETH in the current contract to `to`, with a `gasStipend`. function forceSafeTransferAllETH(address to, uint256 gasStipend) internal { /// @solidity memory-safe-assembly assembly { if iszero(call(gasStipend, to, selfbalance(), codesize(), 0x00, codesize(), 0x00)) { mstore(0x00, to) // Store the address in scratch space. mstore8(0x0b, 0x73) // Opcode `PUSH20`. mstore8(0x20, 0xff) // Opcode `SELFDESTRUCT`. if iszero(create(selfbalance(), 0x0b, 0x16)) { revert(codesize(), codesize()) } // For gas estimation. } } } /// @dev Force sends `amount` (in wei) ETH to `to`, with `GAS_STIPEND_NO_GRIEF`. function forceSafeTransferETH(address to, uint256 amount) internal { /// @solidity memory-safe-assembly assembly { if lt(selfbalance(), amount) { mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`. revert(0x1c, 0x04) } if iszero(call(GAS_STIPEND_NO_GRIEF, to, amount, codesize(), 0x00, codesize(), 0x00)) { mstore(0x00, to) // Store the address in scratch space. mstore8(0x0b, 0x73) // Opcode `PUSH20`. mstore8(0x20, 0xff) // Opcode `SELFDESTRUCT`. if iszero(create(amount, 0x0b, 0x16)) { revert(codesize(), codesize()) } // For gas estimation. } } } /// @dev Force sends all the ETH in the current contract to `to`, with `GAS_STIPEND_NO_GRIEF`. function forceSafeTransferAllETH(address to) internal { /// @solidity memory-safe-assembly assembly { // forgefmt: disable-next-item if iszero(call(GAS_STIPEND_NO_GRIEF, to, selfbalance(), codesize(), 0x00, codesize(), 0x00)) { mstore(0x00, to) // Store the address in scratch space. mstore8(0x0b, 0x73) // Opcode `PUSH20`. mstore8(0x20, 0xff) // Opcode `SELFDESTRUCT`. if iszero(create(selfbalance(), 0x0b, 0x16)) { revert(codesize(), codesize()) } // For gas estimation. } } } /// @dev Sends `amount` (in wei) ETH to `to`, with a `gasStipend`. function trySafeTransferETH(address to, uint256 amount, uint256 gasStipend) internal returns (bool success) { /// @solidity memory-safe-assembly assembly { success := call(gasStipend, to, amount, codesize(), 0x00, codesize(), 0x00) } } /// @dev Sends all the ETH in the current contract to `to`, with a `gasStipend`. function trySafeTransferAllETH(address to, uint256 gasStipend) internal returns (bool success) { /// @solidity memory-safe-assembly assembly { success := call(gasStipend, to, selfbalance(), codesize(), 0x00, codesize(), 0x00) } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* ERC20 OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Sends `amount` of ERC20 `token` from `from` to `to`. /// Reverts upon failure. /// /// The `from` account must have at least `amount` approved for /// the current contract to manage. function safeTransferFrom(address token, address from, address to, uint256 amount) internal { /// @solidity memory-safe-assembly assembly { let m := mload(0x40) // Cache the free memory pointer. mstore(0x60, amount) // Store the `amount` argument. mstore(0x40, to) // Store the `to` argument. mstore(0x2c, shl(96, from)) // Store the `from` argument. mstore(0x0c, 0x23b872dd000000000000000000000000) // `transferFrom(address,address,uint256)`. // Perform the transfer, reverting upon failure. if iszero( and( // The arguments of `and` are evaluated from right to left. or(eq(mload(0x00), 1), iszero(returndatasize())), // Returned 1 or nothing. call(gas(), token, 0, 0x1c, 0x64, 0x00, 0x20) ) ) { mstore(0x00, 0x7939f424) // `TransferFromFailed()`. revert(0x1c, 0x04) } mstore(0x60, 0) // Restore the zero slot to zero. mstore(0x40, m) // Restore the free memory pointer. } } /// @dev Sends all of ERC20 `token` from `from` to `to`. /// Reverts upon failure. /// /// The `from` account must have their entire balance approved for /// the current contract to manage. function safeTransferAllFrom(address token, address from, address to) internal returns (uint256 amount) { /// @solidity memory-safe-assembly assembly { let m := mload(0x40) // Cache the free memory pointer. mstore(0x40, to) // Store the `to` argument. mstore(0x2c, shl(96, from)) // Store the `from` argument. mstore(0x0c, 0x70a08231000000000000000000000000) // `balanceOf(address)`. // Read the balance, reverting upon failure. if iszero( and( // The arguments of `and` are evaluated from right to left. gt(returndatasize(), 0x1f), // At least 32 bytes returned. staticcall(gas(), token, 0x1c, 0x24, 0x60, 0x20) ) ) { mstore(0x00, 0x7939f424) // `TransferFromFailed()`. revert(0x1c, 0x04) } mstore(0x00, 0x23b872dd) // `transferFrom(address,address,uint256)`. amount := mload(0x60) // The `amount` is already at 0x60. We'll need to return it. // Perform the transfer, reverting upon failure. if iszero( and( // The arguments of `and` are evaluated from right to left. or(eq(mload(0x00), 1), iszero(returndatasize())), // Returned 1 or nothing. call(gas(), token, 0, 0x1c, 0x64, 0x00, 0x20) ) ) { mstore(0x00, 0x7939f424) // `TransferFromFailed()`. revert(0x1c, 0x04) } mstore(0x60, 0) // Restore the zero slot to zero. mstore(0x40, m) // Restore the free memory pointer. } } /// @dev Sends `amount` of ERC20 `token` from the current contract to `to`. /// Reverts upon failure. function safeTransfer(address token, address to, uint256 amount) internal { /// @solidity memory-safe-assembly assembly { mstore(0x14, to) // Store the `to` argument. mstore(0x34, amount) // Store the `amount` argument. mstore(0x00, 0xa9059cbb000000000000000000000000) // `transfer(address,uint256)`. // Perform the transfer, reverting upon failure. if iszero( and( // The arguments of `and` are evaluated from right to left. or(eq(mload(0x00), 1), iszero(returndatasize())), // Returned 1 or nothing. call(gas(), token, 0, 0x10, 0x44, 0x00, 0x20) ) ) { mstore(0x00, 0x90b8ec18) // `TransferFailed()`. revert(0x1c, 0x04) } mstore(0x34, 0) // Restore the part of the free memory pointer that was overwritten. } } /// @dev Sends all of ERC20 `token` from the current contract to `to`. /// Reverts upon failure. function safeTransferAll(address token, address to) internal returns (uint256 amount) { /// @solidity memory-safe-assembly assembly { mstore(0x00, 0x70a08231) // Store the function selector of `balanceOf(address)`. mstore(0x20, address()) // Store the address of the current contract. // Read the balance, reverting upon failure. if iszero( and( // The arguments of `and` are evaluated from right to left. gt(returndatasize(), 0x1f), // At least 32 bytes returned. staticcall(gas(), token, 0x1c, 0x24, 0x34, 0x20) ) ) { mstore(0x00, 0x90b8ec18) // `TransferFailed()`. revert(0x1c, 0x04) } mstore(0x14, to) // Store the `to` argument. amount := mload(0x34) // The `amount` is already at 0x34. We'll need to return it. mstore(0x00, 0xa9059cbb000000000000000000000000) // `transfer(address,uint256)`. // Perform the transfer, reverting upon failure. if iszero( and( // The arguments of `and` are evaluated from right to left. or(eq(mload(0x00), 1), iszero(returndatasize())), // Returned 1 or nothing. call(gas(), token, 0, 0x10, 0x44, 0x00, 0x20) ) ) { mstore(0x00, 0x90b8ec18) // `TransferFailed()`. revert(0x1c, 0x04) } mstore(0x34, 0) // Restore the part of the free memory pointer that was overwritten. } } /// @dev Sets `amount` of ERC20 `token` for `to` to manage on behalf of the current contract. /// Reverts upon failure. function safeApprove(address token, address to, uint256 amount) internal { /// @solidity memory-safe-assembly assembly { mstore(0x14, to) // Store the `to` argument. mstore(0x34, amount) // Store the `amount` argument. mstore(0x00, 0x095ea7b3000000000000000000000000) // `approve(address,uint256)`. // Perform the approval, reverting upon failure. if iszero( and( // The arguments of `and` are evaluated from right to left. or(eq(mload(0x00), 1), iszero(returndatasize())), // Returned 1 or nothing. call(gas(), token, 0, 0x10, 0x44, 0x00, 0x20) ) ) { mstore(0x00, 0x3e3f8f73) // `ApproveFailed()`. revert(0x1c, 0x04) } mstore(0x34, 0) // Restore the part of the free memory pointer that was overwritten. } } /// @dev Sets `amount` of ERC20 `token` for `to` to manage on behalf of the current contract. /// If the initial attempt to approve fails, attempts to reset the approved amount to zero, /// then retries the approval again (some tokens, e.g. USDT, requires this). /// Reverts upon failure. function safeApproveWithRetry(address token, address to, uint256 amount) internal { /// @solidity memory-safe-assembly assembly { mstore(0x14, to) // Store the `to` argument. mstore(0x34, amount) // Store the `amount` argument. mstore(0x00, 0x095ea7b3000000000000000000000000) // `approve(address,uint256)`. // Perform the approval, retrying upon failure. if iszero( and( // The arguments of `and` are evaluated from right to left. or(eq(mload(0x00), 1), iszero(returndatasize())), // Returned 1 or nothing. call(gas(), token, 0, 0x10, 0x44, 0x00, 0x20) ) ) { mstore(0x34, 0) // Store 0 for the `amount`. mstore(0x00, 0x095ea7b3000000000000000000000000) // `approve(address,uint256)`. pop(call(gas(), token, 0, 0x10, 0x44, codesize(), 0x00)) // Reset the approval. mstore(0x34, amount) // Store back the original `amount`. // Retry the approval, reverting upon failure. if iszero( and( or(eq(mload(0x00), 1), iszero(returndatasize())), // Returned 1 or nothing. call(gas(), token, 0, 0x10, 0x44, 0x00, 0x20) ) ) { mstore(0x00, 0x3e3f8f73) // `ApproveFailed()`. revert(0x1c, 0x04) } } mstore(0x34, 0) // Restore the part of the free memory pointer that was overwritten. } } /// @dev Returns the amount of ERC20 `token` owned by `account`. /// Returns zero if the `token` does not exist. function balanceOf(address token, address account) internal view returns (uint256 amount) { /// @solidity memory-safe-assembly assembly { mstore(0x14, account) // Store the `account` argument. mstore(0x00, 0x70a08231000000000000000000000000) // `balanceOf(address)`. amount := mul( mload(0x20), and( // The arguments of `and` are evaluated from right to left. gt(returndatasize(), 0x1f), // At least 32 bytes returned. staticcall(gas(), token, 0x10, 0x24, 0x20, 0x20) ) ) } } }
{ "remappings": [ "solady/=lib/solady/src/", "address-book/=lib/address-book/src/", "ds-test/=lib/forge-std/lib/ds-test/src/", "forge-std/=lib/forge-std/src/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_depositor","type":"address"},{"internalType":"address","name":"_booster","type":"address"},{"internalType":"address","name":"_sdToken","type":"address"},{"internalType":"address","name":"_gauge","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AllowanceOverflow","type":"error"},{"inputs":[],"name":"AllowanceUnderflow","type":"error"},{"inputs":[],"name":"GOVERNANCE","type":"error"},{"inputs":[],"name":"InsufficientAllowance","type":"error"},{"inputs":[],"name":"InsufficientBalance","type":"error"},{"inputs":[],"name":"InvalidPermit","type":"error"},{"inputs":[],"name":"PermitExpired","type":"error"},{"inputs":[],"name":"TotalSupplyOverflow","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newGovernance","type":"address"}],"name":"GovernanceChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"result","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"depositGauge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"depositSdToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"futureGovernance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gauge","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_depositor","type":"address"}],"name":"setDepositor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gauge","type":"address"}],"name":"setGauge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_governance","type":"address"}],"name":"transferGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bool","name":"_unstake","type":"bool"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60e06040523480156200001157600080fd5b506040516200175d3803806200175d833981016040819052620000349162000117565b6001600160a01b03808616608052600080548383166001600160a01b03199182161790915584821660c05283821660a05260018054928716928216929092179091556002805490911633179055620000908282600019620000aa565b6200009f8585600019620000aa565b505050505062000187565b81601452806034526f095ea7b300000000000000000000000060005260206000604460106000875af13d156001600051141716620000f057633e3f8f736000526004601cfd5b6000603452505050565b80516001600160a01b03811681146200011257600080fd5b919050565b600080600080600060a086880312156200013057600080fd5b6200013b86620000fa565b94506200014b60208701620000fa565b93506200015b60408701620000fa565b92506200016b60608701620000fa565b91506200017b60808701620000fa565b90509295509295909350565b60805160a05160c05161154b62000212600039600081816106dd0152818161084f015281816109a801528181610b5e01528181610c9b0152610f02015260008181610387015281816105a8015281816107a4015281816109120152818161096201528181610a140152610b16015260008181610bd501528181610f650152610fb5015261154b6000f3fe608060405234801561001057600080fd5b50600436106101585760003560e01c80638070c503116100c3578063c7c4ff461161007c578063c7c4ff46146102fb578063d38bfff41461030e578063d505accf14610321578063d64509f914610334578063dd62ed3e14610347578063f2c098b71461037057600080fd5b80638070c5031461029457806395d89b41146102a7578063a6f19c84146102af578063a9059cbb146102c2578063b141b299146102d5578063b6b55f25146102e857600080fd5b80633644e515116101155780633644e515146101ef57806338d07436146101f757806355a68ed31461020a5780635aa6e6751461021d57806370a08231146102485780637ecebe001461026e57600080fd5b806306fdde031461015d578063095ea7b31461017b57806318160ddd1461019e578063238efcbc146101b857806323b872dd146101c2578063313ce567146101d5575b600080fd5b610165610383565b60405161017291906111a9565b60405180910390f35b61018e6101893660046111f8565b61042f565b6040519015158152602001610172565b6805345cdf77eb68f44c545b604051908152602001610172565b6101c0610483565b005b61018e6101d0366004611222565b6104f8565b6101dd6105a4565b60405160ff9091168152602001610172565b6101aa61062d565b6101c061020536600461125e565b6106aa565b6101c0610218366004611293565b6107e5565b600254610230906001600160a01b031681565b6040516001600160a01b039091168152602001610172565b6101aa610256366004611293565b6387a211a2600c908152600091909152602090205490565b6101aa61027c366004611293565b6338377508600c908152600091909152602090205490565b600354610230906001600160a01b031681565b610165610a10565b600054610230906001600160a01b031681565b61018e6102d03660046111f8565b610aa8565b6101c06102e33660046112b5565b610b11565b6101c06102f63660046112b5565b610bd0565b600154610230906001600160a01b031681565b6101c061031c366004611293565b610d19565b6101c061032f3660046112dd565b610d66565b6101c06103423660046112b5565b610eef565b6101aa61035536600461134a565b602052637f5e9f20600c908152600091909152603490205490565b6101c061037e366004611293565b610f31565b60607f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa1580156103e3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261040b9190810190611393565b60405160200161041b9190611440565b604051602081830303815290604052905090565b600082602052637f5e9f20600c5233600052816034600c205581600052602c5160601c337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560206000a35060015b92915050565b6003546001600160a01b031633146104ae576040516305189e0d60e21b815260040160405180910390fd5b60028054336001600160a01b031991821681179092556003805490911690556040517fa6a85f15b976d399f39ad43e515e75910bac714bc55eeff6131fb90780d6f74690600090a2565b60008360601b33602052637f5e9f208117600c526034600c20805460018101156105385780851115610532576313be252b6000526004601cfd5b84810382555b50506387a211a28117600c526020600c208054808511156105615763f4d678b86000526004601cfd5b84810382555050836000526020600c208381540181555082602052600c5160601c8160601c6000805160206114f6833981519152602080a3505060019392505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610604573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106289190611475565b905090565b600080610638610383565b8051906020012090506040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81528160208201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6604082015246606082015230608082015260a081209250505090565b6106b43383610fdd565b60005460405163f3fef3a360e01b81526001600160a01b039182166004820152602481018490527f00000000000000000000000000000000000000000000000000000000000000009091169063f3fef3a390604401600060405180830381600087803b15801561072357600080fd5b505af1158015610737573d6000803e3d6000fd5b5050505080156107ce57600054604051632e1a7d4d60e01b8152600481018490526001600160a01b0390911690632e1a7d4d90602401600060405180830381600087803b15801561078757600080fd5b505af115801561079b573d6000803e3d6000fd5b505050506107ca7f00000000000000000000000000000000000000000000000000000000000000003384611042565b5050565b6000546107ca906001600160a01b03163384611042565b6002546001600160a01b03163314610810576040516305189e0d60e21b815260040160405180910390fd5b60006108236805345cdf77eb68f44c5490565b60005460405163f3fef3a360e01b81526001600160a01b039182166004820152602481018390529192507f0000000000000000000000000000000000000000000000000000000000000000169063f3fef3a390604401600060405180830381600087803b15801561089357600080fd5b505af11580156108a7573d6000803e3d6000fd5b5050600054604051632e1a7d4d60e01b8152600481018590526001600160a01b039091169250632e1a7d4d9150602401600060405180830381600087803b1580156108f157600080fd5b505af1158015610905573d6000803e3d6000fd5b50506000805461094293507f000000000000000000000000000000000000000000000000000000000000000092506001600160a01b031690611088565b600080546001600160a01b0319166001600160a01b03841617905561098a7f000000000000000000000000000000000000000000000000000000000000000083600019611088565b604051636e553f6560e01b8152600481018290526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166024830152831690636e553f6590604401600060405180830381600087803b1580156109f457600080fd5b505af1158015610a08573d6000803e3d6000fd5b505050505050565b60607f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015610a70573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610a989190810190611393565b60405160200161041b9190611492565b60006387a211a2600c52336000526020600c20805480841115610ad35763f4d678b86000526004601cfd5b83810382555050826000526020600c208281540181555081602052600c5160601c336000805160206114f6833981519152602080a350600192915050565b610b3d7f00000000000000000000000000000000000000000000000000000000000000003330846110c4565b600054604051636e553f6560e01b8152600481018390526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116602483015290911690636e553f6590604401600060405180830381600087803b158015610bab57600080fd5b505af1158015610bbf573d6000803e3d6000fd5b50505050610bcd3382611118565b50565b610bfc7f00000000000000000000000000000000000000000000000000000000000000003330846110c4565b60015460408051630c7024df60e31b815290516000926001600160a01b03169163638126f89160048083019260209291908290030181865afa158015610c46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6a91906114bb565b6001805460405163d0f492f760e01b8152600481018690526024810183905260448101929092526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166064840152929350919091169063d0f492f790608401600060405180830381600087803b158015610cec57600080fd5b505af1158015610d00573d6000803e3d6000fd5b505050506107ca338284610d1491906114d4565b611118565b6002546001600160a01b03163314610d44576040516305189e0d60e21b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000610d70610383565b80519060200120905084421115610d8f57631a15a3cc6000526004601cfd5b6040518860601b60601c98508760601b60601c975065383775081901600e52886000526020600c2080547f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f83528360208401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6604084015246606084015230608084015260a08320602e527f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c983528a60208401528960408401528860608401528060808401528760a084015260c08320604e526042602c206000528660ff1660205285604052846060526020806080600060015afa8b3d5114610e9b5763ddafbaef6000526004601cfd5b0190556303faf4f960a51b88176040526034602c2087905587897f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925602060608501a360405250506000606052505050505050565b600054610f27906001600160a01b0316337f0000000000000000000000000000000000000000000000000000000000000000846110c4565b610bcd3382611118565b6002546001600160a01b03163314610f5c576040516305189e0d60e21b815260040160405180910390fd5b600154610f95907f0000000000000000000000000000000000000000000000000000000000000000906001600160a01b03166000611088565b600180546001600160a01b0319166001600160a01b038316179055610bcd7f000000000000000000000000000000000000000000000000000000000000000082600019611088565b6387a211a2600c52816000526020600c208054808311156110065763f4d678b86000526004601cfd5b82900390556805345cdf77eb68f44c8054829003905560008181526001600160a01b0383166000805160206114f6833981519152602083a35050565b816014528060345263a9059cbb60601b60005260206000604460106000875af13d15600160005114171661107e576390b8ec186000526004601cfd5b6000603452505050565b816014528060345263095ea7b360601b60005260206000604460106000875af13d15600160005114171661107e57633e3f8f736000526004601cfd5b60405181606052826040528360601b602c526323b872dd60601b600c52602060006064601c6000895af13d15600160005114171661110a57637939f4246000526004601cfd5b600060605260405250505050565b6805345cdf77eb68f44c548181018181101561113c5763e5cfe9576000526004601cfd5b806805345cdf77eb68f44c5550506387a211a2600c52816000526020600c208181540181555080602052600c5160601c60006000805160206114f6833981519152602080a35050565b60005b838110156111a0578181015183820152602001611188565b50506000910152565b60208152600082518060208401526111c8816040850160208701611185565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146111f357600080fd5b919050565b6000806040838503121561120b57600080fd5b611214836111dc565b946020939093013593505050565b60008060006060848603121561123757600080fd5b611240846111dc565b925061124e602085016111dc565b9150604084013590509250925092565b6000806040838503121561127157600080fd5b823591506020830135801515811461128857600080fd5b809150509250929050565b6000602082840312156112a557600080fd5b6112ae826111dc565b9392505050565b6000602082840312156112c757600080fd5b5035919050565b60ff81168114610bcd57600080fd5b600080600080600080600060e0888a0312156112f857600080fd5b611301886111dc565b965061130f602089016111dc565b95506040880135945060608801359350608088013561132d816112ce565b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561135d57600080fd5b611366836111dc565b9150611374602084016111dc565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156113a557600080fd5b815167ffffffffffffffff808211156113bd57600080fd5b818401915084601f8301126113d157600080fd5b8151818111156113e3576113e361137d565b604051601f8201601f19908116603f0116810190838211818310171561140b5761140b61137d565b8160405282815287602084870101111561142457600080fd5b611435836020830160208801611185565b979650505050505050565b6c02b37ba32902137b7b9ba32b21609d1b81526000825161146881600d850160208701611185565b91909101600d0192915050565b60006020828403121561148757600080fd5b81516112ae816112ce565b603b60f91b8152600082516114ae816001850160208701611185565b9190910160010192915050565b6000602082840312156114cd57600080fd5b5051919050565b8082018082111561047d57634e487b7160e01b600052601160045260246000fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220fb03d71a589f25a9112ef12591c760fce74f6b85f43d6f086ec2ec01b4697bba64736f6c63430008130033000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd52000000000000000000000000c1e3ca8a3921719be0ae3690a0e036feb4f6919100000000000000000000000038d10708ce535361f178f55e68df7e85acc66270000000000000000000000000d1b5651e55d4ceed36251c61c50c889b36f6abb50000000000000000000000007f50786a0b15723d741727882ee99a0bf34e3466
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101585760003560e01c80638070c503116100c3578063c7c4ff461161007c578063c7c4ff46146102fb578063d38bfff41461030e578063d505accf14610321578063d64509f914610334578063dd62ed3e14610347578063f2c098b71461037057600080fd5b80638070c5031461029457806395d89b41146102a7578063a6f19c84146102af578063a9059cbb146102c2578063b141b299146102d5578063b6b55f25146102e857600080fd5b80633644e515116101155780633644e515146101ef57806338d07436146101f757806355a68ed31461020a5780635aa6e6751461021d57806370a08231146102485780637ecebe001461026e57600080fd5b806306fdde031461015d578063095ea7b31461017b57806318160ddd1461019e578063238efcbc146101b857806323b872dd146101c2578063313ce567146101d5575b600080fd5b610165610383565b60405161017291906111a9565b60405180910390f35b61018e6101893660046111f8565b61042f565b6040519015158152602001610172565b6805345cdf77eb68f44c545b604051908152602001610172565b6101c0610483565b005b61018e6101d0366004611222565b6104f8565b6101dd6105a4565b60405160ff9091168152602001610172565b6101aa61062d565b6101c061020536600461125e565b6106aa565b6101c0610218366004611293565b6107e5565b600254610230906001600160a01b031681565b6040516001600160a01b039091168152602001610172565b6101aa610256366004611293565b6387a211a2600c908152600091909152602090205490565b6101aa61027c366004611293565b6338377508600c908152600091909152602090205490565b600354610230906001600160a01b031681565b610165610a10565b600054610230906001600160a01b031681565b61018e6102d03660046111f8565b610aa8565b6101c06102e33660046112b5565b610b11565b6101c06102f63660046112b5565b610bd0565b600154610230906001600160a01b031681565b6101c061031c366004611293565b610d19565b6101c061032f3660046112dd565b610d66565b6101c06103423660046112b5565b610eef565b6101aa61035536600461134a565b602052637f5e9f20600c908152600091909152603490205490565b6101c061037e366004611293565b610f31565b60607f000000000000000000000000d1b5651e55d4ceed36251c61c50c889b36f6abb56001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa1580156103e3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261040b9190810190611393565b60405160200161041b9190611440565b604051602081830303815290604052905090565b600082602052637f5e9f20600c5233600052816034600c205581600052602c5160601c337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560206000a35060015b92915050565b6003546001600160a01b031633146104ae576040516305189e0d60e21b815260040160405180910390fd5b60028054336001600160a01b031991821681179092556003805490911690556040517fa6a85f15b976d399f39ad43e515e75910bac714bc55eeff6131fb90780d6f74690600090a2565b60008360601b33602052637f5e9f208117600c526034600c20805460018101156105385780851115610532576313be252b6000526004601cfd5b84810382555b50506387a211a28117600c526020600c208054808511156105615763f4d678b86000526004601cfd5b84810382555050836000526020600c208381540181555082602052600c5160601c8160601c6000805160206114f6833981519152602080a3505060019392505050565b60007f000000000000000000000000d1b5651e55d4ceed36251c61c50c889b36f6abb56001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610604573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106289190611475565b905090565b600080610638610383565b8051906020012090506040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81528160208201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6604082015246606082015230608082015260a081209250505090565b6106b43383610fdd565b60005460405163f3fef3a360e01b81526001600160a01b039182166004820152602481018490527f00000000000000000000000038d10708ce535361f178f55e68df7e85acc662709091169063f3fef3a390604401600060405180830381600087803b15801561072357600080fd5b505af1158015610737573d6000803e3d6000fd5b5050505080156107ce57600054604051632e1a7d4d60e01b8152600481018490526001600160a01b0390911690632e1a7d4d90602401600060405180830381600087803b15801561078757600080fd5b505af115801561079b573d6000803e3d6000fd5b505050506107ca7f000000000000000000000000d1b5651e55d4ceed36251c61c50c889b36f6abb53384611042565b5050565b6000546107ca906001600160a01b03163384611042565b6002546001600160a01b03163314610810576040516305189e0d60e21b815260040160405180910390fd5b60006108236805345cdf77eb68f44c5490565b60005460405163f3fef3a360e01b81526001600160a01b039182166004820152602481018390529192507f00000000000000000000000038d10708ce535361f178f55e68df7e85acc66270169063f3fef3a390604401600060405180830381600087803b15801561089357600080fd5b505af11580156108a7573d6000803e3d6000fd5b5050600054604051632e1a7d4d60e01b8152600481018590526001600160a01b039091169250632e1a7d4d9150602401600060405180830381600087803b1580156108f157600080fd5b505af1158015610905573d6000803e3d6000fd5b50506000805461094293507f000000000000000000000000d1b5651e55d4ceed36251c61c50c889b36f6abb592506001600160a01b031690611088565b600080546001600160a01b0319166001600160a01b03841617905561098a7f000000000000000000000000d1b5651e55d4ceed36251c61c50c889b36f6abb583600019611088565b604051636e553f6560e01b8152600481018290526001600160a01b037f00000000000000000000000038d10708ce535361f178f55e68df7e85acc6627081166024830152831690636e553f6590604401600060405180830381600087803b1580156109f457600080fd5b505af1158015610a08573d6000803e3d6000fd5b505050505050565b60607f000000000000000000000000d1b5651e55d4ceed36251c61c50c889b36f6abb56001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015610a70573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610a989190810190611393565b60405160200161041b9190611492565b60006387a211a2600c52336000526020600c20805480841115610ad35763f4d678b86000526004601cfd5b83810382555050826000526020600c208281540181555081602052600c5160601c336000805160206114f6833981519152602080a350600192915050565b610b3d7f000000000000000000000000d1b5651e55d4ceed36251c61c50c889b36f6abb53330846110c4565b600054604051636e553f6560e01b8152600481018390526001600160a01b037f00000000000000000000000038d10708ce535361f178f55e68df7e85acc662708116602483015290911690636e553f6590604401600060405180830381600087803b158015610bab57600080fd5b505af1158015610bbf573d6000803e3d6000fd5b50505050610bcd3382611118565b50565b610bfc7f000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd523330846110c4565b60015460408051630c7024df60e31b815290516000926001600160a01b03169163638126f89160048083019260209291908290030181865afa158015610c46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6a91906114bb565b6001805460405163d0f492f760e01b8152600481018690526024810183905260448101929092526001600160a01b037f00000000000000000000000038d10708ce535361f178f55e68df7e85acc6627081166064840152929350919091169063d0f492f790608401600060405180830381600087803b158015610cec57600080fd5b505af1158015610d00573d6000803e3d6000fd5b505050506107ca338284610d1491906114d4565b611118565b6002546001600160a01b03163314610d44576040516305189e0d60e21b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000610d70610383565b80519060200120905084421115610d8f57631a15a3cc6000526004601cfd5b6040518860601b60601c98508760601b60601c975065383775081901600e52886000526020600c2080547f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f83528360208401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6604084015246606084015230608084015260a08320602e527f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c983528a60208401528960408401528860608401528060808401528760a084015260c08320604e526042602c206000528660ff1660205285604052846060526020806080600060015afa8b3d5114610e9b5763ddafbaef6000526004601cfd5b0190556303faf4f960a51b88176040526034602c2087905587897f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925602060608501a360405250506000606052505050505050565b600054610f27906001600160a01b0316337f00000000000000000000000038d10708ce535361f178f55e68df7e85acc66270846110c4565b610bcd3382611118565b6002546001600160a01b03163314610f5c576040516305189e0d60e21b815260040160405180910390fd5b600154610f95907f000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd52906001600160a01b03166000611088565b600180546001600160a01b0319166001600160a01b038316179055610bcd7f000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd5282600019611088565b6387a211a2600c52816000526020600c208054808311156110065763f4d678b86000526004601cfd5b82900390556805345cdf77eb68f44c8054829003905560008181526001600160a01b0383166000805160206114f6833981519152602083a35050565b816014528060345263a9059cbb60601b60005260206000604460106000875af13d15600160005114171661107e576390b8ec186000526004601cfd5b6000603452505050565b816014528060345263095ea7b360601b60005260206000604460106000875af13d15600160005114171661107e57633e3f8f736000526004601cfd5b60405181606052826040528360601b602c526323b872dd60601b600c52602060006064601c6000895af13d15600160005114171661110a57637939f4246000526004601cfd5b600060605260405250505050565b6805345cdf77eb68f44c548181018181101561113c5763e5cfe9576000526004601cfd5b806805345cdf77eb68f44c5550506387a211a2600c52816000526020600c208181540181555080602052600c5160601c60006000805160206114f6833981519152602080a35050565b60005b838110156111a0578181015183820152602001611188565b50506000910152565b60208152600082518060208401526111c8816040850160208701611185565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146111f357600080fd5b919050565b6000806040838503121561120b57600080fd5b611214836111dc565b946020939093013593505050565b60008060006060848603121561123757600080fd5b611240846111dc565b925061124e602085016111dc565b9150604084013590509250925092565b6000806040838503121561127157600080fd5b823591506020830135801515811461128857600080fd5b809150509250929050565b6000602082840312156112a557600080fd5b6112ae826111dc565b9392505050565b6000602082840312156112c757600080fd5b5035919050565b60ff81168114610bcd57600080fd5b600080600080600080600060e0888a0312156112f857600080fd5b611301886111dc565b965061130f602089016111dc565b95506040880135945060608801359350608088013561132d816112ce565b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561135d57600080fd5b611366836111dc565b9150611374602084016111dc565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156113a557600080fd5b815167ffffffffffffffff808211156113bd57600080fd5b818401915084601f8301126113d157600080fd5b8151818111156113e3576113e361137d565b604051601f8201601f19908116603f0116810190838211818310171561140b5761140b61137d565b8160405282815287602084870101111561142457600080fd5b611435836020830160208801611185565b979650505050505050565b6c02b37ba32902137b7b9ba32b21609d1b81526000825161146881600d850160208701611185565b91909101600d0192915050565b60006020828403121561148757600080fd5b81516112ae816112ce565b603b60f91b8152600082516114ae816001850160208701611185565b9190910160010192915050565b6000602082840312156114cd57600080fd5b5051919050565b8082018082111561047d57634e487b7160e01b600052601160045260246000fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220fb03d71a589f25a9112ef12591c760fce74f6b85f43d6f086ec2ec01b4697bba64736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd52000000000000000000000000c1e3ca8a3921719be0ae3690a0e036feb4f6919100000000000000000000000038d10708ce535361f178f55e68df7e85acc66270000000000000000000000000d1b5651e55d4ceed36251c61c50c889b36f6abb50000000000000000000000007f50786a0b15723d741727882ee99a0bf34e3466
-----Decoded View---------------
Arg [0] : _token (address): 0xD533a949740bb3306d119CC777fa900bA034cd52
Arg [1] : _depositor (address): 0xc1e3Ca8A3921719bE0aE3690A0e036feB4f69191
Arg [2] : _booster (address): 0x38d10708Ce535361F178f55E68DF7E85aCc66270
Arg [3] : _sdToken (address): 0xD1b5651E55D4CeeD36251c61c50C889B36F6abB5
Arg [4] : _gauge (address): 0x7f50786A0b15723D741727882ee99a0BF34e3466
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd52
Arg [1] : 000000000000000000000000c1e3ca8a3921719be0ae3690a0e036feb4f69191
Arg [2] : 00000000000000000000000038d10708ce535361f178f55e68df7e85acc66270
Arg [3] : 000000000000000000000000d1b5651e55d4ceed36251c61c50c889b36f6abb5
Arg [4] : 0000000000000000000000007f50786a0b15723d741727882ee99a0bf34e3466
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.