PaymentSplitter testing and WETH; decimal values?

While testing PaymentSplitter on remix (

I wasn't able to replicate a test scenario that simulates WETH management.
From my test it would seem that only integer amounts of ERC20 tokens are sent to the payees;

While I know that all the quantities on ERC20 are managed as int + decimals() I believe I'm missing something, but I cannot find a way to test it on rinkeby/mumbai networks

Have a PaymentSplitter contract as a royalty receiver for listings on marketplaces.

Will it manage WETH or MATIC tokens with decimal values ?
Example: 3 weth to 2 different payees , expected to receive 1.5 weth each

Decimals do not affect the functioning of the contract. This should be handled correctly. How are you testing this?

Remember that the payees need to release their pending payment, they won't receive it automatically.

Hey @frangio thank you for your answer, in the end I just deployed it on polygon and tested there;

The only thing I didn't consider is that weth is not managed as balance on contract but as an ERC20, so anyway it is handled correctly.

Thank you for your work!

1 Like