Overview
S Balance
S Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Price_w | 10181292 | 40 hrs ago | IN | 0 S | 0.00713725 |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
CryptoFromOracleAndRedstone
Compiler Version
vyper:0.3.10
Contract Source Code (Vyper language format)
# @version 0.3.10 """ @title CryptoFromOracleAndRedstone @author Curve.Fi @license MIT """ interface Oracle: def price() -> uint256: view def price_w() -> uint256: nonpayable interface Redstone: def latestAnswer() -> uint256: view def decimals() -> uint256: view ORACLE: public(immutable(Oracle)) REDSTONE: public(immutable(Redstone)) DECIMAL_MULTIPLIER: public(immutable(uint256)) @external def __init__( oracle: Oracle, redstone: Redstone ): ORACLE = oracle REDSTONE = redstone DECIMAL_MULTIPLIER = 10**(18 - redstone.decimals()) @external @view def price() -> uint256: p1: uint256 = ORACLE.price() p2: uint256 = REDSTONE.latestAnswer() assert p2 > 0 return p1 * p2 * DECIMAL_MULTIPLIER / 10**18 @external def price_w() -> uint256: p1: uint256 = ORACLE.price_w() p2: uint256 = REDSTONE.latestAnswer() assert p2 > 0 return p1 * p2 * DECIMAL_MULTIPLIER / 10**18
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"stateMutability":"nonpayable","type":"constructor","inputs":[{"name":"oracle","type":"address"},{"name":"redstone","type":"address"}],"outputs":[]},{"stateMutability":"view","type":"function","name":"price","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"nonpayable","type":"function","name":"price_w","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"ORACLE","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"REDSTONE","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"DECIMAL_MULTIPLIER","inputs":[],"outputs":[{"name":"","type":"uint256"}]}]
Contract Creation Code
6102755150346100a05760206102ee5f395f518060a01c6100a057604052602061030e5f395f518060a01c6100a057606052604051610235526060516102555260605163313ce567608052602060806004609c845afa610061573d5f5f3e3d5ffd5b60203d106100a057608090505180601203601281116100a0579050604d81116100a05780600a0a9050610275526102356100a461000039610295610000f35b5f80fd5f3560e01c60026003821660011b61022d01601e395f51565b6338013f028118610036573461022957602061023560403960206040f35b63a035b1fe811861022557346102295760206102355f395f5163a035b1fe606052602060606004607c845afa61006e573d5f5f3e3d5ffd5b60203d1061022957606090505160405260206102555f395f516350d25bcd608052602060806004609c845afa6100a6573d5f5f3e3d5ffd5b60203d106102295760809050516060526060511561022957604051606051808202811583838304141715610229579050905060206102755f395f518082028115838383041417156102295790509050670de0b6b3a76400008104905060805260206080f3610225565b639f21b3bd811861012d573461022957602061025560403960206040f35b63ceb7f759811861022557346102295760206102355f395f5163ceb7f759606052602060606004607c5f855af1610166573d5f5f3e3d5ffd5b60203d1061022957606090505160405260206102555f395f516350d25bcd608052602060806004609c845afa61019e573d5f5f3e3d5ffd5b60203d106102295760809050516060526060511561022957604051606051808202811583838304141715610229579050905060206102755f395f518082028115838383041417156102295790509050670de0b6b3a76400008104905060805260206080f3610225565b631aef80588118610225573461022957602061027560403960206040f35b5f5ffd5b5f80fd0207010f001802258419023581081860a16576797065728300030a00150000000000000000000000001dab6560494b04473a0be3e7d83cf3fdf3a5182800000000000000000000000065d0f14f7809cdc4f90c3978c753c4671b6b815b
Deployed Bytecode
0x5f3560e01c60026003821660011b61022d01601e395f51565b6338013f028118610036573461022957602061023560403960206040f35b63a035b1fe811861022557346102295760206102355f395f5163a035b1fe606052602060606004607c845afa61006e573d5f5f3e3d5ffd5b60203d1061022957606090505160405260206102555f395f516350d25bcd608052602060806004609c845afa6100a6573d5f5f3e3d5ffd5b60203d106102295760809050516060526060511561022957604051606051808202811583838304141715610229579050905060206102755f395f518082028115838383041417156102295790509050670de0b6b3a76400008104905060805260206080f3610225565b639f21b3bd811861012d573461022957602061025560403960206040f35b63ceb7f759811861022557346102295760206102355f395f5163ceb7f759606052602060606004607c5f855af1610166573d5f5f3e3d5ffd5b60203d1061022957606090505160405260206102555f395f516350d25bcd608052602060806004609c845afa61019e573d5f5f3e3d5ffd5b60203d106102295760809050516060526060511561022957604051606051808202811583838304141715610229579050905060206102755f395f518082028115838383041417156102295790509050670de0b6b3a76400008104905060805260206080f3610225565b631aef80588118610225573461022957602061027560403960206040f35b5f5ffd5b5f80fd0207010f001802250000000000000000000000001dab6560494b04473a0be3e7d83cf3fdf3a5182800000000000000000000000065d0f14f7809cdc4f90c3978c753c4671b6b815b00000000000000000000000000000000000000000000000000000002540be400
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000001dab6560494b04473a0be3e7d83cf3fdf3a5182800000000000000000000000065d0f14f7809cdc4f90c3978c753c4671b6b815b
-----Decoded View---------------
Arg [0] : oracle (address): 0x1daB6560494B04473A0BE3E7D83CF3Fdf3a51828
Arg [1] : redstone (address): 0x65d0F14f7809CdC4f90c3978c753C4671b6B815b
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000001dab6560494b04473a0be3e7d83cf3fdf3a51828
Arg [1] : 00000000000000000000000065d0f14f7809cdc4f90c3978c753c4671b6b815b
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
BSC | 100.00% | $22.48 | 3.2945 | $74.05 |
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.