This script fetches and verifies the 5IRE/USD
price using the PullConsumer smart contract on the 5ireChain.
- Node.js (v20 or higher)
- Yarn
- A
5ireChain Mainnet
Configuration - Private key with sufficient
5IRE coins
for gas fees
- Install dependencies:
yarn install
- Configure environment variables by creating a
.env
file:
FIRE_URL=https://rpc.5ire.network
FIRE_DEPLOYER=your_private_key_here
Execute the script using Hardhat:
npx hardhat run scripts/fetchAndVerify.ts --network fire
The script performs the following operations:
- Fetches verification data for 5IRE/USD price from
Entangle Oracle
- Interacts with the PullConsumer contract at
0xB1e44Fb6DDc1DA35300DA3b66be4235F1532d6D7
- Verifies the price using
merkle proofs
andsignatures
- Outputs the transaction hash upon successful verification
When successful, you should see output similar to:
sent tx: 0x62364a7c80168b8a5a4e8e0758b7a034e96e2e57ae543a8c7907a27039e79a56