Protocol Kit Reference
Transactions
copyTransaction

copyTransaction

Copies a Safe transaction object.

Usage

import {
MetaTransactionData,
OperationType
} from '@safe-global/types-kit'
import { protocolKit } from './setup.ts'

const transactions: MetaTransactionData[] = [{
to: '0x...',
value: '123',
data: '0x',
operation: OperationType.Call // Optional
}]
const safeTransaction1 = await protocolKit.createTransaction({
transactions
})

const safeTransaction2 = await copyTransaction(safeTransaction1)

Parameters

safeTransaction

The Safe transaction object to copy.

const safeTransaction2 = await copyTransaction(
safeTransaction
)

Returns

Promise<SafeTransaction>

The new object with a copy of the Safe transaction.

Last updated on

Was this page helpful?

We use cookies to provide you with the best experience and to help improve our website and application. Please read our Cookie Policy for more information. By clicking "Accept all", you agree to the storing of cookies on your device to enhance site navigation, analyze site usage and provide customer support.