Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, To, Value, Data):
super(Clause, self).__init__(To, Value, Data)
fields = [
("To", binary),
("Value", big_endian_int),
("Data", binary),
]
def __init__(self, To, Value, Data):
super(Clause, self).__init__(To, Value, Data)
class ThorTransaction(rlp.Serializable):
fields = [
("ChainTag", big_endian_int),
("BlockRef", big_endian_int),
("Expiration", big_endian_int),
("Clauses", CountableList(Clause)), # []
("GasPriceCoef", big_endian_int),
("Gas", big_endian_int),
("DependsOn", binary), # b""
("Nonce", big_endian_int),
("Reserved", CountableList(object)), # []
("Signature", binary), # b""
]
def __init__(self, chain_tag, blk_ref, eth_tx):
receiver = b"" if "to" not in eth_tx else decode_hex(eth_tx["to"])
clauses = [
Clause(
receiver,
eth_tx.get("value", 0),
decode_hex(eth_tx.get("data", "")),
)
def __init__(self, chain_tag, blk_ref, eth_tx):
receiver = b"" if "to" not in eth_tx else decode_hex(eth_tx["to"])
clauses = [
Clause(
receiver,
eth_tx.get("value", 0),
decode_hex(eth_tx.get("data", "")),
)
]
super(ThorTransaction, self).__init__(chain_tag, blk_ref, (2 ** 32) - 1, clauses, 0, eth_tx.get("gas", 3000000), b"", 0, [], b"")