diff --git a/README.md b/README.md index 43d0b69..c5a8265 100644 --- a/README.md +++ b/README.md @@ -60,20 +60,24 @@ A lot of the automation in this repository is influenced by my [Robot-Framework- ### Toolkit Roadmap In the future I plan to expand this toolkit into the following areas. -- Create a `robotframework-truffle-remote-library.js` using the [Truffle toolkit](https://trufflesuite.com/), and design similar features that are found in `robotframework-hardhat-remote-library.js` +- Create a `robotframework-truffle-remote-library.js` remote library using the [Truffle toolkit](https://trufflesuite.com/), and design similar features that are found in the `robotframework-hardhat-remote-library.js` remote library. - Progress: - (February 12, 2023 - **Ready To Use**) Created a working Truffle Suite library using a similar design as the Hardhat library, but utilizes [web3.js](https://web3js.org) and added a few different tests too. -- Create more static analysis, security, and vulnerability scanning RPA automation integrated with popular tools in the Web3 and blockchain industry +- Create more static analysis, security, and vulnerability scanning RPA automation integrated with popular tools in the Web3 and blockchain industry. - Progress: - (August 11, 2024 - **Ready To Use**) Created various security focused workflows that handle static analysis and vulnerability scanning of smart contracts. -- Create a `robotframework-hardhat-remote-library.js` powered multichain bot utilizing [Infura RPC nodes](https://infura.io/), [Hardhat toolkit](https://hardhat.org/), and [ethers.js](https://github.com/ethers-io/ethers.js/) -- Create an Alchemy powered bot utilizing [their SDK](https://www.alchemy.com/sdk) and [their RPC nodes](https://docs.alchemy.com/docs/how-to-add-alchemy-rpc-endpoints-to-metamask). -- Attempt to create Robot Framework automation utilizing the [Foundry toolkit](https://github.com/foundry-rs/foundry) +- Create a `robotframework-infura-websocket-bot-rpa-keywords.robot` powered multichain bot utilizing [Infura RPC nodes](https://infura.io/) and websocket tools. + - Progress: + - (September 2, 2024 - **Ready To Use**) Created a multichain Infura Websocket Bot that runs within a Docker Container. +- Create an Alchemy powered bot utilizing [their SDK](https://www.alchemy.com/sdk). + - Progress: + - (September 2, 2024 - **Ready To Use**) Created an Alchemy SDK Bot that runs within a Docker Container. +- Attempt to create Robot Framework automation utilizing the [Foundry toolkit](https://github.com/foundry-rs/foundry). - Progress: - (March 4, 2024 - **Ready To Use**) Created working parallel running Foundry and Playwright tests that runs checks on a mock wallet dApp connected to a local Anvil node. -- Create Metamask automation using [SeleniumLibrary](https://github.com/robotframework/SeleniumLibrary) and [robotframework-browser (a Playwright library)](https://github.com/MarketSquare/robotframework-browser) +- Create Metamask automation using [SeleniumLibrary](https://github.com/robotframework/SeleniumLibrary) and [robotframework-browser (a Playwright library)](https://github.com/MarketSquare/robotframework-browser). - Create a Robot Framework Model-based Testing example utilizing similar concepts found in my [PaBot-Android-Device-Graphwalker-Examples.robot](https://github.com/jg8481/Getting-Started-Robotframework-AppiumLibrary-RoboCon-2021-And-2022/blob/main/Workshop-Examples/Tests/Workshop-Part-Two/PaBot-Android-Device-Graphwalker-Examples.robot#L23) -- Play around with some Chaos Testing ideas for dApps +- Play around with some Chaos Testing ideas for dApps. ### Technical Requirements @@ -111,6 +115,11 @@ bash ./start-solidity-qa-workflows.sh Run-Solidity-Static-Analysis bash ./start-solidity-qa-workflows.sh Stop-And-Clean-Up-Docker-Security-Tests bash ./start-solidity-qa-workflows.sh Run-Parallel-Datadriven-Smart-Contract-Security-Tests +---->>>> Alchemy SDK and Infura Websocket Docker Container Bots Powered by Robot Framework RPA <<<<---- +bash ./start-solidity-qa-workflows.sh Stop-And-Clean-Up-Docker-Bot-RPA-Tasks +bash ./start-solidity-qa-workflows.sh Run-Alchemy-SDK-Bot-RPA-Tasks +bash ./start-solidity-qa-workflows.sh Run-Infura-Websocket-Bot-RPA-Tasks + ---->>>> Hardhat Deployment Commands Powered by Robot Framework RPA (NOTE: These scripts are capable of deploying to Mainnets or Testnets!) <<<<---- bash ./start-solidity-qa-workflows.sh Run-Smart-Contract-Hardhat-Ethereum-RPA-Deployment bash ./start-solidity-qa-workflows.sh Run-Smart-Contract-Hardhat-Fantom-RPA-Deployment diff --git a/alchemy-sdk-docker-blockchain-tools/Dockerfile.AlchemyBot b/alchemy-sdk-docker-blockchain-tools/Dockerfile.AlchemyBot new file mode 100644 index 0000000..19f8c9d --- /dev/null +++ b/alchemy-sdk-docker-blockchain-tools/Dockerfile.AlchemyBot @@ -0,0 +1,23 @@ +FROM node:22 +MAINTAINER Joshua Gorospe + +# Set a non-interactive frontend (useful for Docker builds) +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && \ + apt-get install -y software-properties-common python3-pip + +RUN apt-get update --fix-missing -y \ + && apt-get install python3 -y \ + && apt-get install python3-pip -y \ + && python3 -m pip install robotframework --break-system-packages + +RUN npm install npm --global + +RUN apt-get install -y \ + jq \ + wget \ + curl + +ADD run-commands-inside-docker.sh /usr/local/bin/run-commands-inside-docker.sh +RUN chmod +x /usr/local/bin/run-commands-inside-docker.sh \ No newline at end of file diff --git a/alchemy-sdk-docker-blockchain-tools/docker-compose.yml b/alchemy-sdk-docker-blockchain-tools/docker-compose.yml new file mode 100644 index 0000000..09ac72d --- /dev/null +++ b/alchemy-sdk-docker-blockchain-tools/docker-compose.yml @@ -0,0 +1,10 @@ +services: + + docker-task-runner: + build: + context: . + dockerfile: "Dockerfile.AlchemyBot" + volumes: + - "$PWD:/tasks" + command: -inMemory + network_mode: "bridge" \ No newline at end of file diff --git a/alchemy-sdk-docker-blockchain-tools/logs/alchemy-sdk-task-bot-log.html b/alchemy-sdk-docker-blockchain-tools/logs/alchemy-sdk-task-bot-log.html new file mode 100644 index 0000000..e7083a0 --- /dev/null +++ b/alchemy-sdk-docker-blockchain-tools/logs/alchemy-sdk-task-bot-log.html @@ -0,0 +1,2464 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Opening Robot Framework log failed

+ +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/alchemy-sdk-docker-blockchain-tools/logs/alchemy-sdk-task-bot-output.xml b/alchemy-sdk-docker-blockchain-tools/logs/alchemy-sdk-task-bot-output.xml new file mode 100644 index 0000000..4bcab10 --- /dev/null +++ b/alchemy-sdk-docker-blockchain-tools/logs/alchemy-sdk-task-bot-output.xml @@ -0,0 +1,107 @@ + + + + + +${RESULT} = {'nftTotal': 27282, 'ownerAddr': 'vitalik.eth'} +${RESULT} + + + +... +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +${RESULT} +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +... +Logs the given message to the console. + + +Alchemy_SDK_Bot_Task + + + + +${RESULT} = {'checkNFTCollectionName': 'Crypto Coven', 'checkNFTDeployerAddress': '0xac9d54ca08740A608B6C474e5CA07d51cA8117Fa', 'checkSpecificNFTName': 'balsa vault', 'checkTokenType': 'ERC721', 'checkDeployedBlo... +${RESULT} + + + +... +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +${RESULT} +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +... +Logs the given message to the console. + + +Alchemy_SDK_Bot_Task + + + + + + +All Tasks + + +Alchemy_SDK_Bot_Task + + +Robot Framework Alchemy SDK Bot Task + + + + + diff --git a/alchemy-sdk-docker-blockchain-tools/robotframework-alchemy-sdk-bot-remote-library.js b/alchemy-sdk-docker-blockchain-tools/robotframework-alchemy-sdk-bot-remote-library.js new file mode 100644 index 0000000..f4550b0 --- /dev/null +++ b/alchemy-sdk-docker-blockchain-tools/robotframework-alchemy-sdk-bot-remote-library.js @@ -0,0 +1,81 @@ +'use strict'; + +const robot = require('robotremote'); +const assert = require('assert'); +const { Alchemy, Network } = require('alchemy-sdk'); + +const settings = { + apiKey: "", + network: Network.ETH_MAINNET, +}; +const alchemy = new Alchemy(settings); + + +var lib = module.exports; + +/** + * This robotframework-alchemy-sdk-remote-library.js will focus on the Alchemy SDK + * for blockchain interactions and utilizing the Alchemy Node Infrastructure. Please go to + * the following Alchemy documentation knowledge base to see more information. + * + * https://docs.alchemy.com/reference/alchemy-sdk-quickstart + * + * IMPORTANT NOTE: Replace the "REPLACE_WITH_YOUR_API_KEY" above with a valid Alchemy key. + */ + + +lib.getNFTOwnerInformation = async function() { + const ownerAddr = "vitalik.eth"; + console.log("fetching NFTs for address:", ownerAddr); + console.log("..."); + //const nftsForOwner = await alchemy.nft.getNftsForOwner("vitalik.eth"); + const nftsForOwner = await alchemy.nft.getNftsForOwner(ownerAddr); + const nftTotal = nftsForOwner["totalCount"]; + console.log("number of NFTs found:", nftsForOwner.totalCount); + console.log("..."); + for (const nft of nftsForOwner.ownedNfts) { + console.log("==="); + console.log("contract address:", nft.contract.address); + console.log("token ID:", nft.tokenId); + } + return { nftTotal, ownerAddr }; +}; + +lib.getNFTMetadata = async function() { +// Fetch metadata for a particular NFT: + console.log("fetching metadata for a Crypto Coven NFT..."); + const response = await alchemy.nft.getNftMetadata( + "0x5180db8F5c931aaE63c74266b211F580155ecac8", + "1590" + ); + console.log("==="); + console.log("NFT Collection: ", response.contract.name); + console.log("NFT name: ", response.name); + console.log("Token type: ", response.tokenType); + console.log("NFT description: ", response.description); + console.log("==="); + console.log("Full NFT Metadata Resonse: ", response); + console.log("==="); + const checkNFTCollectionName = response.contract.name; + const checkNFTDeployerAddress = response.contract.contractDeployer || 'N/A'; + const checkSpecificNFTName = response.name || 'N/A'; + const checkTokenType = response.tokenType || 'N/A'; + const checkDeployedBlockNumber = response.contract.deployedBlockNumber || 'N/A'; + const checkOpenSeaFloorPrice = response.contract.openSeaMetadata.floorPrice || 'N/A'; + const checkNFTDiscordURL = response.contract.openSeaMetadata.discordUrl || 'N/A'; + // return { response }; + return { + checkNFTCollectionName, + checkNFTDeployerAddress, + checkSpecificNFTName, + checkTokenType, + checkDeployedBlockNumber, + checkOpenSeaFloorPrice, + checkNFTDiscordURL + }; +}; + + +if (!module.parent) { + const server = new robot.Server([lib], { host: 'localhost', port: 8270 }); +} diff --git a/alchemy-sdk-docker-blockchain-tools/robotframework-alchemy-sdk-bot-rpa-keywords.robot b/alchemy-sdk-docker-blockchain-tools/robotframework-alchemy-sdk-bot-rpa-keywords.robot new file mode 100644 index 0000000..47329bb --- /dev/null +++ b/alchemy-sdk-docker-blockchain-tools/robotframework-alchemy-sdk-bot-rpa-keywords.robot @@ -0,0 +1,31 @@ +*** Settings *** + +Library Remote http://localhost:${REMOTE_LIBRARY_PORT} + +*** Variables *** + +${REMOTE_LIBRARY_PORT} 8270 + +*** Tasks *** + +ALCHEMY SDK BOT TASK : Get the current total amount of NFTs owned by Vitalik Buterin from Ethereum Mainnet. + [Tags] Alchemy_SDK_Bot_Task + ${RESULT}= Get NFT Owner Information + Log To Console ... + Log To Console ... + Log To Console ... + Log To Console ${RESULT} + Log To Console ... + Log To Console ... + Log To Console ... + +ALCHEMY SDK BOT TASK : Get the current metadata about a specific NFT from Ethereum Mainnet. + [Tags] Alchemy_SDK_Bot_Task + ${RESULT}= Get NFT Metadata + Log To Console ... + Log To Console ... + Log To Console ... + Log To Console ${RESULT} + Log To Console ... + Log To Console ... + Log To Console ... diff --git a/alchemy-sdk-docker-blockchain-tools/run-commands-inside-docker.sh b/alchemy-sdk-docker-blockchain-tools/run-commands-inside-docker.sh new file mode 100644 index 0000000..591db8c --- /dev/null +++ b/alchemy-sdk-docker-blockchain-tools/run-commands-inside-docker.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +cd /tasks +ls -la +echo +echo "Installing all of the NodeJS packages inside the Docker Container." +echo +npm update > /dev/null 2>&1 +npm install robotremote > /dev/null 2>&1 +npm install alchemy-sdk > /dev/null 2>&1 +echo +echo "NodeJS packages are installed. Now the Alchemy SDK Bot will run." +echo +sleep 2s +nohup node ./robotframework-alchemy-sdk-bot-remote-library.js > ./logs/robotframework-alchemy-sdk-bot-remote-library.log & +sleep 2s +robot --report NONE --log alchemy-sdk-task-bot-log.html --output alchemy-sdk-task-bot-output.xml -N "Robot Framework Alchemy SDK Bot Task" -d ./logs ./robotframework-alchemy-sdk-bot-rpa-keywords.robot diff --git a/infura-websocket-docker-blockchain-tools/Dockerfile.InfuraWebsocketBot b/infura-websocket-docker-blockchain-tools/Dockerfile.InfuraWebsocketBot new file mode 100644 index 0000000..19f8c9d --- /dev/null +++ b/infura-websocket-docker-blockchain-tools/Dockerfile.InfuraWebsocketBot @@ -0,0 +1,23 @@ +FROM node:22 +MAINTAINER Joshua Gorospe + +# Set a non-interactive frontend (useful for Docker builds) +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && \ + apt-get install -y software-properties-common python3-pip + +RUN apt-get update --fix-missing -y \ + && apt-get install python3 -y \ + && apt-get install python3-pip -y \ + && python3 -m pip install robotframework --break-system-packages + +RUN npm install npm --global + +RUN apt-get install -y \ + jq \ + wget \ + curl + +ADD run-commands-inside-docker.sh /usr/local/bin/run-commands-inside-docker.sh +RUN chmod +x /usr/local/bin/run-commands-inside-docker.sh \ No newline at end of file diff --git a/infura-websocket-docker-blockchain-tools/docker-compose.yml b/infura-websocket-docker-blockchain-tools/docker-compose.yml new file mode 100644 index 0000000..a7a9075 --- /dev/null +++ b/infura-websocket-docker-blockchain-tools/docker-compose.yml @@ -0,0 +1,10 @@ +services: + + docker-task-runner: + build: + context: . + dockerfile: "Dockerfile.InfuraWebsocketBot" + volumes: + - "$PWD:/tasks" + command: -inMemory + network_mode: "bridge" \ No newline at end of file diff --git a/infura-websocket-docker-blockchain-tools/logs/eth_feeHistory.json b/infura-websocket-docker-blockchain-tools/logs/eth_feeHistory.json new file mode 100644 index 0000000..31782d4 --- /dev/null +++ b/infura-websocket-docker-blockchain-tools/logs/eth_feeHistory.json @@ -0,0 +1,20 @@ +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "baseFeePerGas": [ + "0x5d21dba00", + "0x5d21dba00", + "0x5d21dba00", + "0x5d21dba00", + "0x5d21dba00" + ], + "gasUsedRatio": [ + 0.020916733333333333, + 0.0368926, + 0.0142916, + 0.013999533333333333, + 0.0479244 + ] + } +} diff --git a/infura-websocket-docker-blockchain-tools/logs/eth_getBlockReceipts.json b/infura-websocket-docker-blockchain-tools/logs/eth_getBlockReceipts.json new file mode 100644 index 0000000..c345813 --- /dev/null +++ b/infura-websocket-docker-blockchain-tools/logs/eth_getBlockReceipts.json @@ -0,0 +1,204 @@ +{ + "jsonrpc": "2.0", + "id": 1, + "result": [ + { + "blockHash": "0x2cb000bfff9690bd3d16f8a45928b6fc3fad836a276e4927ae7cf30064e8d93c", + "blockNumber": "0x2fb8e29", + "contractAddress": null, + "cumulativeGasUsed": "0xabfa", + "effectiveGasPrice": "0x79126a500", + "from": "0x0d0707963952f2fba59dd06f2b425ace40b492fe", + "gasUsed": "0xabfa", + "logs": [ + { + "address": "0x9702230a8ea53601f5cd2dc00fdbc13d4df4a8c7", + "blockHash": "0x2cb000bfff9690bd3d16f8a45928b6fc3fad836a276e4927ae7cf30064e8d93c", + "blockNumber": "0x2fb8e29", + "data": "0x0000000000000000000000000000000000000000000000000000000000910dca", + "logIndex": "0x0", + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000d0707963952f2fba59dd06f2b425ace40b492fe", + "0x0000000000000000000000006da94a83d087af71a0dedbf93786d760c98819e7" + ], + "transactionHash": "0x917b56e273c29771a2a15b6311440f3f8cd0668052ac00c0de83963cbf0e3d1a", + "transactionIndex": "0x0" + } + ], + "logsBloom": "0x00000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000020000000000080000000000000000000000000000000000008000000000000000000000000000000000000000010000000000004000000000000000000000008000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000", + "status": "0x1", + "to": "0x9702230a8ea53601f5cd2dc00fdbc13d4df4a8c7", + "transactionHash": "0x917b56e273c29771a2a15b6311440f3f8cd0668052ac00c0de83963cbf0e3d1a", + "transactionIndex": "0x0", + "type": "0x0" + }, + { + "blockHash": "0x2cb000bfff9690bd3d16f8a45928b6fc3fad836a276e4927ae7cf30064e8d93c", + "blockNumber": "0x2fb8e29", + "contractAddress": null, + "cumulativeGasUsed": "0xfe02", + "effectiveGasPrice": "0x783bd6ac0", + "from": "0x66d07f7558a7fc21e4b1c31cec1855f3a1887817", + "gasUsed": "0x5208", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "status": "0x1", + "to": "0xb0726ef70e019e32bc1cb94a36af73dae6fdce48", + "transactionHash": "0x1ee9d97bd6f04c89d96e5dba931b65b7c7cd985788a11e8068cae243cd898808", + "transactionIndex": "0x1", + "type": "0x2" + }, + { + "blockHash": "0x2cb000bfff9690bd3d16f8a45928b6fc3fad836a276e4927ae7cf30064e8d93c", + "blockNumber": "0x2fb8e29", + "contractAddress": null, + "cumulativeGasUsed": "0x2a77c", + "effectiveGasPrice": "0x6fc23ac00", + "from": "0xb8ff877ed78ba520ece21b1de7843a8a57ca47cb", + "gasUsed": "0x1a97a", + "logs": [ + { + "address": "0x4d73adb72bc3dd368966edd0f0b2148401a178e2", + "blockHash": "0x2cb000bfff9690bd3d16f8a45928b6fc3fad836a276e4927ae7cf30064e8d93c", + "blockNumber": "0x2fb8e29", + "data": "0xd36d53867b799a38db25c1168ade472dea09734ad93fd82e3717f62e20cf9251d36d53867b799a38db25c1168ade472dea09734ad93fd82e3717f62e20cf92510000000000000000000000000000000000000000000000000000000000000104", + "logIndex": "0x1", + "removed": false, + "topics": [ + "0x74bbc026808dcba59692d6a8bb20596849ca718e10e2432c6cdf48af865bc5d9", + "0x000000000000000000000000000000000000000000000000000000000000006c", + "0x0000000000000000000000005a54fe5234e811466d5366846283323c954310b2" + ], + "transactionHash": "0xdedccb33d09555aa9556b2ca9ff2f46c5ae74ccb2eda72ac55dbbeff1d427814", + "transactionIndex": "0x2" + }, + { + "address": "0x5a54fe5234e811466d5366846283323c954310b2", + "blockHash": "0x2cb000bfff9690bd3d16f8a45928b6fc3fad836a276e4927ae7cf30064e8d93c", + "blockNumber": "0x2fb8e29", + "data": "0x0000000000000000000000004d73adb72bc3dd368966edd0f0b2148401a178e27788556571da435a37d414ec9f5591f7ecdd4f61e4229ee0c3b38d3a86a1c3c2000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000", + "logIndex": "0x2", + "removed": false, + "topics": [ + "0x293e3a2153dc5c8d3667cbd6ede71a71674b2381e5dc4b40c91ad0e813447c0f" + ], + "transactionHash": "0xdedccb33d09555aa9556b2ca9ff2f46c5ae74ccb2eda72ac55dbbeff1d427814", + "transactionIndex": "0x2" + } + ], + "logsBloom": "0x00000000000000080000000000000000000000000000000000000002000000000000000040000000000000000010000000000000000000000000000000002000000000000000000000000000000000080000000000020000000000000000000000000000000004000040000000000008000000000008000000000000000000000000000000000000000000000000000010000000000004000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000800000000000000100000000000000000000800000000000000000000000", + "status": "0x1", + "to": "0x5a54fe5234e811466d5366846283323c954310b2", + "transactionHash": "0xdedccb33d09555aa9556b2ca9ff2f46c5ae74ccb2eda72ac55dbbeff1d427814", + "transactionIndex": "0x2", + "type": "0x0" + }, + { + "blockHash": "0x2cb000bfff9690bd3d16f8a45928b6fc3fad836a276e4927ae7cf30064e8d93c", + "blockNumber": "0x2fb8e29", + "contractAddress": null, + "cumulativeGasUsed": "0x78f10", + "effectiveGasPrice": "0x5d21dba00", + "from": "0x8dd3f7d8574498659f4535f7f13fd3c51a25ec80", + "gasUsed": "0x4e794", + "logs": [ + { + "address": "0x069571bda2f6fbb2fedcf18a7bbda1014b485818", + "blockHash": "0x2cb000bfff9690bd3d16f8a45928b6fc3fad836a276e4927ae7cf30064e8d93c", + "blockNumber": "0x2fb8e29", + "data": "0x0000000000000000000000000000000000000000000000000000000000085dbc000000000000000000000000052023857a217a5b0bdf7f847f7a82e72ba356ab0000000000000000000000000000000000000000000000000000000000004dff", + "logIndex": "0x3", + "removed": false, + "topics": [ + "0x2dad5bc61871201926333cea2842b88a9e0b9e6dce31832196e80d8e810890f1" + ], + "transactionHash": "0x9c1071d1baa569896ebdbbed0da3b530706cb346bc1d475af9d12a9600ad5e01", + "transactionIndex": "0x3" + } + ], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000100000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000002008000000000000000000000000000000000000000000000000000000000000", + "status": "0x1", + "to": "0x069571bda2f6fbb2fedcf18a7bbda1014b485818", + "transactionHash": "0x9c1071d1baa569896ebdbbed0da3b530706cb346bc1d475af9d12a9600ad5e01", + "transactionIndex": "0x3", + "type": "0x0" + }, + { + "blockHash": "0x2cb000bfff9690bd3d16f8a45928b6fc3fad836a276e4927ae7cf30064e8d93c", + "blockNumber": "0x2fb8e29", + "contractAddress": null, + "cumulativeGasUsed": "0x942d2", + "effectiveGasPrice": "0x5d21dba00", + "from": "0x662a7c7b8fe90156463a961ca65337db2b0ac2a9", + "gasUsed": "0x1b3c2", + "logs": [ + { + "address": "0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7", + "blockHash": "0x2cb000bfff9690bd3d16f8a45928b6fc3fad836a276e4927ae7cf30064e8d93c", + "blockNumber": "0x2fb8e29", + "data": "0x00000000000000000000000000000000000000000000000028a5a20da9948dc2", + "logIndex": "0x4", + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000802b65b5d9016621e66003aed0b16615093f328b", + "0x00000000000000000000000041ab86eecbd110a82ca602d032a461f453066f1e" + ], + "transactionHash": "0x3ecb9dae72f47746dce667b4f3ec9939740dce3b20fc14f16752a7c1c699782c", + "transactionIndex": "0x4" + }, + { + "address": "0x420fca0121dc28039145009570975747295f2329", + "blockHash": "0x2cb000bfff9690bd3d16f8a45928b6fc3fad836a276e4927ae7cf30064e8d93c", + "blockNumber": "0x2fb8e29", + "data": "0x000000000000000000000000000000000000000000294075e50713b56d84a125", + "logIndex": "0x5", + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000041ab86eecbd110a82ca602d032a461f453066f1e", + "0x000000000000000000000000802b65b5d9016621e66003aed0b16615093f328b" + ], + "transactionHash": "0x3ecb9dae72f47746dce667b4f3ec9939740dce3b20fc14f16752a7c1c699782c", + "transactionIndex": "0x4" + }, + { + "address": "0x41ab86eecbd110a82ca602d032a461f453066f1e", + "blockHash": "0x2cb000bfff9690bd3d16f8a45928b6fc3fad836a276e4927ae7cf30064e8d93c", + "blockNumber": "0x2fb8e29", + "data": "0x000000000000000000000000000000000000000bb6b192dbf6c794dd791c18b4000000000000000000000000000000000000000000000b820633419ee3b78602", + "logIndex": "0x6", + "removed": false, + "topics": [ + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1" + ], + "transactionHash": "0x3ecb9dae72f47746dce667b4f3ec9939740dce3b20fc14f16752a7c1c699782c", + "transactionIndex": "0x4" + }, + { + "address": "0x41ab86eecbd110a82ca602d032a461f453066f1e", + "blockHash": "0x2cb000bfff9690bd3d16f8a45928b6fc3fad836a276e4927ae7cf30064e8d93c", + "blockNumber": "0x2fb8e29", + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000028a5a20da9948dc2000000000000000000000000000000000000000000294075e50713b56d84a1250000000000000000000000000000000000000000000000000000000000000000", + "logIndex": "0x7", + "removed": false, + "topics": [ + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x000000000000000000000000802b65b5d9016621e66003aed0b16615093f328b", + "0x000000000000000000000000802b65b5d9016621e66003aed0b16615093f328b" + ], + "transactionHash": "0x3ecb9dae72f47746dce667b4f3ec9939740dce3b20fc14f16752a7c1c699782c", + "transactionIndex": "0x4" + } + ], + "logsBloom": "0x0020000000000000810000008000000000000000000000002000004000000000000000000000000000400000000000000100000000008000000000000000000000008000000000400000000c000000200000000000000000000000000000000000000000000000000000000000000000000004000000000000000110000000000000000000000000000000000000000000000000000000080000004008000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000001000000000000000000000000000000000000000000000000020000000000000000002000000000000", + "status": "0x1", + "to": "0x802b65b5d9016621e66003aed0b16615093f328b", + "transactionHash": "0x3ecb9dae72f47746dce667b4f3ec9939740dce3b20fc14f16752a7c1c699782c", + "transactionIndex": "0x4", + "type": "0x2" + } + ] +} diff --git a/infura-websocket-docker-blockchain-tools/logs/eth_subscribe_newPendingTransactions.json b/infura-websocket-docker-blockchain-tools/logs/eth_subscribe_newPendingTransactions.json new file mode 100644 index 0000000..c671a74 --- /dev/null +++ b/infura-websocket-docker-blockchain-tools/logs/eth_subscribe_newPendingTransactions.json @@ -0,0 +1,19 @@ +"0x27c617b21acd3a2f0e89390c5fc0475013a90a791defe5353505ada47d8caca5" +"0x238f1239ed9f4b32ac808a2a82c86b4f185d7681d4d09edc158ad96a400fd6e1" +"0x851b10bfc5f23752172eae8efeee54efaa940d165ed7651bffbcd9df7c845cd8" +"0xf9e06b5a397a0791214df5369e4e67e08069952595141397b8fe15733140afe5" +"0xccac5dd78f01ff490200bb50860a77885d146128cf1754de19bf2cfd4782f056" +"0x87ec9964177279bc50f37ca01d9fc0c22109eba5e552e53d5d6ba4e14cc944e7" +"0x1ea85b86953fc9955b2fad72002888e76289d12d644498e3dfcd8f018b548a82" +"0xeeb3b7475150ae742010b65804313850f2f1e31c032cfd6527db3ed807219693" +"0x417b3e2c78d125634cd941f2b53655d90dc2374206874b3b6b2fb931705aa0b2" +"0x48ca6872cead851cc615e72051c93b13d398e24a36ec9934c9517095e5417330" +"0xa0509c8a25a046520ef7e822e4502f8a75c93e6fc779e5c4cf277f34d798fbfb" +"0x31f606ea3a286246fbec4f91e2f61e11d652b12801cc88f4bf5146ee8f2a8689" +"0xef6ee6f9cb6e72a2b865669f7bd39baf6892288068bad2ccbe23617ae81656db" +"0xf694cf0b3e37d6ed1ac3d99a00d155add48b453ad2be52381ce330527da07c16" +"0xe4d96dd468bdf79b1e8721c6735b0e7147b8b39270f9c1d141bc33569635fe62" +"0x8027bb600824039671a9aa55ba54529cf1d1750dbb3b47cb52e1158255f9b600" +"0x57151cdfdd7139d785dded5f149c70194471e2ba356ec2426da8f157744cbc3b" +"0xb61c55da0c83cb17de03c037799503cb430df29c575c4485339e51a7bd254a2a" +"0xf623e60da399ec5b5b5caf8a39dcfb3322c988eaf5441352cc9730e8e62efc90" diff --git a/infura-websocket-docker-blockchain-tools/logs/infura-websocket-task-bot-log.html b/infura-websocket-docker-blockchain-tools/logs/infura-websocket-task-bot-log.html new file mode 100644 index 0000000..eb95325 --- /dev/null +++ b/infura-websocket-docker-blockchain-tools/logs/infura-websocket-task-bot-log.html @@ -0,0 +1,2464 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Opening Robot Framework log failed

+
    +
  • Verify that you have JavaScript enabled in your browser.
  • +
  • Make sure you are using a modern enough browser. If using Internet Explorer, version 11 is required.
  • +
  • Check are there messages in your browser's JavaScript error log. Please report the problem if you suspect you have encountered a bug.
  • +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/infura-websocket-docker-blockchain-tools/logs/infura-websocket-task-bot-output.xml b/infura-websocket-docker-blockchain-tools/logs/infura-websocket-task-bot-output.xml new file mode 100644 index 0000000..4c82c9f --- /dev/null +++ b/infura-websocket-docker-blockchain-tools/logs/infura-websocket-task-bot-output.xml @@ -0,0 +1,1265 @@ + + + + + + + + +Running command 'wscat -c wss://mainnet.infura.io/ws/v3/ -x '{"jsonrpc":"2.0","method":"eth_feeHistory","params":["0x5", "latest", []],"id":1}' | jq 'del(.result.oldestBlock)' > /tasks/logs/eth_feeHistory.json'. +wscat -c ${INFURA_RPC_URL} -x '{"jsonrpc":"2.0","method":"eth_feeHistory","params":["0x5", "latest", []],"id":1}' | jq 'del(.result.oldestBlock)' > ${EXECDIR}/logs/eth_feeHistory.json +Runs the given command in the system and returns the output. + + + +Running command 'cat /tasks/logs/eth_feeHistory.json 2>&1'. +${INFURA_OUTPUT} = { + "jsonrpc": "2.0", + "id": 1, + "result": { + "baseFeePerBlobGas": [ + "0x1", + "0x1", + "0x1", + "0x1", + "0x1", + "0x1" + ], + "baseFeePerGas": [ + "0x15819530a"... +${INFURA_OUTPUT} +cat ${EXECDIR}/logs/eth_feeHistory.json +Runs the given command in the system and returns the output. + + + +... +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +${INFURA_OUTPUT} +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "baseFeePerBlobGas": [ + "0x1", + "0x1", + "0x1", + "0x1", + "0x1", + "0x1" + ], + "baseFeePerGas": [ + "0x15819530a", + "0x1630f4292", + "0x1642ea871", + "0x1653a48ff", + "0x158bf382f", + "0x17bfb493b" + ], + "blobGasUsedRatio": [ + 1, + 1, + 0.16666666666666666, + 0, + 0 + ], + "gasUsedRatio": [ + 0.6274132, + 0.5126474333333333, + 0.5117402666666667, + 0.3602490666666667, + 0.9088173666666667 + ] + } +} +${INFURA_OUTPUT} +Logs the given message with the given level. + + + +Length is 561. +${INFURA_OUTPUT} +Verifies that the given item is not empty. + + + +Slept 2 seconds. +${RETRY_DELAY} seconds +Pauses the test executed for the given time. + + +${INFURA_RPC_URL} + + +${RETRY_AMOUNT} times +1 second +Get Gas Fee Information +${INFURA_RPC_URL} +Runs the specified keyword and retries if it fails. + + +${ETHEREUM_INFURA_RPC_URL} + + +Infura_Websocket_Bot_Task + + + + + + + +Running command 'wscat -c wss://mainnet.infura.io/ws/v3/ -x '{"jsonrpc":"2.0","method":"eth_getBlockReceipts","params":["finalized"],"id":1}' | jq > /tasks/logs/eth_getBlockReceipts.json'. +wscat -c ${INFURA_RPC_URL} -x '{"jsonrpc":"2.0","method":"eth_getBlockReceipts","params":["finalized"],"id":1}' | jq > ${EXECDIR}/logs/eth_getBlockReceipts.json +Runs the given command in the system and returns the output. + + + +Running command 'cat /tasks/logs/eth_getBlockReceipts.json | jq .result[:2] 2>&1'. +${INFURA_OUTPUT} = [ + { + "blockHash": "0x2fa42684ce63035efee28d07ea9a54d66bb09c69016aa9a0b8dfc7728a7063b2", + "blockNumber": "0x13b52ce", + "contractAddress": null, + "cumulativeGasUsed": "0x39ad3", + "effec... +${INFURA_OUTPUT} +cat ${EXECDIR}/logs/eth_getBlockReceipts.json | jq .result[:2] +Runs the given command in the system and returns the output. + + + +... +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +${INFURA_OUTPUT} +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +[ + { + "blockHash": "0x2fa42684ce63035efee28d07ea9a54d66bb09c69016aa9a0b8dfc7728a7063b2", + "blockNumber": "0x13b52ce", + "contractAddress": null, + "cumulativeGasUsed": "0x39ad3", + "effectiveGasPrice": "0x14a303575", + "from": "0xe2588450dfa9a7b862984c215af88853b15a60a5", + "gasUsed": "0x39ad3", + "logs": [ + { + "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "blockHash": "0x2fa42684ce63035efee28d07ea9a54d66bb09c69016aa9a0b8dfc7728a7063b2", + "blockNumber": "0x13b52ce", + "data": "0x00000000000000000000000000000000000000000000000255d693f4202569ff", + "logIndex": "0x0", + "removed": false, + "topics": [ + "0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c", + "0x000000000000000000000000eaaa41cb2a64b11fe761d41e747c032cdd60cace" + ], + "transactionHash": "0xb9d316796c75538af2a9dcce912f14a7f32172ff0eb4ed2960b0b5761044df25", + "transactionIndex": "0x0" + }, + { + "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "blockHash": "0x2fa42684ce63035efee28d07ea9a54d66bb09c69016aa9a0b8dfc7728a7063b2", + "blockNumber": "0x13b52ce", + "data": "0x00000000000000000000000000000000000000000000000255d693f4202569ff", + "logIndex": "0x1", + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000eaaa41cb2a64b11fe761d41e747c032cdd60cace", + "0x000000000000000000000000fdd05552f1377aa488afed744c8024358af02041" + ], + "transactionHash": "0xb9d316796c75538af2a9dcce912f14a7f32172ff0eb4ed2960b0b5761044df25", + "transactionIndex": "0x0" + }, + { + "address": "0xc9bca88b04581699fab5aa276ccaff7df957cbbf", + "blockHash": "0x2fa42684ce63035efee28d07ea9a54d66bb09c69016aa9a0b8dfc7728a7063b2", + "blockNumber": "0x13b52ce", + "data": "0x0000000000000000000000000000000000000000000000e79594a9b91a63b6b8", + "logIndex": "0x2", + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000fdd05552f1377aa488afed744c8024358af02041", + "0x000000000000000000000000e2588450dfa9a7b862984c215af88853b15a60a5" + ], + "transactionHash": "0xb9d316796c75538af2a9dcce912f14a7f32172ff0eb4ed2960b0b5761044df25", + "transactionIndex": "0x0" + }, + { + "address": "0xfdd05552f1377aa488afed744c8024358af02041", + "blockHash": "0x2fa42684ce63035efee28d07ea9a54d66bb09c69016aa9a0b8dfc7728a7063b2", + "blockNumber": "0x13b52ce", + "data": "0x00000000000000000000000000000000000000000000001c1a993a06741be5e10000000000000000000000000000000000000000000009fb624a299451007a9d", + "logIndex": "0x3", + "removed": false, + "topics": [ + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1" + ], + "transactionHash": "0xb9d316796c75538af2a9dcce912f14a7f32172ff0eb4ed2960b0b5761044df25", + "transactionIndex": "0x0" + }, + { + "address": "0xfdd05552f1377aa488afed744c8024358af02041", + "blockHash": "0x2fa42684ce63035efee28d07ea9a54d66bb09c69016aa9a0b8dfc7728a7063b2", + "blockNumber": "0x13b52ce", + "data": "0x00000000000000000000000000000000000000000000000255d693f4202569ff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e79594a9b91a63b6b8", + "logIndex": "0x4", + "removed": false, + "topics": [ + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x000000000000000000000000eaaa41cb2a64b11fe761d41e747c032cdd60cace", + "0x000000000000000000000000e2588450dfa9a7b862984c215af88853b15a60a5" + ], + "transactionHash": "0xb9d316796c75538af2a9dcce912f14a7f32172ff0eb4ed2960b0b5761044df25", + "transactionIndex": "0x0" + } + ], + "logsBloom": "0x0020000000000000000000008000000000000000000000800000000000000000000000000000000080000000000000000200000008000000000010000000000000000020000000000000000c000000200000000000000000000000008000000000000000001000000000000000008000000000000000000000000010000000000000001000000000000000000000000200000001000000080000004000000000000000000000000000000000200010000000000000000000000000000000008000000002000002000000000000200000000000000000001000000000000000000000200000000000000000000000000000000000000000400000000000000000", + "status": "0x1", + "to": "0xeaaa41cb2a64b11fe761d41e747c032cdd60cace", + "transactionHash": "0xb9d316796c75538af2a9dcce912f14a7f32172ff0eb4ed2960b0b5761044df25", + "transactionIndex": "0x0", + "type": "0x2" + }, + { + "blockHash": "0x2fa42684ce63035efee28d07ea9a54d66bb09c69016aa9a0b8dfc7728a7063b2", + "blockNumber": "0x13b52ce", + "contractAddress": null, + "cumulativeGasUsed": "0x70c4e", + "effectiveGasPrice": "0x184013bf5", + "from": "0xf208090958c942e29a797b5279f690285c26ae5a", + "gasUsed": "0x3717b", + "logs": [ + { + "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "blockHash": "0x2fa42684ce63035efee28d07ea9a54d66bb09c69016aa9a0b8dfc7728a7063b2", + "blockNumber": "0x13b52ce", + "data": "0x00000000000000000000000000000000000000000000000029a2241af62c00bc", + "logIndex": "0x5", + "removed": false, + "topics": [ + "0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c", + "0x000000000000000000000000eaaa41cb2a64b11fe761d41e747c032cdd60cace" + ], + "transactionHash": "0x1414fbe9b140d07f0147c02f836a27d7574c5787d700bb806fc9fc91373c8aaa", + "transactionIndex": "0x1" + }, + { + "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "blockHash": "0x2fa42684ce63035efee28d07ea9a54d66bb09c69016aa9a0b8dfc7728a7063b2", + "blockNumber": "0x13b52ce", + "data": "0x00000000000000000000000000000000000000000000000029a2241af62c00bc", + "logIndex": "0x6", + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000eaaa41cb2a64b11fe761d41e747c032cdd60cace", + "0x000000000000000000000000fdd05552f1377aa488afed744c8024358af02041" + ], + "transactionHash": "0x1414fbe9b140d07f0147c02f836a27d7574c5787d700bb806fc9fc91373c8aaa", + "transactionIndex": "0x1" + }, + { + "address": "0xc9bca88b04581699fab5aa276ccaff7df957cbbf", + "blockHash": "0x2fa42684ce63035efee28d07ea9a54d66bb09c69016aa9a0b8dfc7728a7063b2", + "blockNumber": "0x13b52ce", + "data": "0x00000000000000000000000000000000000000000000000eb3c9b75f2c821a46", + "logIndex": "0x7", + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000fdd05552f1377aa488afed744c8024358af02041", + "0x000000000000000000000000f208090958c942e29a797b5279f690285c26ae5a" + ], + "transactionHash": "0x1414fbe9b140d07f0147c02f836a27d7574c5787d700bb806fc9fc91373c8aaa", + "transactionIndex": "0x1" + }, + { + "address": "0xfdd05552f1377aa488afed744c8024358af02041", + "blockHash": "0x2fa42684ce63035efee28d07ea9a54d66bb09c69016aa9a0b8dfc7728a7063b2", + "blockNumber": "0x13b52ce", + "data": "0x00000000000000000000000000000000000000000000001c443b5e216a47e69d0000000000000000000000000000000000000000000009ecae807235247e6057", + "logIndex": "0x8", + "removed": false, + "topics": [ + "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1" + ], + "transactionHash": "0x1414fbe9b140d07f0147c02f836a27d7574c5787d700bb806fc9fc91373c8aaa", + "transactionIndex": "0x1" + }, + { + "address": "0xfdd05552f1377aa488afed744c8024358af02041", + "blockHash": "0x2fa42684ce63035efee28d07ea9a54d66bb09c69016aa9a0b8dfc7728a7063b2", + "blockNumber": "0x13b52ce", + "data": "0x00000000000000000000000000000000000000000000000029a2241af62c00bc0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000eb3c9b75f2c821a46", + "logIndex": "0x9", + "removed": false, + "topics": [ + "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", + "0x000000000000000000000000eaaa41cb2a64b11fe761d41e747c032cdd60cace", + "0x000000000000000000000000f208090958c942e29a797b5279f690285c26ae5a" + ], + "transactionHash": "0x1414fbe9b140d07f0147c02f836a27d7574c5787d700bb806fc9fc91373c8aaa", + "transactionIndex": "0x1" + } + ], + "logsBloom": "0x0020000000000000000000008000000000000000000000800000000000000000000000000000000080000000000000000200000008000000000010000000000000000020000000000000000c000000200000000000000000000000008000000000000000001000000000000000000000000000000000000000000010000000000000001000000000000000000000000000000001000000090000004000000000000000000000000000000000200010000000000000000000000000000000000000000002000002000000000000200000000000000000001000000000000020000000200000000000000000000000000000000000000000400000000000000000", + "status": "0x1", + "to": "0xeaaa41cb2a64b11fe761d41e747c032cdd60cace", + "transactionHash": "0x1414fbe9b140d07f0147c02f836a27d7574c5787d700bb806fc9fc91373c8aaa", + "transactionIndex": "0x1", + "type": "0x2" + } +] +${INFURA_OUTPUT} +Logs the given message with the given level. + + + +Length is 9706. +${INFURA_OUTPUT} +Verifies that the given item is not empty. + + + +Slept 2 seconds. +${RETRY_DELAY} seconds +Pauses the test executed for the given time. + + +${INFURA_RPC_URL} + + +${RETRY_AMOUNT} times +1 second +Get Recent Blocks And Completed Transactions +${INFURA_RPC_URL} +Runs the specified keyword and retries if it fails. + + +${ETHEREUM_INFURA_RPC_URL} + + +Infura_Websocket_Bot_Task + + + + + + + +Running command 'wscat -c wss://mainnet.infura.io/ws/v3/ -x '{"jsonrpc":"2.0", "id": 1, "method": "eth_subscribe", "params": ["newPendingTransactions"]}' | jq .params.result | grep -v null > /tasks/logs/eth_subscribe_newPendingTransactions.json'. +wscat -c ${INFURA_RPC_URL} -x '{"jsonrpc":"2.0", "id": 1, "method": "eth_subscribe", "params": ["newPendingTransactions"]}' | jq .params.result | grep -v null > ${EXECDIR}/logs/eth_subscribe_newPendingTransactions.json +Runs the given command in the system and returns the output. + + + +Running command 'cat /tasks/logs/eth_subscribe_newPendingTransactions.json 2>&1'. +${INFURA_OUTPUT} = "0x27c617b21acd3a2f0e89390c5fc0475013a90a791defe5353505ada47d8caca5" +"0x238f1239ed9f4b32ac808a2a82c86b4f185d7681d4d09edc158ad96a400fd6e1" +"0x851b10bfc5f23752172eae8efeee54efaa940d165ed7651bffbcd9df7c8... +${INFURA_OUTPUT} +cat ${EXECDIR}/logs/eth_subscribe_newPendingTransactions.json +Runs the given command in the system and returns the output. + + + +... +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +${INFURA_OUTPUT} +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +"0x27c617b21acd3a2f0e89390c5fc0475013a90a791defe5353505ada47d8caca5" +"0x238f1239ed9f4b32ac808a2a82c86b4f185d7681d4d09edc158ad96a400fd6e1" +"0x851b10bfc5f23752172eae8efeee54efaa940d165ed7651bffbcd9df7c845cd8" +"0xf9e06b5a397a0791214df5369e4e67e08069952595141397b8fe15733140afe5" +"0xccac5dd78f01ff490200bb50860a77885d146128cf1754de19bf2cfd4782f056" +"0x87ec9964177279bc50f37ca01d9fc0c22109eba5e552e53d5d6ba4e14cc944e7" +"0x1ea85b86953fc9955b2fad72002888e76289d12d644498e3dfcd8f018b548a82" +"0xeeb3b7475150ae742010b65804313850f2f1e31c032cfd6527db3ed807219693" +"0x417b3e2c78d125634cd941f2b53655d90dc2374206874b3b6b2fb931705aa0b2" +"0x48ca6872cead851cc615e72051c93b13d398e24a36ec9934c9517095e5417330" +"0xa0509c8a25a046520ef7e822e4502f8a75c93e6fc779e5c4cf277f34d798fbfb" +"0x31f606ea3a286246fbec4f91e2f61e11d652b12801cc88f4bf5146ee8f2a8689" +"0xef6ee6f9cb6e72a2b865669f7bd39baf6892288068bad2ccbe23617ae81656db" +"0xf694cf0b3e37d6ed1ac3d99a00d155add48b453ad2be52381ce330527da07c16" +"0xe4d96dd468bdf79b1e8721c6735b0e7147b8b39270f9c1d141bc33569635fe62" +"0x8027bb600824039671a9aa55ba54529cf1d1750dbb3b47cb52e1158255f9b600" +"0x57151cdfdd7139d785dded5f149c70194471e2ba356ec2426da8f157744cbc3b" +"0xb61c55da0c83cb17de03c037799503cb430df29c575c4485339e51a7bd254a2a" +"0xf623e60da399ec5b5b5caf8a39dcfb3322c988eaf5441352cc9730e8e62efc90" +${INFURA_OUTPUT} +Logs the given message with the given level. + + + +Length is 1310. +${INFURA_OUTPUT} +Verifies that the given item is not empty. + + + +Slept 2 seconds. +${RETRY_DELAY} seconds +Pauses the test executed for the given time. + + +${INFURA_RPC_URL} + + +${RETRY_AMOUNT} times +1 second +Get New Pending Transactions +${INFURA_RPC_URL} +Runs the specified keyword and retries if it fails. + + +${ETHEREUM_INFURA_RPC_URL} + + +Infura_Websocket_Bot_Task + + + + + + + +... +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +Starting process: +wscat -c wss://mainnet.infura.io/ws/v3/ -x '{"jsonrpc":"2.0", "id": 1, "method": "eth_subscribe", "params": ["newPendingTransactions"]}' +Waiting for process to complete. +Process completed. +wscat -c ${INFURA_RPC_URL} -x '{"jsonrpc":"2.0", "id": 1, "method": "eth_subscribe", "params": ["newPendingTransactions"]}' +alias=infura_output +shell=True +timeout=20s +on_timeout=continue +Runs a process and waits for it to complete. + + + +${INFURA_OUTPUT} = {"jsonrpc":"2.0","id":1,"result":"0xd68122b0347842eebe2bc315ca1adf22"} +{"jsonrpc":"2.0","method":"eth_subscription","params":{"subscription":"0xd68122b0347842eebe2bc315ca1adf22","result":"0xc5c0159d27... +${INFURA_OUTPUT} +infura_output +stdout=true +Returns the specified `result object` or some of its attributes. + + + +Length is 2875. +${INFURA_OUTPUT} +Verifies that the given item is not empty. + + + +Slept 2 seconds. +${RETRY_DELAY} seconds +Pauses the test executed for the given time. + + + +@{transaction_hashes} = [ ] +@{transaction_hashes} +Returns a list containing given items. + + + +${transaction_hashes} = ['"result":"0xc5c0159d274a858c9fbd6e09279426680e77592e9447543ffdcd3a842d80e2b4"', '"result":"0x06a433031b138441aff443a9057c61b2d350711b095b5ef025e2429b38ccad29"', '"result":"0x7b2561836af150671ae99fb1... +${transaction_hashes} +re.findall(r'"result"\s*:\s*"0x[0-9a-fA-F]{64}"', """${INFURA_OUTPUT}""") +re +Evaluates the given expression in Python and returns the result. + + + +${transaction_hashes} = ['0xc5c0159d274a858c9fbd6e09279426680e77592e9447543ffdcd3a842d80e2b4', '0x06a433031b138441aff443a9057c61b2d350711b095b5ef025e2429b38ccad29', '0x7b2561836af150671ae99fb1a599823e321855aa39305eb6d3ad34c8... +${transaction_hashes} +[match.split('"')[-2] for match in $transaction_hashes] +Evaluates the given expression in Python and returns the result. + + + + + +${etherscan_url} = https://etherscan.io/tx/0xc5c0159d274a858c9fbd6e09279426680e77592e9447543ffdcd3a842d80e2b4 +${etherscan_url} +SEPARATOR= +${BLOCKCHAIN_EXPLORER_BASE_URL} +${tx_hash} +Catenates the given items together and returns the resulted string. + + + +${etherscan_url} +Logs the given message to the console. + + + +https://etherscan.io/tx/0xc5c0159d274a858c9fbd6e09279426680e77592e9447543ffdcd3a842d80e2b4 +${etherscan_url} +Logs the given message with the given level. + + +0xc5c0159d274a858c9fbd6e09279426680e77592e9447543ffdcd3a842d80e2b4 + + + + +${etherscan_url} = https://etherscan.io/tx/0x06a433031b138441aff443a9057c61b2d350711b095b5ef025e2429b38ccad29 +${etherscan_url} +SEPARATOR= +${BLOCKCHAIN_EXPLORER_BASE_URL} +${tx_hash} +Catenates the given items together and returns the resulted string. + + + +${etherscan_url} +Logs the given message to the console. + + + +https://etherscan.io/tx/0x06a433031b138441aff443a9057c61b2d350711b095b5ef025e2429b38ccad29 +${etherscan_url} +Logs the given message with the given level. + + +0x06a433031b138441aff443a9057c61b2d350711b095b5ef025e2429b38ccad29 + + + + +${etherscan_url} = https://etherscan.io/tx/0x7b2561836af150671ae99fb1a599823e321855aa39305eb6d3ad34c84db77477 +${etherscan_url} +SEPARATOR= +${BLOCKCHAIN_EXPLORER_BASE_URL} +${tx_hash} +Catenates the given items together and returns the resulted string. + + + +${etherscan_url} +Logs the given message to the console. + + + +https://etherscan.io/tx/0x7b2561836af150671ae99fb1a599823e321855aa39305eb6d3ad34c84db77477 +${etherscan_url} +Logs the given message with the given level. + + +0x7b2561836af150671ae99fb1a599823e321855aa39305eb6d3ad34c84db77477 + + + + +${etherscan_url} = https://etherscan.io/tx/0xe9b7c8fe5b6a6fae6dc051def8e09210cd1f1208c81a4fd1d5da0c6c4e1a990a +${etherscan_url} +SEPARATOR= +${BLOCKCHAIN_EXPLORER_BASE_URL} +${tx_hash} +Catenates the given items together and returns the resulted string. + + + +${etherscan_url} +Logs the given message to the console. + + + +https://etherscan.io/tx/0xe9b7c8fe5b6a6fae6dc051def8e09210cd1f1208c81a4fd1d5da0c6c4e1a990a +${etherscan_url} +Logs the given message with the given level. + + +0xe9b7c8fe5b6a6fae6dc051def8e09210cd1f1208c81a4fd1d5da0c6c4e1a990a + + + + +${etherscan_url} = https://etherscan.io/tx/0x78a8940fce359cb07424d02282bc0dae60643541e8e2350b9d73497d2283f211 +${etherscan_url} +SEPARATOR= +${BLOCKCHAIN_EXPLORER_BASE_URL} +${tx_hash} +Catenates the given items together and returns the resulted string. + + + +${etherscan_url} +Logs the given message to the console. + + + +https://etherscan.io/tx/0x78a8940fce359cb07424d02282bc0dae60643541e8e2350b9d73497d2283f211 +${etherscan_url} +Logs the given message with the given level. + + +0x78a8940fce359cb07424d02282bc0dae60643541e8e2350b9d73497d2283f211 + + + + +${etherscan_url} = https://etherscan.io/tx/0xfbcc74bb60b59aa1e8ceacfb2bf6d7ad8e7ec4b712dcbd31a352598da270188f +${etherscan_url} +SEPARATOR= +${BLOCKCHAIN_EXPLORER_BASE_URL} +${tx_hash} +Catenates the given items together and returns the resulted string. + + + +${etherscan_url} +Logs the given message to the console. + + + +https://etherscan.io/tx/0xfbcc74bb60b59aa1e8ceacfb2bf6d7ad8e7ec4b712dcbd31a352598da270188f +${etherscan_url} +Logs the given message with the given level. + + +0xfbcc74bb60b59aa1e8ceacfb2bf6d7ad8e7ec4b712dcbd31a352598da270188f + + + + +${etherscan_url} = https://etherscan.io/tx/0x2b0a5ae62a6bbde33a91812dbd49ae8dc6c94a81088d267263c21573390db842 +${etherscan_url} +SEPARATOR= +${BLOCKCHAIN_EXPLORER_BASE_URL} +${tx_hash} +Catenates the given items together and returns the resulted string. + + + +${etherscan_url} +Logs the given message to the console. + + + +https://etherscan.io/tx/0x2b0a5ae62a6bbde33a91812dbd49ae8dc6c94a81088d267263c21573390db842 +${etherscan_url} +Logs the given message with the given level. + + +0x2b0a5ae62a6bbde33a91812dbd49ae8dc6c94a81088d267263c21573390db842 + + + + +${etherscan_url} = https://etherscan.io/tx/0x64f58eb82bc1892e78c69fc7d6a9dd0bb31f3d6b24bba55cc8768fd1f745a179 +${etherscan_url} +SEPARATOR= +${BLOCKCHAIN_EXPLORER_BASE_URL} +${tx_hash} +Catenates the given items together and returns the resulted string. + + + +${etherscan_url} +Logs the given message to the console. + + + +https://etherscan.io/tx/0x64f58eb82bc1892e78c69fc7d6a9dd0bb31f3d6b24bba55cc8768fd1f745a179 +${etherscan_url} +Logs the given message with the given level. + + +0x64f58eb82bc1892e78c69fc7d6a9dd0bb31f3d6b24bba55cc8768fd1f745a179 + + + + +${etherscan_url} = https://etherscan.io/tx/0x50fa3773cb37873aaaee5f810a34356d7f3131d047c8c2ebac2a042bc02b428b +${etherscan_url} +SEPARATOR= +${BLOCKCHAIN_EXPLORER_BASE_URL} +${tx_hash} +Catenates the given items together and returns the resulted string. + + + +${etherscan_url} +Logs the given message to the console. + + + +https://etherscan.io/tx/0x50fa3773cb37873aaaee5f810a34356d7f3131d047c8c2ebac2a042bc02b428b +${etherscan_url} +Logs the given message with the given level. + + +0x50fa3773cb37873aaaee5f810a34356d7f3131d047c8c2ebac2a042bc02b428b + + + + +${etherscan_url} = https://etherscan.io/tx/0x18a9e79d271b86956f696a26dc284c497a4c622d168ba11702f19d108889907f +${etherscan_url} +SEPARATOR= +${BLOCKCHAIN_EXPLORER_BASE_URL} +${tx_hash} +Catenates the given items together and returns the resulted string. + + + +${etherscan_url} +Logs the given message to the console. + + + +https://etherscan.io/tx/0x18a9e79d271b86956f696a26dc284c497a4c622d168ba11702f19d108889907f +${etherscan_url} +Logs the given message with the given level. + + +0x18a9e79d271b86956f696a26dc284c497a4c622d168ba11702f19d108889907f + + + + +${etherscan_url} = https://etherscan.io/tx/0x00661c96f308311688afb62d27078516c4ed150677050773482e83d20b99ef25 +${etherscan_url} +SEPARATOR= +${BLOCKCHAIN_EXPLORER_BASE_URL} +${tx_hash} +Catenates the given items together and returns the resulted string. + + + +${etherscan_url} +Logs the given message to the console. + + + +https://etherscan.io/tx/0x00661c96f308311688afb62d27078516c4ed150677050773482e83d20b99ef25 +${etherscan_url} +Logs the given message with the given level. + + +0x00661c96f308311688afb62d27078516c4ed150677050773482e83d20b99ef25 + + + + +${etherscan_url} = https://etherscan.io/tx/0x885a1caa4d1003445f32517d120b64ee1a358a938f31eff3daec74bdd52c8633 +${etherscan_url} +SEPARATOR= +${BLOCKCHAIN_EXPLORER_BASE_URL} +${tx_hash} +Catenates the given items together and returns the resulted string. + + + +${etherscan_url} +Logs the given message to the console. + + + +https://etherscan.io/tx/0x885a1caa4d1003445f32517d120b64ee1a358a938f31eff3daec74bdd52c8633 +${etherscan_url} +Logs the given message with the given level. + + +0x885a1caa4d1003445f32517d120b64ee1a358a938f31eff3daec74bdd52c8633 + + + + +${etherscan_url} = https://etherscan.io/tx/0xa4bd4dbdace1679407fefc8970c03b7045e70784cbeb9df41a7654d75c230a6d +${etherscan_url} +SEPARATOR= +${BLOCKCHAIN_EXPLORER_BASE_URL} +${tx_hash} +Catenates the given items together and returns the resulted string. + + + +${etherscan_url} +Logs the given message to the console. + + + +https://etherscan.io/tx/0xa4bd4dbdace1679407fefc8970c03b7045e70784cbeb9df41a7654d75c230a6d +${etherscan_url} +Logs the given message with the given level. + + +0xa4bd4dbdace1679407fefc8970c03b7045e70784cbeb9df41a7654d75c230a6d + + + + +${etherscan_url} = https://etherscan.io/tx/0x99083c7ea4c4adc2d18b16104d5d739113e7402e6a28275c080e953edf95afe9 +${etherscan_url} +SEPARATOR= +${BLOCKCHAIN_EXPLORER_BASE_URL} +${tx_hash} +Catenates the given items together and returns the resulted string. + + + +${etherscan_url} +Logs the given message to the console. + + + +https://etherscan.io/tx/0x99083c7ea4c4adc2d18b16104d5d739113e7402e6a28275c080e953edf95afe9 +${etherscan_url} +Logs the given message with the given level. + + +0x99083c7ea4c4adc2d18b16104d5d739113e7402e6a28275c080e953edf95afe9 + + + + +${etherscan_url} = https://etherscan.io/tx/0x72b136de5f20d21ccf7d61705b36dc5b07bcef02613b8f536f80496f964adfea +${etherscan_url} +SEPARATOR= +${BLOCKCHAIN_EXPLORER_BASE_URL} +${tx_hash} +Catenates the given items together and returns the resulted string. + + + +${etherscan_url} +Logs the given message to the console. + + + +https://etherscan.io/tx/0x72b136de5f20d21ccf7d61705b36dc5b07bcef02613b8f536f80496f964adfea +${etherscan_url} +Logs the given message with the given level. + + +0x72b136de5f20d21ccf7d61705b36dc5b07bcef02613b8f536f80496f964adfea + + +${tx_hash} +@{transaction_hashes} + + + +... +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +... +Logs the given message to the console. + + +${INFURA_RPC_URL} +${BLOCKCHAIN_EXPLORER_BASE_URL} + + +${RETRY_AMOUNT} times +1 second +Get Transactions And Log Blockchain Explorer Links +${INFURA_RPC_URL} +${BLOCKCHAIN_EXPLORER_BASE_URL} +Runs the specified keyword and retries if it fails. + + +${ETHEREUM_INFURA_RPC_URL} +${ETHERSCAN_BASE_URL} + + +Infura_Websocket_Bot_Task + + + + + + + +Running command 'wscat -c wss://avalanche-mainnet.infura.io/ws/v3/ -x '{"jsonrpc":"2.0","method":"eth_feeHistory","params":["0x5", "latest", []],"id":1}' | jq 'del(.result.oldestBlock)' > /tasks/logs/eth_feeHistory.json'. +wscat -c ${INFURA_RPC_URL} -x '{"jsonrpc":"2.0","method":"eth_feeHistory","params":["0x5", "latest", []],"id":1}' | jq 'del(.result.oldestBlock)' > ${EXECDIR}/logs/eth_feeHistory.json +Runs the given command in the system and returns the output. + + + +Running command 'cat /tasks/logs/eth_feeHistory.json 2>&1'. +${INFURA_OUTPUT} = { + "jsonrpc": "2.0", + "id": 1, + "result": { + "baseFeePerGas": [ + "0x5d21dba00", + "0x5d21dba00", + "0x5d21dba00", + "0x5d21dba00", + "0x5d21dba00" + ], + "gasUsedRatio":... +${INFURA_OUTPUT} +cat ${EXECDIR}/logs/eth_feeHistory.json +Runs the given command in the system and returns the output. + + + +... +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +${INFURA_OUTPUT} +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "baseFeePerGas": [ + "0x5d21dba00", + "0x5d21dba00", + "0x5d21dba00", + "0x5d21dba00", + "0x5d21dba00" + ], + "gasUsedRatio": [ + 0.020916733333333333, + 0.0368926, + 0.0142916, + 0.013999533333333333, + 0.0479244 + ] + } +} +${INFURA_OUTPUT} +Logs the given message with the given level. + + + +Length is 320. +${INFURA_OUTPUT} +Verifies that the given item is not empty. + + + +Slept 2 seconds. +${RETRY_DELAY} seconds +Pauses the test executed for the given time. + + +${INFURA_RPC_URL} + + +${RETRY_AMOUNT} times +1 second +Get Gas Fee Information +${INFURA_RPC_URL} +Runs the specified keyword and retries if it fails. + + +${AVALANCHE_INFURA_RPC_URL} + + +Infura_Websocket_Bot_Task + + + + + + + +Running command 'wscat -c wss://avalanche-mainnet.infura.io/ws/v3/ -x '{"jsonrpc":"2.0","method":"eth_getBlockReceipts","params":["finalized"],"id":1}' | jq > /tasks/logs/eth_getBlockReceipts.json'. +wscat -c ${INFURA_RPC_URL} -x '{"jsonrpc":"2.0","method":"eth_getBlockReceipts","params":["finalized"],"id":1}' | jq > ${EXECDIR}/logs/eth_getBlockReceipts.json +Runs the given command in the system and returns the output. + + + +Running command 'cat /tasks/logs/eth_getBlockReceipts.json | jq .result[:2] 2>&1'. +${INFURA_OUTPUT} = [ + { + "blockHash": "0x2cb000bfff9690bd3d16f8a45928b6fc3fad836a276e4927ae7cf30064e8d93c", + "blockNumber": "0x2fb8e29", + "contractAddress": null, + "cumulativeGasUsed": "0xabfa", + "effect... +${INFURA_OUTPUT} +cat ${EXECDIR}/logs/eth_getBlockReceipts.json | jq .result[:2] +Runs the given command in the system and returns the output. + + + +... +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +${INFURA_OUTPUT} +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +... +Logs the given message to the console. + + + +[ + { + "blockHash": "0x2cb000bfff9690bd3d16f8a45928b6fc3fad836a276e4927ae7cf30064e8d93c", + "blockNumber": "0x2fb8e29", + "contractAddress": null, + "cumulativeGasUsed": "0xabfa", + "effectiveGasPrice": "0x79126a500", + "from": "0x0d0707963952f2fba59dd06f2b425ace40b492fe", + "gasUsed": "0xabfa", + "logs": [ + { + "address": "0x9702230a8ea53601f5cd2dc00fdbc13d4df4a8c7", + "blockHash": "0x2cb000bfff9690bd3d16f8a45928b6fc3fad836a276e4927ae7cf30064e8d93c", + "blockNumber": "0x2fb8e29", + "data": "0x0000000000000000000000000000000000000000000000000000000000910dca", + "logIndex": "0x0", + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000d0707963952f2fba59dd06f2b425ace40b492fe", + "0x0000000000000000000000006da94a83d087af71a0dedbf93786d760c98819e7" + ], + "transactionHash": "0x917b56e273c29771a2a15b6311440f3f8cd0668052ac00c0de83963cbf0e3d1a", + "transactionIndex": "0x0" + } + ], + "logsBloom": "0x00000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000020000000000080000000000000000000000000000000000008000000000000000000000000000000000000000010000000000004000000000000000000000008000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000", + "status": "0x1", + "to": "0x9702230a8ea53601f5cd2dc00fdbc13d4df4a8c7", + "transactionHash": "0x917b56e273c29771a2a15b6311440f3f8cd0668052ac00c0de83963cbf0e3d1a", + "transactionIndex": "0x0", + "type": "0x0" + }, + { + "blockHash": "0x2cb000bfff9690bd3d16f8a45928b6fc3fad836a276e4927ae7cf30064e8d93c", + "blockNumber": "0x2fb8e29", + "contractAddress": null, + "cumulativeGasUsed": "0xfe02", + "effectiveGasPrice": "0x783bd6ac0", + "from": "0x66d07f7558a7fc21e4b1c31cec1855f3a1887817", + "gasUsed": "0x5208", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "status": "0x1", + "to": "0xb0726ef70e019e32bc1cb94a36af73dae6fdce48", + "transactionHash": "0x1ee9d97bd6f04c89d96e5dba931b65b7c7cd985788a11e8068cae243cd898808", + "transactionIndex": "0x1", + "type": "0x2" + } +] +${INFURA_OUTPUT} +Logs the given message with the given level. + + + +Length is 2925. +${INFURA_OUTPUT} +Verifies that the given item is not empty. + + + +Slept 2 seconds. +${RETRY_DELAY} seconds +Pauses the test executed for the given time. + + +${INFURA_RPC_URL} + + +${RETRY_AMOUNT} times +1 second +Get Recent Blocks And Completed Transactions +${INFURA_RPC_URL} +Runs the specified keyword and retries if it fails. + + +${AVALANCHE_INFURA_RPC_URL} + + +Infura_Websocket_Bot_Task + + + + + + +All Tasks + + +Infura_Websocket_Bot_Task + + +Robot Framework Infura Websocket Bot Task + + + + + diff --git a/infura-websocket-docker-blockchain-tools/robotframework-infura-websocket-bot-rpa-keywords.robot b/infura-websocket-docker-blockchain-tools/robotframework-infura-websocket-bot-rpa-keywords.robot new file mode 100644 index 0000000..0879efd --- /dev/null +++ b/infura-websocket-docker-blockchain-tools/robotframework-infura-websocket-bot-rpa-keywords.robot @@ -0,0 +1,141 @@ +*** Settings *** + +Library OperatingSystem +Library Process +Library String +Library Collections + +*** Variables *** + +${ETHEREUM_INFURA_RPC_URL} wss://mainnet.infura.io/ws/v3/ +${AVALANCHE_INFURA_RPC_URL} wss://avalanche-mainnet.infura.io/ws/v3/ +${ETHERSCAN_BASE_URL} https://etherscan.io/tx/ +${SNOWTRACE_BASE_URL} https://snowtrace.io/tx/ + +${RETRY_AMOUNT} 5 +${RETRY_DELAY} 2 + +*** Tasks *** + +ETHEREUM MAINNET - INFURA WEBSOCKET BOT TASK : Monitor the gas fee information of the 5 latest blocks on Ethereum Mainnet and log the metrics. + [Tags] Infura_Websocket_Bot_Task + Monitor Gas Fee Information ${ETHEREUM_INFURA_RPC_URL} + +ETHEREUM MAINNET - INFURA WEBSOCKET BOT TASK : Monitor recently completed transactions on a recently created block on Ethereum Mainnet and log the 2 most recent. + [Tags] Infura_Websocket_Bot_Task + Monitor Recent Blocks And Completed Transactions ${ETHEREUM_INFURA_RPC_URL} + +ETHEREUM MAINNET - INFURA WEBSOCKET BOT TASK : Monitor new pending transactions on the Ethereum Mainnet and log a list of transaction hashes from the Infura RPC URL. + [Tags] Infura_Websocket_Bot_Task + Monitor New Pending Transactions ${ETHEREUM_INFURA_RPC_URL} + +ETHEREUM MAINNET - INFURA WEBSOCKET BOT TASK : Monitor new pending transactions on the Ethereum Mainnet and convert the hashes into Etherscan URLs. + [Tags] Infura_Websocket_Bot_Task + Monitor Transactions And Log Blockchain Explorer Links ${ETHEREUM_INFURA_RPC_URL} ${ETHERSCAN_BASE_URL} + +AVALANCHE MAINNET - INFURA WEBSOCKET BOT TASK : Monitor the gas fee information of the 5 latest blocks on Avalanche Mainnet and log the metrics. + [Tags] Infura_Websocket_Bot_Task + Monitor Gas Fee Information ${AVALANCHE_INFURA_RPC_URL} + +AVALANCHE MAINNET - INFURA WEBSOCKET BOT TASK : Monitor recently completed transactions on a recently created block on Avalanche Mainnet and log the 2 most recent. + [Tags] Infura_Websocket_Bot_Task + Monitor Recent Blocks And Completed Transactions ${AVALANCHE_INFURA_RPC_URL} + +###---> Uncomment the following tasks to see how differently the same JSON-RPC API methods of Avalanche behave compared to Ethereum's JSON-RPC API methods. +# AVALANCHE MAINNET - INFURA WEBSOCKET BOT TASK : Monitor new pending transactions on the Avalanche Mainnet and log a list of transaction hashes from the Infura RPC URL. +# [Tags] Infura_Websocket_Bot_Task +# Monitor New Pending Transactions ${AVALANCHE_INFURA_RPC_URL} + +# AVALANCHE MAINNET - INFURA WEBSOCKET BOT TASK : Monitor new pending transactions on the Avalanche Mainnet and convert the hashes into Snowtrace URLs. +# [Tags] Infura_Websocket_Bot_Task +# Monitor Transactions And Log Blockchain Explorer Links ${AVALANCHE_INFURA_RPC_URL} ${SNOWTRACE_BASE_URL} + +*** Keywords *** + +Monitor Gas Fee Information + [Arguments] ${INFURA_RPC_URL} + Wait Until Keyword Succeeds ${RETRY_AMOUNT} times 1 second Get Gas Fee Information ${INFURA_RPC_URL} + +Get Gas Fee Information + [Arguments] ${INFURA_RPC_URL} + Run wscat -c ${INFURA_RPC_URL} -x '{"jsonrpc":"2.0","method":"eth_feeHistory","params":["0x5", "latest", []],"id":1}' | jq 'del(.result.oldestBlock)' > ${EXECDIR}/logs/eth_feeHistory.json + ${INFURA_OUTPUT}= Run cat ${EXECDIR}/logs/eth_feeHistory.json + Log To Console ... + Log To Console ... + Log To Console ... + Log To Console ${INFURA_OUTPUT} + Log To Console ... + Log To Console ... + Log To Console ... + Log ${INFURA_OUTPUT} + Should Not Be Empty ${INFURA_OUTPUT} + Sleep ${RETRY_DELAY} seconds + +Monitor Recent Blocks And Completed Transactions + [Arguments] ${INFURA_RPC_URL} + Wait Until Keyword Succeeds ${RETRY_AMOUNT} times 1 second Get Recent Blocks And Completed Transactions ${INFURA_RPC_URL} + +Get Recent Blocks And Completed Transactions + [Arguments] ${INFURA_RPC_URL} + Run wscat -c ${INFURA_RPC_URL} -x '{"jsonrpc":"2.0","method":"eth_getBlockReceipts","params":["finalized"],"id":1}' | jq > ${EXECDIR}/logs/eth_getBlockReceipts.json + ${INFURA_OUTPUT}= Run cat ${EXECDIR}/logs/eth_getBlockReceipts.json | jq .result[:2] + Log To Console ... + Log To Console ... + Log To Console ... + Log To Console ${INFURA_OUTPUT} + Log To Console ... + Log To Console ... + Log To Console ... + Log ${INFURA_OUTPUT} + Should Not Be Empty ${INFURA_OUTPUT} + Sleep ${RETRY_DELAY} seconds + +Monitor New Pending Transactions + [Arguments] ${INFURA_RPC_URL} + Wait Until Keyword Succeeds ${RETRY_AMOUNT} times 1 second Get New Pending Transactions ${INFURA_RPC_URL} + +Get New Pending Transactions + [Arguments] ${INFURA_RPC_URL} + Run wscat -c ${INFURA_RPC_URL} -x '{"jsonrpc":"2.0", "id": 1, "method": "eth_subscribe", "params": ["newPendingTransactions"]}' | jq .params.result | grep -v null > ${EXECDIR}/logs/eth_subscribe_newPendingTransactions.json + ${INFURA_OUTPUT}= Run cat ${EXECDIR}/logs/eth_subscribe_newPendingTransactions.json + Log To Console ... + Log To Console ... + Log To Console ... + Log To Console ${INFURA_OUTPUT} + Log To Console ... + Log To Console ... + Log To Console ... + Log ${INFURA_OUTPUT} + Should Not Be Empty ${INFURA_OUTPUT} + Sleep ${RETRY_DELAY} seconds + +Monitor Transactions And Log Blockchain Explorer Links + [Arguments] ${INFURA_RPC_URL} ${BLOCKCHAIN_EXPLORER_BASE_URL} + Wait Until Keyword Succeeds ${RETRY_AMOUNT} times 1 second Get Transactions And Log Blockchain Explorer Links ${INFURA_RPC_URL} ${BLOCKCHAIN_EXPLORER_BASE_URL} + +Get Transactions And Log Blockchain Explorer Links + [Arguments] ${INFURA_RPC_URL} ${BLOCKCHAIN_EXPLORER_BASE_URL} + Log To Console ... + Log To Console ... + Log To Console ... + Run Process wscat -c ${INFURA_RPC_URL} -x '{"jsonrpc":"2.0", "id": 1, "method": "eth_subscribe", "params": ["newPendingTransactions"]}' alias=infura_output shell=True timeout=20s on_timeout=continue + ${INFURA_OUTPUT}= Get Process Result infura_output stdout=true + Should Not Be Empty ${INFURA_OUTPUT} + Sleep ${RETRY_DELAY} seconds + @{transaction_hashes}= Create List + + # Use Python's re module for more complicated regex handling + ${transaction_hashes}= Evaluate re.findall(r'"result"\s*:\s*"0x[0-9a-fA-F]{64}"', """${INFURA_OUTPUT}""") re + + # Extract just the transaction hashes from the matches, removing the `"result":"` from each match + ${transaction_hashes}= Evaluate [match.split('"')[-2] for match in $transaction_hashes] + + # Create Etherscan URL links and log them + FOR ${tx_hash} IN @{transaction_hashes} + ${etherscan_url} Catenate SEPARATOR= ${BLOCKCHAIN_EXPLORER_BASE_URL} ${tx_hash} + Log To Console ${etherscan_url} + Log ${etherscan_url} + END + Log To Console ... + Log To Console ... + Log To Console ... \ No newline at end of file diff --git a/infura-websocket-docker-blockchain-tools/run-commands-inside-docker.sh b/infura-websocket-docker-blockchain-tools/run-commands-inside-docker.sh new file mode 100644 index 0000000..0a89b03 --- /dev/null +++ b/infura-websocket-docker-blockchain-tools/run-commands-inside-docker.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +cd /tasks +ls -la +echo +echo "Installing all of the NodeJS packages inside the Docker Container." +echo +npm update > /dev/null 2>&1 +npm install robotremote > /dev/null 2>&1 +npm install -g wscat > /dev/null 2>&1 +echo +echo "NodeJS packages are installed. Now the EthersJS Bot will run." +echo +robot --report NONE --log infura-websocket-task-bot-log.html --output infura-websocket-task-bot-output.xml -N "Robot Framework Infura Websocket Bot Task" -d ./logs ./robotframework-infura-websocket-bot-rpa-keywords.robot diff --git a/solidity-parallel-datadriven-security-tools/resources/docker-compose.yml b/solidity-parallel-datadriven-security-tools/resources/docker-compose.yml index 1bc916a..3457c44 100644 --- a/solidity-parallel-datadriven-security-tools/resources/docker-compose.yml +++ b/solidity-parallel-datadriven-security-tools/resources/docker-compose.yml @@ -1,4 +1,3 @@ - services: docker-solidity-security-test-runner: