Skip to content

Commit

Permalink
fix: tests should check correct gas
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Akhterov <[email protected]>
  • Loading branch information
janaakhterov committed Mar 22, 2022
1 parent 143837c commit 1463de9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion contract_create_transaction_unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func TestUnitMockContractCreateTransaction(t *testing.T) {
params := NewContractFunctionParameters().AddString("hello from hedera")
require.Equal(t, bytes.Compare(bod.ContractCreateInstance.ConstructorParameters, params._Build(nil)), 0)
require.Equal(t, bod.ContractCreateInstance.Memo, "hedera-sdk-go::TestContractCreateTransaction_Execute")
require.Equal(t, bod.ContractCreateInstance.Gas, int64(75000))
require.Equal(t, bod.ContractCreateInstance.Gas, int64(100000))
require.Equal(t, hex.EncodeToString(bod.ContractCreateInstance.AdminKey.GetEd25519()), key.PublicKey().StringRaw())
}

Expand Down
2 changes: 1 addition & 1 deletion contract_execute_transaction_unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func TestUnitMockContractExecuteTransaction(t *testing.T) {

if bod, ok := transactionBody.Data.(*services.TransactionBody_ContractCall); ok {
require.Equal(t, bod.ContractCall.ContractID.GetContractNum(), int64(123))
require.Equal(t, bod.ContractCall.GetGas(), int64(75000))
require.Equal(t, bod.ContractCall.GetGas(), int64(100000))
message := "setMessage"
require.Equal(t, bytes.Compare(bod.ContractCall.FunctionParameters, params._Build(&message)), 0)
}
Expand Down

0 comments on commit 1463de9

Please sign in to comment.