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 .
To initialize the SDK, you'll need the Asigna contracts addresses deployed on your target network and the corresponding Asigna Transaction Service API URLs.
Copy const RPC_URL = 'https://rpc.merlinchain.io' ;
const PRIVATE_KEY = 'your_signer_private_key' ;
const SAFE_ADDRESS = '0x03123...12' ; // your deployed safe address on Merlin Mainnet
const txServiceUrls = {
4200 n: "https://merlin-mainnet-api.asigna.io/txs/api" , // Merlin Mainnet
686868 n: "https://merlin-testnet-api.asigna.io/txs/api" // Merlin Testnet
};
export const contractNetworks = {
4200 n: {
safeSingletonAddress : '0x7479c8be2cb59813c1696d4ab8Ab574605DB36bE' ,
safeProxyFactoryAddress : '0x33539b6B3B521fDd25eE5112552f56A24b87F33f' ,
multiSendAddress : '0x8AA155Bd561Ff636a729362767E73b855eBF575c' ,
multiSendCallOnlyAddress : '0xAd2FC07fEfccbACD6433F27Fd3fA70E318e4f687' ,
fallbackHandlerAddress : '0xB96810C379e1ab89C97265EA450DE4FaD320FAB3' ,
signMessageLibAddress : '0x21e9f28f769A219754B0Dd83Ef29c0155A2a56Ec' ,
createCallAddress : '0x147E227890EA8A164BaaFE17a65767846AA43489' ,
simulateTxAccessorAddress : '0x27A5f29189AbAcf8f5b61785bE49874879e4e9B9' ,
} ,
686868 n: {
safeSingletonAddress : '0x3D5177A6C60aF40B60d8c00683B160170A419858' ,
safeProxyFactoryAddress : '0x427E933613Bd65E5f8B106DfE3541b68Ed86B131' ,
multiSendAddress : '0x07F93f2c661CbD749D451E358685579e3564FEB6' ,
multiSendCallOnlyAddress : '0x3b2fce2Cb8C9A9538F0D20eE333ebf552BDE3EFA' ,
fallbackHandlerAddress : '0x47E7A87Afa01a797D2a09E37Cc16683F6e4B7519' ,
signMessageLibAddress : '0x70D9E8CDcb9BB9058E68F3f7fc1Bdb7B3c2072cd' ,
createCallAddress : '0x812995c19b5EA51751228A2A0c23d38eEd3ec7D1' ,
simulateTxAccessorAddress : '0xbB7D99C78FE800466a144cFbdA4d83c742A5035b' ,
}
};
const chainId = 4200 n ; // Merlin Mainnet selected
const txServiceUrl = txServiceUrls[chainId];
const apiKit = new SafeApiKit ({
chainId : 1116 n ,
txServiceUrl
});
const safeSigner = await Safe .init ({
provider : RPC_URL ,
signer : PRIVATE_KEY ,
safeAddress : SAFE_ADDRESS ,
contractNetworks
});