Contracts for the cryptoxmas.xyz. Includes:
- Escrow contract with buy and claim logic
- NFT token (ERC721 Enumerable + Mintable)
- Sender buys Christmas Card (NFT) by sending ETH to an escrow Smart Contract. (Optionally sender can add more ETH for receiver)
- Escrow Smart Contract mints NFT and keeps it in the escrow
- Smart Contract sends small amount (0.01 eth) to ephemeral account, rest of NFT price to Giveth campaign as a donation and leaves ETH above the NFT price for receiver to claim in escrow.
- Sender shares claim link, which contains private key for ephemeral account, with receiver
- Receiver submits claim transaction from the address generated by the private key in the claim link.
- The escrow Smart Contract transfers the Christmas Card (NFT) and optional ether to the receiver’s address
- NodeJS v10.12.0
- Yarn 1.10.1
Install libs:
yarn
Waffle is used to build and test contracts - https://github.com/EthWorks/Waffle
To build contracts run:
yarn waffle
To test:
yarn test
WIP
GPL-3 Liscense