# Trx

This is a generic method for invoking JSON RPC's `eth_sendTransaction` with Ethers.js. Use this method to create a transaction that invokes a smart contract method. Returns an Ethers.js `TransactionResponse` object.

* `address` (string) The Ethereum address the transaction is directed to.
* `method` (string) The smart contract member in which to invoke.
* `[parameters]` (any\[]) Parameters of the method to invoke.
* `[options]` (CallOptions) Options to set for `eth_sendTransaction`, (as JSON object), and Ethers.js method overrides. The ABI can be a string optional ABI of the single intended method, an array of many methods, or a JSON object of the ABI generated by a Solidity compiler.
* `RETURN` (Promise\<any>) Returns an Ethers.js `TransactionResponse` object or an error object if the transaction failed.

```
const oneEthInWei = '1000000000000000000';
const sEthAddress = '0x4ddc2d193948926d02f9b1fe9e1daa0718270ed5';
const provider = window.ethereum;

(async function() {
  console.log('Supplying ETH to the Strike Protocol...');

  // Mint some sETH by supplying ETH to the Strike Protocol
  const trx = await Strike.eth.trx(
    sEthAddress,
    'function mint() payable',
    [],
    {
      provider,
      value: oneEthInWei
    }
  );

  // const result = await trx.wait(1); // JSON object of trx info, once mined

  console.log('Ethers.js transaction object', trx);
})().catch(console.error);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.strike.org/strike.js/ethereum-methods/trx.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
