someone please tell me why I will do this.
1 Replies
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.