Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

get_resource_limits() in privileged api should be accessed by everyone #5319

@qimiaoguo

Description

@qimiaoguo

Now only the privileged account can access the privileged api, this is true.
However, I think the get_resource_limits should be take out of it because it is just a get-action.

Two reasons:

  1. My contract can know how much ram or net or cpu has been used when an inline action is executed, then it can decide if to accept it or not.
  2. When transfer token to others, if others' account take your ram, then you can monitor it and let the transfer fail.

Now we can only get account usage with the RPC, but not in the contract, is it right?

Metadata

Metadata

Assignees

No one assigned

    Labels

    CONSENSUSIntroduces a change that may modify consensus protocol rules on an existing blockchain.enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions