-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
231 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,8 +7,9 @@ jobs: | |
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21.0' | ||
- uses: aviate-labs/[email protected].0 | ||
- uses: aviate-labs/[email protected].1 | ||
with: | ||
dfx-version: 0.18.0 | ||
pocketic-version: 3.0.1 | ||
- run: mv ic/testdata/networks.json $HOME/.config/dfx/networks.json | ||
- run: make test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// Package pocketic provides a client for the "hello" canister. | ||
// Do NOT edit this file. It was automatically generated by https://github.com/aviate-labs/agent-go. | ||
package pocketic_test | ||
|
||
import ( | ||
"github.com/aviate-labs/agent-go" | ||
|
||
"github.com/aviate-labs/agent-go/principal" | ||
) | ||
|
||
// Agent is a client for the "hello" canister. | ||
type Agent struct { | ||
a *agent.Agent | ||
canisterId principal.Principal | ||
} | ||
|
||
// NewAgent creates a new agent for the "hello" canister. | ||
func NewAgent(canisterId principal.Principal, config agent.Config) (*Agent, error) { | ||
a, err := agent.New(config) | ||
if err != nil { | ||
return nil, err | ||
} | ||
return &Agent{ | ||
a: a, | ||
canisterId: canisterId, | ||
}, nil | ||
} | ||
|
||
// HelloQuery calls the "helloQuery" method on the "hello" canister. | ||
func (a Agent) HelloQuery(arg0 string) (*string, error) { | ||
var r0 string | ||
if err := a.a.Query( | ||
a.canisterId, | ||
"helloQuery", | ||
[]any{arg0}, | ||
[]any{&r0}, | ||
); err != nil { | ||
return nil, err | ||
} | ||
return &r0, nil | ||
} | ||
|
||
// HelloUpdate calls the "helloUpdate" method on the "hello" canister. | ||
func (a Agent) HelloUpdate(arg0 string) (*string, error) { | ||
var r0 string | ||
if err := a.a.Call( | ||
a.canisterId, | ||
"helloUpdate", | ||
[]any{arg0}, | ||
[]any{&r0}, | ||
); err != nil { | ||
return nil, err | ||
} | ||
return &r0, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.