This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
interface AggregatorV3Interface { | |
function decimals() external view returns (uint8); | |
function description() external view returns (string memory); | |
function version() external view returns (uint256); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//SPDX-License-Identifier: MIT | |
pragma solidity 0.8.19; //pragma solidtity ^0.8.18, pragma solidity >=0.8.18 <0.9.0 | |
import {SimpleStorage} from "./SimpleStorage.sol"; | |
contract AddFiveStorage is SimpleStorage { | |
function sayHello() public pure returns(string memory) { | |
return "Hello"; | |
} | |
//To create an override, the main function should be virtual | |
function store(uint256 _newNumber) public override { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//SPDX-License-Identifier: MIT | |
pragma solidity 0.8.19; //pragma solidtity ^0.8.18, pragma solidity >=0.8.18 <0.9.0 | |
import {SimpleStorage} from "./SimpleStorage.sol"; | |
contract AddFiveStorage is SimpleStorage { | |
function sayHello() public pure returns(string memory) { | |
return "Hello"; | |
} | |
//To create an override, the main function should be virtual | |
function store(uint256 _newNumber) public override { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//SPDX-License-Identifier: MIT | |
pragma solidity 0.8.19; //pragma solidtity ^0.8.18, pragma solidity >=0.8.18 <0.9.0 | |
contract SimpleStorage { | |
//Basic types : boolean, uint, int, address, bytes, string | |
// public, private, internal, external. Default is internal. | |
//view, pure doesn't allow updating state, hence can be invoked without txn externally. only a "call" | |
uint256 myFavoriteNumber; | |
uint256[] listOfFavoriteNumbers; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2020-12-01T04:41:06.706Z","extensionVersion":"v3.4.3"} |