This tool analyzes bridged token amounts for wstETH, rETH, and apxETH across different bridges on the Optimism network.
-
Clone the repository:
git clone https://github.com/hai-on-op/rewards-bridge-kit cd rewards-bridge-kit
-
Install dependencies:
npm install
-
Create a
config.json
file based onconfig.example.json
:cp config.example.json config.json
-
Edit
config.json
and fill in your specific values:API_KEY
: Your Covalent API keyCHAIN_ID
: The chain ID (default is "optimism-mainnet")STANDARD_BRIDGE_ADDRESS
: The standard bridge contract addressLZ_EXECUTOR_ADDRESS
: The LayerZero executor addressCROSS_DOMAIN_MESSENGER_ADDRESS
: The cross-domain messenger addressAPX_ETH_ADDRESS
: The apxETH token addressRETH_CONTRACT_ADDRESS
: The rETH token addressWSTETH_CONTRACT_ADDRESS
: The wstETH token addressHOP_PROTOCOL_RETH_WRAPPER
: The Hop Protocol rETH wrapper addressFROM_BLOCK
: The starting block number for transaction filtering (default is 0)TO_BLOCK
: The ending block number for transaction filtering (use null for latest)
-
Create a
setup_files
directory in the project root:mkdir setup_files
-
Place your CSV files in the
setup_files
directory using the following naming convention:mint-reward_token-KITE_collateral-APXETH.csv
mint-reward_token-KITE_collateral-RETH.csv.csv
mint-reward_token-KITE_collateral-WSTETH.csv.csv
mint-reward_token-OP_collateral-APXETH.csv
mint-reward_token-OP_collateral-RETH.csv.csv
mint-reward_token-OP_collateral-WSTETH.csv.csv
Each CSV file should contain wallet addresses in the first column.
To run the script, use the following command:
The script will generate a bridged_amounts_detailed.json
file in the output
directory, with the following structure:
{
"address": "0xaddress",
"bridgeTransactions": []
}
This file will be used in the minter-reward
repository