Skip to content

Commit b268297

Browse files
authored
Update default from holesky to Hoodi, add Hoodi
* holesky -> hoodi * holesky -> hoodi * fix clippies
1 parent 470d07e commit b268297

File tree

13 files changed

+69
-39
lines changed

13 files changed

+69
-39
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ jobs:
187187
- name: Run tests (docker_03_problems)
188188
run: cargo test --test docker_03_problems --profile=release-fast -- --test-threads=10
189189

190-
test_faucet_holesky:
191-
name: Test Holesky faucet
190+
test_faucet_hoodi:
191+
name: Test Hoodi faucet
192192
timeout-minutes: 20
193193

194194
runs-on: ubuntu-latest
@@ -210,43 +210,43 @@ jobs:
210210

211211
- name: Check if balance is 0
212212
run: |
213-
[ $(cargo run -- balance -c holesky | jq -r '.[] | .gasDecimal') == "0" ]
214-
[ $(cargo run -- balance -c holesky | jq -r '.[] | .tokenDecimal') == "0" ]
213+
[ $(cargo run -- balance -c hoodi | jq -r '.[] | .gasDecimal') == "0" ]
214+
[ $(cargo run -- balance -c hoodi | jq -r '.[] | .tokenDecimal') == "0" ]
215215
216216
- name: Get ETH from faucet
217-
run: cargo run -- get-dev-eth -c holesky
217+
run: cargo run -- get-dev-eth -c hoodi
218218

219219
- name: Check ETH balance after getting funds from faucet (should be 0.01)
220220
run: |
221221
sleep 60 # give time for the blockchain to propagate info about the transaction
222-
[ $(cargo run -- balance -c holesky | jq -r '.[] | .gasDecimal') == "0.01" ]
222+
[ $(cargo run -- balance -c hoodi | jq -r '.[] | .gasDecimal') == "0.01" ]
223223
224224
- name: Mint tokens
225225
run: |
226-
cargo run -- mint-test-tokens -c holesky
226+
cargo run -- mint-test-tokens -c hoodi
227227
cargo run -- run
228228
229229
- name: Check token balance
230230
run: |
231-
[ $(cargo run -- balance -c holesky | jq -r '.[] | .tokenDecimal') == "1000" ]
231+
[ $(cargo run -- balance -c hoodi | jq -r '.[] | .tokenDecimal') == "1000" ]
232232
233233
- name: Transfer 166.6 GLM tokens
234234
run: |
235-
cargo run -- transfer -c holesky --recipient 0x5b984629E2Cc7570cBa7dD745b83c3dD23Ba6d0f --token glm --amount 166.6
235+
cargo run -- transfer -c hoodi --recipient 0x5b984629E2Cc7570cBa7dD745b83c3dD23Ba6d0f --token glm --amount 166.6
236236
cargo run -- run
237237
238238
- name: Transfer all GLM tokens
239239
run: |
240-
cargo run -- transfer -c holesky --recipient 0x5b984629E2Cc7570cBa7dD745b83c3dD23Ba6d0f --token glm --all
240+
cargo run -- transfer -c hoodi --recipient 0x5b984629E2Cc7570cBa7dD745b83c3dD23Ba6d0f --token glm --all
241241
cargo run -- run
242242
243243
- name: Check token balance zero
244244
run: |
245-
[ $(cargo run -- balance -c holesky | jq -r '.[] | .tokenDecimal') == "0" ]
245+
[ $(cargo run -- balance -c hoodi | jq -r '.[] | .tokenDecimal') == "0" ]
246246
247247
- name: Transfer all left ETH tokens
248248
run: |
249-
cargo run -- transfer -c holesky --recipient 0x5b984629E2Cc7570cBa7dD745b83c3dD23Ba6d0f --token eth --all
249+
cargo run -- transfer -c hoodi --recipient 0x5b984629E2Cc7570cBa7dD745b83c3dD23Ba6d0f --token eth --all
250250
cargo run -- run
251251
252252
payment_tests_custom:

crates/erc20_payment_lib/config-payments.toml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,4 +349,42 @@ allowed-head-behind-secs = 120
349349
dns-source = "polygon.rpc-node.dev.golem.network."
350350

351351

