This file contains hidden or 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: GPL-3.0 | |
| pragma solidity >=0.4.22 <0.9.0; | |
| library TestsAccounts { | |
| function getAccount(uint index) pure public returns (address) { | |
| address[15] memory accounts; | |
| accounts[0] = 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4; | |
| accounts[1] = 0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2; |
This file contains hidden or 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
| // This script can be used to deploy the "Storage" contract using ethers.js library. | |
| // Please make sure to compile "./contracts/1_Storage.sol" file before running this script. | |
| // And use Right click -> "Run" from context menu of the file to run the script. Shortcut: Ctrl+Shift+S | |
| import { deploy } from './ethers-lib' | |
| (async () => { | |
| try { | |
| const result = await deploy('Storage', []) | |
| console.log(`Deployed contract address: ${result.address}`) |
This file contains hidden or 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
| { | |
| "name": "Storage", | |
| "address": "0xf9aa6a218364e1e37153b33b9d44b64d6fb457a9", | |
| "abi": [ | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "uint256", | |
| "name": "num", | |
| "type": "uint256" |
This file contains hidden or 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: GPL-3.0 | |
| pragma solidity >=0.8.2 <0.9.0; | |
| /** | |
| * @title Storage | |
| * @dev Store & retrieve value in a variable | |
| * @custom:dev-run-script ./scripts/deploy_with_ethers.ts | |
| */ | |
| contract Storage { |
This file contains hidden or 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
| { | |
| "overrides": [ | |
| { | |
| "files": "*.sol", | |
| "options": { | |
| "printWidth": 80, | |
| "tabWidth": 4, | |
| "useTabs": false, | |
| "singleQuote": false, | |
| "bracketSpacing": false |
OlderNewer