From e3a8dcc5bc62f4c12a00cbf94eb934217dee3c55 Mon Sep 17 00:00:00 2001 From: Qiang Zhou Date: Wed, 31 Jan 2024 14:17:40 +0800 Subject: [PATCH] add invoke Signed-off-by: Qiang Zhou --- cairoVM/cmd/main.go | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/cairoVM/cmd/main.go b/cairoVM/cmd/main.go index 89eda94..c04b4b5 100644 --- a/cairoVM/cmd/main.go +++ b/cairoVM/cmd/main.go @@ -1,9 +1,10 @@ package main import ( + "testbot/cairoVM" + "github.com/NethermindEth/juno/core/felt" "github.com/davecgh/go-spew/spew" - "testbot/cairoVM" // "github.com/NethermindEth/juno/core" ) @@ -35,4 +36,17 @@ func main() { } spew.Dump(trace) + invokeContract := "0x2" + + invokeTx, err := cairoVM.NewInvoke(invokeContract) + if err != nil { + panic(err) + } + + trace, err = vm.HandleInvokeTx(invokeTx) // Assuming there is a HandleInvokeTx function + if err != nil { + panic(err) + } + spew.Dump(trace) + }