Protocol Kit Reference
Transactions
copyTransaction

copyTransaction

Copies a Safe transaction object.

Usage


_17
import {
_17
MetaTransactionData,
_17
OperationType
_17
} from '@safe-global/types-kit'
_17
import { protocolKit } from './setup.ts'
_17
_17
const transactions: MetaTransactionData[] = [{
_17
to: '0x...',
_17
value: '123',
_17
data: '0x',
_17
operation: OperationType.Call // Optional
_17
}]
_17
const safeTransaction1 = await protocolKit.createTransaction({
_17
transactions
_17
})
_17
_17
const safeTransaction2 = await copyTransaction(safeTransaction1)

Parameters

safeTransaction

The Safe transaction object to copy.


_10
const safeTransaction2 = await copyTransaction(
_10
safeTransaction
_10
)

Returns

Promise<SafeTransaction>

The new object with a copy of the Safe transaction.

Was this page helpful?