Skip to content

Commit

Permalink
move Web3 provider RPC URL into env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
s-tikhomirov committed Dec 13, 2024
1 parent e103ba4 commit b3890ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/incentivization/test_poc.nim
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{.used.}

import
std/[options], testutils/unittests, chronos, web3, stew/byteutils, stint, strutils
std/[options], testutils/unittests, chronos, web3, stew/byteutils, stint, strutils, os

import
waku/[node/peer_manager, waku_core],
Expand All @@ -19,7 +19,10 @@ const TxHashSimpleTransfer* =
TxHash.fromHex("0xa3985984b2ec3f1c3d473eb57a4820a56748f25dabbf9414f2b8380312b439cc")
const ExpectedToAddress = Address.fromHex("0x5e809a85aa182a9921edd10a4163745bb3e36284")
const ExpectedValue = 200500000000005063.u256
const EthClient = "https://sepolia.infura.io/v3/470c2e9a16f24057aee6660081729fb9"

# To set up the environment variable (replace Infura with your provider if needed):
# $ export WEB3_RPC_URL="https://sepolia.infura.io/v3/YOUR_API_KEY"
const EthClient = os.getEnv("WEB3_RPC_URL")

suite "Waku Incentivization PoC Eligibility Proofs":
## Tests for service incentivization PoC.
Expand Down
1 change: 1 addition & 0 deletions waku/incentivization/txid_proof.nim
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ proc isEligibleTxId*(
if eligibilityProof.proofOfPayment.isNone():
return err("Eligibility proof is empty")
var web3: Web3
echo "WEB3_RPC_URL: " & ethClient
try:
web3 = await newWeb3(ethClient)
except ValueError:
Expand Down

0 comments on commit b3890ca

Please sign in to comment.