swap-kiwi-contracts 1.0.2
Install from the command line:
Learn more about npm packages
$ npm install @niftyhorde/swap-kiwi-contracts@1.0.2
Install via package.json:
"@niftyhorde/swap-kiwi-contracts": "1.0.2"
About this version
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 typings -
lint
- Runs solhint on current project -
clean
- Clears the cache and deletes all artifacts -
compile
- Compiles the entire project, building all artifacts -
deploy:local
- Run deploy script on localhost -
console
- Opens a buidler console -
coverage
- Generates a code coverage report for tests -
flatten
- Flattens and prints all contracts and their dependencies -
help
- Prints available commands -
node
- Starts a JSON-RPC server on top of Buidler EVM -
script
- Runs a user-defined script after compiling the project -
test:localhost
- Runs mocha tests -
test:ci
- Runs gas check and solidity coverage -
test:gas
- Runs gas check -
test:coverage
- Runs solidity coverage -
typechain
- 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
Details
- swap-kiwi-contracts
- niftyhorde
- about 2 years ago
- SEE LICENSE IN LICENSE
- 29 dependencies
Assets
- swap-kiwi-contracts-1.0.2.tgz
Download activity
- Total downloads 280
- Last 30 days 3
- Last week 0
- Today 0