Skip to content

Commit

Permalink
feat: update packages and fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
d3or committed Feb 21, 2024
1 parent 21a2ff6 commit 29e92c7
Show file tree
Hide file tree
Showing 8 changed files with 7,398 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/example/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
node_modules
.env

# Hardhat files
/cache
/artifacts

# TypeChain files
/typechain
/typechain-types

# solidity-coverage files
/coverage
/coverage.json
13 changes: 13 additions & 0 deletions test/example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Sample Hardhat Project

This project demonstrates a basic Hardhat use case. It comes with a sample contract, a test for that contract, and a script that deploys that contract.

Try running some of the following tasks:

```shell
npx hardhat help
npx hardhat test
REPORT_GAS=true npx hardhat test
npx hardhat node
npx hardhat run scripts/deploy.ts
```
23 changes: 23 additions & 0 deletions test/example/contracts/Greeter.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
pragma solidity ^0.8.24;

contract Greeter {

string public greeting;

constructor(string memory _greeting) public {
greeting = _greeting;
}

function greet() public view returns (string memory) {
return greeting;
}

function setGreeting(string memory _greeting) public {
greeting = _greeting;
}

function throwAnError(string memory message) public {
greeting = "goodbye";
require(false, message);
}
}
10 changes: 10 additions & 0 deletions test/example/hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { HardhatUserConfig } from 'hardhat/config';
import '@nomicfoundation/hardhat-toolbox';

import '../../src/index';

const config: HardhatUserConfig = {
solidity: '0.8.24',
};

export default config;
Loading

0 comments on commit 29e92c7

Please sign in to comment.