# EVM SDK

Asigna leverages Safe Global's EVM smart contract multisig logic, allowing full compatibility with Safe's SDK. This enables you to access all of Safe's features seamlessly. For more details, refer to their documentation [here](https://docs.safe.global/sdk/overview).

To initialize the SDK, you'll need the Asigna contracts addresses deployed on your target network and the corresponding Asigna Transaction Service API URLs.

<pre class="language-javascript"><code class="lang-javascript">const RPC_URL = 'https://rpc.testnet.citrea.xyz';
const PRIVATE_KEY = 'your_signer_private_key';
const SAFE_ADDRESS = '0x03123...12'; // your deployed safe address
<strong>
</strong>const txServiceUrls = {
  4200n: "https://merlin-mainnet-api.asigna.io/txs/api", // Merlin Mainnet
  686868n: "https://merlin-testnet-api.asigna.io/txs/api", // Merlin Testnet
  5115n: "https://citrea-testnet-api.asigna.io/txs/api", // Citrea Testnet
  3636n: "https://botanix-testnet-api.asigna.io/txs/api" // Botanix Testnet
};

export const contractNetworks = {
  4200n: {
    safeSingletonAddress: '0x7479c8be2cb59813c1696d4ab8Ab574605DB36bE',
    safeProxyFactoryAddress: '0x33539b6B3B521fDd25eE5112552f56A24b87F33f',
    multiSendAddress: '0x8AA155Bd561Ff636a729362767E73b855eBF575c',
    multiSendCallOnlyAddress: '0xAd2FC07fEfccbACD6433F27Fd3fA70E318e4f687',
    fallbackHandlerAddress: '0xB96810C379e1ab89C97265EA450DE4FaD320FAB3',
    signMessageLibAddress: '0x21e9f28f769A219754B0Dd83Ef29c0155A2a56Ec',
    createCallAddress: '0x147E227890EA8A164BaaFE17a65767846AA43489',
    simulateTxAccessorAddress: '0x27A5f29189AbAcf8f5b61785bE49874879e4e9B9',
  },
  686868n: {
    safeSingletonAddress: '0x3D5177A6C60aF40B60d8c00683B160170A419858',
    safeProxyFactoryAddress: '0x427E933613Bd65E5f8B106DfE3541b68Ed86B131',
    multiSendAddress: '0x07F93f2c661CbD749D451E358685579e3564FEB6',
    multiSendCallOnlyAddress: '0x3b2fce2Cb8C9A9538F0D20eE333ebf552BDE3EFA',
    fallbackHandlerAddress: '0x47E7A87Afa01a797D2a09E37Cc16683F6e4B7519',
    signMessageLibAddress: '0x70D9E8CDcb9BB9058E68F3f7fc1Bdb7B3c2072cd',
    createCallAddress: '0x812995c19b5EA51751228A2A0c23d38eEd3ec7D1',
    simulateTxAccessorAddress: '0xbB7D99C78FE800466a144cFbdA4d83c742A5035b',
  },
  5115n: {
    safeSingletonAddress: '0x04ad731E80beE8F2BCd71048B5EA85643D9a0787',
    safeProxyFactoryAddress: '0x5A0b04FF49D430bB2989dd0966Cd490A2A1e2eA9',
    multiSendAddress: '0x2D156b196c7db6f7519E61E7EdBBdcE0396a33BA',
    multiSendCallOnlyAddress: '0xddaB6979bf0b48B2eAdfE9895059F44987745c76',
    fallbackHandlerAddress: '0xDAcbEcd96406466187c68E87cF5Ca5f588A299D4',
    signMessageLibAddress: '0x4BE868b8074DB64d895c688398521d3b0cDCEbCe',
    createCallAddress: '0x0B3dFB0Ed456B6e83a70E1a2D2Ef7DaE6AD45E63',
    simulateTxAccessorAddress: '0x2d4Dc195BCbE3E1EaFD12E9Ba28C3dDDaa3Fa56E',
  },
  3636n: {
    safeSingletonAddress: '0x2BA5157e7ab9913604d20e4Bd62EbC4fDab26032',
    safeProxyFactoryAddress: '0x760eAe3fD965C92ad6977De99Df58aF2814AD4B1',
    multiSendAddress: '0x3b644926E435E65751663a83928B983b7D78D012',
    multiSendCallOnlyAddress: '0xAa096390abc62E5A603c6F22071dd62895A596d8',
    fallbackHandlerAddress: '0xBd58c03BcB2cA285fCC578D326a7C9788A91B61a',
    signMessageLibAddress: '0x1205b09e057640d9785805CDaE64d011F30713c6',
    createCallAddress: '0x4F058Ac76040a4a2EbBc8fc960C5824ABFad9E0b',
    simulateTxAccessorAddress: '0x7872B223719895C0D9505E93D57144bD6ec9611E',
  }
};

const chainId = 5115n; // Citrea Testnet selected
const txServiceUrl = txServiceUrls[chainId];

const apiKit = new SafeApiKit({
  chainId: 1116n,
  txServiceUrl
});

const safeSigner = await Safe.init({
  provider: RPC_URL,
  signer: PRIVATE_KEY,
  safeAddress: SAFE_ADDRESS,
  contractNetworks
});

</code></pre>

The core SDK logic is detailed on [Safe's documentation page](https://docs.safe.global/sdk/overview).


---

# 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://asigna.gitbook.io/asigna/developers/multisig-sdk/evm-sdk.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.
