• Mark Tyneway's avatar
    contracts: add hardhat impersonate account step · 33abe73d
    Mark Tyneway authored
    It can be used with the command:
    
    ```
    $ npx hardhat deploy --tags hardhat --network fork --fork-network kovan
    ```
    
    A new parameter `--fork-network` is added which specifies the network
    that is being forked. We cannot use the actual network due to it
    checking the `.chainId` file in the `deployments/xxx/` directory
    and comparing that against the remote network.
    
    It is hidden behind the `hardhat` tag and only runs if the deploy config
    has the network set to `fork` with `--network fork`. It is up to the
    user to configure `hardhat node` with the correct fork url.
    
    This should be used with the env vars:
    ```
    CONTRACTS_TARGET_NETWORK=fork
    CONTRACTS_DEPLOYER_KEY=0x...
    CONTRACTS_RPC_URL=<url of forked network>
    ```
    
    This must run first and I didn't want to rename all of the files,
    so I named it with the prefix `0000`.
    33abe73d
Name
Last commit
Last update
..
bin Loading commit data...
contracts Loading commit data...
deploy Loading commit data...
deployments Loading commit data...
scripts Loading commit data...
src Loading commit data...
tasks Loading commit data...
test Loading commit data...
.eslintrc.js Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.lintstagedrc.yml Loading commit data...
.prettierignore Loading commit data...
.prettierrc.js Loading commit data...
.solcover.js Loading commit data...
.solhint.json Loading commit data...
.solhintignore Loading commit data...
CHANGELOG.md Loading commit data...
LICENSE Loading commit data...
README.md Loading commit data...
codechecks.yml Loading commit data...
hardhat.config.ts Loading commit data...
package.json Loading commit data...
slither.config.json Loading commit data...
tsconfig.build.json Loading commit data...
tsconfig.json Loading commit data...