feat: deploy AutismRegistrar on arbitrum_goerli network (#2)

* feat: add `arbitrum_goerli` network

* Deploy `AutismRegsitrar` on `arbitrum_goerli` network

* chore: `.gitignore`, new lines
This commit is contained in:
r1oga
2022-11-07 21:57:11 +01:00
committed by GitHub
parent 7edecb68d7
commit 276abb82a1
7 changed files with 19261 additions and 359 deletions

3
.gitignore vendored
View File

@@ -1,3 +1,4 @@
.idea/
node_modules/
build/
build/
.env

1
.tool-versions Normal file
View File

@@ -0,0 +1 @@
nodejs lts

22
README.md Normal file
View File

@@ -0,0 +1,22 @@
# Zkitter/Autism Registrar Contract
## Getting Started
0. Install dependencies: `npm i`
1. Define environment variables
| variable | description |
|------------------|-------------------------------------------------|
| GOERLI_API_KEY | Infura API KEY for Arbitrum Goerli RPC endpoint |
| DEPLOYER_ADDRESS | Address to deploy contract from |
| PRIVATE_KEY | Private key of deployer address |
2. Truffle scripts
- `truffle build`
- `truffle deploy --network <networkName>`
## Deployed contracts
| Network | Address |
|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Aribtrum | [0x6b0a11F9aA5aa275f16e44e1D479A59dd00abE58](https://arbiscan.io/address/0x6b0a11f9aa5aa275f16e44e1d479a59dd00abe58#code)
| Arbitrum Rinkeby | [0x4e3f9c0374816C80B1f1c8D2D49b3cD68460330b](https://rinkeby-explorer.arbitrum.io/address/0x4e3f9c0374816C80B1f1c8D2D49b3cD68460330b/contracts#address-tabs) |
| Arbitrum Goerli | [0x92844a251EC890141F6617c9c2ef7eEb26a81ad8](https://goerli-rollup-explorer.arbitrum.io/address/0x92844a251EC890141F6617c9c2ef7eEb26a81ad8/contracts#address-tabs) |

View File

@@ -2,7 +2,6 @@ const Migrations = artifacts.require("AutismRegistrar");
module.exports = function (deployer) {
deployer.deploy(Migrations, {
// from: "0x5d432ce201d2c03234e314d4703559102Ebf365C",
from: "0x860C68abeEE0ecBd97729C7d1E09dA1e7EaD3C50",
from: `${process.env.DEPLOYER_ADDRESS}`,
});
};
};

19509
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -3,11 +3,9 @@
"version": "1.0.0",
"description": "",
"main": "truffle-config.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"@truffle/hdwallet-provider": "^1.2.6",
"truffle": "^5.6.2",
"truffle-hdwallet-provider": "^1.0.17"
},
"author": "",

View File

@@ -22,7 +22,7 @@ const HDWalletProvider = require('@truffle/hdwallet-provider');
//
// const fs = require('fs');
// const mnemonic = fs.readFileSync(".secret").toString().trim();
console.log(process.env.PRIVATE_KEY);
module.exports = {
/**
* Networks define how you connect to your ethereum client and let you set the
@@ -44,7 +44,7 @@ module.exports = {
development: {
host: "127.0.0.1", // Localhost (default: none)
port: 8545, // Standard Ethereum port (default: none)
network_id: "*", // Any network (default: none)
network_id: "*" // Any network (default: none)
},
// Another network with more advanced options...
// advanced: {
@@ -57,58 +57,42 @@ module.exports = {
// },
arbitrum: {
provider: function() {
return new HDWalletProvider(
// throw-away seed for dev
process.env.PRIVATE_KEY,
`https://arbitrum-mainnet.infura.io/v3/28e5737b9034453d877f39dcf3f297b9`
);
},
provider: () => new HDWalletProvider(
// throw-away seed for dev
process.env.PRIVATE_KEY,
`https://arbitrum-mainnet.infura.io/v3/28e5737b9034453d877f39dcf3f297b9`
)
,
network_id: 42161,
networkCheckTimeout: 1000000,
timeoutBlocks: 200
},
arbitrum_rinkeby: {
provider: function() {
return new HDWalletProvider(
// throw-away seed for dev
'maid side truck wood tuition engine onion extra frozen garbage car eager',
`https://arbitrum-rinkeby.infura.io/v3/28e5737b9034453d877f39dcf3f297b9`
);
},
provider: () => new HDWalletProvider(
// throw-away seed for dev
'maid side truck wood tuition engine onion extra frozen garbage car eager',
`https://arbitrum-rinkeby.infura.io/v3/28e5737b9034453d877f39dcf3f297b9`
)
,
network_id: 421611,
networkCheckTimeout: 10000000,
timeoutBlocks: 200
},
// Useful for deploying to a public network.
// NB: It's important to wrap the provider as a function.
// ropsten: {
// provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`),
// network_id: 3, // Ropsten's id
// gas: 5500000, // Ropsten has a lower block limit than mainnet
// confirmations: 2, // # of confs to wait between deployments. (default: 0)
// timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50)
// skipDryRun: true // Skip dry run before migrations? (default: false for public nets )
// },
// Useful for private networks
// private: {
// provider: () => new HDWalletProvider(mnemonic, `https://network.io`),
// network_id: 2111, // This network is yours, in the cloud.
// production: true // Treats this network as if it was a public net. (default: false)
// }
arbitrum_goerli: {
provider: () => new HDWalletProvider(
// throw-away seed for dev
process.env.PRIVATE_KEY,
`https://arbitrum-goerli.infura.io/v3/${process.env.ARB_GOERLI_API_KEY}`
)
,
network_id: 421613
}
},
// Set default mocha options here, use special reporters etc.
mocha: {
// timeout: 100000
},
// Configure your compilers
compilers: {
solc: {
version: "0.8.3", // Fetch exact version from solc-bin (default: truffle's version)
docker: false, // Use "0.5.1" you've installed locally with docker (default: false)
docker: false // Use "0.5.1" you've installed locally with docker (default: false)
// settings: { // See the solidity docs for advice about optimization and evmVersion
// optimizer: {
// enabled: false,
@@ -117,15 +101,5 @@ module.exports = {
// evmVersion: "byzantium"
// }
}
},
// Truffle DB is currently disabled by default; to enable it, change enabled: false to enabled: true
//
// Note: if you migrated your contracts prior to enabling this field in your Truffle project and want
// those previously migrated contracts available in the .db directory, you will need to run the following:
// $ truffle migrate --reset --compile-all
db: {
enabled: false
}
};
};