Skip to content

Latest commit

 

History

History

contracts

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Payment channel

payment channel smart contract setup that supports all ERC20 tokens

Prerequisite

Test

An ERC20 token called MockToken is setup for testing

forge install foundry-rs/forge-std --no-commit
forge install openzeppelin/openzeppelin-contracts --no-commit
forge test

Build

forge build -o build

Deployment

To deploy on testnet/mainnet, you can use the scripts/Deploy.s.sol script -- see forge documentation for details on using scripts. Afterwards, hardcode the contract addresses as defaults for the Publisher client (and/or provider client), or, better yet commit the ./broadcast folder and take the contract addresses from there -- or, potentially even better, use ENS to resolve the payment/registry contracts.