Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 71 additions & 6 deletions src/api/rpcspec/methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,14 @@ func main() {
console.log(transactionStatus);
});
`,
starknetGo: ``,
starknetGo: `${STARKNET_GO_PREFIX}result, err := provider.GetTransactionStatus(context.Background(), "0x7641514f46a77013e80215cdce2e55d5aca49c13428b885c7ecb9d3ddb4ab11")
if err != nil {
log.Fatal(err)
}

fmt.Println(result)
}
`,
starknetRs: ``,
},

Expand All @@ -405,7 +412,14 @@ func main() {
console.log(transaction);
});
`,
starknetGo: ``,
starknetGo: `${STARKNET_GO_PREFIX}result, err := provider.GetTransactionByHash(context.Background(), "0x7641514f46a77013e80215cdce2e55d5aca49c13428b885c7ecb9d3ddb4ab11")
if err != nil {
log.Fatal(err)
}

fmt.Println(result)
}
`,
starknetRs: ``,
},

Expand All @@ -423,7 +437,14 @@ func main() {
console.log(transaction);
});
`,
starknetGo: ``,
starknetGo: `${STARKNET_GO_PREFIX}result, err := provider.GetTransactionByHash(context.Background(), "latest", 0)
if err != nil {
log.Fatal(err)
}

fmt.Println(result)
}
`,
starknetRs: ``,
},

Expand All @@ -437,7 +458,14 @@ func main() {
console.log(transactionReceipt);
});
`,
starknetGo: ``,
starknetGo: `${STARKNET_GO_PREFIX}result, err := provider.GetTransactionReceipt(context.Background(), "0x7641514f46a77013e80215cdce2e55d5aca49c13428b885c7ecb9d3ddb4ab11")
if err != nil {
log.Fatal(err)
}

fmt.Println(result)
}
`,
starknetRs: ``,
},

Expand Down Expand Up @@ -528,7 +556,14 @@ func main() {
console.log(transactionCount);
});
`,
starknetGo: ``,
starknetGo: `${STARKNET_GO_PREFIX}result, err := provider.GetBlockTransactionCount(context.Background(), "latest")
if err != nil {
log.Fatal(err)
}

fmt.Println(result)
}
`,
starknetRs: ``,
},

Expand Down Expand Up @@ -719,7 +754,37 @@ func main() {
},
},
starknetJs: ``,
starknetGo: ``,
starknetGo: `${STARKNET_GO_PREFIX}result, err := provider.GetTransactionStatus(context.Background(),
map[string]interface{}{
"from_block": blockID,
"to_block": blockID,
"address": contractAddress,
"keys": map[string]interface{}{
"placeholder": [][]string{
{
"0x1001e85047571380eed1d7e1cc5a9af6a707b3d65789bb1702c7d680e5e87e",
},
},
"description": "The key to the storage value for the given contract",
"type": "array",
},
"continuation_token": map[string]interface{}{
"placeholder": "",
"description": "The token returned from the previous query. If no token is provided the first page is returned",
},
"chunk_size": map[string]interface{}{
"placeholder": 2,
"description": "The number of events to return",
},
})

if err != nil {
log.Fatal(err)
}

fmt.Println(result)
}
`,
starknetRs: ``,
},

Expand Down