-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploy example contract in graph-node
- Loading branch information
Showing
5 changed files
with
45 additions
and
2 deletions.
There are no files selected for viewing
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,7 @@ tmp/ | |
temp/ | ||
|
||
.env | ||
|
||
#Hardhat files | ||
cache | ||
artifacts |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// Copyright 2022 Vulcanize, Inc. | ||
// | ||
|
||
import '@nomiclabs/hardhat-waffle'; | ||
|
||
import './test/tasks/example-deploy'; | ||
|
||
// You need to export an object to set up your config | ||
// Go to https://hardhat.org/config/ to learn more | ||
|
||
/** | ||
* @type import('hardhat/config').HardhatUserConfig | ||
*/ | ||
export default { | ||
solidity: '0.8.0', | ||
paths: { | ||
sources: './test/contracts' | ||
} | ||
}; |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// Copyright 2022 Vulcanize, Inc. | ||
// | ||
|
||
import { task } from 'hardhat/config'; | ||
import '@nomiclabs/hardhat-ethers'; | ||
|
||
task('example-deploy', 'Deploys Example contract') | ||
.setAction(async (args, hre) => { | ||
await hre.run('compile'); | ||
const Example = await hre.ethers.getContractFactory('Example'); | ||
const example = await Example.deploy(); | ||
|
||
console.log('Example contract deployed to:', example.address); | ||
}); |