Search
Search

Transaction: G9Mwxoa...JEEt

Receiver
Status
Succeeded
Transaction Fee
0.00085 
Deposit Value
0 
Gas Used
12 Tgas
Attached Gas
100 Tgas
Created
March 25, 2024 at 6:18:39pm
Hash
G9MwxoaR8KMgn7aFx8Gq4kDs9TmN5kghcHjG52RdJEEt

Actions

Called method: 'set' in contract: social.near
Arguments:
{ "data": { "81423b2d389fbf3f73ba45e3b62dcc1fdd37cea2d0d383806fdc687822fdb8a6": { "widget": { "NearUkraineStakeWidget": { "": "const Background = styled.div`\n height: 100%;\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n`;\n\nconst OuterWrapper = styled.div`\n position: absolute;\n top: 10%;\n left: 50%;\n transform: translateX(-50%);\n color: white;\n font-family: 'Kodchasan', sans-serif;\n text-align: center;\n`;\n\nconst ButtonWrapper = styled.div`\n display: flex;\n flex-wrap: wrap;\n justify-content: center; /* Center content horizontally */\n\n @media (max-width: 600px) {\n flex-direction: column; /* Switch to column layout if width is less than 600px */\n align-items: center; /* Center items horizontally in column layout */\n }\n`;\n\nconst Social = styled.div`\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n`;\n\nconst AmountButton = styled.button`\n background: white;\n color: blue;\n font-size: 1em;\n margin: 10px;\n padding: 0.25em 1em;\n border: 2px solid blue;\n border-radius: 3px;\n`;\n\nconst StakeButton = styled.button`\n background: white;\n color: blue;\n font-size: 1em;\n margin: 10px;\n padding: 0.25em 1em;\n border: 2px solid green;\n border-radius: 3px;\n`;\n\ninitState({ amount: \"1\" });\nconst accountId = props.wallet_id || context.accountId;\nconst decimals = props.decimal_places ?? 1;\n\nconst onStakeClick = () => {\n const gas = 300 * 10e11; // 300 TGas\n // TODO: doesn't support floats right now due to limitation of JS integers\n const exactDeposit = parseInt(state.amount) + \"000000000000000000000000\";\n const deposit = (exactDeposit / 10e23).toFixed(decimals);\n console.log(`gas: 300 TGas, deposit: ${deposit} Near`);\n Near.call(\n \"nearuaguild.poolv1.near\",\n \"deposit_and_stake\",\n {},\n gas,\n exactDeposit\n );\n};\n\nconst onAmountInputChange = ({ target }) => {\n let nearAmount;\n if (target.value === \"\") {\n // If input is empty\n nearAmount = \"\"; // Allow empty input\n } else if (parseInt(target.value) < 1) {\n // If input is less than 1\n nearAmount = 1; // Set it to 1\n } else {\n nearAmount = target.value; // Otherwise, keep the entered value\n }\n State.update({ amount: nearAmount });\n};\n\nconst onPresetButtonClick = ({ target }) => {\n State.update({ amount: target.value });\n};\n\nconst totalStakedBalance = (\n Near.view(\"nearuaguild.poolv1.near\", \"get_total_staked_balance\", {}) / 1e24\n).toFixed(decimals);\n\nconst yourStakedBalance = (\n Near.view(\"nearuaguild.poolv1.near\", \"get_account_staked_balance\", {\n account_id: accountId,\n }) / 1e24\n).toFixed(decimals);\n\nconst res = fetch(`https://api.nearblocks.io/v1/account/${accountId}`);\nconst yourAccountBalance = (res.body.account[0].amount / 1e24).toFixed(\n decimals\n);\n\nconst ButtonContainer = styled.div`\n display: flex;\n justify-content: center; /* Вирівнює кнопки по центру по горизонталі */\n width: 100%; /* Розтягує контейнер на всю ширину */\n`;\n\nreturn (\n <Background>\n <Widget src=\"nearukraineguild.near/widget/MysteryBox.Manage.Components.MenuHeader\" />\n <Widget src=\"nearukraineguild.near/widget/MysteryBox.Components.BackgroundStars\" />\n <OuterWrapper>\n <h1>Stake NEAR in NearUkraine</h1>\n <p>\n Total staked balance in validator is: {totalStakedBalance} Near <br />\n Your staked balance in validator is: {yourStakedBalance} Near <br />\n Your balance is: {yourAccountBalance} Near\n </p>\n <p>\n Amount:\n <input\n type=\"number\"\n min=\"1\"\n value={state.amount}\n onChange={onAmountInputChange}\n />\n </p>\n <ButtonWrapper>\n <AmountButton onClick={onPresetButtonClick} value=\"5\">\n 5\n </AmountButton>\n <AmountButton onClick={onPresetButtonClick} value=\"25\">\n 25\n </AmountButton>\n <AmountButton onClick={onPresetButtonClick} value=\"50\">\n 50\n </AmountButton>\n <AmountButton\n onClick={onPresetButtonClick}\n value={yourAccountBalance - 0.05}\n >\n Max\n </AmountButton>\n <StakeButton onClick={onStakeClick}>Stake</StakeButton>\n </ButtonWrapper>\n <Social>\n <Widget src=\"nearukraineguild.near/widget/MysteryBox.Manage.Components.Socials\" />\n </Social>\n </OuterWrapper>\n </Background>\n);\n" } } } } }

Transaction Execution Plan

