Skip to content

Commit

Permalink
Merge pull request #33 from subspace/ft/deployOn3H
Browse files Browse the repository at this point in the history
Deploy Faucet on Gemini 3h
  • Loading branch information
marc-aurele-besner authored Feb 23, 2024
2 parents 55b0c69 + 0eaaa4d commit 0986a80
Show file tree
Hide file tree
Showing 10 changed files with 4,172 additions and 41 deletions.
10 changes: 5 additions & 5 deletions smart_contract/contractsAddressDeployed.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
},
{
"name": "Faucet",
"address": "0xAe7b1b1e458D8EbC8e656A2B87fcbE989831e692",
"address": "0x2296dbb90C714c1355Ff9cbcB70D5AB29060b454",
"network": "nova",
"deployer": "0xC89F6C6DF2f2e29AfFA81E19515CC08579a93980",
"deploymentDate": "Wed Dec 20 2023 22:43:58 GMT-0500 (Eastern Standard Time)",
"chainId": 1002,
"deploymentDate": "Thu Feb 22 2024 16:32:50 GMT-0500 (Eastern Standard Time)",
"chainId": 490000,
"blockHash": "",
"blockNumber": 0,
"tag": "Faucet deployed by deploy script",
"tag": "Faucet deployed by deploy script for Gemini-3h",
"extra": {}
},
{
Expand All @@ -35,4 +35,4 @@
"tag": "Faucet deployed by deploy script",
"extra": {}
}
]
]
14 changes: 13 additions & 1 deletion smart_contract/contractsAddressDeployedHistory.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,17 @@
"blockNumber": 0,
"tag": "Faucet deployed by deploy script",
"extra": {}
},
{
"name": "Faucet",
"address": "0x2296dbb90C714c1355Ff9cbcB70D5AB29060b454",
"network": "nova",
"deployer": "0xC89F6C6DF2f2e29AfFA81E19515CC08579a93980",
"deploymentDate": "Thu Feb 22 2024 16:32:50 GMT-0500 (Eastern Standard Time)",
"chainId": 490000,
"blockHash": "",
"blockNumber": 0,
"tag": "Faucet deployed by deploy script for Gemini-3h",
"extra": {}
}
]
]
29 changes: 4 additions & 25 deletions smart_contract/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ const {
RPC_URL_NOVA,
PRIVATE_KEY_NOVA,
NOVA_SCAN_API_KEY,
// Gemini 3
RPC_URL_GEMINI,
PRIVATE_KEY_GEMINI,
GEMINI_SCAN_API_KEY,
// Goerli
RPC_URL_GOERLI,
PRIVATE_KEY_GOERLI,
Expand All @@ -24,19 +20,11 @@ const {
if (RPC_URL_NOVA && PRIVATE_KEY_NOVA) {
networks.nova = {
url: RPC_URL_NOVA,
chainId: 1002,
chainId: 490000,
accounts: [PRIVATE_KEY_NOVA],
}
}

if (RPC_URL_GEMINI && PRIVATE_KEY_GEMINI) {
networks.gemini = {
url: RPC_URL_GEMINI,
chainId: 1002,
accounts: [PRIVATE_KEY_GEMINI],
}
}

if (RPC_URL_GOERLI && PRIVATE_KEY_GOERLI) {
networks.goerli = {
url: RPC_URL_GOERLI,
Expand All @@ -63,24 +51,15 @@ const config: HardhatUserConfig = {
etherscan: {
apiKey: {
nova: `${NOVA_SCAN_API_KEY}`,
gemini: `${GEMINI_SCAN_API_KEY}`,
goerli: `${ETHERSCAN_API_KEY}`,
},
customChains: [
{
network: 'nova',
chainId: 1002,
urls: {
apiURL: 'https://nova.subspace.network/api',
browserURL: 'https://nova.subspace.network/',
},
},
{
network: 'gemini',
chainId: 1002,
chainId: 490000,
urls: {
apiURL: 'https://blockscout.subspace.network/api',
browserURL: 'https://blockscout.subspace.network/',
apiURL: 'https://nova.gemini-3h.subspace.network/api',
browserURL: 'https://nova.gemini-3h.subspace.network/',
},
},
],
Expand Down
1 change: 1 addition & 0 deletions smart_contract/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"hardhat-gas-reporter": "^1.0.9",
"prettier": "^3.0.3",
"prettier-plugin-solidity": "^1.1.3",
"solidity-coverage": "^0.8.1",
"ts-node": "^10.9.1",
"typechain": "^8.3.1",
"typescript": "^5.2.2"
Expand Down
4 changes: 4 additions & 0 deletions smart_contract/scripts/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import { setup } from './utils/setup'
async function main() {
const [deployer] = await ethers.getSigners()
const deployerAddress = await deployer.getAddress()
const deployerBalance = await deployer.provider.getBalance(deployerAddress)

console.log('deployerAddress', deployerAddress)
console.log('deployerBalance', deployerBalance.toString())

await setup(deployer, [deployerAddress])
}
Expand Down
10 changes: 8 additions & 2 deletions smart_contract/scripts/fundFaucet.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { ethers, addressBook, network } from 'hardhat'
import { addressBook, ethers, network } from 'hardhat'

async function main() {
const [deployer] = await ethers.getSigners()
const deployerAddress = await deployer.getAddress()
const deployerBalance = await deployer.provider.getBalance(deployerAddress)

const AMOUNT_TO_FUND = ethers.parseEther('0.1')
console.log('deployerAddress', deployerAddress)
console.log('deployerBalance', deployerBalance.toString())

const AMOUNT_TO_FUND = ethers.parseEther('1')

let faucetAddressIfDeployed: string | undefined = undefined
faucetAddressIfDeployed = addressBook.retrieveContract('Faucet', network.name)
Expand All @@ -30,6 +33,9 @@ async function main() {
} else {
console.error('Not enough funds')
}

const endDeployerBalance = await deployer.provider.getBalance(deployerAddress)
console.log('endDeployerBalance', endDeployerBalance.toString())
}

main().catch((error) => {
Expand Down
Loading

0 comments on commit 0986a80

Please sign in to comment.