Search Apps Documentation Source Content File Folder Download Copy Actions Download

z5c_transfer_filetest.gno

0.96 Kb · 30 lines
 1// PKGPATH: gno.land/r/aib/main
 2package main
 3
 4import (
 5	"time"
 6
 7	tmtesting "gno.land/p/aib/ibc/lightclient/tendermint/testing"
 8	"gno.land/p/aib/ibc/types"
 9
10	"gno.land/r/aib/ibc/apps/transfer"
11	"gno.land/r/aib/ibc/core"
12)
13
14// TransferGRC20: token not found in grc20reg
15func main(cur realm) {
16	var (
17		chainID        = "chain-id-2"
18		clientState    = tmtesting.NewClientState(chainID, types.NewHeight(2, 2))
19		apphash        = tmtesting.Hash("apphash")
20		trustedValset  = tmtesting.GenValset()
21		consensusState = tmtesting.GenConsensusState(time.Now(), apphash, trustedValset.Hash())
22	)
23	clientID := core.CreateClient(cross(cur), clientState, consensusState)
24	core.RegisterCounterparty(cross(cur), clientID, [][]byte{[]byte("iavlStoreKey"), []byte("prefix2")}, "07-tendermint-2")
25
26	transfer.Transfer(cross(cur), clientID, "atone1user", "gno.land/r/unknown/token", 100, uint64(time.Now().Add(time.Hour).Unix()), "")
27}
28
29// Error:
30// GRC20 token gno.land/r/unknown/token not found in grc20reg