proto.eth.params: new max_data_len attr
This commit is contained in:
parent
0b3982fcbf
commit
8ebc9ac2de
2 changed files with 5 additions and 1 deletions
|
|
@ -40,6 +40,7 @@ class mainnet(CoinProtocol.DummyWIF, CoinProtocol.Secp256k1):
|
|||
address_reuse_ok = True
|
||||
is_vm = True
|
||||
is_evm = True
|
||||
max_data_len = 1024 * 10 # arbitrary value (Token.bin is 3.24 kb)
|
||||
|
||||
# https://www.chainid.dev
|
||||
chain_ids = {
|
||||
|
|
|
|||
|
|
@ -36,7 +36,10 @@ class New(VmNew, Base, TxBase.New):
|
|||
m = "'--contract-data' option may not be used with token transaction"
|
||||
assert 'Token' not in self.name, m
|
||||
with open(self.cfg.contract_data) as fp:
|
||||
self.usr_contract_data = bytes.fromhex(fp.read().strip())
|
||||
data = bytes.fromhex(fp.read().strip())
|
||||
assert len(data) <= self.proto.max_data_len, (
|
||||
f'{len(data)}: data length too large (>{self.proto.max_data_len})')
|
||||
self.usr_contract_data = data
|
||||
self.disable_fee_check = True
|
||||
|
||||
def process_data_output_arg(self, arg):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue