Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
xSushiExchangeRate
Compiler Version
v0.8.0+commit.c7dfd78e
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2021-02-08 */ //SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); } contract xSushiExchangeRate { IERC20 xSushi; IERC20 sushi; constructor(address _xSushi, address _sushi) { xSushi = IERC20(_xSushi); sushi = IERC20(_sushi); } function getExchangeRate() public view returns (uint256) { return sushi.balanceOf(address(xSushi))*(10**18) / xSushi.totalSupply(); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_xSushi","type":"address"},{"internalType":"address","name":"_sushi","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"getExchangeRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506040516102ed3803806102ed83398101604081905261002f9161007c565b600080546001600160a01b039384166001600160a01b031991821617909155600180549290931691161790556100ae565b80516001600160a01b038116811461007757600080fd5b919050565b6000806040838503121561008e578182fd5b61009783610060565b91506100a560208401610060565b90509250929050565b610230806100bd6000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063e6aa216c14610030575b600080fd5b61003861004e565b60405161004591906101a6565b60405180910390f35b60008060009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561009d57600080fd5b505afa1580156100b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d5919061017a565b6001546000546040516370a0823160e01b81526001600160a01b03928316926370a082319261010992911690600401610192565b60206040518083038186803b15801561012157600080fd5b505afa158015610135573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610159919061017a565b61016b90670de0b6b3a76400006101cf565b61017591906101af565b905090565b60006020828403121561018b578081fd5b5051919050565b6001600160a01b0391909116815260200190565b90815260200190565b6000826101ca57634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156101f557634e487b7160e01b81526011600452602481fd5b50029056fea26469706673582212201aad6e35a2a8f892f5a5aae856d6a2be27fdd827c84efa06c139d0f89a41d9d164736f6c634300080000330000000000000000000000008798249c2e607446efb7ad49ec89dd1865ff42720000000000000000000000006b3595068778dd592e39a122f4f5a5cf09c90fe2
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063e6aa216c14610030575b600080fd5b61003861004e565b60405161004591906101a6565b60405180910390f35b60008060009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561009d57600080fd5b505afa1580156100b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d5919061017a565b6001546000546040516370a0823160e01b81526001600160a01b03928316926370a082319261010992911690600401610192565b60206040518083038186803b15801561012157600080fd5b505afa158015610135573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610159919061017a565b61016b90670de0b6b3a76400006101cf565b61017591906101af565b905090565b60006020828403121561018b578081fd5b5051919050565b6001600160a01b0391909116815260200190565b90815260200190565b6000826101ca57634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156101f557634e487b7160e01b81526011600452602481fd5b50029056fea26469706673582212201aad6e35a2a8f892f5a5aae856d6a2be27fdd827c84efa06c139d0f89a41d9d164736f6c63430008000033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000008798249c2e607446efb7ad49ec89dd1865ff42720000000000000000000000006b3595068778dd592e39a122f4f5a5cf09c90fe2
-----Decoded View---------------
Arg [0] : _xSushi (address): 0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272
Arg [1] : _sushi (address): 0x6B3595068778DD592e39A122f4f5a5cF09C90fE2
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000008798249c2e607446efb7ad49ec89dd1865ff4272
Arg [1] : 0000000000000000000000006b3595068778dd592e39a122f4f5a5cf09c90fe2
Deployed Bytecode Sourcemap
221:333:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;410:141;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;458:7;525:6;;;;;;;;;-1:-1:-1;;;;;525:6:0;-1:-1:-1;;;;;525:18:0;;:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;481:5;;;505:6;481:32;;-1:-1:-1;;;481:32:0;;-1:-1:-1;;;;;481:5:0;;;;:15;;:32;;505:6;;;481:32;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:41;;515:6;481:41;:::i;:::-;:64;;;;:::i;:::-;474:71;;410:141;:::o;14:194:1:-;;137:2;125:9;116:7;112:23;108:32;105:2;;;158:6;150;143:22;105:2;-1:-1:-1;186:16:1;;95:113;-1:-1:-1;95:113:1:o;213:203::-;-1:-1:-1;;;;;377:32:1;;;;359:51;;347:2;332:18;;314:102::o;421:177::-;567:25;;;555:2;540:18;;522:76::o;603:217::-;;669:1;659:2;;-1:-1:-1;;;694:31:1;;748:4;745:1;738:15;776:4;701:1;766:15;659:2;-1:-1:-1;805:9:1;;649:171::o;825:277::-;;931:1;927;923:6;919:14;916:1;913:21;908:1;901:9;894:17;890:45;887:2;;;-1:-1:-1;;;958:37:1;;1018:4;1015:1;1008:15;1052:4;965:7;1036:21;887:2;-1:-1:-1;1087:9:1;;877:225::o
Swarm Source
ipfs://1aad6e35a2a8f892f5a5aae856d6a2be27fdd827c84efa06c139d0f89a41d9d1
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
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.