Specify Gas Fee Overrides For Transaction

Pass the max_fee_per_gas and max_priority_fee_per_gas parameters to the Halliday transaction function to enforce gas fee overrides for your transactions. The transaction will use the specified parameters rather than getting the dynamic fee for a typical transaction at the current time.

Example Usage

// Call an arbitrary contract.
const contractAddress = '0x1f6557356bfb310a556300a36fb18f54fb4791b1';
// The contract's ABI
const contractAbi = [...]; // Replace with your contract's ABI
// Create an instance of the contract
const contract = new ethers.Contract(contractAddress, contractAbi, signer);
// Get the calldata for a contract call
const calldata = contract.interface.encodeFunctionData('someFunction', ['arg1', 'arg2']);

// Call the contract, with gas sponsored by the paymaster.
const contractCallTxInfo = await hallidayClient.callContract({
  from_in_game_player_id: userInGameId,								// your user's id in your application
  target_address: contractAddress,
  value: "0",
  sponsor_gas: true,
  gas_fee_overrides: {
    max_fee_per_gas: "0x888888888", // Specify 0x888888888 wei as max fee 
    max_priority_fee_per_gas: "0x9999999"; // Specify 0x9999999 wei as max priority fee


In addition to standard callContract() inputs, you must specify the gas_fee_overrides parameter, which consists of two required fields

max_fee_per_gasstringThe desired max_fee_per_gas for the tx in wei.
max_priority_fee_per_gasstringThe desired max_priority_fee_per_gas for the tx in wei.


Promise to a GetTransactionReponse Object

blockchain_typestringThe blockchain on which this transaction occurred (e.g. ETHEREUM, IMMUTABLE_PROD)
tx_idstringThe ID of the transaction
statusstringThe status of the transaction (e.g. PENDING, COMPLETE, FAILED)
retry_countnumberThe number of times we've retried sending this transaction
on_chain_id (optional)stringThe blockchain transaction id if the transaction succeeded
error_message (optional)stringThe error message if the transaction failed
user_op_receipt (optional)stringJSON Object of the user operation receipt (if the operation went through on chain)