From 4981e569fcf46040069388941397cb6d327709ea Mon Sep 17 00:00:00 2001 From: Daniel Akhterov Date: Mon, 28 Feb 2022 22:46:17 -0800 Subject: [PATCH] fix: gas should be 100000 for tests and contract deletion requires an obtainer Signed-off-by: Daniel Akhterov --- contract_bytecode_query_e2e_test.go | 18 +++++++---- contract_call_query_e2e_test.go | 39 ++++++++++++++---------- contract_create_transaction_e2e_test.go | 4 ++- contract_delete_transaction_e2e_test.go | 5 +-- contract_execute_transaction_e2e_test.go | 20 +++++++----- contract_info_query_e2e_test.go | 15 ++++++--- contract_update_transaction_e2e_test.go | 7 +++-- 7 files changed, 67 insertions(+), 41 deletions(-) diff --git a/contract_bytecode_query_e2e_test.go b/contract_bytecode_query_e2e_test.go index 8a4e03405..47e6a01b4 100644 --- a/contract_bytecode_query_e2e_test.go +++ b/contract_bytecode_query_e2e_test.go @@ -32,7 +32,7 @@ func TestIntegrationContractBytecodeQueryCanExecute(t *testing.T) { contractResponse, err := NewContractCreateTransaction(). SetAdminKey(env.OperatorKey). SetNodeAccountIDs([]AccountID{resp.NodeID}). - SetGas(75000). + SetGas(100000). SetConstructorParameters(NewContractFunctionParameters().AddString("Hello from Hedera.")). SetBytecodeFileID(fileID). SetContractMemo("[e2e::ContractCreateTransaction]"). @@ -60,6 +60,7 @@ func TestIntegrationContractBytecodeQueryCanExecute(t *testing.T) { resp, err = NewContractDeleteTransaction(). SetContractID(contractID). + SetTransferAccountID(env.Client.GetOperatorAccountID()). SetNodeAccountIDs([]AccountID{resp.NodeID}). Execute(env.Client) require.NoError(t, err) @@ -101,7 +102,7 @@ func TestIntegrationContractBytecodeQueryGetCostExecute(t *testing.T) { contractResponse, err := NewContractCreateTransaction(). SetAdminKey(env.OperatorKey). SetNodeAccountIDs([]AccountID{resp.NodeID}). - SetGas(75000). + SetGas(100000). SetConstructorParameters(NewContractFunctionParameters().AddString("Hello from Hedera.")). SetBytecodeFileID(fileID). SetContractMemo("[e2e::ContractCreateTransaction]"). @@ -132,6 +133,7 @@ func TestIntegrationContractBytecodeQueryGetCostExecute(t *testing.T) { resp, err = NewContractDeleteTransaction(). SetContractID(contractID). + SetTransferAccountID(env.Client.GetOperatorAccountID()). SetNodeAccountIDs([]AccountID{resp.NodeID}). Execute(env.Client) require.NoError(t, err) @@ -173,7 +175,7 @@ func TestIntegrationContractBytecodeQuerySetBigMaxPayment(t *testing.T) { contractResponse, err := NewContractCreateTransaction(). SetAdminKey(env.OperatorKey). SetNodeAccountIDs([]AccountID{resp.NodeID}). - SetGas(75000). + SetGas(100000). SetConstructorParameters(NewContractFunctionParameters().AddString("Hello from Hedera.")). SetBytecodeFileID(fileID). SetContractMemo("[e2e::ContractCreateTransaction]"). @@ -204,6 +206,7 @@ func TestIntegrationContractBytecodeQuerySetBigMaxPayment(t *testing.T) { resp, err = NewContractDeleteTransaction(). SetContractID(contractID). + SetTransferAccountID(env.Client.GetOperatorAccountID()). SetNodeAccountIDs([]AccountID{resp.NodeID}). Execute(env.Client) require.NoError(t, err) @@ -245,7 +248,7 @@ func TestIntegrationContractBytecodeQuerySetSmallMaxPayment(t *testing.T) { contractResponse, err := NewContractCreateTransaction(). SetAdminKey(env.OperatorKey). SetNodeAccountIDs([]AccountID{resp.NodeID}). - SetGas(75000). + SetGas(100000). SetConstructorParameters(NewContractFunctionParameters().AddString("Hello from Hedera.")). SetBytecodeFileID(fileID). SetContractMemo("[e2e::ContractCreateTransaction]"). @@ -276,6 +279,7 @@ func TestIntegrationContractBytecodeQuerySetSmallMaxPayment(t *testing.T) { resp, err = NewContractDeleteTransaction(). SetContractID(contractID). + SetTransferAccountID(env.Client.GetOperatorAccountID()). SetNodeAccountIDs([]AccountID{resp.NodeID}). Execute(env.Client) require.NoError(t, err) @@ -317,7 +321,7 @@ func TestIntegrationContractBytecodeQueryInsufficientFee(t *testing.T) { contractResponse, err := NewContractCreateTransaction(). SetAdminKey(env.OperatorKey). SetNodeAccountIDs([]AccountID{resp.NodeID}). - SetGas(75000). + SetGas(100000). SetConstructorParameters(NewContractFunctionParameters().AddString("Hello from Hedera.")). SetBytecodeFileID(fileID). SetContractMemo("[e2e::ContractCreateTransaction]"). @@ -348,6 +352,7 @@ func TestIntegrationContractBytecodeQueryInsufficientFee(t *testing.T) { resp, err = NewContractDeleteTransaction(). SetContractID(contractID). + SetTransferAccountID(env.Client.GetOperatorAccountID()). SetNodeAccountIDs([]AccountID{resp.NodeID}). Execute(env.Client) require.NoError(t, err) @@ -389,7 +394,7 @@ func TestIntegrationContractBytecodeQueryNoContractID(t *testing.T) { contractResponse, err := NewContractCreateTransaction(). SetAdminKey(env.OperatorKey). SetNodeAccountIDs([]AccountID{resp.NodeID}). - SetGas(75000). + SetGas(100000). SetConstructorParameters(NewContractFunctionParameters().AddString("Hello from Hedera.")). SetBytecodeFileID(fileID). SetContractMemo("[e2e::ContractCreateTransaction]"). @@ -417,6 +422,7 @@ func TestIntegrationContractBytecodeQueryNoContractID(t *testing.T) { resp, err = NewContractDeleteTransaction(). SetContractID(contractID). + SetTransferAccountID(env.Client.GetOperatorAccountID()). SetNodeAccountIDs([]AccountID{resp.NodeID}). Execute(env.Client) require.NoError(t, err) diff --git a/contract_call_query_e2e_test.go b/contract_call_query_e2e_test.go index c7661a4b5..72e17d4ae 100644 --- a/contract_call_query_e2e_test.go +++ b/contract_call_query_e2e_test.go @@ -32,7 +32,7 @@ func TestIntegrationContractCallQueryCanExecute(t *testing.T) { resp, err = NewContractCreateTransaction(). SetAdminKey(env.OperatorKey.PublicKey()). SetNodeAccountIDs([]AccountID{resp.NodeID}). - SetGas(75000). + SetGas(100000). SetConstructorParameters(NewContractFunctionParameters().AddString("Hello from Hedera.")). SetBytecodeFileID(fileID). SetContractMemo("[e2e::ContractCreateTransaction]"). @@ -52,7 +52,7 @@ func TestIntegrationContractCallQueryCanExecute(t *testing.T) { SetNodeAccountIDs([]AccountID{resp.NodeID}). SetContractID(contractID). SetQueryPayment(NewHbar(1)). - SetGas(75000). + SetGas(100000). SetFunction("getMessage", nil). SetMaxQueryPayment(NewHbar(5)). Execute(env.Client) @@ -63,7 +63,7 @@ func TestIntegrationContractCallQueryCanExecute(t *testing.T) { resp, err = NewContractExecuteTransaction(). SetContractID(contractID). SetNodeAccountIDs([]AccountID{resp.NodeID}). - SetGas(75000). + SetGas(100000). SetFunction("setMessage", NewContractFunctionParameters().AddString("new message")). Execute(env.Client) require.NoError(t, err) @@ -76,7 +76,7 @@ func TestIntegrationContractCallQueryCanExecute(t *testing.T) { SetNodeAccountIDs([]AccountID{resp.NodeID}). SetMaxQueryPayment(NewHbar(2)). SetQueryPayment(NewHbar(1)). - SetGas(75000). + SetGas(100000). SetFunction("getMessage", nil). Execute(env.Client) require.NoError(t, err) @@ -85,6 +85,7 @@ func TestIntegrationContractCallQueryCanExecute(t *testing.T) { resp, err = NewContractDeleteTransaction(). SetContractID(contractID). + SetTransferAccountID(env.Client.GetOperatorAccountID()). SetNodeAccountIDs([]AccountID{resp.NodeID}). Execute(env.Client) require.NoError(t, err) @@ -126,7 +127,7 @@ func TestIntegrationContractCallQueryGetCost(t *testing.T) { resp, err = NewContractCreateTransaction(). SetAdminKey(env.OperatorKey.PublicKey()). SetNodeAccountIDs([]AccountID{resp.NodeID}). - SetGas(75000). + SetGas(100000). SetConstructorParameters(NewContractFunctionParameters().AddString("Hello from Hedera.")). SetBytecodeFileID(fileID). SetContractMemo("[e2e::ContractCreateTransaction]"). @@ -146,7 +147,7 @@ func TestIntegrationContractCallQueryGetCost(t *testing.T) { SetNodeAccountIDs([]AccountID{resp.NodeID}). SetContractID(contractID). SetMaxQueryPayment(NewHbar(1)). - SetGas(75000). + SetGas(100000). SetFunction("getMessage", nil) cost, err := callQuery.GetCost(env.Client) @@ -157,6 +158,7 @@ func TestIntegrationContractCallQueryGetCost(t *testing.T) { resp, err = NewContractDeleteTransaction(). SetContractID(contractID). + SetTransferAccountID(env.Client.GetOperatorAccountID()). SetNodeAccountIDs([]AccountID{resp.NodeID}). Execute(env.Client) require.NoError(t, err) @@ -198,7 +200,7 @@ func TestIntegrationContractCallQuerySetMaxPaymentBig(t *testing.T) { resp, err = NewContractCreateTransaction(). SetAdminKey(env.OperatorKey.PublicKey()). SetNodeAccountIDs([]AccountID{resp.NodeID}). - SetGas(75000). + SetGas(100000). SetConstructorParameters(NewContractFunctionParameters().AddString("Hello from Hedera.")). SetBytecodeFileID(fileID). SetContractMemo("[e2e::ContractCreateTransaction]"). @@ -218,7 +220,7 @@ func TestIntegrationContractCallQuerySetMaxPaymentBig(t *testing.T) { SetNodeAccountIDs([]AccountID{resp.NodeID}). SetContractID(contractID). SetMaxQueryPayment(NewHbar(10000)). - SetGas(75000). + SetGas(100000). SetFunction("getMessage", nil) _, err = callQuery.GetCost(env.Client) @@ -229,6 +231,7 @@ func TestIntegrationContractCallQuerySetMaxPaymentBig(t *testing.T) { resp, err = NewContractDeleteTransaction(). SetContractID(contractID). + SetTransferAccountID(env.Client.GetOperatorAccountID()). SetNodeAccountIDs([]AccountID{resp.NodeID}). Execute(env.Client) require.NoError(t, err) @@ -270,7 +273,7 @@ func TestIntegrationContractCallQuerySetSmallMaxPayment(t *testing.T) { resp, err = NewContractCreateTransaction(). SetAdminKey(env.OperatorKey.PublicKey()). SetNodeAccountIDs([]AccountID{resp.NodeID}). - SetGas(75000). + SetGas(100000). SetConstructorParameters(NewContractFunctionParameters().AddString("Hello from Hedera.")). SetBytecodeFileID(fileID). SetContractMemo("[e2e::ContractCreateTransaction]"). @@ -290,7 +293,7 @@ func TestIntegrationContractCallQuerySetSmallMaxPayment(t *testing.T) { SetNodeAccountIDs([]AccountID{resp.NodeID}). SetContractID(contractID). SetMaxQueryPayment(HbarFromTinybar(1)). - SetGas(75000). + SetGas(100000). SetFunction("getMessage", nil) cost, err := callQuery.GetCost(env.Client) @@ -303,6 +306,7 @@ func TestIntegrationContractCallQuerySetSmallMaxPayment(t *testing.T) { resp, err = NewContractDeleteTransaction(). SetContractID(contractID). + SetTransferAccountID(env.Client.GetOperatorAccountID()). SetNodeAccountIDs([]AccountID{resp.NodeID}). Execute(env.Client) require.NoError(t, err) @@ -344,7 +348,7 @@ func TestIntegrationContractCallQueryInsufficientFee(t *testing.T) { resp, err = NewContractCreateTransaction(). SetAdminKey(env.Client.GetOperatorPublicKey()). SetNodeAccountIDs([]AccountID{resp.NodeID}). - SetGas(75000). + SetGas(100000). SetConstructorParameters(NewContractFunctionParameters().AddString("Hello from Hedera.")). SetBytecodeFileID(fileID). SetContractMemo("[e2e::ContractCreateTransaction]"). @@ -364,7 +368,7 @@ func TestIntegrationContractCallQueryInsufficientFee(t *testing.T) { SetNodeAccountIDs([]AccountID{resp.NodeID}). SetContractID(contractID). SetMaxQueryPayment(NewHbar(1)). - SetGas(75000). + SetGas(100000). SetFunction("getMessage", nil) _, err = callQuery.GetCost(env.Client) @@ -377,6 +381,7 @@ func TestIntegrationContractCallQueryInsufficientFee(t *testing.T) { resp, err = NewContractDeleteTransaction(). SetContractID(contractID). + SetTransferAccountID(env.Client.GetOperatorAccountID()). SetNodeAccountIDs([]AccountID{resp.NodeID}). Execute(env.Client) require.NoError(t, err) @@ -401,7 +406,7 @@ func TestIntegrationContractCallQueryNoContractID(t *testing.T) { env := NewIntegrationTestEnv(t) _, err := NewContractCallQuery(). - SetGas(75000). + SetGas(100000). SetNodeAccountIDs(env.NodeAccountIDs). // test getCost SetFunction("getMessage", nil). @@ -436,7 +441,7 @@ func TestIntegrationContractCallQueryNoGas(t *testing.T) { resp, err = NewContractCreateTransaction(). SetAdminKey(env.OperatorKey.PublicKey()). SetNodeAccountIDs([]AccountID{resp.NodeID}). - SetGas(75000). + SetGas(100000). SetConstructorParameters(NewContractFunctionParameters().AddString("Hello from Hedera.")). SetBytecodeFileID(fileID). SetContractMemo("[e2e::ContractCreateTransaction]"). @@ -465,6 +470,7 @@ func TestIntegrationContractCallQueryNoGas(t *testing.T) { resp, err = NewContractDeleteTransaction(). SetContractID(contractID). + SetTransferAccountID(env.Client.GetOperatorAccountID()). SetNodeAccountIDs([]AccountID{resp.NodeID}). Execute(env.Client) require.NoError(t, err) @@ -506,7 +512,7 @@ func TestIntegrationContractCallQueryNoFunction(t *testing.T) { resp, err = NewContractCreateTransaction(). SetAdminKey(env.OperatorKey.PublicKey()). SetNodeAccountIDs([]AccountID{resp.NodeID}). - SetGas(75000). + SetGas(100000). SetConstructorParameters(NewContractFunctionParameters().AddString("Hello from Hedera.")). SetBytecodeFileID(fileID). SetContractMemo("[e2e::ContractCreateTransaction]"). @@ -525,7 +531,7 @@ func TestIntegrationContractCallQueryNoFunction(t *testing.T) { _, err = NewContractCallQuery(). SetNodeAccountIDs([]AccountID{resp.NodeID}). SetContractID(contractID). - SetGas(75000). + SetGas(100000). SetQueryPayment(NewHbar(1)). // test getCost Execute(env.Client) @@ -536,6 +542,7 @@ func TestIntegrationContractCallQueryNoFunction(t *testing.T) { resp, err = NewContractDeleteTransaction(). SetContractID(contractID). + SetTransferAccountID(env.Client.GetOperatorAccountID()). SetNodeAccountIDs([]AccountID{resp.NodeID}). Execute(env.Client) require.NoError(t, err) diff --git a/contract_create_transaction_e2e_test.go b/contract_create_transaction_e2e_test.go index 52c76a03d..a8e6f8f7f 100644 --- a/contract_create_transaction_e2e_test.go +++ b/contract_create_transaction_e2e_test.go @@ -48,6 +48,7 @@ func TestIntegrationContractCreateTransactionCanExecute(t *testing.T) { resp, err = NewContractDeleteTransaction(). SetContractID(contractID). + SetTransferAccountID(env.Client.GetOperatorAccountID()). SetNodeAccountIDs([]AccountID{resp.NodeID}). Execute(env.Client) require.NoError(t, err) @@ -116,6 +117,7 @@ func TestIntegrationContractCreateTransactionNoAdminKey(t *testing.T) { resp, err = NewContractDeleteTransaction(). SetContractID(contractID). + SetTransferAccountID(env.Client.GetOperatorAccountID()). SetNodeAccountIDs([]AccountID{resp.NodeID}). Execute(env.Client) require.NoError(t, err) @@ -208,7 +210,7 @@ func TestIntegrationContractCreateTransactionNoBytecodeFileID(t *testing.T) { resp, err = NewContractCreateTransaction(). SetAdminKey(env.Client.GetOperatorPublicKey()). SetNodeAccountIDs([]AccountID{resp.NodeID}). - SetGas(75000). + SetGas(100000). Execute(env.Client) require.NoError(t, err) diff --git a/contract_delete_transaction_e2e_test.go b/contract_delete_transaction_e2e_test.go index 8fc0a1e9f..ea6950ae5 100644 --- a/contract_delete_transaction_e2e_test.go +++ b/contract_delete_transaction_e2e_test.go @@ -35,7 +35,7 @@ func TestIntegrationContractDeleteTransactionCanExecute(t *testing.T) { resp, err = NewContractCreateTransaction(). SetAdminKey(env.Client.GetOperatorPublicKey()). - SetGas(75000). + SetGas(100000). SetNodeAccountIDs([]AccountID{resp.NodeID}). SetConstructorParameters(NewContractFunctionParameters().AddString("hello from hedera")). SetBytecodeFileID(fileID). @@ -51,6 +51,7 @@ func TestIntegrationContractDeleteTransactionCanExecute(t *testing.T) { resp, err = NewContractDeleteTransaction(). SetContractID(contractID). + SetTransferAccountID(env.Client.GetOperatorAccountID()). SetNodeAccountIDs([]AccountID{resp.NodeID}). Execute(env.Client) require.NoError(t, err) @@ -104,7 +105,7 @@ func TestIntegrationContractDeleteTransactionNoContractID(t *testing.T) { resp, err = NewContractCreateTransaction(). SetAdminKey(env.Client.GetOperatorPublicKey()). - SetGas(75000). + SetGas(100000). SetNodeAccountIDs([]AccountID{resp.NodeID}). SetConstructorParameters(NewContractFunctionParameters().AddString("hello from hedera")). SetBytecodeFileID(fileID). diff --git a/contract_execute_transaction_e2e_test.go b/contract_execute_transaction_e2e_test.go index e2b4b477d..6f4ac0431 100644 --- a/contract_execute_transaction_e2e_test.go +++ b/contract_execute_transaction_e2e_test.go @@ -33,7 +33,7 @@ func TestIntegrationContractExecuteTransactionCanExecute(t *testing.T) { resp, err = NewContractCreateTransaction(). SetAdminKey(env.Client.GetOperatorPublicKey()). - SetGas(75000). + SetGas(100000). SetNodeAccountIDs([]AccountID{resp.NodeID}). SetConstructorParameters(NewContractFunctionParameters().AddString("hello from hedera")). SetBytecodeFileID(fileID). @@ -50,7 +50,7 @@ func TestIntegrationContractExecuteTransactionCanExecute(t *testing.T) { resp, err = NewContractExecuteTransaction(). SetContractID(contractID). SetNodeAccountIDs([]AccountID{resp.NodeID}). - SetGas(75000). + SetGas(100000). SetFunction("setMessage", NewContractFunctionParameters().AddString("new message")). Execute(env.Client) require.NoError(t, err) @@ -60,6 +60,7 @@ func TestIntegrationContractExecuteTransactionCanExecute(t *testing.T) { resp, err = NewContractDeleteTransaction(). SetContractID(contractID). + SetTransferAccountID(env.Client.GetOperatorAccountID()). SetNodeAccountIDs([]AccountID{resp.NodeID}). Execute(env.Client) require.NoError(t, err) @@ -84,7 +85,7 @@ func TestIntegrationContractExecuteTransactionNoContractID(t *testing.T) { env := NewIntegrationTestEnv(t) _, err := NewContractExecuteTransaction(). - SetGas(75000). + SetGas(100000). SetNodeAccountIDs(env.NodeAccountIDs). SetFunction("setMessage", NewContractFunctionParameters().AddString("new message")). Execute(env.Client) @@ -116,7 +117,7 @@ func TestIntegrationContractExecuteTransactionNoGas(t *testing.T) { resp, err = NewContractCreateTransaction(). SetAdminKey(env.Client.GetOperatorPublicKey()). - SetGas(75000). + SetGas(100000). SetNodeAccountIDs([]AccountID{resp.NodeID}). SetConstructorParameters(NewContractFunctionParameters().AddString("hello from hedera")). SetBytecodeFileID(fileID). @@ -145,6 +146,7 @@ func TestIntegrationContractExecuteTransactionNoGas(t *testing.T) { resp, err = NewContractDeleteTransaction(). SetContractID(contractID). + SetTransferAccountID(env.Client.GetOperatorAccountID()). SetNodeAccountIDs([]AccountID{resp.NodeID}). Execute(env.Client) require.NoError(t, err) @@ -187,7 +189,7 @@ func TestIntegrationContractExecuteTransactionNoFunction(t *testing.T) { resp, err = NewContractCreateTransaction(). SetAdminKey(env.Client.GetOperatorPublicKey()). - SetGas(75000). + SetGas(100000). SetNodeAccountIDs([]AccountID{resp.NodeID}). SetConstructorParameters(NewContractFunctionParameters().AddString("hello from hedera")). SetBytecodeFileID(fileID). @@ -203,7 +205,7 @@ func TestIntegrationContractExecuteTransactionNoFunction(t *testing.T) { resp, err = NewContractExecuteTransaction(). SetContractID(contractID). - SetGas(75000). + SetGas(100000). SetNodeAccountIDs([]AccountID{resp.NodeID}). Execute(env.Client) require.NoError(t, err) @@ -216,6 +218,7 @@ func TestIntegrationContractExecuteTransactionNoFunction(t *testing.T) { resp, err = NewContractDeleteTransaction(). SetContractID(contractID). + SetTransferAccountID(env.Client.GetOperatorAccountID()). SetNodeAccountIDs([]AccountID{resp.NodeID}). Execute(env.Client) require.NoError(t, err) @@ -263,7 +266,7 @@ func DisabledTestIntegrationContractExecuteTransactionID(t *testing.T) { // noli resp, err = NewContractCreateTransaction(). SetAdminKey(env.Client.GetOperatorPublicKey()). - SetGas(75000). + SetGas(100000). SetNodeAccountIDs([]AccountID{resp.NodeID}). SetConstructorParameters(NewContractFunctionParameters().AddString("hello from hedera")). SetBytecodeFileID(fileID). @@ -280,7 +283,7 @@ func DisabledTestIntegrationContractExecuteTransactionID(t *testing.T) { // noli resp, err = NewContractExecuteTransaction(). SetContractID(contractID). SetNodeAccountIDs([]AccountID{resp.NodeID}). - SetGas(75000). + SetGas(100000). SetFunction("setMessage", NewContractFunctionParameters().AddString("new message")). Execute(env.Client) require.NoError(t, err) @@ -296,6 +299,7 @@ func DisabledTestIntegrationContractExecuteTransactionID(t *testing.T) { // noli resp, err = NewContractDeleteTransaction(). SetContractID(contractID). + SetTransferAccountID(env.Client.GetOperatorAccountID()). SetNodeAccountIDs([]AccountID{resp.NodeID}). Execute(env.Client) require.NoError(t, err) diff --git a/contract_info_query_e2e_test.go b/contract_info_query_e2e_test.go index 64b04313a..5c0b691a2 100644 --- a/contract_info_query_e2e_test.go +++ b/contract_info_query_e2e_test.go @@ -35,7 +35,7 @@ func TestIntegrationContractInfoQueryCanExecute(t *testing.T) { resp, err = NewContractCreateTransaction(). SetAdminKey(env.Client.GetOperatorPublicKey()). - SetGas(75000). + SetGas(100000). SetNodeAccountIDs([]AccountID{resp.NodeID}). SetConstructorParameters(NewContractFunctionParameters().AddString("hello from hedera")). SetBytecodeFileID(fileID). @@ -63,6 +63,7 @@ func TestIntegrationContractInfoQueryCanExecute(t *testing.T) { resp, err = NewContractDeleteTransaction(). SetContractID(contractID). + SetTransferAccountID(env.Client.GetOperatorAccountID()). SetNodeAccountIDs([]AccountID{resp.NodeID}). Execute(env.Client) require.NoError(t, err) @@ -107,7 +108,7 @@ func TestIntegrationContractInfoQueryGetCost(t *testing.T) { resp, err = NewContractCreateTransaction(). SetAdminKey(env.Client.GetOperatorPublicKey()). - SetGas(75000). + SetGas(100000). SetNodeAccountIDs([]AccountID{resp.NodeID}). SetConstructorParameters(NewContractFunctionParameters().AddString("hello from hedera")). SetBytecodeFileID(fileID). @@ -138,6 +139,7 @@ func TestIntegrationContractInfoQueryGetCost(t *testing.T) { resp, err = NewContractDeleteTransaction(). SetContractID(contractID). + SetTransferAccountID(env.Client.GetOperatorAccountID()). SetNodeAccountIDs([]AccountID{resp.NodeID}). Execute(env.Client) require.NoError(t, err) @@ -182,7 +184,7 @@ func TestIntegrationContractInfoQuerySetBigMaxPayment(t *testing.T) { resp, err = NewContractCreateTransaction(). SetAdminKey(env.Client.GetOperatorPublicKey()). - SetGas(75000). + SetGas(100000). SetNodeAccountIDs([]AccountID{resp.NodeID}). SetConstructorParameters(NewContractFunctionParameters().AddString("hello from hedera")). SetBytecodeFileID(fileID). @@ -213,6 +215,7 @@ func TestIntegrationContractInfoQuerySetBigMaxPayment(t *testing.T) { resp, err = NewContractDeleteTransaction(). SetContractID(contractID). + SetTransferAccountID(env.Client.GetOperatorAccountID()). SetNodeAccountIDs([]AccountID{resp.NodeID}). Execute(env.Client) require.NoError(t, err) @@ -257,7 +260,7 @@ func TestIntegrationContractInfoQuerySetSmallMaxPayment(t *testing.T) { resp, err = NewContractCreateTransaction(). SetAdminKey(env.Client.GetOperatorPublicKey()). - SetGas(75000). + SetGas(100000). SetNodeAccountIDs([]AccountID{resp.NodeID}). SetConstructorParameters(NewContractFunctionParameters().AddString("hello from hedera")). SetBytecodeFileID(fileID). @@ -286,6 +289,7 @@ func TestIntegrationContractInfoQuerySetSmallMaxPayment(t *testing.T) { resp, err = NewContractDeleteTransaction(). SetContractID(contractID). + SetTransferAccountID(env.Client.GetOperatorAccountID()). SetNodeAccountIDs([]AccountID{resp.NodeID}). Execute(env.Client) require.NoError(t, err) @@ -330,7 +334,7 @@ func TestIntegrationContractInfoQueryInsufficientFee(t *testing.T) { resp, err = NewContractCreateTransaction(). SetAdminKey(env.Client.GetOperatorPublicKey()). - SetGas(75000). + SetGas(100000). SetNodeAccountIDs([]AccountID{resp.NodeID}). SetConstructorParameters(NewContractFunctionParameters().AddString("hello from hedera")). SetBytecodeFileID(fileID). @@ -359,6 +363,7 @@ func TestIntegrationContractInfoQueryInsufficientFee(t *testing.T) { resp, err = NewContractDeleteTransaction(). SetContractID(contractID). + SetTransferAccountID(env.Client.GetOperatorAccountID()). SetNodeAccountIDs([]AccountID{resp.NodeID}). Execute(env.Client) require.NoError(t, err) diff --git a/contract_update_transaction_e2e_test.go b/contract_update_transaction_e2e_test.go index 9c7cd4459..eb701a275 100644 --- a/contract_update_transaction_e2e_test.go +++ b/contract_update_transaction_e2e_test.go @@ -34,7 +34,7 @@ func TestIntegrationContractUpdateTransactionCanExecute(t *testing.T) { resp, err = NewContractCreateTransaction(). SetAdminKey(env.Client.GetOperatorPublicKey()). - SetGas(75000). + SetGas(100000). SetNodeAccountIDs([]AccountID{resp.NodeID}). SetConstructorParameters(NewContractFunctionParameters().AddString("hello from hedera")). SetBytecodeFileID(fileID). @@ -63,7 +63,7 @@ func TestIntegrationContractUpdateTransactionCanExecute(t *testing.T) { assert.Equal(t, info.AccountID.String(), contractID.String()) assert.NotNil(t, info.AdminKey) assert.Equal(t, info.AdminKey.String(), env.Client.GetOperatorPublicKey().String()) - assert.Equal(t, info.Storage, uint64(523)) + assert.Equal(t, info.Storage, uint64(0x40)) assert.Equal(t, info.ContractMemo, "[e2e::ContractCreateTransaction]") resp, err = NewContractUpdateTransaction(). @@ -90,11 +90,12 @@ func TestIntegrationContractUpdateTransactionCanExecute(t *testing.T) { assert.Equal(t, info.AccountID.String(), contractID.String()) assert.NotNil(t, info.AdminKey) assert.Equal(t, info.AdminKey.String(), env.Client.GetOperatorPublicKey().String()) - assert.Equal(t, info.Storage, uint64(523)) + assert.Equal(t, info.Storage, uint64(0x40)) assert.Equal(t, info.ContractMemo, "[e2e::ContractUpdateTransaction]") resp, err = NewContractDeleteTransaction(). SetContractID(contractID). + SetTransferAccountID(env.Client.GetOperatorAccountID()). SetNodeAccountIDs([]AccountID{resp.NodeID}). Execute(env.Client) require.NoError(t, err)