public void TestCreateAccount2() { MyWallet wallet = new(); Contract contract = Contract.Create(new ContractParameterType[] { ContractParameterType.Boolean }, new byte[] { 1 }); WalletAccount account = wallet.CreateAccount(contract, UT_Crypto.GenerateCertainKey(32).PrivateKey); account.Should().NotBeNull(); wallet = new(); account = wallet.CreateAccount(contract, (byte[])(null)); account.Should().NotBeNull(); }
public static void ClassInit(TestContext ctx) { glkey = UT_Crypto.GenerateCertainKey(32); nep2Key = glkey.Export("pwd", ProtocolSettings.Default.AddressVersion, 2, 1, 1); }