assertIsRlmCurrent
func(int, rlm .uverse.realm)- OID
- 0b8694…2e59:3
assertIsRlmCurrent details
isAllowedBatchInstruction
func(opcode uint8) boolisAllowedBatchInstruction reports whether opcode may appear in a batch.
- OID
- 0b8694…2e59:5
isAllowedBatchInstruction details
callSuccessAck
func() (types.RecvPacketResult, .uverse.error)callSuccessAck builds the empty success acknowledgement a completed call writes.
- OID
- 0b8694…2e59:7
callSuccessAck details
safeCallOnZkgm
func(int, rlm .uverse.realm, receiver zkgm.Zkgmable, env zkgm.CallEnv) (err .uverse.error, panicked bool)safeCallOnZkgm runs the receiver and reports a failure as panicked=true. revive is preferred since it also catches cross-realm aborts. The recover fallback, used only when revive is unsupported, catches ordinary panics.
- OID
- 0b8694…2e59:9
safeCallOnZkgm details
safeCallOnIntentZkgm
func(int, rlm .uverse.realm, receiver zkgm.Zkgmable, env zkgm.IntentCallEnv) (err .uverse.error, panicked bool)safeCallOnIntentZkgm runs the receiver's intent callback and reports a failure as panicked=true, mirroring safeCallOnZkgm for the OnIntentZkgm path.
- OID
- 0b8694…2e59:10
safeCallOnIntentZkgm details
canRevive
func() ok boolcanRevive reports whether revive works in the current runtime. revive panics rather than returning when the interpreter lacks support for it.
- OID
- 0b8694…2e59:11
canRevive details
callErrAck
func(int, rlm .uverse.realm, err .uverse.error) types.RecvPacketResultcallErrAck encodes err as a failure acknowledgement for the call.
- OID
- 0b8694…2e59:12
callErrAck details
ChannelBalanceKeyV2
func(channelId types.ChannelId, path *uint256.Uint, baseToken []uint8, quoteToken []uint8) stringChannelBalanceKeyV2 returns the storage key for a v2 channel balance entry.
- OID
- 0b8694…2e59:13
ChannelBalanceKeyV2 details
ibcDenomPrefix
untyped stringibcDenomPrefix is the prefix of wrapped IBC voucher denoms (mirrors z.PredictWrappedToken\*). Used to detect and trim wrapped denoms.
Value
"ibc/"
IBC_TOKEN
untyped bigintValue
(0 <untyped> bigint)
GRC20_TOKEN
untyped bigintValue
(1 <untyped> bigint)
NATIVE_COIN
untyped bigintValue
(2 <untyped> bigint)
isIBCTokenDenom
func(denom string) bool- OID
- 0b8694…2e59:15
isIBCTokenDenom details
getTokenType
func(denom string) int- OID
- 0b8694…2e59:17
getTokenType details
parseCoins
func(s string) chain.CoinsparseCoins parses a comma-separated \<amount>\<denom> string into Coins.
- OID
- 0b8694…2e59:18
parseCoins details
funds
typefunds is the gno analog of the reference contract's threaded \`funds: &mut Coins\` (the message's attached coins). It is decremented as each token order consumes its BaseAmount during verification.
Value
v1.funds
newFunds
func(sent chain.Coins) *v1.fundsnewFunds snapshots the attached coins into a mutable spend budget.
- OID
- 0b8694…2e59:19
newFunds details
execFatal
typeexecFatal is a sentinel panic value. Unlike ordinary panics, values of this type are re-panicked by the recover handler so the VM can observe the failure after transaction rollback.
Value
v1.execFatal
decodeOrderInstruction
func(instruction zkgm.Instruction) (zkgm.TokenOrderV2, .uverse.error)decodeOrderInstruction decodes a v2 token order, rejecting unsupported instruction versions.
- OID
- 0b8694…2e59:20
decodeOrderInstruction details
decodeCallInstruction
func(instruction zkgm.Instruction) (zkgm.Call, .uverse.error)decodeCallInstruction decodes a call, rejecting unsupported instruction versions.
- OID
- 0b8694…2e59:22
decodeCallInstruction details
decodeBatchInstruction
func(instruction zkgm.Instruction) (zkgm.Batch, .uverse.error)decodeBatchInstruction decodes a batch, rejecting unsupported instruction versions.
- OID
- 0b8694…2e59:23
decodeBatchInstruction details
decodeForwardInstruction
func(instruction zkgm.Instruction) (zkgm.Forward, .uverse.error)decodeForwardInstruction decodes a forward, rejecting unsupported instruction versions.
- OID
- 0b8694…2e59:24
decodeForwardInstruction details
mustEncodeUniversalErrorAck
func() []uint8mustEncodeUniversalErrorAck returns the ABI-encoded failure acknowledgement \`z.Ack{Tag: TAG\_ACK\_FAILURE, InnerAck: empty}\` that zkgm-internal recv failures emit. The empty inner ack matches union's \`Ack{tag: TAG\_ACK\_FAILURE, inner\_ack: Default::default()}\`; the encoded Ack itself is non-empty, satisfying core's non-empty acknowledgement requirement.
- OID
- 0b8694…2e59:25
mustEncodeUniversalErrorAck details
failureResult
func(ack []uint8) types.RecvPacketResultfailureResult wraps an ack as a failed recv result.
- OID
- 0b8694…2e59:26
failureResult details
universalErrorAck
func() []uint8universalErrorAck returns the cached sentinel error acknowledgement.
- OID
- 0b8694…2e59:27
universalErrorAck details
tokenOrderDestinationChannel
func(channelId types.ChannelId) (uint32, .uverse.error)tokenOrderDestinationChannel rejects the zero-channel sentinel so the derived destChan is safe to feed into UpdateChannelPath / PopChannelFromPath without colliding with the "no channel" slot. This mirrors the TokenOrder path helper's channel-zero rejection.
- OID
- 0b8694…2e59:28
tokenOrderDestinationChannel details
isOnlyMakerAck
func(ack []uint8) boolisOnlyMakerAck reports whether ack is the only-maker sentinel.
- OID
- 0b8694…2e59:29
isOnlyMakerAck details
extractPanicMessage
func(r interface{...}) stringextractPanicMessage renders a recovered panic value as a string.
- OID
- 0b8694…2e59:30
extractPanicMessage details
errUnsupportedOpcode
untyped stringvalues; build them with makeError at the call site (see above).
Value
"unsupported opcode"
errUnsupportedTokenOrderVersion
untyped stringvalues; build them with makeError at the call site (see above).
Value
"unsupported token order version"
errUnsupportedCallVersion
untyped stringvalues; build them with makeError at the call site (see above).
Value
"unsupported call version"
errUnsupportedBatchVersion
untyped stringvalues; build them with makeError at the call site (see above).
Value
"unsupported batch version"
errUnsupportedForwardVersion
untyped stringvalues; build them with makeError at the call site (see above).
Value
"unsupported forward version"
errInvalidUnescrow
untyped stringvalues; build them with makeError at the call site (see above).
Value
"invalid token order unescrow"
errTokenOrderFeeUnderflow
untyped stringvalues; build them with makeError at the call site (see above).
Value
"token order fee underflow: quote amount exceeds base amount"
errUnknownTokenOrderKind
untyped stringvalues; build them with makeError at the call site (see above).
Value
"unknown token order kind"
errUnknownFillType
untyped stringvalues; build them with makeError at the call site (see above).
Value
"unknown fill type"
errUnsupportedTokenOrderKindForAck
untyped stringvalues; build them with makeError at the call site (see above).
Value
"unsupported token order kind for ack"
errUnsupportedTokenOrderKindForRefund
untyped stringvalues; build them with makeError at the call site (see above).
Value
"unsupported token order kind for refund"
errSolveNotImplemented
untyped stringvalues; build them with makeError at the call site (see above).
Value
"solve token order not implemented"
errInvalidTokenOrderDestChannel
untyped stringvalues; build them with makeError at the call site (see above).
Value
"invalid token order destination channel"
errInvalidTokenOrderTransferAmount
untyped stringvalues; build them with makeError at the call site (see above).
Value
"invalid token order transfer amount"
errMetadataDecimalsMismatch
untyped stringvalues; build them with makeError at the call site (see above).
Value
"token order: metadata decimals do not match the local token"
errEurekaUnsupported
untyped stringvalues; build them with makeError at the call site (see above).
Value
"eureka mode not supported"
errInvalidCallSender
untyped stringvalues; build them with makeError at the call site (see above).
Value
"invalid call sender"
errReceiverNotRegistered
untyped stringvalues; build them with makeError at the call site (see above).
Value
"receiver not registered"
errIsOnlyMakerAck
untyped stringvalues; build them with makeError at the call site (see above).
Value
"is only maker ack"
errInvalidForwardInstruction
untyped stringvalues; build them with makeError at the call site (see above).
Value
"invalid forward instruction"
errForwardMissingPrevDest
untyped stringvalues; build them with makeError at the call site (see above).
Value
"forward missing previous destination channel"
errForwardMissingNextSource
untyped stringvalues; build them with makeError at the call site (see above).
Value
"forward missing next source channel"
errForwardPrevDestMismatch
untyped stringvalues; build them with makeError at the call site (see above).
Value
"forward previous-destination mismatch"
errForwardZeroTimeout
untyped stringvalues; build them with makeError at the call site (see above).
Value
"forward timeout timestamp must be non-zero"
errInvalidBatchInstruction
untyped stringvalues; build them with makeError at the call site (see above).
Value
"invalid batch instruction"
errBatchAckCountMismatch
untyped stringvalues; build them with makeError at the call site (see above).
Value
"batch ack count mismatch"
errAmountOverflow
untyped stringvalues; build them with makeError at the call site (see above).
Value
"amount overflows int64"
errVoucherNotFound
untyped stringvalues; build them with makeError at the call site (see above).
Value
"voucher not found"
errVoucherSymbolAlreadyRegistered
untyped stringvalues; build them with makeError at the call site (see above).
Value
"voucher symbol already registered under a different denom"
errTokenBucketAbsent
untyped stringvalues; build them with makeError at the call site (see above).
Value
"token bucket is absent"
errCoinMismatch
untyped stringvalues; build them with makeError at the call site (see above).
Value
"zkgm/coins: sent coin mismatch"
errChannelBalanceUnderflow
untyped stringvalues; build them with makeError at the call site (see above).
Value
"zkgm/channel_balance: underflow"
errChannelBalanceOverflow
untyped stringvalues; build them with makeError at the call site (see above).
Value
"zkgm/channel_balance: overflow"
errSpoofedRealm
untyped stringvalues; build them with makeError at the call site (see above).
Value
"rlm does not match the current crossing frame"
makeError
func(msgs []string) .uverse.error- OID
- 0b8694…2e59:31
makeError details
forwardInFlightKey
func(packet types.Packet) stringforwardInFlightKey derives the in-flight key from the child packet's commitment hash.
- OID
- 0b8694…2e59:33
forwardInFlightKey details
buildForwardChild
func(packet types.Packet, path *uint256.Uint, parentSalt [32]uint8, forward zkgm.Forward) (types.Packet, .uverse.error)buildForwardChild builds the next-hop packet, advancing the channel path and namespacing the salt.
- OID
- 0b8694…2e59:35
buildForwardChild details
isAllowedForwardInstruction
func(opcode uint8) boolisAllowedForwardInstruction reports whether opcode may be forwarded.
- OID
- 0b8694…2e59:36
isAllowedForwardInstruction details
cloneTokenBucket
func(bucket *tokenbucket.TokenBucket) *tokenbucket.TokenBucket- OID
- 0b8694…2e59:37
cloneTokenBucket details
ucs03ZkgmV1
typeucs03ZkgmV1 is the v1 implementation of the zkgm app. It holds the injected proxy state (zkgm.IStore) and contains all the protocol logic; the proxy keeps only the stable identity, the escrow funds, and the swap point. State writes go through the store's borrow-rule setters: v.store.SetXXX(0, rlm, ...).
Value
v1.ucs03ZkgmV1
NewUCS03ZkgmV1
func(store ucs03_zkgm.IStore) ucs03_zkgm.IAppNewUCS03ZkgmV1 constructs a fresh v1 impl bound to the injected store.
- OID
- 0b8694…2e59:39
NewUCS03ZkgmV1 details
enforceVersion
func(version string)enforceVersion rejects channels that do not speak the zkgm protocol version.
- OID
- 0b8694…2e59:41
enforceVersion details
init.70
func()- OID
- 0b8694…2e59:42
init.70 details
tagAckSuccess
func() *uint256.UinttagAckSuccess returns a fresh copy of the success ack tag.
- OID
- 0b8694…2e59:44
tagAckSuccess details
tagAckFailure
func() *uint256.Uint- OID
- 0b8694…2e59:46
tagAckFailure details
fillTypeProtocol
func() *uint256.Uint- OID
- 0b8694…2e59:47
fillTypeProtocol details
fillTypeMarketMaker
func() *uint256.Uint- OID
- 0b8694…2e59:48
fillTypeMarketMaker details
isZeroImage
func(image [32]uint8) boolisZeroImage reports whether a metadata image is the zero value, selecting the V1 wrapped-token prediction when true.
- OID
- 0b8694…2e59:49
isZeroImage details
encodeTokenOrderSuccessAck
func(fillType *uint256.Uint, marketMaker []uint8) ([]uint8, .uverse.error)encodeTokenOrderSuccessAck builds a success token-order ack with the given fill type.
- OID
- 0b8694…2e59:50
encodeTokenOrderSuccessAck details
canonicalDecimals
untyped bigintcanonicalDecimals is the ledger precision a wrapped voucher is capped to. A source token with more decimals overflows the grc20 int64 ledger, so its amounts are downscaled to this precision on the way in, and upscaled back on the way out.
Value
(6 <untyped> bigint)
sanitizeVoucherSymbol
func(candidate string, ibcDenom string) stringsanitizeVoucherSymbol derives a grc20-legal symbol (\<=MaxSymbolLen, \[A-Za-z0-9\_-]) from the candidate, falling back to a prefix of the IBC hash when empty.
- OID
- 0b8694…2e59:51
sanitizeVoucherSymbol details
scaleExpForDecimals
func(decimals uint8) intscaleExpForDecimals returns the origin->ledger downscale exponent for \`decimals\`: the low-order digits dropped so the ledger holds canonicalDecimals. Tokens at or below canonicalDecimals return 0. Used at creation to cap the ledger, and by the INITIALIZE pre-flight check before a voucher exists.
- OID
- 0b8694…2e59:53
scaleExpForDecimals details
amountInt64
func(amount *uint256.Uint) (int64, .uverse.error)amountInt64 narrows a uint256 to int64 for the native banker/grc20 paths (no scaling). It is the scaleExp-0 case of the shared downscaler, kept as a named helper for the native call sites (funds.sub, sendNative).
- OID
- 0b8694…2e59:54