-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #145 from P4-Games/develop
Deploy 20240410-2
- Loading branch information
Showing
5 changed files
with
274 additions
and
8 deletions.
There are no files selected for viewing
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,44 @@ | ||
# Development Guide | ||
|
||
|
||
## Verify source code of deployed Contracts | ||
|
||
1. Create an account in polygonscan.com | ||
2. Create un API Key in your Polygon's account | ||
3. Copy your API Key from Polygonscan | ||
4. Create a .env file with the API Key | ||
|
||
```sh | ||
POLYGON_MUMBAI_RPC_PROVIDER = 'RPC Node URL' | ||
PRIVATE_KEY = 'your wallet private key' | ||
POLYGONSCAN_API_KEY = 'your polygonscan api key' | ||
``` | ||
|
||
5. Install hardhat-etherscan dependency | ||
|
||
|
||
```sh | ||
npm install --save-dev @nomiclabs/hardhat-etherscan | ||
or | ||
yarn add --dev @nomiclabs/hardhat-etherscan | ||
``` | ||
|
||
6. Update your hardhat.config.js with etherscan | ||
|
||
|
||
```sh | ||
module.exports = { | ||
solidity: ... | ||
defaultNetwork: ... | ||
networks: { ...} | ||
etherscan: { | ||
apiKey: POLYGONSCAN_API_KEY | ||
} | ||
} | ||
``` | ||
7. Verify the deployed contract address | ||
```sh | ||
npx hardhat verify CONTRACT_ADDR --network polygon | ||
``` |
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
Oops, something went wrong.