gxchain / gxb-core

GXChain Blockchain implementation
https://www.gxchain.org
GNU General Public License v3.0
226 stars 78 forks source link

Modify update contract logic #172

Closed RootkitKiller closed 5 years ago

RootkitKiller commented 5 years ago

160 更新智能合约逻辑

  1. 更新合约,校验abi和code,只需任意一种不同,便可以更新。

  2. 更新合约手续费调整:base_fee + (new_size - old_size)* price_per_kbyte,合约变小和合约大小不变,则只需支付base_fee。

size差值 = (new_abi_size + new_code_size) - (old_abi_size + old_code_size)