Skip to content

Commit

Permalink
Update dev to goerli
Browse files Browse the repository at this point in the history
  • Loading branch information
delaaxe committed Nov 15, 2022
1 parent e985fa3 commit 4abafab
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 4 deletions.
36 changes: 36 additions & 0 deletions DEPLOYMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Deployment

## 1. Compile the contracts:

`npm run cc`

If setting up a new environment `ENV_NAME` for the first time:

- Add the new environment in `truffle-config.base.js`
- Add a new AWS configuration locally
- Add it to `S3_BUCKET_SUFFIXES` in `.env`

## 2. Deploy the contracts:

```
./scripts/deploy.sh --no-compile ENV_NAME 1
./scripts/deploy.sh --no-compile ENV_NAME 2
./scripts/deploy.sh --no-compile ENV_NAME 3
./scripts/deploy.sh --no-compile ENV_NAME 4
```

If you need to do some manual changes to the config file and reupload it to S3 you can do it like this:

Download:

`aws-vault exec argent-ENV_NAME -- aws s3 cp s3://argent-smartcontracts-ENV_NAME/backend/config.json ./config.json`

Upload:

`aws-vault exec argent-ENV_NAME -- aws s3 cp ./config.json s3://argent-smartcontracts-ENV_NAME/backend/config.json`

## 3. Configure the DappRegistry

- Go to the `argent-trustslists` repo
- Make sure the values in `scripts/config/ENV_NAME.json` match the config file you created earlier in `argent-contracts` (multisig, ens manager, dapp registry, ...)
- Run the deploy script: `aws-vault exec argent-ENV_NAME -- yarn hardhat run ./scripts/configure-registries.ts --network ENV_NAME`
1 change: 1 addition & 0 deletions deployment/1_setup_test_environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
async function deployENSRegistry(owner, domain) {
// Deploy the public ENS registry
const ensRegistryWithoutFallback = await ENSRegistry.new();
console.log("Deploying local ENSRegistry");
const ENSWrapper = await ENSRegistryWithFallback.new(ensRegistryWithoutFallback.address);
console.log("Deployed local ENSRegistry at ", ENSWrapper.address);
// ENS domain
Expand Down
2 changes: 1 addition & 1 deletion deployment/3_finalise_test_environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async function main() {
await deployENSReverseRegistrar(config, deploymentAccount);
}

console.log("## completed deployment script 4 ##");
console.log("## completed deployment script 3 ##");
}

// For truffle exec
Expand Down
2 changes: 1 addition & 1 deletion deployment/4_deploy_modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ async function main() {
};
await versionUploader.upload(version);

console.log("## completed deployment script 5 ##");
console.log("## completed deployment script 4 ##");
}

// For truffle exec
Expand Down
4 changes: 2 additions & 2 deletions truffle-config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ module.exports = {

dev: {
provider: () => new AWSWalletProvider(
`https://rinkeby.infura.io/v3/${process.env.INFURA_KEY}`,
`https://eth-goerli.g.alchemy.com/v2/${process.env.ALCHEMY_KEY}`,
"argent-smartcontracts-dev",
"backend/deploy.key"
),
network_id: 4, // rinkeby
network_id: 5, // goerli
gas: _gasLimit,
gasPrice: _gasPrice
},
Expand Down

0 comments on commit 4abafab

Please sign in to comment.