-
Notifications
You must be signed in to change notification settings - Fork 398
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(stdlibs/std)!: remove
Get
prefixes, extend abbreviations (#3374)
Linked to #1475 - GetCallerAt =>CallerAt - GetOrigSend => OriginSend - origSend => originSend - GetOrigCaller => OriginCaller - origCaller => originCaller - Orig => Origin - Addr => Address - PrevRealm => PreviousRealm - GetChainID => ChainID - GetBanker => NewBanker - GetChainDomain => ChainDomain - GetHeight => Height BREAKING CHANGE: changes many of the existing standard library functions. --------- Co-authored-by: hieu.ha <[email protected]> Co-authored-by: Leon Hudak <[email protected]> Co-authored-by: Morgan Bazalgette <[email protected]>
- Loading branch information
1 parent
ec696d4
commit 0a239e1
Showing
242 changed files
with
1,195 additions
and
1,194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
docs/assets/how-to-guides/porting-solidity-to-gno/porting-3.gno
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 12 additions & 12 deletions
24
docs/assets/how-to-guides/porting-solidity-to-gno/porting-6.gno
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
docs/assets/how-to-guides/porting-solidity-to-gno/porting-8.gno
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
func Withdraw() { | ||
// Query the return amount to non-highest bidders | ||
amount, _ := pendingReturns.Get(std.GetOrigCaller().String()) | ||
amount, _ := pendingReturns.Get(std.OriginCaller().String()) | ||
|
||
if amount > 0 { | ||
// If there's an amount, reset the amount first, | ||
pendingReturns.Set(std.GetOrigCaller().String(), 0) | ||
pendingReturns.Set(std.OriginCaller().String(), 0) | ||
|
||
// Return the exceeded amount | ||
banker := std.GetBanker(std.BankerTypeRealmSend) | ||
pkgAddr := std.GetOrigPkgAddr() | ||
banker := std.NewBanker(std.BankerTypeRealmSend) | ||
pkgAddr := std.OriginPkgAddress() | ||
|
||
banker.SendCoins(pkgAddr, std.GetOrigCaller(), std.Coins{{"ugnot", amount.(int64)}}) | ||
banker.SendCoins(pkgAddr, std.OriginCaller(), std.Coins{{"ugnot", amount.(int64)}}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.