Skip to content

Commit

Permalink
Faucet contract + tests
Browse files Browse the repository at this point in the history
  • Loading branch information
antico5 committed Aug 26, 2021
1 parent af641dc commit 27113ca
Show file tree
Hide file tree
Showing 9 changed files with 28,371 additions and 1 deletion.
6 changes: 6 additions & 0 deletions faucet/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
.env

#Hardhat files
cache
artifacts
15 changes: 15 additions & 0 deletions faucet/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Basic Sample Hardhat Project

This project demonstrates a basic Hardhat use case. It comes with a sample contract, a test for that contract, a sample script that deploys that contract, and an example of a task implementation, which simply lists the available accounts.

Try running some of the following tasks:

```shell
npx hardhat accounts
npx hardhat compile
npx hardhat clean
npx hardhat test
npx hardhat node
node scripts/sample-script.js
npx hardhat help
```
2 changes: 1 addition & 1 deletion faucet/faucet.sol → faucet/contracts/Faucet.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pragma solidity ^0.8.7;

contract owned {
address owner;
address public owner;

constructor() {
owner = msg.sender;
Expand Down
19 changes: 19 additions & 0 deletions faucet/hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { task } from "hardhat/config";
import "@nomiclabs/hardhat-waffle";

// This is a sample Hardhat task. To learn how to create your own go to
// https://hardhat.org/guides/create-task.html
task("accounts", "Prints the list of accounts", async (args, hre) => {
const accounts = await hre.ethers.getSigners();

for (const account of accounts) {
console.log(await account.address);
}
});

// You need to export an object to set up your config
// Go to https://hardhat.org/config/ to learn more

export default {
solidity: "0.8.7",
};
Loading

0 comments on commit 27113ca

Please sign in to comment.