Skip to content
This repository has been archived by the owner on Aug 31, 2024. It is now read-only.

Commit

Permalink
set_value
Browse files Browse the repository at this point in the history
  • Loading branch information
Lawliet-Chan committed Jan 31, 2024
1 parent 03ebcf7 commit 3a839f1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cairoVM/invoke.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

var (
contractMethod string = "increase_value"
contractMethod string = "set_value"
)

func NewInvoke() (*core.InvokeTransaction, error) {
Expand All @@ -22,12 +22,12 @@ func NewInvoke() (*core.InvokeTransaction, error) {
// Converting the contractAddress from hex to felt
contractAddress := new(felt.Felt).SetUint64(2)

// randata := new(felt.Felt).SetUint64(111)
params := new(felt.Felt).SetUint64(111)
// Building the functionCall struct, where :
FnCall := rpc.FunctionCall{
ContractAddress: contractAddress, //contractAddress is the contract that we want to call
EntryPointSelector: utils.GetSelectorFromNameFelt(contractMethod), //this is the function that we want to call
// Calldata: []*felt.Felt{randata}, //this is the data that we want to pass to the function
Calldata: []*felt.Felt{params}, //this is the data that we want to pass to the function
}

txCallData := account.FmtCallDataCairo2([]rpc.FunctionCall{FnCall})
Expand Down

0 comments on commit 3a839f1

Please sign in to comment.