This repo contains the smart contract for our project Trustchain Lite!
it has 1 impt class, 3 dicts/states and 5 functions
class/ called message in proto3
- Transfer (basically contains all the transfer info like what token, from who to who, and the status of the transfer, pending or accepted)
dictionary/States:
- transfers: Map of NFT Symbol to Transfer Class
- pending for: Map of User Address to NFT Symbol
- pending by: Map of User Address to NFT Symbol
- ApprovedTransfers: Map of User Address to NFT Symbol
Functions
-
ProposeTransfer input: NFTsymbol, from and to address output: basically creates a new transfer class and updates the dictionaries accordingly
-
AcceptTransfer input: NFT symbol output: basically updates the transfer object to reflect accepted and update the dictionaries accordingly
-
GetPendingProposal input: your address output: shows you all the NFT symbols that you proposed and are pending
-
GetPendingAcceptances input: your address output: shows you all the NFT symbols that other ppl propose to you and are pending your acceptance
-
GetTransfer input: NFT Symbol output: transfer class
-
GetApprovedProposals input: your address output: shows you all the NFT symbols that you proposed to transfer and has been accepted by the other party
-
RemoveApprovedProposal input: your address + NFT symbol output: Removes the NFT symbol from your ApprovedProposals MappedState
- c#