ERC-20
Staking
Overview
Max Total Supply
1.817199689430283873 ankrETH
Holders
162 (0.00%)
Total Transfers
-
Market
Price
$2,862.92 @ 4,083.114752 FTM (+0.35%)
Onchain Market Cap
$5,202.50
Circulating Supply Market Cap
$37,024,585.00
Other Info
Token Contract (WITH 18 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
Contract Name:
InternetBondProxy
Compiler Version
v0.8.6+commit.11564f7e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0-only pragma solidity ^0.8.6; import "./interfaces/ICrossChainBridge.sol"; contract InternetBondProxy { bytes32 private constant BEACON_SLOT = bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1); fallback() external { address bridge; bytes32 slot = BEACON_SLOT; assembly { bridge := sload(slot) } address impl = ICrossChainBridge(bridge).getBondImplementation(); assembly { calldatacopy(0, 0, calldatasize()) let result := delegatecall(gas(), impl, 0, calldatasize(), 0, 0) returndatacopy(0, 0, returndatasize()) switch result case 0 {revert(0, returndatasize())} default {return (0, returndatasize())} } } function setBeacon(address newBeacon) external { address beacon; bytes32 slot = BEACON_SLOT; assembly { beacon := sload(slot) } require(beacon == address(0x00)); assembly { sstore(slot, newBeacon) } } } library InternetBondProxyUtils { bytes constant internal INTERNET_BOND_PROXY_BYTECODE = hex"608060405234801561001057600080fd5b50610215806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063d42afb56146100fd575b60008061005960017fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d516101a2565b60001b9050805491506000826001600160a01b0316631626425c6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561009f57600080fd5b505af11580156100b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d79190610185565b90503660008037600080366000845af43d6000803e8080156100f8573d6000f35b3d6000fd5b61011061010b366004610161565b610112565b005b60008061014060017fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d516101a2565b8054925090506001600160a01b0382161561015a57600080fd5b9190915550565b60006020828403121561017357600080fd5b813561017e816101c7565b9392505050565b60006020828403121561019757600080fd5b815161017e816101c7565b6000828210156101c257634e487b7160e01b600052601160045260246000fd5b500390565b6001600160a01b03811681146101dc57600080fd5b5056fea2646970667358221220d283edebb1e56b63c1cf809c7a7219bbf056c367c289dabb51fdba5f71cdf44c64736f6c63430008060033"; bytes32 constant internal INTERNET_BOND_PROXY_HASH = keccak256(INTERNET_BOND_PROXY_BYTECODE); bytes4 constant internal SET_META_DATA_SIG = bytes4(keccak256("initAndObtainOwnership(bytes32,bytes32,uint256,address,address,bool)")); bytes4 constant internal SET_BEACON_SIG = bytes4(keccak256("setBeacon(address)")); function deployInternetBondProxy(address bridge, bytes32 salt, ICrossChainBridge.Metadata memory metaData, address ratioFeed) internal returns (address) { /* lets concat bytecode with constructor parameters */ bytes memory bytecode = INTERNET_BOND_PROXY_BYTECODE; /* deploy new contract and store contract address in result variable */ address result; assembly { result := create2(0, add(bytecode, 0x20), mload(bytecode), salt) } require(result != address(0x00), "deploy failed"); /* setup impl */ (bool success, bytes memory returnValue) = result.call(abi.encodePacked(SET_BEACON_SIG, abi.encode(bridge))); require(success, string(abi.encodePacked("setBeacon failed: ", returnValue))); /* setup meta data */ bytes memory inputData = new bytes(0xc4); bool isRebasing = metaData.bondMetadata[1] == bytes1(0x01); bytes4 selector = SET_META_DATA_SIG; assembly { mstore(add(inputData, 0x20), selector) mstore(add(inputData, 0x24), mload(metaData)) mstore(add(inputData, 0x44), mload(add(metaData, 0x20))) mstore(add(inputData, 0x64), mload(add(metaData, 0x40))) mstore(add(inputData, 0x84), mload(add(metaData, 0x60))) mstore(add(inputData, 0xa4), ratioFeed) mstore(add(inputData, 0xc4), isRebasing) } (success, returnValue) = result.call(inputData); require(success, string(abi.encodePacked("set metadata failed: ", returnValue))); /* return generated contract address */ return result; } function internetBondProxyAddress(address deployer, bytes32 salt) internal pure returns (address) { bytes32 bytecodeHash = keccak256(INTERNET_BOND_PROXY_BYTECODE); bytes32 hash = keccak256(abi.encodePacked(uint8(0xff), address(deployer), salt, bytecodeHash)); return address(bytes20(hash << 96)); } }
// SPDX-License-Identifier: GPL-3.0-only pragma solidity ^0.8.6; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IERC20Mintable { function mint(address account, uint256 amount) external; function burn(address account, uint256 amount) external; } interface IERC20Pegged { function getOrigin() external view returns (uint256, address); } interface IERC20Extra { function name() external returns (string memory); function decimals() external returns (uint8); function symbol() external returns (string memory); } interface IERC20MetadataChangeable { event NameChanged(string prevValue, string newValue); event SymbolChanged(string prevValue, string newValue); function changeName(bytes32) external; function changeSymbol(bytes32) external; } interface IERC20InternetBond { function ratio() external view returns (uint256); function isRebasing() external view returns (bool); }
// SPDX-License-Identifier: GPL-3.0-only pragma solidity ^0.8.6; import "../interfaces/IERC20.sol"; interface ICrossChainBridge { event ContractAllowed(address contractAddress, uint256 toChain); event ContractDisallowed(address contractAddress, uint256 toChain); event ConsensusChanged(address consensusAddress); event TokenImplementationChanged(address consensusAddress); event BondImplementationChanged(address consensusAddress); struct Metadata { bytes32 symbol; bytes32 name; uint256 originChain; address originAddress; bytes32 bondMetadata; // encoded metadata version, bond type } event DepositLocked( uint256 chainId, address indexed fromAddress, address indexed toAddress, address fromToken, address toToken, uint256 totalAmount, Metadata metadata ); event DepositBurned( uint256 chainId, address indexed fromAddress, address indexed toAddress, address fromToken, address toToken, uint256 totalAmount, Metadata metadata, address originToken ); event WithdrawMinted( bytes32 receiptHash, address indexed fromAddress, address indexed toAddress, address fromToken, address toToken, uint256 totalAmount ); event WithdrawUnlocked( bytes32 receiptHash, address indexed fromAddress, address indexed toAddress, address fromToken, address toToken, uint256 totalAmount ); enum InternetBondType { NOT_BOND, REBASING_BOND, NONREBASING_BOND } function isPeggedToken(address toToken) external returns (bool); function deposit(uint256 toChain, address toAddress) payable external; function deposit(address fromToken, uint256 toChain, address toAddress, uint256 amount) external; function withdraw(bytes calldata encodedProof, bytes calldata rawReceipt, bytes calldata receiptRootSignature) external; function factoryPeggedToken(uint256 fromChain, Metadata calldata metaData) external; function factoryPeggedBond(uint256 fromChain, Metadata calldata metaData) external; function getTokenImplementation() external returns (address); function getBondImplementation() external returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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); /** * @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 `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount ) external returns (bool); }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "berlin", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"stateMutability":"nonpayable","type":"fallback"},{"inputs":[{"internalType":"address","name":"newBeacon","type":"address"}],"name":"setBeacon","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50610215806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063d42afb56146100fd575b60008061005960017fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d516101a2565b60001b9050805491506000826001600160a01b0316631626425c6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561009f57600080fd5b505af11580156100b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d79190610185565b90503660008037600080366000845af43d6000803e8080156100f8573d6000f35b3d6000fd5b61011061010b366004610161565b610112565b005b60008061014060017fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d516101a2565b8054925090506001600160a01b0382161561015a57600080fd5b9190915550565b60006020828403121561017357600080fd5b813561017e816101c7565b9392505050565b60006020828403121561019757600080fd5b815161017e816101c7565b6000828210156101c257634e487b7160e01b600052601160045260246000fd5b500390565b6001600160a01b03811681146101dc57600080fd5b5056fea2646970667358221220d283edebb1e56b63c1cf809c7a7219bbf056c367c289dabb51fdba5f71cdf44c64736f6c63430008060033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063d42afb56146100fd575b60008061005960017fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d516101a2565b60001b9050805491506000826001600160a01b0316631626425c6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561009f57600080fd5b505af11580156100b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d79190610185565b90503660008037600080366000845af43d6000803e8080156100f8573d6000f35b3d6000fd5b61011061010b366004610161565b610112565b005b60008061014060017fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d516101a2565b8054925090506001600160a01b0382161561015a57600080fd5b9190915550565b60006020828403121561017357600080fd5b813561017e816101c7565b9392505050565b60006020828403121561019757600080fd5b815161017e816101c7565b6000828210156101c257634e487b7160e01b600052601160045260246000fd5b500390565b6001600160a01b03811681146101dc57600080fd5b5056fea2646970667358221220d283edebb1e56b63c1cf809c7a7219bbf056c367c289dabb51fdba5f71cdf44c64736f6c63430008060033
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.