Techiio-author
Started by Sidhdarth BasuMay 20, 2022

Open
Why do sender and minter should be same on minting NFT ?

10 VIEWES 0 LIKES 0 DISLIKES SHARE
0 LIKES 0 DISLIKES 10 VIEWES SHARE

someone please tell me why I will do this.

1 Replies

Techiio-commentatorPOULAMI SARKAR replied 3 months ago0 likes0 dislikes

I am developing NFT marketplace with terra and I use CW721. And I noticed on mint function if the sender and minter is not equal it returns "Unauthorized" error.

pub fn mint(
&self,
deps: DepsMut,
_env: Env,
info: MessageInfo,
msg: MintMsg<T>,
) -> Result<Response<C>, ContractError> {
let minter = self.minter.load(deps.storage)?;

if info.sender != minter {
return Err(ContractError::Unauthorized {});
}
...
}

In Javascript with Terra.js I sent request with my wallet address. But if the sender and minter must be same, I have to send request with minter's wallet address. And that means NFT creator should know the password of minter's wallet.

You must be Logged in to reply
Techiio-logo

Techiio is on the journey to build an ocean of technical knowledge, scouring the emerging stars in process and proffering them to the corporate world.

Follow us on:

Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Developed and maintained by Wikiance
Developed and maintained by Wikiance