The smart contracts that implement the Decentralized Market Protocol.
This repo contains store registry, relay registry and the payments factory.
nix is used for dependancy managment.
Run nix develop
to enter the devShell.
To create and delopy the contract to a local testnet first
- start anvil and deploy the contract locally run
run-and-deploy
- to redeploy the contract run
deploy-market
rm -rf abis/sol
solc --abi --base-path . --include-path lib/ \
--input-file src/store-reg.sol \
--input-file src/relay-reg.sol \
--input-file src/payment-factory.sol \
-o abis/sol
# overwrite for abis/sol/IERC1155Errors.abi
solc --abi --input-file lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol -o abis/sol --overwrite
abigen --abi abis/sol/StoreReg.abi --pkg main --type RegStore --out abis/go/registry-store.go
abigen --abi abis/sol/RelayReg.abi --pkg main --type RegRelay --out abis/go/registry-relay.go
TODO: need to find a way to include deployed addresses
The TS interface for the ABI is generated by wagmi cli. The generated code will be stored in ./abis/js/src/
To update the code run the following.
cd abis/js
pnpm install
pnpm wagmi generate
forge test --no-auto-detect
- Sepolia
0x0311095a513A8Aa2Ff413a5728e807dA00D4f05D
- Sepolia
0x98bBce2e30c80b5648E6579D9CcC3A5eF639a775
- Sepolia
0xB09631fB4cb86FE2CD0106705E6cB373EE4fC078
GPL-3