Dapp only shows max of 1000 recipients
Abram
Thanks for flagging this Simon Mullaney - I guess you're the first to make a Split this large. Distributing a balance among this many recipients might bump up against gas block limits.
Will add a ticket to address in the app.
Simon Mullaney
Thanks Abram. The same bug applies to when you download the CSV in the dapp.
Have you any metrics on what is the max size that 0xSplits split can be and still reliably distribute tokens?
Can you batch distribute the tokens in any case, using batchDistributeAndWithdraw() maybe?
Abram
Simon Mullaney: max number recipients depends on the network, since it's a function of gas block limit. On mainnet the max is around 1k recipients (though could go larger w nested splits). Here is a link to a prev version of the docs that highlights gas usage: https://github.com/0xSplits/docs/blob/487daf3490e000fe63306b1f0154273545c2f262/pages/appendices/gas-estimates.mdx
Abram
@Simon Mullaney feel free to drop us a line at support at splits.org as well, happy to help talk through gas usage stuff over email as it would be good to understand your specific use case
William Minshew
Simon Mullaney: the maximum size depends how many of the recipients have previously received the token being distributed. I can try to dig up exact numbers but you should be able to test it fairly easily with foundry or hard hat. I want to say it was something like a little over 1000 if none of the recipients had received the token before and close to 5000 if all of them had
batching withdraws with the distribute fn will increase the gas of the txn (bc of the withdrawals) and so decrease the number of recipients a single call can handle (the recipient limitations are from the block gas limit)
William Minshew
Simon Mullaney: i can't get the hardhat task running atm on my local machine (it's been awhile since we used this repo / task) but if you look in the splits-contracts repo there's a
task/estimateGas.ts
you can use to produce estimates with a local hardhat network running. Maybe you'll have better luck with itSimon Mullaney
Contract address: 0xb5245856CEEc0e43Ca8e7771269bC0800eBB754A
Network: Mumbai