Skip to content

Commit

Permalink
feat(scripts): add deployment script & instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
realnimish committed Sep 4, 2024
1 parent 675e5c0 commit e18f6c0
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
27 changes: 27 additions & 0 deletions packages/contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,30 @@ This library facilitates checking signatures over CCIP read responses.

### [OffchainResolver.sol](contracts/OffchainResolver.sol)
This contract implements the offchain resolution system. Set this contract as the resolver for a name, and that name and all its subdomains that are not present in the ENS registry will be resolved via the provided gateway by supported clients.

## Deployment instruction

1. Set the following env variables:

* *REMOTE_GATEWAY*
The target url (default: localhost:8080)

* *DEPLOYER_KEY* (*mandatory)
The private key use to deploy the contract (also the contract owner)

* *SIGNER_KEY* (*mandatory)
The public key which is approved as the trusted signer

* *INFURA_ID*
API key for network provider

* *ETHERSCAN_API_KEY*

* *NETWORK*
The target network (default: sepolia)

2. Run the following command

```bash
./deploy.sh
```
11 changes: 11 additions & 0 deletions packages/contracts/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -eu

# Can only be overwritten from the .env file, not from the command line!
NETWORK=sepolia

# Load .env
source .env

# Deploy OffchainResolver
npx hardhat --network $NETWORK deploy --tags demo

0 comments on commit e18f6c0

Please sign in to comment.