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

Implement get_max_supply STATIC method #129

Closed
1 task done
Tracked by #128 ...
DenisCarriere opened this issue Apr 8, 2024 · 1 comment
Closed
1 task done
Tracked by #128 ...

Implement get_max_supply STATIC method #129

DenisCarriere opened this issue Apr 8, 2024 · 1 comment
Labels

Comments

@DenisCarriere
Copy link
Contributor

DenisCarriere commented Apr 8, 2024

Purpose

Extend eosio.token contract with an additional static method get_max_supply to easily retrieve max supply of a token.

get_max_supply STATIC

static asset get_max_supply( const name& token_contract_account, const symbol_code& sym_code )
 {
    stats statstable( token_contract_account, sym_code.raw() );
    const auto& st = statstable.get( sym_code.raw(), "invalid supply symbol code" );
    return st.max_supply;
 }

References

Note: changes should be pushed to Antelope Reference contracts https://github.com/AntelopeIO/reference-contracts

additional scope

  • get_issuer
@DenisCarriere
Copy link
Contributor Author

Implemented via: AntelopeIO/reference-contracts@bde73bf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

2 participants