I have created a smart contract function in ethereum. I am unable to use more than four parameters to the function. If a I create a function with more than 4 parameters and call the it by passing arguments , the transaction is getting mined but no event is being triggered and no data is getting saved in the transaction.

Also I am unable to send more than 31 characters per string parameter

So adding gas value while calling the function works. But how do I pre-determine how much of gas I would have to send when calling a function??

P.S. : I am working on a private block chain and using Nethereum's web3 interface and geth to deploy and call the smart contract.


You need to check the gas value you are defining while calling that function. Generally, if you pass a long string as a function argument, You may end up providing more gas for the transaction to get succeed.

Also, I'm using more than 4 arguments in my smart contract function and it works perfectly fine. So I think there is no limit for function arguments unless the gas amount is sufficient.


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