This repository has been archived by the owner on Nov 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 51
invokeTransferFrom() is problem in erc20 example #27
Comments
// getAllowance gets amount of token allowed by wallet owner to spend by spender
func getAllowance(c r.Context, ownerMspId, ownerCertId, spenderMspId, spenderCertId string) (int, error) {
return c.State().GetInt(allowanceKey(ownerMspId, ownerCertId, spenderMspId, spenderCertId), 0)
} in the
|
you're right. I mean, it would be the token owner to
in the
Please reply if I misunderstand. |
you can see example in test https://github.com/s7techlab/cckit/blob/master/examples/erc20/erc20_test.go#L101 |
@vitiko Thanks for answer. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi, I ran the erc20 example and it seems to be a problem with invokeTransferFrom().
allowance, err := getAllowance(c, fromMspId, fromCertId, invoker.GetMSPID(), invoker.GetID())
In the above code, the argument value corresponding to 'from' and the argument value position of 'invoker' seem to be reversed.
Please confirm.
Thanks
The text was updated successfully, but these errors were encountered: