|
@@ -24,24 +24,15 @@ namespace HyperCube.Models
|
|
|
return contracts[name];
|
|
|
}
|
|
|
}
|
|
|
- return null;
|
|
|
+ return null;
|
|
|
}
|
|
|
|
|
|
public SmartContract()
|
|
|
{ }
|
|
|
|
|
|
- public async Task Run(string weiValue = "0x0")
|
|
|
+ public Task Run(string weiValue = "0x0")
|
|
|
{
|
|
|
- var verifierAccount = AccountModel.Current;
|
|
|
- //Console.WriteLine($"Verify {verifierAccount.Name}");
|
|
|
-
|
|
|
- //if (Blockchain.GetMain().contractNames.ContainsKey("Verify"))
|
|
|
- //{
|
|
|
- // var contr = Blockchain.GetMain().contractNames["Verify"];
|
|
|
- // var res = Blockchain.GetMain().RunContractWrite(contr.Address, "0x11111111");
|
|
|
- // Console.WriteLine("Test verify RUN " + res);
|
|
|
- //}
|
|
|
- //TODO run smart contract with verifier wallet
|
|
|
+ return null;
|
|
|
}
|
|
|
|
|
|
public SmartContract(int id, string name, string code, string bytecode)
|
|
@@ -52,4 +43,13 @@ namespace HyperCube.Models
|
|
|
ByteCode = bytecode;
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
+
|
|
|
+ public class VerifyContract : SmartContract
|
|
|
+ {
|
|
|
+ public async Task Run(AccountModel initiator, AccountModel verifier, ArticleModel newArticle, string weiValue = "0x0")
|
|
|
+ {
|
|
|
+ Console.WriteLine($"VerifyContract Run {initiator.Name} {newArticle}");
|
|
|
+ var res = Blockchain.GetMain().RunContractWrite(Address, "0x11111111");
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|