Simple. Safe. Reliable. Your NFT swapping platform.
-
First user starts a swap by calling
proposeSwap
and providing the address of the second user he wants to trade with and arrays of NFT addresses and IDs he wants to trade -> NFTs transferred toSwapKiwi
contract -
Second user can now progress the swap by calling
initiateSwap
with arrays of NFT addresses and IDs he wants to trade -> NFTs transferred toSwapKiwi
contract OR cancel it by callingcancelSwap
-> NFTs transferred back to swap initiator -
First user can now execute the swap by calling
acceptSwap
-> NFTs transferred fromSwapKiwi
to participants OR reject the swap entirely by callingrejectSwap
-> NFTs transferred fromSwapKiwi
to their owners
Following software is required to be installed to use this repo:
- NodeJS >= v14.0.0
This repo also uses dependencies that are associated with Hardhat but not built-in. Third -party plugins:
On first use of this repo, run yarn install
to install all required dependencies.
Then run yarn run build
to set up the repo.
Run yarn run help
to see all available commands:
build
- Compiles the entire project and generates Typechain typingslint
- Runs solhint on current projectclean
- Clears the cache and deletes all artifactscompile
- Compiles the entire project, building all artifactsdeploy:local
- Run deploy script on localhostconsole
- Opens a buidler consolecoverage
- Generates a code coverage report for testsflatten
- Flattens and prints all contracts and their dependencieshelp
- Prints available commandsnode
- Starts a JSON-RPC server on top of Buidler EVMscript
- Runs a user-defined script after compiling the projecttest:localhost
- Runs mocha teststest:ci
- Runs gas check and solidity coveragetest:gas
- Runs gas checktest:coverage
- Runs solidity coveragetypechain
- Generate Typechain typings for compiled contracts
Please check .env.sample
and populate the required variables in the .env
file.
CONTRACT_OWNER_ADDRESS
- address of the contract owner on mainnet (for other networks contract owner is
deployer
) - on deployment, ownership is automatically transferred from deployer to this address
- address of the contract owner on mainnet (for other networks contract owner is