Skip to content

Commit

Permalink
chore: small web3run.js adjustments (#107)
Browse files Browse the repository at this point in the history
web3run.js adjustments
  • Loading branch information
meph authored Oct 11, 2023
1 parent 110dc59 commit 25ee22e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Binary file removed .fluence/.DS_Store
Binary file not shown.
8 changes: 5 additions & 3 deletions gateway/web3run.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@ const web3 = new Web3("http://localhost:3000");

async function main() {
try {
const bn = await web3.eth.getBlockNumber()
console.log("Trying to fetch the block number...");
const bn = await web3.eth.getBlockNumber();
console.log("Block number is: ", bn);
} catch (e) {
console.error("Error requesting block number\n", e);
}

try {
const resp = await web3.eth.getTransaction("0x8bad403edde37642e4dab6c91eeca77b979fce1c979c14ca8755f5c3573eaeb4")
console.log("Trying to fetch the transaction information...");
const resp = await web3.eth.getTransaction("0x7bfa7c9812c67af61872c66f3af13bb65ad0f81b7a44bcf4a11c11900be16409");
console.log("Transaction is", resp);
} catch (e) {
console.log("Erro requesting transaction info\n", e)
console.log("Error requesting transaction info!\n", e)
}
}

Expand Down

0 comments on commit 25ee22e

Please sign in to comment.