> For the complete documentation index, see [llms.txt](https://chainex.gitbook.io/whitepaper/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chainex.gitbook.io/whitepaper/sdk-integration-docs/making-transactions.md).

# Making transactions

Example of a mint transaction using our SDK

1. **Initiating Smart Contract**:

   ```javascript
   const apiKey = process.env.API_KEY;
   const chainEx = new ChainEx(apiKey);
   const smartAccount = await chainEx.initialize(provider, configParams); 
   const contractAddress = "<contract_address>";
   const abi = ERC721_ABI;
   const erc721Contract = new ethers.Contract(contractAddress, abi);
   ```

   Identify the address and ABI of your ERC-721 contract for SDK-enabled interactions.
2. **Constructing a Transaction**:

   ```javascript
   const transaction = {
       target: contractAddress,
       data: erc721Contract.interface.encodeFunctionData("safeMint", [param1, param2]) `
   };
   ```

   Create a transaction blueprint for invoking the `safeMint` function on your ERC-721 contract via ChainEx.
3. **Transaction Execution**:

   ```javascript
   const operationHash = await chainEx.executeTransaction(transaction);
   console.log("Operation Hash:", operationHash);
   ```

   Execute the transaction with ChainEx and receive the operation hash.
