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.

withdraw_limit_filetest.gno

0.47 Kb · 18 lines
 1// PKGPATH: gno.land/r/test/withdrawfixture/main
 2
 3package main
 4
 5import (
 6	"testing"
 7
 8	"gno.land/r/g132vz03ycpaagtef4jmxjakstkppgyc5wn3r807/erratabank/v0"
 9)
10
11func main(cur realm) {
12	testing.SetRealm(testing.NewUserRealm(address("g1dmt3sa5ucvecxuhf3j6ne5r0e3z4x7h6c03xc0")))
13	bookID := erratabank.CreateBook(cross(cur), "Book", "First", "https://example.org/book", 1)
14	erratabank.Withdraw(cross(cur), bookID, 1)
15}
16
17// Error:
18// withdrawal must be positive and within available escrow