Go to file
Oskar Thoren 37b3fc3fbb
Debug contract
2021-02-05 19:14:06 +08:00
contracts Debug contract 2021-02-05 19:14:06 +08:00
scripts Finally get signature verification to match 2021-02-05 18:59:28 +08:00
test Init sample hardhat project 2021-01-28 11:27:27 +08:00
.gitignore Init sample hardhat project 2021-01-28 11:27:27 +08:00
README.md Update README 2021-02-02 12:58:58 +08:00
hardhat.config.js Init sample hardhat project 2021-01-28 11:27:27 +08:00
package-lock.json Add back ethers-eip712 library 2021-02-03 12:20:45 +08:00
package.json Add back ethers-eip712 library 2021-02-03 12:20:45 +08:00

README.md

Minimal Swap PoC

A minimal end to end proof of concept of using Swap contracts written by Swarm and maintained here: https://github.com/ethersphere/swap-swear-and-swindle

All contract code imported from the above repo.

Ported to Hardhat and Ethers.io.

How to run

For scripts there is a script to setup SWAP contracts. To run it and make it persistent we can do the following:

# Run a node
npx hardhat node

# Run script to setup SWAP contracts on local hardhat node
npx hardhat run scripts/setup-swap.js --network localhost

Which will return you a list a list of addresses for ERC20, Alice, Bob, and their respective SWAP contracts. You can then interact with it by running a console:

npx hardhat console --network localhost