Exemplo n.º 1
0
    def f(chain_id=1, **kwargs):
        balance_proof = make_balance_proof(signer=signer, **kwargs)
        balance_proof.chain_id = chain_id
        partner_signed_balance_proof = SignedBlindedBalanceProof.from_balance_proof_signed_state(
            balance_proof)
        request_monitoring = RequestMonitoring(
            onchain_balance_proof=partner_signed_balance_proof,
            reward_amount=TokenAmount(55))
        request_monitoring.sign(non_closing_signer)

        # usually not a property of RequestMonitoring, but added for convenience in these tests
        request_monitoring.non_closing_signer = to_checksum_address(  # type: ignore
            non_closing_signer.address)
        return request_monitoring
Exemplo n.º 2
0
 def f(amount=1, nonce=1):
     balance_proof = make_balance_proof(signer=signer,
                                        amount=amount,
                                        nonce=nonce)
     partner_signed_balance_proof = SignedBlindedBalanceProof.from_balance_proof_signed_state(
         balance_proof, )
     request_monitoring = RequestMonitoring(
         onchain_balance_proof=partner_signed_balance_proof,
         reward_amount=55,
     )
     request_monitoring.sign(non_closing_signer)
     request_monitoring.non_closing_signer = to_checksum_address(
         non_closing_signer.address)
     return request_monitoring