mainnet
English
Русский
Tiếng Việt
繁體中文
简体中文
Українська
Home
Explore
Transaction: 9quuJha...6Mof
Signed by
jgold.near
Receiver
social.near
Status
Succeeded
Transaction Fee
0.00047 Ⓝ
Deposit Value
0 Ⓝ
Gas Used
4 Tgas
Attached Gas
100 Tgas
Created
July 02, 2024 at 5:39:52pm
Hash
9quuJha8w8WQeTbdM9LHGDbT9z66FvhmexMsPLe76Mof
Block Hash
5K6nxz5Cmcta1mfRjvfwZmSx29kpfqPMrtbSbuDz9C93
Actions
Called method: 'set' in contract:
social.near
Arguments:
{ "data": { "jgold.near": { "widget": { "multisender-pretest": { "": "const MultiSenderWidget = ({ context, NearAPI }) => {\r\n // Initialize the state\r\n State.init({\r\n tokenContract: \"\",\r\n csvInput: \"\",\r\n isConnected: context.accountId ? true : false, // Check if user is connected\r\n });\r\n\r\n const handleMultiSend = async () => {\r\n const rows = State.csvInput.split(\";\");\r\n const transactions = rows.map((row) => {\r\n const [recipient, amount] = row.split(\",\").map((item) => item.trim());\r\n return {\r\n contractId: State.tokenContract,\r\n methodName: \"ft_transfer\",\r\n args: {\r\n receiver_id: recipient,\r\n amount: NearAPI.utils.format.parseNearAmount(amount),\r\n },\r\n gas: \"300000000000000\", // gas limit\r\n deposit: \"1\", // deposit, in yoctoNEAR\r\n };\r\n });\r\n\r\n try {\r\n for (const tx of transactions) {\r\n await context.account.functionCall(tx);\r\n }\r\n console.log(\"Tokens sent successfully\");\r\n } catch (error) {\r\n console.error(\"Error during multisend:\", error);\r\n }\r\n };\r\n\r\n const handleCSVInput = (e) => {\r\n State.update({ csvInput: e.target.value });\r\n };\r\n\r\n return (\r\n <div>\r\n <h1>NEAR Social Multisender</h1>\r\n <div>\r\n <label>Token Contract:</label>\r\n <input\r\n type=\"text\"\r\n value={State.tokenContract}\r\n onChange={(e) => State.update({ tokenContract: e.target.value })}\r\n />\r\n </div>\r\n <div>\r\n <label>CSV Input:</label>\r\n <textarea\r\n placeholder=\"wallet1, amount1; wallet2, amount2; ...\"\r\n value={State.csvInput}\r\n onChange={handleCSVInput}\r\n />\r\n </div>\r\n <div>\r\n <button onClick={handleMultiSend}>Send Tokens</button>\r\n </div>\r\n <div>\r\n <h3>CSV Template:</h3>\r\n <p>wallet1, amount1; wallet2, amount2; ...</p>\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nreturn <MultiSenderWidget />;\r\n" } } } } }
Transaction Execution Plan
Convert Transaction To Receipt
Gas Burned:
312 Ggas
Tokens Burned:
0.00003 Ⓝ
Receipt:
Receipt ID:
DYzb3Ly7azVsfe1quvVe3voAuwquwfsUZHPfWh11Hrya
Executed in Block:
B84RJH8d6tTNdjZr2wjUiCrsGfgevPEHAmoLJUsANMkR
Predecessor ID:
jgold.near
Receiver ID:
social.near
Gas Burned:
4 Tgas
Tokens Burned:
0.00044 Ⓝ
Called method: 'set' in contract:
social.near
Arguments:
{ "data": { "jgold.near": { "widget": { "multisender-pretest": { "": "const MultiSenderWidget = ({ context, NearAPI }) => {\r\n // Initialize the state\r\n State.init({\r\n tokenContract: \"\",\r\n csvInput: \"\",\r\n isConnected: context.accountId ? true : false, // Check if user is connected\r\n });\r\n\r\n const handleMultiSend = async () => {\r\n const rows = State.csvInput.split(\";\");\r\n const transactions = rows.map((row) => {\r\n const [recipient, amount] = row.split(\",\").map((item) => item.trim());\r\n return {\r\n contractId: State.tokenContract,\r\n methodName: \"ft_transfer\",\r\n args: {\r\n receiver_id: recipient,\r\n amount: NearAPI.utils.format.parseNearAmount(amount),\r\n },\r\n gas: \"300000000000000\", // gas limit\r\n deposit: \"1\", // deposit, in yoctoNEAR\r\n };\r\n });\r\n\r\n try {\r\n for (const tx of transactions) {\r\n await context.account.functionCall(tx);\r\n }\r\n console.log(\"Tokens sent successfully\");\r\n } catch (error) {\r\n console.error(\"Error during multisend:\", error);\r\n }\r\n };\r\n\r\n const handleCSVInput = (e) => {\r\n State.update({ csvInput: e.target.value });\r\n };\r\n\r\n return (\r\n <div>\r\n <h1>NEAR Social Multisender</h1>\r\n <div>\r\n <label>Token Contract:</label>\r\n <input\r\n type=\"text\"\r\n value={State.tokenContract}\r\n onChange={(e) => State.update({ tokenContract: e.target.value })}\r\n />\r\n </div>\r\n <div>\r\n <label>CSV Input:</label>\r\n <textarea\r\n placeholder=\"wallet1, amount1; wallet2, amount2; ...\"\r\n value={State.csvInput}\r\n onChange={handleCSVInput}\r\n />\r\n </div>\r\n <div>\r\n <button onClick={handleMultiSend}>Send Tokens</button>\r\n </div>\r\n <div>\r\n <h3>CSV Template:</h3>\r\n <p>wallet1, amount1; wallet2, amount2; ...</p>\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nreturn <MultiSenderWidget />;\r\n" } } } } }
Result:
{ "block_height": "122479486" }
No logs
Receipt:
Receipt ID:
9zAwph4fTUiWtZutWd18MDJSqfwdeE8PUPBBHtmSAKQY
Executed in Block:
9Cyhnx3eeyN7zvk9cQpuuJpJZrK8AbjgkJiP5NYLbqT2
Predecessor ID:
system
Receiver ID:
jgold.near
Gas Burned:
223 Ggas
Tokens Burned:
0 Ⓝ
Transferred
0.01833 Ⓝ
to
jgold.near
Empty result
No logs
© 2024 NEAR Inc. All Rights Reserved.
Terms of Service
|
Privacy Policy
Questions?
Join the Community
◍