Skip to content

Commit

Permalink
docs(readme.md): Update etherscan API URL and add diamond contract usage
Browse files Browse the repository at this point in the history
  • Loading branch information
ben46 committed Apr 6, 2024
1 parent e372789 commit 91861d6
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -415,13 +415,16 @@ Alternatively, you can change the mainnet etherscan api key env var name to some
...
verify: {
etherscan: {
apiUrl: 'http://mynetwork.xyz'
apiUrl: 'https://api-testnet.ftmscan.com',
apiKey: process.env.ETHERSCAN_API_KEY_FANTOM
}
}
}
}
}
```
NOTE: some projects use `apiUrl` like `https://api-testnet.ftmscan.com/api`, but we should remove `/api` path here, just fill in `https://api-testnet.ftmscan.com`


`--license <SPDX license id>`: SPDX license (useful if SPDX is not listed in the sources), need to be supported by etherscan: https://etherscan.io/contract-license-types

Expand Down Expand Up @@ -1312,6 +1315,24 @@ diamond.deploy('ADiamondContract', {
});
```
### use diamond contract for your scripts
set external typechain in `hardhat.config.ts`, this make sure typechain knows this abi and generate typechain files for the diamond contract
```ts
const config: HardhatUserConfig = {
typechain: {
externalArtifacts: ['deployments/localhost/ADiamondContract.json']
},
...
```
in your scripts
```ts
const ADiamondContract = await ethers.getContract<ADiamondContract>('ADiamondContract')
// do your stuff
```
### more...
There are more options, to be described later...
Expand Down

0 comments on commit 91861d6

Please sign in to comment.