Skip to content

Commit

Permalink
fixed Scroll chain_id | added Base,opBNB | update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
whonion committed Feb 27, 2024
1 parent d899be3 commit d106238
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 13 deletions.
13 changes: 11 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
PRIVATE_KEY = '<YOUR_PRIVATE_KEY>'
PRIVATE_KEY = '<YOUR_PRIVATE_KEY1>
<YOUR_PRIVATE_KEY2>
<YOUR_PRIVATE_KEY3>
<YOUR_PRIVATE_KEY4>
<YOUR_PRIVATE_KEY5>
<YOUR_PRIVATE_KEY6>
<YOUR_PRIVATE_KEY7>
<YOUR_PRIVATE_KEY8>
<YOUR_PRIVATE_KEYn>'
#Specify your instant RPC-node
RPC_PROVIDER='https://ethereum-goerli.publicnode.com'
CHAIN_ID = 5
CHAIN_ID = 5 #Specify chain_id for deploy contracts

#FAUCETS: https://faucetlink.to/
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![Go version][go-badge]][go-url] [![go-report][go-report-badge]][go-report-url] [![Lint][lint-badge]][lint-url] [![Test][test-badge]][test-url] [![Build][build-badge]][build-url] [![Makefile][makefile-badge]][makefile-url] [![deploy][deploy-badge]][deploy-url] [![HitCount](https://hits.dwyl.com/whonion//SmartContractBatchDeployer.svg)](https://hits.dwyl.com/whonion/SmartContractBatchDeployer)[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwhonion%2Fgo-solc-batch-deployer.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fwhonion%2Fgo-solc-batch-deployer?ref=badge_shield)
[![Status](https://img.shields.io/badge/status-active-success.svg)](https://github.com/whonion/go-solc-batch-deployer/blob/main/) [![Go version][go-badge]][go-url] [![go-report][go-report-badge]][go-report-url] [![Lint][lint-badge]][lint-url] [![Test][test-badge]][test-url] [![Build][build-badge]][build-url] [![Makefile][makefile-badge]][makefile-url] [![deploy][deploy-badge]][deploy-url] [![HitCount](https://hits.dwyl.com/whonion/go-solc-batch-deployer.svg)](https://hits.dwyl.com/whonion/go-solc-batch-deployer)[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwhonion%2Fgo-solc-batch-deployer.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fwhonion%2Fgo-solc-batch-deployer?ref=badge_shield)
</br>
# Example of batch deployment smart contracts to EVM using Go Lang</br>
## Example of batch deployment smart contracts to EVM using Go Lang</br>

Implementation with go-ethereum<br>

Expand Down Expand Up @@ -55,19 +55,27 @@ cd go-solc-batch-deployer



- Add to `.env-file` your variables: `PRIVATE_KEY` (without **0x**),`RPC_PROVIDER` and `CHAIN_ID`
- Add to `.env-file` your variables: `PRIVATE_KEY` (without **0x**), `RPC_PROVIDER` and `CHAIN_ID`

```sh
PRIVATE_KEY = '<YOUR_PRIVATE_KEY1>
<YOUR_PRIVATE_KEY2>
<YOUR_PRIVATE_KEY3>
<YOUR_PRIVATE_KEY4>
<YOUR_PRIVATE_KEY5>
<YOUR_PRIVATE_KEY6>
<YOUR_PRIVATE_KEY7>
<YOUR_PRIVATE_KEY8>
<YOUR_PRIVATE_KEYn>'
CHAIN_ID = 10
PRIVATE_KEY = '0x.......................................................'
RPC_PROVIDER='https://rpc.ankr.com/optimism/{YOUR_API_KEY}'
RPC_PROVIDER = 'https://rpc.ankr.com/optimism/{YOUR_API_KEY}'
```

- Add correct files *.sol to the `contacts` folder for deployment on the required chain

- Create new session with `tmux`
```sh
tmux new -s contract_deploy \
tmux new -s contractdeploy \
```
- Run `main.go`

Expand Down
22 changes: 17 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,13 @@ func main() {
534351: {
ChainID: 534351,
ChainName: "Scroll Alpha Testnet",
ExplorerURL: "https://sepolia-blockscout.scroll.io/",
ExplorerURL: "https://sepolia-blockscout.scroll.io",
RPCURL: "https://1rpc.io/scroll/sepolia",
},
534352: {
ChainID: 534351,
ChainID: 534352,
ChainName: "Scroll Mainnet",
ExplorerURL: "https://scrollscan.com/",
ExplorerURL: "https://scrollscan.com",
RPCURL: "https://rpc.scroll.io",
},
59140: {
Expand All @@ -161,7 +161,7 @@ func main() {
59144: {
ChainID: 59144,
ChainName: "Linea Mainnet",
ExplorerURL: "https://lineascan.build/",
ExplorerURL: "https://lineascan.build",
RPCURL: "https://rpc.linea.build",
},
6102: {
Expand All @@ -173,7 +173,7 @@ func main() {
34443: {
ChainID: 34443,
ChainName: "Mode network",
ExplorerURL: "https://explorer.mode.network/",
ExplorerURL: "https://explorer.mode.network",
RPCURL: "https://1rpc.io/mode",
},
7000: {
Expand All @@ -182,6 +182,18 @@ func main() {
ExplorerURL: "https://explorer.zetachain.com",
RPCURL: "https://zeta.rpcgrid.com",
},
8453: {
ChainID: 8453,
ChainName: "Base Mainnet",
ExplorerURL: "https://basescan.org",
RPCURL: "https://base-rpc.publicnode.com",
},
204: {
ChainID: 204,
ChainName: "opBNB",
ExplorerURL: "https://mainnet.opbnbscan.com",
RPCURL: "https://opbnb-rpc.publicnode.com",
},
}
for _, privateKeyStr := range privateKeys {
privateKey, err := crypto.HexToECDSA(strings.TrimSpace(privateKeyStr))
Expand Down

0 comments on commit d106238

Please sign in to comment.