Hey there! I'm suffering from problems with batch transfer function. Can you give me little help please?
The code is like this.
constructor (address _BDAIadress) public {
BDAI = IERC20(_BDAIadress);
owner = msg.sender;
}
function drop(address[] memory recipients, uint256[] memory amount) public onlyOwner {
for (uint256 i = 0; i < recipients.length; i++) {
BDAI.transfer(recipients[i], amount[i]*10**18);
}
}
I tried the code and have seen good result with 3~4 address/small amount of tokens. But when I try to do a massive transfer( around 150 address / x*10**7~8 amount), it fails with error.
Is there proper form to send it? (like ["address1", "address2", .... ] and ["amount1", "amount2",... ] or [address1, address2, ....] and [amount1, amount2, ....]
Or shoud I try to do partial transfers at once? (like upto 10 address)
Thank you for any advice!!