def from_dict(cls, data: Dict[str, Any]) -> 'ContractReceiveNewPaymentNetwork': return cls( transaction_hash=deserialize_transactionhash(data['transaction_hash']), payment_network=data['payment_network'], block_number=BlockNumber(int(data['block_number'])), block_hash=BlockHash(deserialize_bytes(data['block_hash'])), )
def from_dict(cls, data: Dict[str, Any]) -> 'ContractReceiveChannelNew': return cls( transaction_hash=deserialize_transactionhash(data['transaction_hash']), channel_state=data['channel_state'], block_number=BlockNumber(int(data['block_number'])), block_hash=BlockHash(deserialize_bytes(data['block_hash'])), )
def from_dict(cls, data: Dict[str, Any]) -> "ContractReceiveChannelNew": return cls( transaction_hash=deserialize_transactionhash( data["transaction_hash"]), channel_state=data["channel_state"], block_number=BlockNumber(int(data["block_number"])), block_hash=BlockHash(deserialize_bytes(data["block_hash"])), )
def from_dict(cls, data: Dict[str, Any]) -> 'ContractReceiveNewTokenNetwork': return cls( transaction_hash=deserialize_transactionhash(data['transaction_hash']), payment_network_identifier=to_canonical_address(data['payment_network_identifier']), token_network=data['token_network'], block_number=BlockNumber(int(data['block_number'])), block_hash=BlockHash(deserialize_bytes(data['block_hash'])), )
def from_dict(cls, data: Dict[str, Any]) -> "ContractReceiveRouteClosed": return cls( transaction_hash=deserialize_transactionhash( data["transaction_hash"]), canonical_identifier=CanonicalIdentifier.from_dict( data["canonical_identifier"]), block_number=BlockNumber(int(data["block_number"])), block_hash=BlockHash(deserialize_bytes(data["block_hash"])), )
def from_dict(cls, data: Dict[str, Any]) -> 'ContractReceiveSecretReveal': return cls( transaction_hash=deserialize_transactionhash(data['transaction_hash']), secret_registry_address=to_canonical_address(data['secret_registry_address']), secrethash=deserialize_secret_hash(data['secrethash']), secret=deserialize_secret(data['secret']), block_number=BlockNumber(int(data['block_number'])), block_hash=BlockHash(deserialize_bytes(data['block_hash'])), )
def from_dict(cls, data: Dict[str, Any]) -> "ContractReceiveChannelNewBalance": return cls( transaction_hash=deserialize_transactionhash( data["transaction_hash"]), canonical_identifier=CanonicalIdentifier.from_dict( data["canonical_identifier"]), deposit_transaction=data["deposit_transaction"], block_number=BlockNumber(int(data["block_number"])), block_hash=BlockHash(deserialize_bytes(data["block_hash"])), )
def from_dict(cls, data: Dict[str, Any]) -> "ContractReceiveRouteNew": return cls( transaction_hash=deserialize_transactionhash( data["transaction_hash"]), canonical_identifier=CanonicalIdentifier.from_dict( data["canonical_identifier"]), participant1=to_canonical_address(data["participant1"]), participant2=to_canonical_address(data["participant2"]), block_number=BlockNumber(int(data["block_number"])), block_hash=BlockHash(deserialize_bytes(data["block_hash"])), )
def from_dict(cls, data: Dict[str, Any]) -> 'ContractReceiveRouteClosed': return cls( transaction_hash=deserialize_transactionhash(data['transaction_hash']), canonical_identifier=CanonicalIdentifier( chain_identifier=CHAIN_ID_UNSPECIFIED, token_network_address=to_canonical_address(data['token_network_identifier']), channel_identifier=ChannelID(int(data['channel_identifier'])), ), block_number=BlockNumber(int(data['block_number'])), block_hash=BlockHash(deserialize_bytes(data['block_hash'])), )
def from_dict(cls, data: Dict[str, Any]) -> "ContractReceiveChannelSettled": return cls( transaction_hash=deserialize_transactionhash( data["transaction_hash"]), canonical_identifier=CanonicalIdentifier.from_dict( data["canonical_identifier"]), our_onchain_locksroot=deserialize_locksroot( data["our_onchain_locksroot"]), partner_onchain_locksroot=deserialize_locksroot( data["partner_onchain_locksroot"]), block_number=BlockNumber(int(data["block_number"])), block_hash=BlockHash(deserialize_bytes(data["block_hash"])), )
def from_dict(cls, data: Dict[str, Any]) -> "ContractReceiveChannelBatchUnlock": return cls( transaction_hash=deserialize_transactionhash( data["transaction_hash"]), canonical_identifier=CanonicalIdentifier.from_dict( data["canonical_identifier"]), participant=to_canonical_address(data["participant"]), partner=to_canonical_address(data["partner"]), locksroot=deserialize_locksroot(data["locksroot"]), unlocked_amount=TokenAmount(int(data["unlocked_amount"])), returned_tokens=TokenAmount(int(data["returned_tokens"])), block_number=BlockNumber(int(data["block_number"])), block_hash=deserialize_blockhash(data["block_hash"]), )
def from_dict(cls, data: Dict[str, Any]) -> 'ContractReceiveChannelBatchUnlock': return cls( transaction_hash=deserialize_transactionhash(data['transaction_hash']), canonical_identifier=CanonicalIdentifier( chain_identifier=CHAIN_ID_UNSPECIFIED, token_network_address=to_canonical_address(data['token_network_identifier']), channel_identifier=CHANNEL_ID_UNSPECIFIED, ), participant=to_canonical_address(data['participant']), partner=to_canonical_address(data['partner']), locksroot=deserialize_locksroot(data['locksroot']), unlocked_amount=TokenAmount(int(data['unlocked_amount'])), returned_tokens=TokenAmount(int(data['returned_tokens'])), block_number=BlockNumber(int(data['block_number'])), block_hash=deserialize_blockhash(data['block_hash']), )