From ae1aaea78eb53cda88a4f1deb583cddc254261ca Mon Sep 17 00:00:00 2001 From: Meharab L <33731973+Meharab@users.noreply.github.com> Date: Wed, 27 Dec 2023 19:28:29 +0600 Subject: [PATCH] Quest: Commit a custom expression to the repo: Create monitor-an-address.md Create a custom expression for QuickAlerts Expressions Library: Key Steps: Understand QuickAlerts: Learn how it operates by reviewing existing examples. Prepare the Environment: Fork and clone the repository. Create or Improve an Example: Developing a new alert. Test Thoroughly: Ensuring the example works flawlessly. Submit a Pull Request: Pushing the changes and creating a pull request for review. https://github.com/quiknode-labs/quickalerts-examples --- examples/monitor-an-address.md | 112 +++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 examples/monitor-an-address.md diff --git a/examples/monitor-an-address.md b/examples/monitor-an-address.md new file mode 100644 index 0000000..cececec --- /dev/null +++ b/examples/monitor-an-address.md @@ -0,0 +1,112 @@ +## Monitor an Address Alert + +### Description +Get a QuickAlert when any activity occurred by the tragated wallet address. This alert works great to set an alert for an upcoming block. i.e get alerted for when a transaction has been executed etc. + +### Blockchain & Network +All Blockchains and networks + +### Expression Values +- Target address `0x3483Be5373B040892952cF92c5889C1B2eB0e507` + +### Expression +``` +(tx_to == '0x3483Be5373B040892952cF92c5889C1B2eB0e507') || (tx_from == '0x3483Be5373B040892952cF92c5889C1B2eB0e507') +``` + +### Expected Result +```shell +{ +"block_number":10279109 +"topic":"raw-ethereum-goerli" +"chain":"ethereum-goerli" +"block":{ +"baseFeePerGas":"0x13" +"difficulty":"0x0" +"extraData":"0xd883010b05846765746888676f312e31392e37856c696e7578" +"gasLimit":"0x1c9c380" +"gasUsed":"0xb3d949" +"hash":"0xf743841d54f1a8f106a418d811786302cda380cbf2d54bf125153b3a74ee414c" +"logsBloom":"0x0231820ab43030000004080085010100001004502640480140a50404820c080a084048118202022450a010200100440808450020c8a422a806010b02a42c8010450a004c0c01040015a84009a6ea20226071004a816589c40008014ca410002202278200830300c00002188008201822081144c017242002984003124880700094220a48021c01006544402ac20000201020440980104a880035e263840204000308e209020938d26010000080000002040012838c00010488070a840030004e2034c0c20054c0044016a08001040a0400a0002001888014000004821013625071383018472180485829000840521080a0000012031302630040200200000400" +"miner":"0x94750381be1aba0504c666ee1db118f68f0780d4" +"mixHash":"0x74e597d61376353098be8af0c42c87b8fefa91fd43a0ce7908e2bcbefeef57af" +"nonce":"0x0000000000000000" +"number":"0x9cd8c5" +"parentHash":"0x4fbeca55a3a009b1a8820e2e083bf6a5cbc20ba66bf845ca3dcbef7168fa114f" +"receiptsRoot":"0x3e05843be0174e8ba9f1d10abdfd87a6b16003b2f58286da504aeafa87406ba4" +"sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" +"size":"0x1003c" +"stateRoot":"0xf1657bcc0c57dc8c3aa52a57436ad934d35cfea0a71422fc4690e3844d784166" +"timestamp":"0x658c21c8" +"totalDifficulty":"0xa4a470" +"transactions": +[ + 0:{ + "blockHash":"0xf743841d54f1a8f106a418d811786302cda380cbf2d54bf125153b3a74ee414c" + "blockNumber":"0x9cd8c5" + "from":"0x552b8e2c1e97069ba0e29cdbf9642f4e6318abc7" + "gas":"0x29292" + "gasPrice":"0x2f08236400" + "hash":"0x88eaf2a7896ec40c64d825bdc7ebba2a21f91d73e2e9e9aa14c123280d1360a1" + "input":"0x" + "nonce":"0x25a9" + "to":"0x1643e812ae58766192cf7d2cf9567df2c37e9b7f" + "transactionIndex":"0x0" + "value":"0x1bc16d674ec80000" + "type":"0x0" + "v":"0x2d" + "r":"0xb79ecf3551e50f20ce82fea46986bb813237c6b4a68cb419bb87cd1b7ccdb1b1" + "s":"0x3c3c31b4e9634d958ecea745f1509349a04c25f779579944911af26a283bb52e" + "maxFeePerGas":"" + "maxPriorityFeePerGas":"" + "accessList":NULL + "chainId":"0x5" + } +... 100 +] +[100 - 162] +"transactionsRoot":"0x667a7cc37aeb7615c30976b4b3bf26ad9f2be7ed9815f9639b73015ededeaf48" +"uncles":[ +] +"withdrawals":[ +0:{...} +1:{...} +2:{...} +3:{...} +4:{...} +5:{...} +6:{...} +7:{...} +8:{...} +9:{...} +10:{...} +11:{...} +12:{...} +13:{...} +14:{...} +15:{...} +] +"withdrawalsRoot":"0x250bba485c8d249a8574168b58214f45cbb5a08bef2318299c6829b0ff237524" +} +"receipts": +[ + 0:{ + "blockHash":"0xf743841d54f1a8f106a418d811786302cda380cbf2d54bf125153b3a74ee414c" + "blockNumber":"0x9cd8c5" + "contractAddress":NULL + "cumulativeGasUsed":"0x13425" + "effectiveGasPrice":"0x2f08236400" + "from":"0x552b8e2c1e97069ba0e29cdbf9642f4e6318abc7" + "gasUsed":"0x13425" + "logs":[...] + "logsBloom":"0x00000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000002000000000020000000000008000000800000000000000000000000010000000000000000000000000000400000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000400000082000000000002200000000000000000000080000000000000000020000000000000000000000000000000000000000000020000000000000000000000" + "status":"0x1" + "to":"0x1643e812ae58766192cf7d2cf9567df2c37e9b7f" + "transactionHash":"0x88eaf2a7896ec40c64d825bdc7ebba2a21f91d73e2e9e9aa14c123280d1360a1" + "transactionIndex":"0x0" + "type":"0x0" + } +... 100 +] +[100 - 162] +```