def new_withdraw_ong_transaction(self, b58_claimer_address: str, b58_recv_address: str, amount: int,
                                     b58_payer_address: str, gas_limit: int, gas_price: int) -> Transaction:
        """
        This interface is used to generate a Transaction object that
        allow one account to withdraw an amount of ong and transfer them to receive address.

        :param b58_claimer_address: a base58 encode address which is used to indicate who is the claimer.
        :param b58_recv_address: a base58 encode address which is used to indicate who receive the claimed ong.
        :param amount: the amount of asset that will be claimed.
        :param b58_payer_address: a base58 encode address which indicate who will pay for the transaction.
        :param gas_limit: an int value that indicate the gas limit.
        :param gas_price: an int value that indicate the gas price.
        :return: a Transaction object which can be used for withdraw ong.
        """
        if not isinstance(b58_claimer_address, str) or not isinstance(b58_recv_address, str) or not isinstance(
                b58_payer_address, str):
            raise SDKException(ErrorCode.param_err('the data type of base58 encode address should be the string.'))
        if len(b58_claimer_address) != 34 or len(b58_recv_address) != 34 or len(b58_payer_address) != 34:
            raise SDKException(ErrorCode.param_err('the length of base58 encode address should be 34 bytes.'))
        if amount <= 0:
            raise SDKException(ErrorCode.other_error('the amount should be greater than than zero.'))
        if gas_price < 0:
            raise SDKException(ErrorCode.other_error('the gas price should be equal or greater than zero.'))
        if gas_limit < 0:
            raise SDKException(ErrorCode.other_error('the gas limit should be equal or greater than zero.'))
        ont_contract_address = self.get_asset_address('ont')
        ong_contract_address = self.get_asset_address("ong")
        args = {"sender": Address.b58decode(b58_claimer_address).to_bytes(), "from": ont_contract_address,
                "to": Address.b58decode(b58_recv_address).to_bytes(), "value": amount}
        invoke_code = build_native_invoke_code(ong_contract_address, b'\x00', "transferFrom", args)
        payer_array = Address.b58decode(b58_payer_address).to_bytes()
        return Transaction(0, 0xd1, int(time()), gas_price, gas_limit, payer_array, invoke_code, bytearray(), list())
def new_withdraw_ong_transaction ( self , b58_claimer_address : str , b58_recv_address : str , amount : int , b58_payer_address : str , gas_limit : int , gas_price : int ) -> Transaction : if not isinstance ( b58_claimer_address , str ) or not isinstance ( b58_recv_address , str ) or not isinstance ( b58_payer_address , str ) : raise SDKException ( ErrorCode . param_err ( 'the data type of base58 encode address should be the string.' ) ) if len ( b58_claimer_address ) != 34 or len ( b58_recv_address ) != 34 or len ( b58_payer_address ) != 34 : raise SDKException ( ErrorCode . param_err ( 'the length of base58 encode address should be 34 bytes.' ) ) if amount <= 0 : raise SDKException ( ErrorCode . other_error ( 'the amount should be greater than than zero.' ) ) if gas_price < 0 : raise SDKException ( ErrorCode . other_error ( 'the gas price should be equal or greater than zero.' ) ) if gas_limit < 0 : raise SDKException ( ErrorCode . other_error ( 'the gas limit should be equal or greater than zero.' ) ) ont_contract_address = self . get_asset_address ( 'ont' ) ong_contract_address = self . get_asset_address ( "ong" ) args = { "sender" : Address . b58decode ( b58_claimer_address ) . to_bytes ( ) , "from" : ont_contract_address , "to" : Address . b58decode ( b58_recv_address ) . to_bytes ( ) , "value" : amount } invoke_code = build_native_invoke_code ( ong_contract_address , b'\x00' , "transferFrom" , args ) payer_array = Address . b58decode ( b58_payer_address ) . to_bytes ( ) return Transaction ( 0 , 0xd1 , int ( time ( ) ) , gas_price , gas_limit , payer_array , invoke_code , bytearray ( ) , list ( ) )
This interface is used to generate a Transaction object that
        allow one account to withdraw an amount of ong and transfer them to receive address.

        :param b58_claimer_address: a base58 encode address which is used to indicate who is the claimer.
        :param b58_recv_address: a base58 encode address which is used to indicate who receive the claimed ong.
        :param amount: the amount of asset that will be claimed.
        :param b58_payer_address: a base58 encode address which indicate who will pay for the transaction.
        :param gas_limit: an int value that indicate the gas limit.
        :param gas_price: an int value that indicate the gas price.
        :return: a Transaction object which can be used for withdraw ong.