Pasos:
-
Set on Coffee Token Handler el address del WrappedCoffeeCoin contract - Done
-
Crear NFT - Done
-
add cooperative to Token Handler function addCooperative(address cooperative) public onlyOwner{ --- mint WrappedCoffeeCoin---
-
En coffee batch NFT, darle approve al contrato de Coffee token Handler Farmer en NFT Contrato-> function approve(address to (CoffeeTokenHandler Contract), uint256 tokenId)
-
La cooperativa le va a dar wrap token wrapCoffee(address _from, uint256 _tokenId) public onlyCooperative() --- burn WrappedCoffeeCoin---
-
En wrapped coffee coin, darle approve al contrato de Coffee token Handler Farmer en Wrapped Contract -> approve(address spender(coffeeHandlerToken), uint256 amount)
-
La cooperativa le va a dar unwrap token function unwrapCoffee(address _from, uint256 _tokenId, uint256 _amount) public onlyCooperative(){