Change GAS Limit

You might want to play with the GAS limit in your local deployment, so you can test your solutions using a GAS limit equivalent to what you will have in the Mainnet according to your membership.

Clone Repository

If you haven’t cloned the following repository yet, please clone this repository now. It contains all the code necessary to send a transaction and change gas limit.

				
					$ git clone https://github.com/LACNetNetworks/samples.git
				
			

Now download all the necessary dependencies:

				
					$ cd samples/local
$ yarn install (If you haven’t done it yet)
				
			

Send Transaction to Change GAS Limit

To change the GAS limit, you need to send a transaction. Please execute the following script (you will be setting it to 10M per block with this transaction, which you can modify as it please you):

				
					$ node changeGasLimit.js --gasLimit=10000000
				
			

Where gasLimit will be the new value set to gas limit on your local node.

You will see your transaction sent and a new gas limit value set into the smart contract like this:

				
					Tx hash: 0x936b7a20ce1da316ed31160751fb31f5fb7eec60ca968b16f845089edf5a44ee
New GasLimit set: 10000000

				
			

That’s all. You have sent a transaction and changed the gas limit value on your local node. Now you can play with it as much as you want.

Next Steps

Now that you have finish this tutorial, you are ready to join the LACChain ProTestnets and Mainnet. Learn more about Our Networks and Deploy a Node!

Copyright 2024 © All rights Reserved. Designed by LACNet