Skip to content Search Apps Documentation Source Content Run Reset Eval Playground File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

z_policy_literal_filetest.gno

0.49 Kb · 14 lines
 1// PKGPATH: gno.land/r/demo/lending
 2package lending
 3
 4// Pins the VM rule that makes Custom() necessary: another realm cannot
 5// allocate a Bouncer-declared type with a composite literal.
 6
 7import bouncer "gno.land/r/g19wmd95cwm3s0w0c5592tgu3zh4zgrtlggvugnj/bouncer/v0"
 8
 9func main(cur realm) {
10	_ = bouncer.Check("gno.land/r/demo/vault", bouncer.Policy{MinScore: 10})
11}
12
13// Error:
14// cannot allocate gno.land/r/g19wmd95cwm3s0w0c5592tgu3zh4zgrtlggvugnj/bouncer/v0.Policy in realm gno.land/r/demo/lending