When I create public getters committed code my contract exceeds code size limit

0 votes

I am pushing JSONs received from various services in the contract as well as final quote/price. The contract doesn't calculate anything, it just records every step of the pricing workflow unique to a primary customer.
The issue is that the data structures are large and I need all the info in the ledger. However, I can't do automatic public getter as it cannot accommodate more than 7 items in structure.
When I create public getters (committed code), my contract exceeds the code size limit. What should be my solution?

 

Dec 31, 2018 in Blockchain by slayer
• 29,370 points
730 views

1 answer to this question.

0 votes

Are you pushing info one by one or in a batch? I suggest you to push in a batch to reduce the amount of gas charged, in doing so you need to store the transactions temporary in a DB (MYSQL DB) and then push the same into Blockchain. Pushing info into ledger then gets easy, call web3 API and push the info that's it.

answered Dec 31, 2018 by Omkar
• 69,220 points

Related Questions In Blockchain

0 votes
1 answer

How can I deploy a HelloWorld contract on my testrpc network?

The problem lies in the command: truffle migrate Your truffle migrate command ...READ MORE

answered Apr 27, 2018 in Blockchain by Perry
• 17,100 points

edited Aug 10, 2018 by Omkar 2,885 views
0 votes
1 answer
0 votes
1 answer

What if Gas required in my program exceeds the limit of 3000000?

Going through your code, I noticed that  you ...READ MORE

answered May 29, 2018 in Blockchain by Perry
• 17,100 points
819 views
0 votes
1 answer

How to limit execution of smart contract only to my dapp?

You can use modifiers to do it ...READ MORE

answered Jul 17, 2018 in Blockchain by digger
• 26,740 points
670 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,942 views
+1 vote
3 answers

Removing double quotes from a string from JSON response in PHP

Just remove the json_encode call, and it should work: $resp ...READ MORE

answered Sep 12, 2018 in Blockchain by digger
• 26,740 points
45,295 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,468 views
0 votes
1 answer
0 votes
1 answer

How can i import the csv/excel files into my contract and record the transaction ?

You can not directly import an excel/csv ...READ MORE

answered Apr 16, 2019 in Blockchain by Omkar
• 69,220 points
3,689 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP