Consider in a contract the payer intends to pay recipient
ETH based on
USD (ex. the salary is 1
USD but paid by
So, if today contract needs to know equivalent value of 1
USD exactly at time of payment.
For this, contract needs to access to some external sources to know the price of the day of
I want to use ex. THIS WEB SITE as data-source. How can I fetch the price of
ETH from this website as an ex. integer value ?
Is there a sample of such contract / data-source as an example ?