mirror of
https://github.com/zkitter/contracts.git
synced 2026-01-08 22:48:01 -05:00
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:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,3 +1,4 @@
|
|||||||
.idea/
|
.idea/
|
||||||
node_modules/
|
node_modules/
|
||||||
build/
|
build/
|
||||||
|
.env
|
||||||
|
|||||||
1
.tool-versions
Normal file
1
.tool-versions
Normal file
@@ -0,0 +1 @@
|
|||||||
|
nodejs lts
|
||||||
22
README.md
Normal file
22
README.md
Normal 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) |
|
||||||
@@ -2,7 +2,6 @@ const Migrations = artifacts.require("AutismRegistrar");
|
|||||||
|
|
||||||
module.exports = function (deployer) {
|
module.exports = function (deployer) {
|
||||||
deployer.deploy(Migrations, {
|
deployer.deploy(Migrations, {
|
||||||
// from: "0x5d432ce201d2c03234e314d4703559102Ebf365C",
|
from: `${process.env.DEPLOYER_ADDRESS}`,
|
||||||
from: "0x860C68abeEE0ecBd97729C7d1E09dA1e7EaD3C50",
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
19509
package-lock.json
generated
19509
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -3,11 +3,9 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "truffle-config.js",
|
"main": "truffle-config.js",
|
||||||
"scripts": {
|
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@truffle/hdwallet-provider": "^1.2.6",
|
"@truffle/hdwallet-provider": "^1.2.6",
|
||||||
|
"truffle": "^5.6.2",
|
||||||
"truffle-hdwallet-provider": "^1.0.17"
|
"truffle-hdwallet-provider": "^1.0.17"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ const HDWalletProvider = require('@truffle/hdwallet-provider');
|
|||||||
//
|
//
|
||||||
// const fs = require('fs');
|
// const fs = require('fs');
|
||||||
// const mnemonic = fs.readFileSync(".secret").toString().trim();
|
// const mnemonic = fs.readFileSync(".secret").toString().trim();
|
||||||
console.log(process.env.PRIVATE_KEY);
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
/**
|
/**
|
||||||
* Networks define how you connect to your ethereum client and let you set the
|
* Networks define how you connect to your ethereum client and let you set the
|
||||||
@@ -44,7 +44,7 @@ module.exports = {
|
|||||||
development: {
|
development: {
|
||||||
host: "127.0.0.1", // Localhost (default: none)
|
host: "127.0.0.1", // Localhost (default: none)
|
||||||
port: 8545, // Standard Ethereum port (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...
|
// Another network with more advanced options...
|
||||||
// advanced: {
|
// advanced: {
|
||||||
@@ -57,58 +57,42 @@ module.exports = {
|
|||||||
// },
|
// },
|
||||||
|
|
||||||
arbitrum: {
|
arbitrum: {
|
||||||
provider: function() {
|
provider: () => new HDWalletProvider(
|
||||||
return new HDWalletProvider(
|
// throw-away seed for dev
|
||||||
// throw-away seed for dev
|
process.env.PRIVATE_KEY,
|
||||||
process.env.PRIVATE_KEY,
|
`https://arbitrum-mainnet.infura.io/v3/28e5737b9034453d877f39dcf3f297b9`
|
||||||
`https://arbitrum-mainnet.infura.io/v3/28e5737b9034453d877f39dcf3f297b9`
|
)
|
||||||
);
|
,
|
||||||
},
|
|
||||||
network_id: 42161,
|
network_id: 42161,
|
||||||
networkCheckTimeout: 1000000,
|
networkCheckTimeout: 1000000,
|
||||||
timeoutBlocks: 200
|
timeoutBlocks: 200
|
||||||
},
|
},
|
||||||
|
|
||||||
arbitrum_rinkeby: {
|
arbitrum_rinkeby: {
|
||||||
provider: function() {
|
provider: () => new HDWalletProvider(
|
||||||
return new HDWalletProvider(
|
// throw-away seed for dev
|
||||||
// throw-away seed for dev
|
'maid side truck wood tuition engine onion extra frozen garbage car eager',
|
||||||
'maid side truck wood tuition engine onion extra frozen garbage car eager',
|
`https://arbitrum-rinkeby.infura.io/v3/28e5737b9034453d877f39dcf3f297b9`
|
||||||
`https://arbitrum-rinkeby.infura.io/v3/28e5737b9034453d877f39dcf3f297b9`
|
)
|
||||||
);
|
,
|
||||||
},
|
|
||||||
network_id: 421611,
|
network_id: 421611,
|
||||||
networkCheckTimeout: 10000000,
|
networkCheckTimeout: 10000000,
|
||||||
timeoutBlocks: 200
|
timeoutBlocks: 200
|
||||||
},
|
},
|
||||||
// Useful for deploying to a public network.
|
arbitrum_goerli: {
|
||||||
// NB: It's important to wrap the provider as a function.
|
provider: () => new HDWalletProvider(
|
||||||
// ropsten: {
|
// throw-away seed for dev
|
||||||
// provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`),
|
process.env.PRIVATE_KEY,
|
||||||
// network_id: 3, // Ropsten's id
|
`https://arbitrum-goerli.infura.io/v3/${process.env.ARB_GOERLI_API_KEY}`
|
||||||
// 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)
|
network_id: 421613
|
||||||
// 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)
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// Set default mocha options here, use special reporters etc.
|
|
||||||
mocha: {
|
|
||||||
// timeout: 100000
|
|
||||||
},
|
|
||||||
|
|
||||||
// Configure your compilers
|
|
||||||
compilers: {
|
compilers: {
|
||||||
solc: {
|
solc: {
|
||||||
version: "0.8.3", // Fetch exact version from solc-bin (default: truffle's version)
|
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
|
// settings: { // See the solidity docs for advice about optimization and evmVersion
|
||||||
// optimizer: {
|
// optimizer: {
|
||||||
// enabled: false,
|
// enabled: false,
|
||||||
@@ -117,15 +101,5 @@ module.exports = {
|
|||||||
// evmVersion: "byzantium"
|
// 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
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user