Skip to content

Commit

Permalink
Add SNS canister interfaces.
Browse files Browse the repository at this point in the history
  • Loading branch information
q-uint committed Apr 10, 2024
1 parent 01b5e61 commit 45e26fa
Show file tree
Hide file tree
Showing 16 changed files with 4,824 additions and 2 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ gen:

gen-ic:
go run ic/testdata/gen.go
go run ic/sns/testdata/gen.go

fmt:
go mod tidy
Expand Down
4 changes: 2 additions & 2 deletions gen/templates/agent.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ import (
type {{ .Name }} {{ if .Eq }}= {{end}}{{ .Type }}
{{- end }}

// Agent is a client for the "{{ .CanisterName }}" canister.
// {{ .AgentName }}Agent is a client for the "{{ .CanisterName }}" canister.
type {{ .AgentName }}Agent struct {
a *agent.Agent
canisterId principal.Principal
}

// NewAgent creates a new agent for the "{{ .CanisterName }}" canister.
// New{{ .AgentName }}Agent creates a new agent for the "{{ .CanisterName }}" canister.
func New{{ .AgentName }}Agent(canisterId principal.Principal, config agent.Config) (*{{ .AgentName }}Agent, error) {
a, err := agent.New(config)
if err != nil {
Expand Down
Loading

0 comments on commit 45e26fa

Please sign in to comment.