-
Notifications
You must be signed in to change notification settings - Fork 11.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend PaymentSplitter to support ERC20 tokens #2858
Conversation
with ERC20 support on top of the existing PaymentSplitter
The |
Glad you all are updating this to paymentsplitter for ERC20s. I did this for AirSwap last month, and released a tutorial (with its own github repo) for others to create their own tokenpaymentsplitter contracts. Will be great when you integrate the ERC20 functionality into the main repo. |
great to have this included in the main repo! |
This PR extends the existing
PaymentSplitter
to add support for ERC20 tokens.New functions and events include:
function totalReleased() public view returns (uint256)
function totalReleased(IERC20 asset) public view returns (uint256)
function released(address account) public view returns (uint256)
function released(IERC20 asset, address account) public view returns (uint256)
function release(address payable account) public
function release(IERC20 asset, address payable account) public
event PaymentReceived(address from, uint256 amount)
event ERC20PaymentReleased(IERC20 indexed asset, address to, uint256 amount)
Fixes #2701, #2762, #2853
PaymentSplitter
can safely be updated to use this new featurePR Checklist