Search Apps Documentation Source Content File Folder Download Copy Actions Download

z3b_send_packet_filetest.gno

0.56 Kb · 28 lines
 1// PKGPATH: gno.land/r/aib/main
 2package main
 3
 4import (
 5	"time"
 6
 7	"gno.land/p/aib/ibc/types"
 8	"gno.land/r/aib/ibc/core"
 9)
10
11// SendPacket fails client not found
12func main(cur realm) {
13	packet := types.MsgSendPacket{
14		SourceClient:     "clientID",
15		TimeoutTimestamp: uint64(time.Now().Unix()),
16		Payloads: []types.Payload{{
17			SourcePort:      "transfer",
18			DestinationPort: "transfer",
19			Encoding:        "application/json",
20			Value:           []byte("{}"),
21			Version:         "v1",
22		}},
23	}
24	core.SendPacket(cross(cur), packet)
25}
26
27// Error:
28// client clientID not found