Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(banker): Add TotalCoin reference #2661

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions docs/reference/stdlibs/std/banker.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type Banker interface {
SendCoins(from, to Address, coins Coins)
IssueCoin(addr Address, denom string, amount int64)
RemoveCoin(addr Address, denom string, amount int64)
TotalCoin(denom string) int64
}
```

Expand All @@ -28,10 +29,10 @@ Returns `Banker` of the specified type.

#### Parameters
- `BankerType` - type of Banker to get:
- `BankerTypeReadonly` - read-only access to coin balances
- `BankerTypeOrigSend` - full access to coins sent with the transaction that calls the banker
- `BankerTypeRealmSend` - full access to coins that the realm itself owns, including the ones sent with the transaction
- `BankerTypeRealmIssue` - able to issue new coins
- `BankerTypeReadonly` - read-only access to coin balances
- `BankerTypeOrigSend` - full access to coins sent with the transaction that calls the banker
- `BankerTypeRealmSend` - full access to coins that the realm itself owns, including the ones sent with the transaction
- `BankerTypeRealmIssue` - able to issue new coins

#### Usage

Expand Down Expand Up @@ -94,3 +95,16 @@ Removes (burns) `amount` of coin with a denomination `denom` from address `addr`
```go
banker.RemoveCoin(addr, denom, amount)
```

---

## TotalCoin
Returns the total supply of coin with denomination `denom`.

#### Parameters
- `denom` **string** denomination of coin to get the total supply of

#### Usage
```go
banker.TotalCoin(denom)
```
Loading