Is it possible to send array of 2^18 or 262144 numbers of elements as a calldata? How much gas would that cost? Does it even make sense to have that large array in terms of gas cost?

1 Answer 1


An array of 2^18 bytes32 values would require approximately 5 million gas to send as calldata.

In an ideal scenario....no, but I'm not here to define requirements or ask for use cases. I wouldn't recommend it purely based on gas costs.

More practical to store the data in a separate contract or on a decentralized storage platform such as IPFS and access it as needed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.