Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0906518
feat: use the graph instead of rpc for fetching events
kbizikav May 28, 2025
deb207b
fix: fix sync test
kbizikav May 28, 2025
9e55459
chore: delete gas server
kbizikav May 28, 2025
67c85e2
fix: replace get account with get transaction count for compatibility…
kbizikav May 28, 2025
e1c376e
chore: delte last deposit block number because it's not used anymore
kbizikav May 28, 2025
dcbebbd
chore: fix clippy
kbizikav May 28, 2025
f940c3b
chore: add derive test
kbizikav May 28, 2025
4c514f7
chore: delete unused network & bump version
kbizikav May 28, 2025
4c759eb
chore: update deps version
kbizikav May 28, 2025
63f0590
chore: more logs
kbizikav May 28, 2025
397eeaf
chore: fix typo & minor test change
kbizikav May 28, 2025
36fed06
feat: add insufficient balance handler
kbizikav May 29, 2025
0082f92
chore: increase transaction timeout
kbizikav May 29, 2025
c480887
chore: print tx success status
kbizikav May 29, 2025
f766688
feat: github cache
kbizikav May 29, 2025
d59311d
feat: print balance of withdrawal
kbizikav May 29, 2025
3873857
feat: abr diplay of withdrawal
kbizikav May 29, 2025
91b2737
feat: notify balance update in insufficient_balance_instruction
kbizikav May 29, 2025
f05b638
chore: fix typos
kbizikav May 29, 2025
94cf424
fix: reject all indices
kbizikav May 30, 2025
04d2173
chore: increase cooldown for less rpc requests
kbizikav May 30, 2025
41954a6
feat: add health check for graph client
kbizikav May 30, 2025
c546532
Update src/cli/accounts_status.rs
kbizikav May 30, 2025
87116a6
Update src/cli/configure.rs
kbizikav May 30, 2025
01d7df7
chore: replace graphql url for base sepolia/mainnet
kbizikav Jun 2, 2025
7117190
fix: fix compile error for windows
kbizikav Jun 3, 2025
0cd7a42
chore: delete unused deps
kbizikav Jun 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4,005 changes: 1,691 additions & 2,314 deletions Cargo.lock

Large diffs are not rendered by default.

22 changes: 14 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,15 @@ edition = "2021"
[dependencies]
anyhow = "1.0.88"
bincode = "1.3.3"
plonky2 = { git="https://github.com/InternetMaximalism/polygon-plonky2.git", branch="intmax2-dev"}
intmax2-zkp = {git ="https://github.com/InternetMaximalism/intmax2-zkp", branch = "dev"}
mining_circuit_v1 ={git ="https://github.com/InternetMaximalism/intmax2-mining.git"}
plonky2 = { git = "https://github.com/InternetMaximalism/polygon-plonky2.git", branch = "intmax2-dev" }
intmax2-zkp = { git = "https://github.com/InternetMaximalism/intmax2-zkp", branch = "dev" }
mining_circuit_v1 = { git = "https://github.com/InternetMaximalism/intmax2-mining.git" }
num-bigint = "0.4.6"
serde = {version="1.0.210", features = ["derive"]}
serde = { version = "1.0.210", features = ["derive"] }
serde_json = "1.0.128"
config = "0.13"
reqwest = { version = "0.11", features = ["json"] }
ethers = "2.0"
tokio = { version = "1", features = ["full"] }
rpassword = "5.0"
aes-gcm = "0.9"
sha3 = "0.10.0"
dialoguer = "0.11.0"
Expand All @@ -28,7 +26,6 @@ simplelog = "0.12.2"
log = "0.4.22"
chrono = "0.4.38"
regex = "1.10.6"
dir = "0.1.2"
dirs = "5.0.1"
clap = { version = "4.5.18", features = ["derive"] }
dotenv = "0.15.0"
Expand All @@ -38,6 +35,15 @@ strum = "0.26.3"
strum_macros = "0.26.4"
openssl = { version = "0.10", features = ["vendored"] }
openssl-sys = { version = "0.9", features = ["vendored"] }
self_update = {version="0.41.0", features=["archive-zip", "compression-zip-deflate"]}
self_update = { version = "0.41.0", features = [
"archive-zip",
"compression-zip-deflate",
] }
rand_chacha = "0.3.1"
alloy = { version = "1.0.1", features = ["rand"] }
futures = "0.3.31"
serde_with = "3.12.0"
tower = "0.5.2"
serde_qs = "0.15.0"
env_logger = "0.11.8"

