Search Apps Documentation Source Content File Folder Download Copy Actions Download

zz_send_packet_example_filetest.gno

0.70 Kb · 32 lines
 1// PKGPATH: gno.land/r/aib/main
 2package main
 3
 4import (
 5	"gno.land/p/aib/ibc/types"
 6	"gno.land/r/aib/ibc/core"
 7)
 8
 9func main(cur realm) {
10	var (
11		packet = types.MsgSendPacket{
12			SourceClient:     "",        // XXX update
13			TimeoutTimestamp: uint64(0), // XXX update
14			Payloads: []types.Payload{
15				{
16					SourcePort:      "",           // XXX update
17					DestinationPort: "",           // XXX update
18					Encoding:        "",           // XXX update
19					Value:           []byte("{}"), // XXX update
20					Version:         "",           // XXX update
21				},
22			},
23		}
24	)
25
26	sequence := core.SendPacket(cross(cur), packet)
27
28	println(sequence)
29}
30
31// Error:
32// validate client identifier: identifier cannot be blank