Skip to content

Commit

Permalink
Deploy to Arbitrum Goerli
Browse files Browse the repository at this point in the history
  • Loading branch information
lbeder committed Aug 21, 2023
1 parent 0ea2525 commit d4ea656
Show file tree
Hide file tree
Showing 20 changed files with 6,210 additions and 22 deletions.
1 change: 1 addition & 0 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ ETHEREUM_OPTIMISM_PROVIDER_URL=
ETHEREUM_SEPOLIA_PROVIDER_URL=
ETHEREUM_OPTIMISM_GOERLI_PROVIDER_URL=
ETHEREUM_BASE_GOERLI_PROVIDER_URL=
ETHEREUM_ARBITRUM_GOERLI_PROVIDER_URL=
ETHERSCAN_API_KEY=
MAX_FEE=
MAX_PRIORITY_FEE=
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ deployments/optimism/solcInputs/*
deployments/sepolia/solcInputs/*
deployments/optimism-goerli/solcInputs/*
deployments/base-goerli/solcInputs/*
deployments/arbitrum-goerli/solcInputs/*
deployments/hardhat/*

.coverage_artifacts
Expand Down
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Please note that you can also import and use the addresses directly in your code
* Deployment and ABI: [EAS.json](./deployments/optimism/EAS.json)
* **SchemaRegistry**:
* Contract: [0x4200000000000000000000000000000000000020](https://optimistic.etherscan.io/address/0x4200000000000000000000000000000000000020)
* Deployment and ABI: [SchemaRegistry.json](./deployments//optimism/SchemaRegistry.json)
* Deployment and ABI: [SchemaRegistry.json](./deployments/optimism/SchemaRegistry.json)

### Optimism Goerli

Expand All @@ -91,7 +91,7 @@ Please note that you can also import and use the addresses directly in your code
* Deployment and ABI: [EAS.json](./deployments/optimism-goerli/EAS.json)
* **SchemaRegistry**:
* Contract: [0x4200000000000000000000000000000000000020](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000020)
* Deployment and ABI: [SchemaRegistry.json](./deployments//optimism-goerli/SchemaRegistry.json)
* Deployment and ABI: [SchemaRegistry.json](./deployments/optimism-goerli/SchemaRegistry.json)

### Base Goerli

Expand All @@ -102,7 +102,18 @@ Please note that you can also import and use the addresses directly in your code
* Deployment and ABI: [EAS.json](./deployments/base-goerli/EAS.json)
* **SchemaRegistry**:
* Contract: [0x720c2bA66D19A725143FBf5fDC5b4ADA2742682E](https://goerli.basescan.org//address/0x720c2bA66D19A725143FBf5fDC5b4ADA2742682E)
* Deployment and ABI: [SchemaRegistry.json](./deployments//base-goerli/SchemaRegistry.json)
* Deployment and ABI: [SchemaRegistry.json](./deployments/base-goerli/SchemaRegistry.json)

### Arbitrum Goerli

#### v1.1.0

* **EAS**:
* Contract: [0xAcfE09Fd03f7812F022FBf636700AdEA18Fd2A7A](https:/goerli.arbiscan.io//address/0xAcfE09Fd03f7812F022FBf636700AdEA18Fd2A7A)
* Deployment and ABI: [EAS.json](./deployments/arbitrum-goerli/EAS.json)
* **SchemaRegistry**:
* Contract: [0x720c2bA66D19A725143FBf5fDC5b4ADA2742682E](https:/goerli.arbiscan.io//address/0x720c2bA66D19A725143FBf5fDC5b4ADA2742682E)
* Deployment and ABI: [SchemaRegistry.json](./deployments/arbitrum-goerli/SchemaRegistry.json)

## Installation

Expand Down
7 changes: 6 additions & 1 deletion data/NamedAccounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,18 @@ const baseGoerli = (address: string) => ({
[DeploymentNetwork.BaseGoerli]: address
});

const arbitrumGoerli = (address: string) => ({
[DeploymentNetwork.ArbitrumGoerli]: address
});

export const NamedAccounts = {
deployer: {
...mainnet(deployer),
...arbitrumOne(deployer),
...optimism(deployer),
...sepolia(deployer),
...optimismGoerli(deployer),
...baseGoerli(deployer)
...baseGoerli(deployer),
...arbitrumGoerli(deployer)
}
};
36 changes: 20 additions & 16 deletions deploy/scripts/000100-test-seed.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
import fs from 'fs';
import path from 'path';
import Chance from 'chance';
import { AbiCoder, encodeBytes32String, keccak256, toUtf8Bytes, Wallet } from 'ethers';
import { AbiCoder, encodeBytes32String, keccak256, toUtf8Bytes, TransactionReceipt, Wallet } from 'ethers';
import { DeployFunction } from 'hardhat-deploy/types';
import { HardhatRuntimeEnvironment } from 'hardhat/types';
import { NO_EXPIRATION, ZERO_ADDRESS, ZERO_BYTES32 } from '../../utils/Constants';
import {
execute,
getDeploymentDir,
InstanceName,
isMainnetFork,
isTestnet,
setDeploymentMetadata
} from '../../utils/Deploy';
import { getSchemaUID, getUIDsFromAttestEvents } from '../../utils/EAS';
import { execute, getDeploymentDir, InstanceName, isTestnet, setDeploymentMetadata } from '../../utils/Deploy';
import { getSchemaUID, getUIDsFromAttestReceipt } from '../../utils/EAS';
import Logger from '../../utils/Logger';

export const TEST_ATTESTATIONS_OUTPUT_PATH = path.join(getDeploymentDir(), 'test-attestations.json');
Expand Down Expand Up @@ -223,7 +216,11 @@ const func: DeployFunction = async ({ getNamedAccounts }: HardhatRuntimeEnvironm
const { data, params } = generator();
const recipient = Wallet.createRandom().address;

Logger.info(`${i + 1}: ${recipient} --> ${JSON.stringify(params)}`);
Logger.info(
`${i + 1}: ${recipient} --> ${JSON.stringify(params, (_, value) =>
typeof value === 'bigint' ? value.toString() : value
)}`
);

requests.push({
recipient,
Expand All @@ -245,7 +242,7 @@ const func: DeployFunction = async ({ getNamedAccounts }: HardhatRuntimeEnvironm
from: deployer
});

const uids: string[] = await getUIDsFromAttestEvents(res.events);
const uids: string[] = await getUIDsFromAttestReceipt(res as any as TransactionReceipt);

testAttestations[schemaId] = {
schema,
Expand Down Expand Up @@ -412,7 +409,11 @@ const func: DeployFunction = async ({ getNamedAccounts }: HardhatRuntimeEnvironm
const recipient = Wallet.createRandom().address;

const extParams = { ...params, holdType: HoldType[holdType], useType: UseType[useType] };
Logger.info(`${recipient} --> ${JSON.stringify({ ...extParams })}`);
Logger.info(
`${recipient} --> ${JSON.stringify({ ...extParams }, (_, value) =>
typeof value === 'bigint' ? value.toString() : value
)}`
);

requests.push({
recipient,
Expand All @@ -434,7 +435,7 @@ const func: DeployFunction = async ({ getNamedAccounts }: HardhatRuntimeEnvironm
from: deployer
});

const uids: string[] = await getUIDsFromAttestEvents(res.events);
const uids: string[] = await getUIDsFromAttestReceipt(res as any as TransactionReceipt);

testAttestations[schemaId] = {
schema,
Expand All @@ -445,12 +446,15 @@ const func: DeployFunction = async ({ getNamedAccounts }: HardhatRuntimeEnvironm
}))
};

fs.writeFileSync(TEST_ATTESTATIONS_OUTPUT_PATH, JSON.stringify(testAttestations, null, 2));
fs.writeFileSync(
TEST_ATTESTATIONS_OUTPUT_PATH,
JSON.stringify(testAttestations, (_, value) => (typeof value === 'bigint' ? value.toString() : value), 2)
);

return true;
};

// Run this deployment script only during test or deployments on testnet
func.skip = async () => !isMainnetFork() && !isTestnet(); // eslint-disable-line require-await
func.skip = async () => !isTestnet(); // eslint-disable-line require-await

export default setDeploymentMetadata(__filename, func);
1 change: 1 addition & 0 deletions deployments/arbitrum-goerli/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
421613
8 changes: 8 additions & 0 deletions deployments/arbitrum-goerli/.migrations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"000001-registry": 1692628438,
"000002-eas": 1692628441,
"000003-register-initial-schemas": 1692628528,
"000004-name-initial-schemas": 1692628619,
"000005-eip712-proxy": 1692628953,
"000100-test-seed": 1692629466
}
Loading

0 comments on commit d4ea656

Please sign in to comment.