|
@@ -43,6 +43,7 @@
|
|
|
string function_processed = "";
|
|
|
string contractAddDisabled = "";
|
|
|
string tokenContract = "0xe5D682717955d6C35d465A3485625C64655a04f4";
|
|
|
+
|
|
|
string tokenName
|
|
|
{
|
|
|
get { return Blockchain.tokenName; }
|
|
@@ -133,20 +134,20 @@
|
|
|
</p>*@
|
|
|
<br />
|
|
|
</p>
|
|
|
-<div>
|
|
|
- <button @onclick="ImportERC20">ImportERC20</button>
|
|
|
- <p><input id="tc" size="100" @bind="tokenContract" name="code" type="text" placeholder="Адрес контракта токена" /></p>
|
|
|
- <p><input id="tn" size="100" @bind="tokenName" name="code" type="text" placeholder="" /></p>
|
|
|
- <p><input id="ts" size="100" @bind="tokenSymbol" name="code" type="text" placeholder="" /></p>
|
|
|
- <p><input id="td" size="100" @bind="tokenDecimals" name="code" type="text" placeholder="" /></p>
|
|
|
- <p><input id="tb" size="100" @bind="tokenBalance" name="code" type="text" placeholder="" /></p>
|
|
|
-</div>
|
|
|
-<div>
|
|
|
- <button @onclick="TransferToken">Transfer</button>
|
|
|
- <p><input id="tc" size="100" @bind="tokenAmount" name="code" type="text" placeholder="Количество" /></p>
|
|
|
- <p><input id="tn" size="100" @bind="addressTo" name="code" type="text" placeholder="Адрес получателя" /></p>
|
|
|
+ <div>
|
|
|
+ <button @onclick="ImportERC20">ImportERC20</button>
|
|
|
+ <p><input id="tc" size="100" @bind="tokenContract" name="code" type="text" placeholder="Адрес контракта токена" /></p>
|
|
|
+ <p><input id="tn" size="100" @bind="tokenName" name="code" type="text" placeholder="" /></p>
|
|
|
+ <p><input id="ts" size="100" @bind="tokenSymbol" name="code" type="text" placeholder="" /></p>
|
|
|
+ <p><input id="td" size="100" @bind="tokenDecimals" name="code" type="text" placeholder="" /></p>
|
|
|
+ <p><input id="tb" size="100" @bind="tokenBalance" name="code" type="text" placeholder="" /></p>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <button @onclick="TransferToken">Transfer</button>
|
|
|
+ <p><input id="tc" size="100" @bind="tokenAmount" name="code" type="text" placeholder="Количество" /></p>
|
|
|
+ <p><input id="tn" size="100" @bind="addressTo" name="code" type="text" placeholder="Адрес получателя" /></p>
|
|
|
|
|
|
-</div>
|
|
|
+ </div>
|
|
|
|
|
|
@*<p style="visibility:@hidereceipt">
|
|
|
Get smart contract address:
|
|
@@ -203,6 +204,7 @@
|
|
|
<div>Token balance:@balanceHCB</div>
|
|
|
@*<button @onclick="TransferContract">Transfer 10 by Contract</button>*@
|
|
|
<button @onclick="EstimateGas">EstimateGas</button>
|
|
|
+ <button onclick="window.location.href='@mypath'">Download 1</button>
|
|
|
</p>
|
|
|
|
|
|
<p>Result: @result, gas: @gas</p>
|
|
@@ -291,7 +293,7 @@
|
|
|
// }
|
|
|
//}
|
|
|
//function_processed = final + ")";
|
|
|
- //sha3 = await GetSHA3(function_processed);
|
|
|
+ //sha3 = await GetSHA3(function_processed);
|
|
|
getFiles();
|
|
|
function_processed = await Blockchain.GetMain().compileFunction(function1, false);
|
|
|
|
|
@@ -450,26 +452,28 @@
|
|
|
}
|
|
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
|
- {
|
|
|
- account = AccountModel.Current;
|
|
|
- Console.WriteLine($"Blockchains OnInitializedAsync");
|
|
|
- await GetBalance();
|
|
|
- }
|
|
|
+ {
|
|
|
+ //Console.WriteLine($"Blazor is {Smart}");
|
|
|
+
|
|
|
+ account = AccountModel.Current;
|
|
|
+ Console.WriteLine($"Blockchains OnInitializedAsync");
|
|
|
+ await GetBalance();
|
|
|
+ }
|
|
|
|
|
|
- //private async Task GetBlockChain()
|
|
|
- //{
|
|
|
- // //if (Blockchain.loaded.Count == 0)
|
|
|
- // //{
|
|
|
- // Blockchain bc = new HyperCube.Models.Blockchain(bcURL, bcport);
|
|
|
- // result = await bc.Initialize();
|
|
|
- // if (result != "")
|
|
|
- // hidecontr = "visible";
|
|
|
- // //bcURL = bc.GetAddress();
|
|
|
- // //bc.ExecuteContract();
|
|
|
- // //bcURL = bc.address;
|
|
|
- // //hidecontr = "hidden";
|
|
|
- // //}
|
|
|
-
|
|
|
- // //private Post post = new Post();
|
|
|
- //}
|
|
|
+ //private async Task GetBlockChain()
|
|
|
+ //{
|
|
|
+ // //if (Blockchain.loaded.Count == 0)
|
|
|
+ // //{
|
|
|
+ // Blockchain bc = new HyperCube.Models.Blockchain(bcURL, bcport);
|
|
|
+ // result = await bc.Initialize();
|
|
|
+ // if (result != "")
|
|
|
+ // hidecontr = "visible";
|
|
|
+ // //bcURL = bc.GetAddress();
|
|
|
+ // //bc.ExecuteContract();
|
|
|
+ // //bcURL = bc.address;
|
|
|
+ // //hidecontr = "hidden";
|
|
|
+ // //}
|
|
|
+
|
|
|
+ // //private Post post = new Post();
|
|
|
+ //}
|
|
|
}
|