@@ -26,6 +26,7 @@ import (
26
26
"github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Depth"
27
27
"github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/ERC20"
28
28
"github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/EmitLog"
29
+ "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Log0"
29
30
"github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Memory"
30
31
"github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/OpCallAux"
31
32
"github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Revert2"
@@ -883,3 +884,72 @@ func sendEthTransfersWithoutWaiting(t *testing.T, ctx context.Context, client *e
883
884
log .Debugf ("sending eth transfer: %v" , signedTx .Hash ().String ())
884
885
}
885
886
}
887
+
888
+ func prepareLog0 (t * testing.T , ctx context.Context , auth * bind.TransactOpts , client * ethclient.Client ) (map [string ]interface {}, error ) {
889
+ _ , tx , sc , err := Log0 .DeployLog0 (auth , client )
890
+ require .NoError (t , err )
891
+
892
+ err = operations .WaitTxToBeMined (ctx , client , tx , operations .DefaultTimeoutTxToBeMined )
893
+ require .NoError (t , err )
894
+
895
+ return map [string ]interface {}{
896
+ "sc" : sc ,
897
+ }, nil
898
+ }
899
+
900
+ func createLog0AllZeros (t * testing.T , ctx context.Context , auth * bind.TransactOpts , client * ethclient.Client , customData map [string ]interface {}) (* ethTypes.Transaction , error ) {
901
+ scInterface := customData ["sc" ]
902
+ sc := scInterface .(* Log0.Log0 )
903
+
904
+ gasPrice , err := client .SuggestGasPrice (ctx )
905
+ require .NoError (t , err )
906
+
907
+ opts := * auth
908
+ opts .NoSend = true
909
+ opts .Value = big .NewInt (0 ).SetUint64 (txValue )
910
+ opts .GasPrice = gasPrice
911
+ opts .GasLimit = fixedTxGasLimit
912
+
913
+ tx , err := sc .OpLog0 (& opts )
914
+ require .NoError (t , err )
915
+
916
+ return tx , nil
917
+ }
918
+
919
+ func createLog0Empty (t * testing.T , ctx context.Context , auth * bind.TransactOpts , client * ethclient.Client , customData map [string ]interface {}) (* ethTypes.Transaction , error ) {
920
+ scInterface := customData ["sc" ]
921
+ sc := scInterface .(* Log0.Log0 )
922
+
923
+ gasPrice , err := client .SuggestGasPrice (ctx )
924
+ require .NoError (t , err )
925
+
926
+ opts := * auth
927
+ opts .NoSend = true
928
+ opts .Value = big .NewInt (0 ).SetUint64 (txValue )
929
+ opts .GasPrice = gasPrice
930
+ opts .GasLimit = fixedTxGasLimit
931
+
932
+ tx , err := sc .OpLog00 (& opts )
933
+ require .NoError (t , err )
934
+
935
+ return tx , nil
936
+ }
937
+
938
+ func createLog0Short (t * testing.T , ctx context.Context , auth * bind.TransactOpts , client * ethclient.Client , customData map [string ]interface {}) (* ethTypes.Transaction , error ) {
939
+ scInterface := customData ["sc" ]
940
+ sc := scInterface .(* Log0.Log0 )
941
+
942
+ gasPrice , err := client .SuggestGasPrice (ctx )
943
+ require .NoError (t , err )
944
+
945
+ opts := * auth
946
+ opts .NoSend = true
947
+ opts .Value = big .NewInt (0 ).SetUint64 (txValue )
948
+ opts .GasPrice = gasPrice
949
+ opts .GasLimit = fixedTxGasLimit
950
+
951
+ tx , err := sc .OpLog01 (& opts )
952
+ require .NoError (t , err )
953
+
954
+ return tx , nil
955
+ }
0 commit comments