Skip to content

Commit

Permalink
Add Arthera Mainnet (#29)
Browse files Browse the repository at this point in the history
* add arthera mainnet

* clean up
  • Loading branch information
julienbrg authored Jan 9, 2024
1 parent 846153e commit a24594c
Show file tree
Hide file tree
Showing 10 changed files with 585 additions and 41 deletions.
4 changes: 4 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Arthera Mainnet
ARTHERA_MAINNET_RPC_ENDPOINT_URL="https://rpc.arthera.net"
ARTHERA_MAINNET_PRIVATE_KEY="88888"

# Sepolia
SEPOLIA_RPC_ENDPOINT_URL="https://ethereum-sepolia.publicnode.com"
SEPOLIA_PRIVATE_KEY="88888"
Expand Down
41 changes: 7 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ This Hardhat template includes:

## Supported networks

- [Arthera Mainnet](https://chainlist.org/chain/10242) ([docs](https://docs.arthera.net/build/networks#arthera-mainnet))
- [Arthera testnet](https://chainlist.org/chain/10243) ([docs](https://docs.arthera.net/build/networks#arthera-testnet))
- [Sepolia Testnet](https://chainlist.org/chain/11155111) ([docs](https://ethereum.org/nb/developers/docs/networks/#sepolia))
- [OP Sepolia Testnet](https://chainlist.org/chain/11155420) ([docs](https://docs.optimism.io/chain/networks#op-sepolia))
- [Arthera testnet](https://chainlist.org/chain/10243) ([docs](https://docs.arthera.net/build/networks#arthera-testnet))

## Install

Expand All @@ -36,62 +37,34 @@ pnpm test

## Deploy

Deploy to Sepolia:

```
pnpm deploy:sepolia
```

_Please note that it includes an automatic Etherscan verification._

Deploy to Arthera Testnet:

```
pnpm deploy:arthera
pnpm deploy:<NETWORK_NAME>
```

## Check balance

You can check the current signer wallet balance:

```
pnpm bal op-sepolia
pnpm bal <NETWORK_NAME>
```

## Verify using Sourcify

On Arthera Testnet:

```
pnpm sourcify:arthera 8
pnpm sourcify:<NETWORK_NAME>
```

## Mint

On Sepolia:

```
pnpm mint:sepolia 42
```

On Arthera Testnet:

```
pnpm mint:arthera 42
pnpm mint:<NETWORK_NAME> 42
```

## Send

On Sepolia:

```
pnpm send:sepolia 8
```

On Arthera Testnet:

```
pnpm send:arthera 8
pnpm send:<NETWORK_NAME> 8
```

## Versions
Expand Down
30 changes: 29 additions & 1 deletion deploy/deploy-basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default async ({ getNamedAccounts, deployments }: any) => {
console.log("hre.network.name:", hre.network.name)

switch (hre.network.name) {
case "arthera-testnet":
case "arthera":
console.log(
"Basic ERC-20 token contract deployed:",
msg(basic.receipt.contractAddress)
Expand All @@ -48,6 +48,34 @@ export default async ({ getNamedAccounts, deployments }: any) => {
console.error(error)
}

break
case "arthera-testnet":
console.log(
"Basic ERC-20 token contract deployed:",
msg(basic.receipt.contractAddress)
)

try {
// Please use `pnpm sourcify:arthera` after the deployment instead.

// console.log("\nEtherscan verification in progress...")
// console.log(
// "\nWaiting for 6 block confirmations (you can skip this part)"
// )
// await basic.deploymentTransaction()?.wait(6)
// await hre.run("verify:verify", {
// network: network.name,
// address: basic.receipt.contractAddress,
// constructorArguments: [initialMint]
// })

console.log(
"Please use `pnpm sourcify:arthera-testnet` to verify your contract."
)
} catch (error) {
console.error(error)
}

break
case "sepolia":
try {
Expand Down
1 change: 1 addition & 0 deletions deployments/arthera/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
10242
Loading

0 comments on commit a24594c

Please sign in to comment.