go-bitsong icon indicating copy to clipboard operation
go-bitsong copied to clipboard

EventMetadataAuthorityUpdate and EventMintAuthorityUpdate arguments

Open giorgionocera opened this issue 3 years ago • 1 comments

In the nft module, inside the nft/keeper/metadata.go file, when UpdateMetadataAuthority method is called (if it works as expected) an event of type EventMetadataAuthorityUpdate is emitted. This method expects two parameters https://github.com/bitsongofficial/go-bitsong/blob/84691c819214a1f9b9dd844ea2b49b7ccc8ece1b/proto/bitsong/nft/v1beta1/nft.proto#L115-L118

Which should be the id of the updated Metadata and the new Authority.

It seems that the first argument is wrong. It is passed the sender address and not the Metadata id.

https://github.com/bitsongofficial/go-bitsong/blob/84691c819214a1f9b9dd844ea2b49b7ccc8ece1b/x/nft/keeper/metadata.go#L106-L109

Similarly, it happens for the UpdateMintAuthority method

https://github.com/bitsongofficial/go-bitsong/blob/84691c819214a1f9b9dd844ea2b49b7ccc8ece1b/x/nft/keeper/metadata.go#L125-L128

Is it an error?

giorgionocera avatar Sep 28 '22 19:09 giorgionocera

It's an error, good catch.

ryusmo avatar Sep 30 '22 17:09 ryusmo