github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/docs/assets/how-to-guides/porting-solidity-to-gno/porting-11.gno (about) 1 func AuctionEnd() { 2 if std.GetHeight() < auctionEndBlock { 3 panic("Auction hasn't ended") 4 } 5 6 if ended { 7 panic("Auction has ended") 8 9 } 10 ended = true 11 12 // Send the highest bid to the recipient 13 banker := std.GetBanker(std.BankerTypeRealmSend) 14 pkgAddr := std.GetOrigPkgAddr() 15 16 banker.SendCoins(pkgAddr, receiver, std.Coins{{"ugnot", int64(highestBid)}}) 17 }