352+
[chain.hoodi]
353+
chain-name = "Hoodi"
354+
chain-id = 560048
355+
currency-symbol = "tETH"
356+
priority-fee = 0.000001
357+
max-fee-per-gas = 20.0
358+
transaction-timeout = 100
359+
wrapper-contract = { address = "0x7E69E00E00293D80F0f3E7e0Db5eab6D5d4E0EfF" }
360+
token = { address = "0x55555555555556AcFf9C332Ed151758858bd7a26", symbol = "tGLM" }
361+
multi-contract = { address = "0x222222222220C9269Cfb43eD434888F604d1dC21", max-at-once = 10 }
362+
mint-contract = { address = "0x500F965199C63865A3E666cA3fF55B64F1c8Bc8b", max-glm-allowed = 400 }
363+
distributor-contract = { address = "0x16684CcBC9b5c250D927d32f8F937fbbd058837A" }
364+
faucet-client = { max-eth-allowed = 0.009, faucet-srv = "_hoodi-faucet._tcp", faucet-host = "faucet.testnet.golem.network", faucet-lookup-domain = "dev.golem.network", faucet-srv-port = 4004 }
365+
confirmation-blocks = 0
366+
block-explorer-url = "https://hoodi.etherscan.io"
367+
external-source-check-interval = 300
368+
369+
[[chain.hoodi.rpc-endpoints]]
370+
priority = 0
371+
max-timeout-ms = 5000
372+
verify-interval-secs = 300
373+
allowed-head-behind-secs = 120
374+
dns-source = "hoodi.rpc-node.dev.golem.network."
375+
376+
[[chain.hoodi.rpc-endpoints]]
377+
names = """
378+
hoodi.rpc-node.dev.golem.network
379+
"""
380+
381+
endpoints = """
382+
https://hoodi.rpc-node.dev.golem.network/
383+
"""
384+
priority = 0
385+
max-timeout-ms = 5000
386+
verify-interval-secs = 60
387+
allowed-head-behind-secs = 120
388+
389+
352390

crates/erc20_payment_lib/src/account_balance.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use crate::error::ErrorBag;
44
use crate::error::PaymentError;
55
use crate::runtime::SharedState;
66
use crate::setup::PaymentSetup;
7-
use serde::{Deserialize, Serialize};
87
use std::str::FromStr;
98
use std::sync::Arc;
109
use structopt::StructOpt;
@@ -24,17 +23,6 @@ pub struct BalanceOptions2 {
2423
pub debug_loop: Option<u64>,
2524
}
2625

27-
#[derive(Debug, Clone, Serialize, Deserialize)]
28-
#[serde(rename_all = "camelCase")]
29-
pub struct BalanceResult2 {
30-
pub gas: Option<String>,
31-
pub gas_decimal: Option<String>,
32-
pub gas_human: Option<String>,
33-
pub token: Option<String>,
34-
pub token_decimal: Option<String>,
35-
pub token_human: Option<String>,
36-
}
37-
3826
pub async fn test_balance_loop(
3927
_shared_state: Option<Arc<std::sync::Mutex<SharedState>>>,
4028
payment_setup: PaymentSetup,

crates/erc20_payment_lib/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(clippy::result_large_err)]
2+
13
mod account_balance;
24
pub mod config;
35
mod contracts;

crates/erc20_payment_lib_common/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(clippy::result_large_err)]
2+
13
mod db;
24
pub mod error;
35
mod events;

crates/erc20_payment_lib_extra/src/account_balance.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use web3::types::Address;
1919
#[derive(Clone, StructOpt)]
2020
#[structopt(about = "Payment statistics options")]
2121
pub struct BalanceOptions {
22-
#[structopt(short = "c", long = "chain-name", default_value = "holesky")]
22+
#[structopt(short = "c", long = "chain-name", default_value = "hoodi")]
2323
pub chain_name: String,
2424

2525
///list of accounts separated by comma

frontend/src/Accounts.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const Accounts = () => {
1313
const [accounts, setAccounts] = React.useState<SenderAccounts | null>(null);
1414
const { backendSettings } = useContext(BackendSettingsContext);
1515
const [selectedAccount, setSelectedAccount] = React.useState<string | null>(null);
16-
const [selectedChain, setSelectedChain] = React.useState<string | null>("17000");
16+
const [selectedChain, setSelectedChain] = React.useState<string | null>("560048");
1717
const config = useConfig();
1818

1919
const loadTxCount = useCallback(async () => {

src/actions/deposit/close.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use web3::types::{Address, U256};
1212
#[derive(StructOpt)]
1313
#[structopt(about = "Close deposit if you are spender")]
1414
pub struct CloseDepositOptions {
15-
#[structopt(short = "c", long = "chain-name", default_value = "holesky")]
15+
#[structopt(short = "c", long = "chain-name", default_value = "hoodi")]
1616
pub chain_name: String,
1717

1818
#[structopt(long = "address", help = "Address (has to have private key)")]

src/actions/deposit/create.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use web3::types::{Address, U256};
1919
#[derive(StructOpt)]
2020
#[structopt(about = "Create deposit for use by spender")]
2121
pub struct CreateDepositOptions {
22-
#[structopt(short = "c", long = "chain-name", default_value = "holesky")]
22+
#[structopt(short = "c", long = "chain-name", default_value = "hoodi")]
2323
pub chain_name: String,
2424

2525
#[structopt(long = "address", help = "Address (has to have private key)")]

src/actions/deposit/details.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use web3::types::{Address, U256};
1313
#[derive(StructOpt)]
1414
#[structopt(about = "Show details of given deposit")]
1515
pub struct CheckDepositOptions {
16-
#[structopt(short = "c", long = "chain-name", default_value = "holesky")]
16+
#[structopt(short = "c", long = "chain-name", default_value = "hoodi")]
1717
pub chain_name: String,
1818

1919
#[structopt(long = "deposit-id", help = "Deposit id to use")]

0 commit comments

Comments
 (0)