aergoio / aergo

aergo blockchain kernel
http://docs.aergo.io
MIT License
214 stars 45 forks source link

fix hardfork version on child Lua state #223

Closed kroggen closed 1 year ago

kroggen commented 1 year ago

Current code is using hardfork version 2 when a new contract is deployed by an existing contract, via contract.deploy()

This fix makes the new Lua state to have the same hardfork version as the parent Lua state

kroggen commented 1 year ago

This change probably affects the gas computation on transactions that deploy a contract, like ARC1 and ARC2 factories, so a sync test is required