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,040 points
11 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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
• 65,820 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
• 16,450 points

edited Aug 10, 2018 by Omkar 350 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
• 16,450 points
32 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
• 27,620 points
12 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
62 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
• 27,620 points
1,511 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 in Blockchain by Omkar
• 65,820 points
62 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.