provenance-io / provenance

A distributed, proof of stake blockchain designed for the financial services industry.
https://provenance.io
Apache License 2.0
89 stars 39 forks source link

Marker feegrants not working #2110

Closed SpicyLemon closed 3 months ago

SpicyLemon commented 3 months ago

Summary of Bug

Marker funds cannot be used to pay for fees via a feegrant.

Version

v1.19.1

Steps to Reproduce

  1. Create a coin marker with zero supply, and send some nhash to it. This is the same setup we use for our hash grants.
  2. Use the marker module's GrantAllowance endpoint to create a feegrant that another address can use to spend some (or all) of the nhash in that marker.
  3. Attempt to do a transaction with the marker address as the fee-granter.

You'll get an error that looks like this:

cannot withdraw from marker account pb1zueukfejxrvurmrqup9sgqwfwfyra7mygz9f34 (grant0077): account: pb1zueukfejxrvurmrqup9sgqwfwfyra7mygz9f34: insufficient funds

In the marker module's send restriction, when the from address is a marker, we currently require a transfer agent. If there is no transfer agent, that "cannot withdraw from marker account ..." error is returned.


For Admin Use