Convert Transaction To Receipt
Gas Burned:
2 Tgas
Tokens Burned:
0.00024 
Receipt:
Predecessor ID:
Receiver ID:
Gas Burned:
6 Tgas
Tokens Burned:
0.0006 
Called method: 'set' in contract: social.near
Arguments:
{ "data": { "81423b2d389fbf3f73ba45e3b62dcc1fdd37cea2d0d383806fdc687822fdb8a6": { "widget": { "NearUkraineStakeWidget": { "": "const Background = styled.div`\n height: 100%;\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n`;\n\nconst OuterWrapper = styled.div`\n position: absolute;\n top: 10%;\n left: 50%;\n transform: translateX(-50%);\n color: white;\n font-family: 'Kodchasan', sans-serif;\n text-align: center;\n`;\n\nconst ButtonWrapper = styled.div`\n display: flex;\n flex-wrap: wrap;\n justify-content: center; /* Center content horizontally */\n\n @media (max-width: 600px) {\n flex-direction: column; /* Switch to column layout if width is less than 600px */\n align-items: center; /* Center items horizontally in column layout */\n }\n`;\n\nconst Social = styled.div`\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n`;\n\nconst AmountButton = styled.button`\n background: white;\n color: blue;\n font-size: 1em;\n margin: 10px;\n padding: 0.25em 1em;\n border: 2px solid blue;\n border-radius: 3px;\n`;\n\nconst StakeButton = styled.button`\n background: white;\n color: blue;\n font-size: 1em;\n margin: 10px;\n padding: 0.25em 1em;\n border: 2px solid green;\n border-radius: 3px;\n`;\n\ninitState({ amount: \"1\" });\nconst accountId = props.wallet_id || context.accountId;\nconst decimals = props.decimal_places ?? 1;\n\nconst onStakeClick = () => {\n const gas = 300 * 10e11; // 300 TGas\n // TODO: doesn't support floats right now due to limitation of JS integers\n const exactDeposit = parseInt(state.amount) + \"000000000000000000000000\";\n const deposit = (exactDeposit / 10e23).toFixed(decimals);\n console.log(`gas: 300 TGas, deposit: ${deposit} Near`);\n Near.call(\n \"nearuaguild.poolv1.near\",\n \"deposit_and_stake\",\n {},\n gas,\n exactDeposit\n );\n};\n\nconst onAmountInputChange = ({ target }) => {\n let nearAmount;\n if (target.value === \"\") {\n // If input is empty\n nearAmount = \"\"; // Allow empty input\n } else if (parseInt(target.value) < 1) {\n // If input is less than 1\n nearAmount = 1; // Set it to 1\n } else {\n nearAmount = target.value; // Otherwise, keep the entered value\n }\n State.update({ amount: nearAmount });\n};\n\nconst onPresetButtonClick = ({ target }) => {\n State.update({ amount: target.value });\n};\n\nconst totalStakedBalance = (\n Near.view(\"nearuaguild.poolv1.near\", \"get_total_staked_balance\", {}) / 1e24\n).toFixed(decimals);\n\nconst yourStakedBalance = (\n Near.view(\"nearuaguild.poolv1.near\", \"get_account_staked_balance\", {\n account_id: accountId,\n }) / 1e24\n).toFixed(decimals);\n\nconst res = fetch(`https://api.nearblocks.io/v1/account/${accountId}`);\nconst yourAccountBalance = (res.body.account[0].amount / 1e24).toFixed(\n decimals\n);\n\nconst ButtonContainer = styled.div`\n display: flex;\n justify-content: center; /* Вирівнює кнопки по центру по горизонталі */\n width: 100%; /* Розтягує контейнер на всю ширину */\n`;\n\nreturn (\n <Background>\n <Widget src=\"nearukraineguild.near/widget/MysteryBox.Manage.Components.MenuHeader\" />\n <Widget src=\"nearukraineguild.near/widget/MysteryBox.Components.BackgroundStars\" />\n <OuterWrapper>\n <h1>Stake NEAR in NearUkraine</h1>\n <p>\n Total staked balance in validator is: {totalStakedBalance} Near <br />\n Your staked balance in validator is: {yourStakedBalance} Near <br />\n Your balance is: {yourAccountBalance} Near\n </p>\n <p>\n Amount:\n <input\n type=\"number\"\n min=\"1\"\n value={state.amount}\n onChange={onAmountInputChange}\n />\n </p>\n <ButtonWrapper>\n <AmountButton onClick={onPresetButtonClick} value=\"5\">\n 5\n </AmountButton>\n <AmountButton onClick={onPresetButtonClick} value=\"25\">\n 25\n </AmountButton>\n <AmountButton onClick={onPresetButtonClick} value=\"50\">\n 50\n </AmountButton>\n <AmountButton\n onClick={onPresetButtonClick}\n value={yourAccountBalance - 0.05}\n >\n Max\n </AmountButton>\n <StakeButton onClick={onStakeClick}>Stake</StakeButton>\n </ButtonWrapper>\n <Social>\n <Widget src=\"nearukraineguild.near/widget/MysteryBox.Manage.Components.Socials\" />\n </Social>\n </OuterWrapper>\n </Background>\n);\n" } } } } }
Result:
{ "block_height": "115459421" }
No logs
Receipt:
Predecessor ID:
Receiver ID:
Gas Burned:
4 Tgas
Tokens Burned:
0 
Transferred 0.01845  to 81423…7822fdb8a6
Empty result
No logs