Safe{Core} A A SDK Release 34
New Versions
- account-abstraction-kit-poc:
v2.0.0
- api-kit:
v2.0.0
- onramp-kit:
v2.0.0
- protocol-kit:
v2.0.0
- relay-kit:
v2.0.0
- safe-core-sdk-types:
v3.0.0
What's Changed
- refactor(auth-kit): Reduce bundle size
- refactor(protocol-kit): Rename MasterCopy to singleton
- feat(relay-kit): Improve general structure and follow other packs style
- feat: Ethers v6 Migration
- refactor(protocol-kit): createTransaction accepts only array of transactions
- chore: bump safe-deployments to v1.27.0 by @dasanra in #533
- chore(deps): bump get-func-name from 2.0.0 to 2.0.2 by @dependabot in #563
- chore(deps): bump @babel/traverse from 7.21.4 to 7.23.2 by @dependabot in #562
- Chain-specific Safe addresses by @tmjssz in #560
- feat(account-abstraction-kit): unit tests by @tmjssz in #571
- feat: chainId as a BigInt by @DaniSomoza in #570
- feat: upgrade dependencies by @tmjssz in #576
- chore(deps): bump axios from 1.3.3 to 1.6.0 in /packages/onramp-kit/example/server by @dependabot in #580
- fix: safeTxGas estimation parse for Ethers v6 by @DaniSomoza in #584
- chore: cleanup unused dependencies by @dasanra in #585
- fix:
parseSafeTxGasErrorResponse
to improve error handling across providers by @DaniSomoza in #587 - Update parseSafeTxGasErrorResponse for Enhanced Provider Error Handling by @DaniSomoza in #589
- fix decodeSafeTxGas by @DaniSomoza in #592
- fix encodedSafeTxGas by @DaniSomoza in #595
- fix: createTransaction to accept only transactions array by @dasanra in #590
- fix exception handling in signature decoding for Monerium Pack by @DaniSomoza in #599
⚠️ Breaking Changes
api-kit
SafeApiKit
instantiation
// old:
constructor({ txServiceUrl, ethAdapter }: SafeApiKitConfig)
// new:
constructor({ chainId, txServiceUrl? }: SafeApiKitConfig)
- '/api' is not added to the txServiceUrl prop
- Rename type
MasterCopyResponse
toSafeSingletonResponse
- Rename method
getServiceMasterCopiesInfo()
togetServiceSingletonsInfo()
protocol-kit
- Rename
isL1SafeMasterCopy
toisL1SafeSingleton
// old:
SafeFactory.create({ ethAdapter, isL1SafeMasterCopy: true })
// new:
SafeFactory.create({ ethAdapter, isL1SafeSingleton: true })
- EthersAdapter now it's only compatible with ethers v6.
- createTransaction now only accepts array of transactions
// old:
const safeTransactionData = {
to: '',
data: '',
value: '',
nonce: '',
safeTxGas: ''
}
const safeTransaction = protocolKit.createTransaction({ safeTransactionData })
// new:
const safeTransactionData = {
to: '',
data: '',
value: ''
}
const options = {
nonce: '',
safeTxGas: ''
}
const safeTransaction = protocolKit.createTransaction({ [safeTransactionData], options })
account-abstraction-kit (AccountAbstraction class)
- The constructor signer is changed to an
EthAdapter
//old:
const safeAccountAbstraction = new AccountAbstraction(signer)
// new:
const ethAdapter = new EthersAdapter({ ethers, signerOrProvider: signer })
const safeAccountAbstraction = new AccountAbstraction(ethAdapter)
- The
init()
method now is parameterless and creates aprotocolKit
instance with the predicted or current safe address
//old:
async init(options: AccountAbstractionConfig)
//new:
async init()
- We removed the
getSignerAddress()
,getNonce()
,getSafeAddress()
andisSafeDeployed()
methods as they can be accessed from the newprotocolKit
property - The
relayTransaction()
method now returns andunknown
type instead anstring
as we don't know what the relayer pack returns on advance. We were currently assuming the GelatotaskId
async relayTransaction(
transactions: MetaTransactionData[],
options?: MetaTransactionOptions
): Promise<unknown>
relay-kit
- The
GelatoRelayPack
constructor now includes a mandatoryprotocolKit
parameter as we made it required for any new pack extending theRelayKitBasePack
constructor({ apiKey, protocolKit }: GelatoOptions)
-
We removed the
protocolKit
parameter from thecreateTransactionWithHandlePayment()
,createTransactionWithTransfer()
andexecuteRelayTransaction()
methods in theGelatoRelayPack
as we now include it in the constructor -
Removed the type
export interface RelayPack
as we use now an abstract class
New Contributors
Full Changelog: r33...r34