Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

gpushv2.gno

0.43 Kb · 14 lines
 1package gpushv2
 2
 3import (
 4	factory "gno.land/r/g1n4pl5uc4yt5r96m9w6fmdznx3x0jyg8l6arhmt/bazaar/bazaarv5"
 5)
 6
 7// Sync writes one wallet's Genesis FeeDiscount into factory.HolderDiscount.
 8// Called from the Genesis collection on mint/transfer. Previous realm is this pusher.
 9func Sync(cur realm, owner string, bps int64) {
10	if !cur.Previous().IsCode() {
11		panic("gpush: collection realm")
12	}
13	factory.NoteHolderDiscount(cross(cur), owner, bps)
14}