alephium / alephium-nft

Prototype for NFT Marketplace on Alephium
6 stars 7 forks source link

Update NFT contracts #12

Closed polarker closed 1 year ago

Lbqds commented 1 year ago

I reviewed the contracts, LGTM, only one minor question, do we need to add a withdraw function to the NFTMarketPlace contract?

@using(assetsInContract = true)
pub fn withdraw(to: Address, amount: U256) -> () {
  checkCaller!(callerAddress!() == admin, ErrorCodes.AdminAllowedOnly)
  transferTokenFromSelf!(to, ALPH, amount)
}
h0ngcha0 commented 1 year ago

@using(assetsInContract = true) pub fn withdraw(to: Address, amount: U256) -> () { checkCaller!(callerAddress!() == admin, ErrorCodes.AdminAllowedOnly) transferTokenFromSelf!(to, ALPH, amount) }

Sounds good :+1: