Skip to content

Commit

Permalink
Deploy offchain resolver to Sepolia
Browse files Browse the repository at this point in the history
  • Loading branch information
jefflau committed Jan 3, 2024
1 parent efb7c02 commit 952914d
Show file tree
Hide file tree
Showing 5 changed files with 394 additions and 16 deletions.
1 change: 0 additions & 1 deletion packages/contracts/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
deployments
artifacts
1 change: 1 addition & 0 deletions packages/contracts/deployments/sepolia/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
11155111
310 changes: 310 additions & 0 deletions packages/contracts/deployments/sepolia/OffchainResolver.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

36 changes: 21 additions & 15 deletions packages/contracts/hardhat.config.js
Original file line number Diff line number Diff line change
@@ -1,57 +1,63 @@
// const { task } = require('hardhat/config');
require('@nomiclabs/hardhat-etherscan');
require('@nomiclabs/hardhat-ethers');
require('@nomiclabs/hardhat-waffle');
require('hardhat-deploy');
require('hardhat-deploy-ethers');
require("@nomiclabs/hardhat-etherscan");
require("@nomiclabs/hardhat-ethers");
require("@nomiclabs/hardhat-waffle");
require("hardhat-deploy");
require("hardhat-deploy-ethers");

real_accounts = undefined;
if (process.env.DEPLOYER_KEY && process.env.OWNER_KEY) {
real_accounts = [process.env.OWNER_KEY, process.env.DEPLOYER_KEY];
}
const gatewayurl =
'https://offchain-resolver-example.uc.r.appspot.com/{sender}/{data}.json';
"https://offchain-resolver-example.uc.r.appspot.com/{sender}/{data}.json";

let devgatewayurl = 'http://localhost:8080/{sender}/{data}.json';
let devgatewayurl = "http://localhost:8080/{sender}/{data}.json";
if (process.env.REMOTE_GATEWAY) {
devgatewayurl =
`${process.env.REMOTE_GATEWAY}/{sender}/{data}.json`;
devgatewayurl = `${process.env.REMOTE_GATEWAY}/{sender}/{data}.json`;
}
/**
* @type import('hardhat/config').HardhatUserConfig
*/

module.exports = {
solidity: '0.8.10',
solidity: "0.8.10",
networks: {
hardhat: {
throwOnCallFailures: false,
gatewayurl: devgatewayurl,
},
ropsten: {
url: `https://ropsten.infura.io/v3/${process.env.INFURA_ID}`,
tags: ['test', 'demo'],
tags: ["test", "demo"],
chainId: 3,
accounts: real_accounts,
gatewayurl,
},
rinkeby: {
url: `https://rinkeby.infura.io/v3/${process.env.INFURA_ID}`,
tags: ['test', 'demo'],
tags: ["test", "demo"],
chainId: 4,
accounts: real_accounts,
gatewayurl,
},
goerli: {
url: `https://goerli.infura.io/v3/${process.env.INFURA_ID}`,
tags: ['test', 'demo'],
tags: ["test", "demo"],
chainId: 5,
accounts: real_accounts,
gatewayurl,
},
sepolia: {
url: `https://sepolia.infura.io/v3/${process.env.INFURA_ID}`,
tags: ["test", "demo"],
chainId: 11155111,
accounts: real_accounts,
gatewayurl,
},
mainnet: {
url: `https://mainnet.infura.io/v3/${process.env.INFURA_ID}`,
tags: ['demo'],
tags: ["demo"],
chainId: 1,
accounts: real_accounts,
gatewayurl,
Expand All @@ -62,7 +68,7 @@ module.exports = {
},
namedAccounts: {
signer: {
default: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266',
default: "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
},
deployer: {
default: 1,
Expand Down

0 comments on commit 952914d

Please sign in to comment.