Contract
0x046605839c01C54921f4aA1AAa245E88227707D8
2
Contract Overview
Balance:
0 AVAX
AVAX Value:
$0.00
My Name Tag:
Not Available, login to update
Txn Hash | Method |
Block
|
From
|
To
|
Value | [Txn Fee] | |||
---|---|---|---|---|---|---|---|---|---|
0x1686ac68a1ca1f399acf0cf706e470e90a4999dbf3d83f2fc34282d5d527ef5a | 0x60a06040 | 8607700 | 522 days 22 hrs ago | 0x08f2112b3ba6c20c76988bab9ad94f7676652608 | IN | Create: BaseCoinWrapper | 0 AVAX | 0.003969575 |
[ Download CSV Export ]
Contract Name:
BaseCoinWrapper
Compiler Version
v0.8.10+commit.fc410830
Optimization Enabled:
Yes with 1000000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; pragma abicoder v1; import "../interfaces/IWrapper.sol"; contract BaseCoinWrapper is IWrapper { IERC20 private constant _BASE = IERC20(0x0000000000000000000000000000000000000000); IERC20 private immutable _wBase; constructor(IERC20 wBase) { _wBase = wBase; } function wrap(IERC20 token) external view override returns (IERC20 wrappedToken, uint256 rate) { if(token == _BASE) { return (_wBase, 1e18); } else if (token == _wBase) { return (_BASE, 1e18); } else { revert("Unsupported token"); } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; pragma abicoder v1; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IWrapper { function wrap(IERC20 token) external view returns (IERC20 wrappedToken, uint256 rate); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
{ "optimizer": { "enabled": true, "runs": 1000000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
[{"inputs":[{"internalType":"contract IERC20","name":"wBase","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"wrap","outputs":[{"internalType":"contract IERC20","name":"wrappedToken","type":"address"},{"internalType":"uint256","name":"rate","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a060405234801561001057600080fd5b506040516102483803806102488339818101604052602081101561003357600080fd5b50516001600160a01b03166080526080516101e76100616000396000818160b4015260e501526101e76000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063023276f014610030575b600080fd5b6100636004803603602081101561004657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610093565b6040805173ffffffffffffffffffffffffffffffffffffffff909316835260208301919091528051918290030190f35b60008073ffffffffffffffffffffffffffffffffffffffff83166100e357507f000000000000000000000000000000000000000000000000000000000000000092670de0b6b3a764000092509050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561014a5750600092670de0b6b3a764000092509050565b604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f556e737570706f7274656420746f6b656e000000000000000000000000000000604482015290519081900360640190fdfea2646970667358221220ec840c298f087f729bc3caa4d4027354180215e941d75b9865d2572ba1622a5d64736f6c634300080a0033000000000000000000000000b31f66aa3c1e785363f0875a1b74e27b85fd66c7
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000b31f66aa3c1e785363f0875a1b74e27b85fd66c7
-----Decoded View---------------
Arg [0] : wBase (address): 0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000b31f66aa3c1e785363f0875a1b74e27b85fd66c7
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.