Skip to content

xor68/Smart-Contract1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smart-Contract1

Overloading Example

SimpleStorage.sol

contract SimpleStorage {

  uint256 favoriteNumber;
  
  function store(uint256 _favoriteNumber) public virtual {
     favoriteNumber = _favoriteNumber;
  }
  ...
}

ExtraStorage.sol

import "./SimpleStorage.sol";

contract ExtraStorage is SimpleStorage {
    function store(uint256 _favoriteNumber) public override {
        favoriteNumber = _favoriteNumber + 5;
    }
}

getPrice.sol

How to get the price of Ethereum (ETH) on the Ethereum network.

Step 1

Drop faucet: docs.chain.link#goerli - faucetlink.to/goerli

GOERLI TESTNET FAUCET I have registered my address on telegram (0x2C1b8B161F4cE411077D673B3459Fb1564ea0b06) and I recived 0.01 goerli faucet from bitszn

Step 2

On remix insert code from doc.chain.link

Step 3

In Remix select as environment Iniected Provider - MetaMask

Gas requirement of function PriceConsumerV3.getLatestPrice is infinite: 
If the gas requirement of a function is higher than the block gas limit, 
it cannot be executed. Please avoid loops in your functions or actions 
that modify large areas of storage

Roberto Linkedin

About

Simple Examples

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published