interfaces.gno
0.92 Kb · 37 lines
1package zkgm
2
3import u256 "gno.land/p/onbloc/math/uint256"
4
5// Zkgmable is implemented by realms that receive ZKGM Call instructions
6// dispatched from the ZKGM proxy.
7type Zkgmable interface {
8 // OnZkgm handles a standard ZKGM Call.
9 OnZkgm(cur realm, env CallEnv) error
10
11 // OnIntentZkgm handles the intent-settlement Call variant.
12 OnIntentZkgm(cur realm, env IntentCallEnv) error
13}
14
15type CallEnv struct {
16 Caller string
17 ProxyAccount string
18 Path *u256.Uint
19 SourceChannel string
20 DestinationChannel string
21 Sender []byte
22 Calldata []byte
23 Relayer []byte
24 RelayerMsg []byte
25}
26
27type IntentCallEnv struct {
28 Caller string
29 ProxyAccount string
30 Path *u256.Uint
31 SourceChannel string
32 DestinationChannel string
33 Sender []byte
34 Calldata []byte
35 MarketMaker []byte
36 MarketMakerMsg []byte
37}