'Why do sender and minter should be same on minting NFT?
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. I can ignore this condition but is this required?
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.
What's the difference between token_uri and image url? I think they are same.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|