diff --git a/Avalanche.postman_collection.json b/Avalanche.postman_collection.json index da1c98e..d61cfb1 100644 --- a/Avalanche.postman_collection.json +++ b/Avalanche.postman_collection.json @@ -1,6 +1,6 @@ { "info": { - "_postman_id": "133cf180-c9cf-4d6b-9834-944dc66f7f0f", + "_postman_id": "3d716136-a9a1-45a5-86ca-2102a10a86a7", "name": "Avalanche", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "23086587" @@ -4973,12 +4973,343 @@ }, { "name": "getAtomicTx", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "var res = {};", + "const req = JSON.parse(pm.request.body.raw)", + "const txID = req.params.txID", + "var view = `", + "", + " ", + "", + "", + "", + "", + "", + "", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + "", + " {{#if response.inputs.0.address}}", + " ", + " ", + " ", + " ", + " ", + " {{/if}}", + "", + " {{#if response.inputs.0.nonce}}", + " ", + " ", + " ", + " ", + " ", + " {{/if}}", + "", + " {{#if response.inputs.0.id}}", + " ", + " ", + " ", + " ", + " ", + " {{/if}}", + "", + " {{#if response.inputs.0.txId}}", + " ", + " ", + " ", + " ", + " ", + " {{/if}}", + "", + " {{#if response.inputs.0.index}}", + " ", + " ", + " ", + " ", + " ", + " {{/if}}", + "", + " {{#if response.inputs.0.amount}}", + " ", + " ", + " ", + " ", + " ", + " {{/if}}", + "", + " {{#if response.inputs.0.srcChain}}", + " ", + " ", + " ", + " ", + " ", + " {{/if}}", + "", + " ", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + "", + " {{#if response.outputs.0.address}}", + " ", + " ", + " ", + " ", + " ", + " {{/if}}", + "", + " {{#if response.outputs.0.id}}", + " ", + " ", + " ", + " ", + " ", + " {{/if}}", + "", + " {{#if response.outputs.0.txId}}", + " ", + " ", + " ", + " ", + " ", + " {{/if}}", + "", + " {{#if response.outputs.0.index}}", + " ", + " ", + " ", + " ", + " ", + " {{/if}}", + "", + " {{#if response.outputs.0.amount}}", + " ", + " ", + " ", + " ", + " ", + " {{/if}}", + "", + " {{#if response.outputs.0.dstChain}}", + " ", + " ", + " ", + " ", + " ", + " {{/if}}", + "", + " {{#if response.outputs.0.owner.addresses}}", + " ", + " ", + " ", + " ", + " ", + " {{/if}}", + "", + " {{#if response.outputs.0.owner.threshold}}", + " ", + " ", + " ", + " ", + " ", + " {{/if}}", + "", + "", + " ", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + " ", + "", + "", + "
Decoded Atomic TX:
ID: {{response.id}}
Type: {{response.type}}
From: {{response.from}}
To: {{response.to}}
From: {{response.from}}
Chain ID: {{response.chainId}}
Date: {{response.timestamp}}
Block number: {{response.blockNumber}}
Block hash: {{response.blockHash}}
Value: {{response.value}}
Burned fees: {{response.burnedFees}}
Status: {{response.status}}
Inputs
Address: {{response.inputs.0.address}}
Nonce: {{response.inputs.0.nonce}}
ID: {{response.inputs.0.id}}
Transaction ID: {{response.inputs.0.txId}}
Index: {{response.inputs.0.index}}
Amount: {{response.inputs.0.amount}}
Source chain: {{response.inputs.0.srcChain}}
Asset ID: {{response.inputs.0.asset.id}}
Asset name: {{response.inputs.0.asset.name}}
Asset symbol: {{response.inputs.0.asset.symbol}}
Asset denomination: {{response.inputs.0.asset.denomination}}
Asset type: {{response.inputs.0.asset.type}}
Outputs
Address: {{response.outputs.0.address}}
ID: {{response.outputs.0.id}}
Transaction ID: {{response.outputs.0.txId}}
Index: {{response.outputs.0.index}}
Amount: {{response.outputs.0.amount}}
Destination chain: {{response.outputs.0.dstChain}}
Owner address: {{response.outputs.0.owner.addresses}}
Threshold: {{response.outputs.0.owner.threshold}}
Asset ID: {{response.outputs.0.asset.id}}
Asset name: {{response.outputs.0.asset.name}}
Asset symbol: {{response.outputs.0.asset.symbol}}
Asset denomination: {{response.outputs.0.asset.denomination}}
Asset type: {{response.outputs.0.asset.type}}
", + "`;", + "", + "const requestURL = \"https://api-beta.avascan.info/v2/network/mainnet/evm/43114/transactions/\" + txID ;", + "console.log(requestURL)", + "pm.sendRequest(requestURL, function (err, response) {", + " res = response.json();", + " console.log(res.value)", + " pm.visualizer.set(view, {", + " response: res,", + " });", + "})", + "" + ], + "type": "text/javascript" + } + } + ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", - "raw": "{\n \"jsonrpc\":\"2.0\",\n \"id\" :1,\n \"method\" :\"avax.getAtomicTx\",\n \"params\" :{\n \"txID\":\"2GD5SRYJQr2kw5jE73trBFiAgVQyrCaeg223TaTyJFYXf2kPty\",\n \"encoding\": \"hex\"\n }\n}", + "raw": "{\n \"jsonrpc\":\"2.0\",\n \"id\" :1,\n \"method\" :\"avax.getAtomicTx\",\n \"params\" :{\n \"txID\":\"9zX25brVj24xMBXJFw973MGVgkuDwvFPyBQoqo4pLye5mBkhN\",\n \"encoding\": \"hex\"\n }\n}\n\n//choose \"Visualize\" from the output section to see the decoded tx", "options": { "raw": { "language": "json"