> For the complete documentation index, see [llms.txt](https://l1x-sdk.gitbook.io/l1x-wallet-sdk/4BgPf6WH50hnVEUCHE22/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://l1x-sdk.gitbook.io/l1x-wallet-sdk/4BgPf6WH50hnVEUCHE22/evm-methods/how-to-make-an-evm-contract-state-changing-call.md).

# How to make an EVM contract state changing call?

* **makeStateChangingFunctionCall**

**Function:**

This function is used to make a state changing call to a smart contract.&#x20;

{% code lineNumbers="true" fullWidth="false" %}

```typescript
import { L1XProvider, EVMStateChangeCallArg } from "@l1x/l1x-wallet-sdk";

let l1xProvider = new L1XProvider({
  clusterType: "mainnet",
  endpoint: "https://v2-mainnet-rpc.l1x.foundation",
});

let params: EVMStateChangeCallArg = {
  attrib: {
    arguments: {
      did: "DID_URL",
      didDocument: "DID_DOCUMENT_URL",
    },
    contract_address: "cf0289e86714d97979d726eeb2fa3a23b9c007c1",
    function: "createDID",
    abi: ["ABI"],
  },
  private_key: "YOUR_PRIVATE_KEY",
  fee_limit: 1,
};

l1xProvider.evm
  .makeStateChangingFunctionCall(params)
  .then((response) => console.log(response)) // log response
  .catch((err) => console.error(err)); // log error

```

{% endcode %}

**Parameters**:

The smart contract parameters for state changing object.

```json
{
  attrib: {
    arguments: {
      did: "DID_URL",
      didDocument: "DID_DOCUMENT_URL",
    },
    contract_address: "cf0289e86714d97979d726eeb2fa3a23b9c007c1",
    function: "createDID",
    abi: ["ABI"],
  },
  private_key: "YOUR_PRIVATE_KEY",
  fee_limit: 1,
}
```

**Returns:**

A promise that resolves when the transaction is submitted.

```json
{
     "hash": "dc224ba854d5fbd3371f6d509b9a0b5451fff78a70ad3a209b5c273f8da0abfb"
}
```