222 changes: 222 additions & 0 deletions abi/ERC20.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,222 @@
[
{
"constant": true,
"inputs": [],
"name": "name",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_spender",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_from",
"type": "address"
},
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "decimals",
"outputs": [
{
"name": "",
"type": "uint8"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"name": "balance",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "symbol",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
},
{
"name": "_spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"payable": true,
"stateMutability": "payable",
"type": "fallback"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "owner",
"type": "address"
},
{
"indexed": true,
"name": "spender",
"type": "address"
},
{
"indexed": false,
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "from",
"type": "address"
},
{
"indexed": true,
"name": "to",
"type": "address"
},
{
"indexed": false,
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
}
]
27 changes: 14 additions & 13 deletions config/config.base-sepolia.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
availability_server_url = "https://base-sepolia.v1.mining-gateway.intmax.xyz/v1/availability"
withdrawal_gnark_prover_url = "https://base-sepolia.v1.mining-gateway.intmax.xyz/v1/gnark-withdraw-circuit"
claim_gnark_prover_url = "https://base-sepolia.v1.mining-gateway.intmax.xyz/v1/gnark-claim-circuit"
withdrawal_server_url="https://base-sepolia.v1.mining-gateway.intmax.xyz/v1/withdrawal"
circulation_server_url="https://base-sepolia.v1.mining-gateway.intmax.xyz/v1/mining"
gas_server_url="https://base-sepolia.v1.mining-gateway.intmax.xyz/v1/mining/gas-fee/estimate"
tree_data_repository="InternetMaximalism/intmax2-v1-mining-mock"
tree_data_directory="base-sepolia-data"
tree_data_branch="main"
withdrawal_server_url = "https://base-sepolia.v1.mining-gateway.intmax.xyz/v1/withdrawal"
circulation_server_url = "https://base-sepolia.v1.mining-gateway.intmax.xyz/v1/mining"
tree_data_repository = "InternetMaximalism/intmax2-v1-mining-mock"
tree_data_directory = "base-sepolia-data"
tree_data_branch = "main"
sync_tree_data_interval_in_sec = 3600
gnark_get_proof_cooldown_in_sec = 60

[blockchain]
chain_id = 84532
graph_url = "https://base-sepolia.graph.intmax.xyz/subgraphs/name/stage-int1"
graph_health_check_timeout_in_sec = 60
int1_address = "0x5dfa05aAdbE75a92f6153508950533fC1bed98BE"
minter_address = "0xeF9CBc6F2f602AF19b0fEc2cc4F217177730858E"
token_address = "0x2699CD7f883DecC464171a7A92f4CcC4eF220fa2"
Expand All @@ -22,12 +23,12 @@ single_claim_gas = 600000

[service]
repository_url = "https://github.com/InternetMaximalism/intmax2-mining-cli"
mining_min_cooldown_in_sec = 20
mining_max_cooldown_in_sec = 200
loop_cooldown_in_sec = 10
high_gas_retry_inverval_in_sec = 10
mining_min_cooldown_in_sec = 20
mining_max_cooldown_in_sec = 200
loop_cooldown_in_sec = 60
high_gas_retry_interval_in_sec = 30

[env]
default_max_gas_price ="100"
default_mining_times="5"
default_mining_unit="0.1"
default_max_gas_price = "100"
default_mining_times = "5"
default_mining_unit = "0.1"
27 changes: 14 additions & 13 deletions config/config.base.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
availability_server_url = "https://v1.base-prod.mining-gateway.intmax.xyz/v1/availability"
withdrawal_gnark_prover_url = "https://v1.base-prod.mining-gateway.intmax.xyz/v1/gnark-withdraw-circuit"
claim_gnark_prover_url = "https://v1.base-prod.mining-gateway.intmax.xyz/v1/gnark-claim-circuit"
withdrawal_server_url="https://v1.base-prod.mining-gateway.intmax.xyz/v1/withdrawal"
circulation_server_url="https://v1.base-prod.mining-gateway.intmax.xyz/v1/mining"
gas_server_url="https://v1.base-prod.mining-gateway.intmax.xyz/v1/mining/gas-fee/estimate"
tree_data_repository="InternetMaximalism/intmax2-mining"
tree_data_directory="base-data"
tree_data_branch="main"
withdrawal_server_url = "https://v1.base-prod.mining-gateway.intmax.xyz/v1/withdrawal"
circulation_server_url = "https://v1.base-prod.mining-gateway.intmax.xyz/v1/mining"
tree_data_repository = "InternetMaximalism/intmax2-mining"
tree_data_directory = "base-data"
tree_data_branch = "main"
sync_tree_data_interval_in_sec = 3600
gnark_get_proof_cooldown_in_sec = 60

[blockchain]
chain_id = 8453
graph_url = "https://v1.base-prod.graph.intmax.xyz/subgraphs/name/prod-int1"
graph_health_check_timeout_in_sec = 60
int1_address = "0x195F9b5F42435bB71E9765E66a9bdFE40d44A895"
minter_address = "0x1f5a5Eb6C3894351425BD51ea2AE1ef3FEC93976"
token_address = "0xf95117e3a5B7968703CeD3B66A9CbE0Bc9e1D8bf"
Expand All @@ -22,12 +23,12 @@ single_claim_gas = 600000

[service]
repository_url = "https://github.com/InternetMaximalism/intmax2-mining-cli"
mining_min_cooldown_in_sec = 3600 # 1 hour
mining_max_cooldown_in_sec = 21600 # 6 hours
loop_cooldown_in_sec = 10
high_gas_retry_inverval_in_sec = 10
mining_min_cooldown_in_sec = 3600 # 1 hour
mining_max_cooldown_in_sec = 21600 # 6 hours
loop_cooldown_in_sec = 60
high_gas_retry_interval_in_sec = 30

[env]
default_max_gas_price ="10"
default_mining_times="10"
default_mining_unit="0.1"
default_max_gas_price = "10"
default_mining_times = "10"
default_mining_unit = "0.1"
Loading
Loading