Releases: OffchainLabs/arbitrum-sdk
Releases · OffchainLabs/arbitrum-sdk
v3.1.6
v3.1.5
What's Changed
L1ToL2Message
- Fixed
retryableExists
returningfalse
when there's an unexpected error by @DZGoldman in #300
Full Changelog: v3.1.4...v3.1.5
v3.1.4
What's Changed
L1ToL2MessageGasEstimator
- Improved performance of
estimateAll
by @bartlomiej94 in #288
Networks
- Added
getEthBridgeInformation
to obtain eth bridge contracts by @TucksonDev in #260
Constants
- Added
ARB_OWNER_PUBLIC
to constants by @shotaronowhere in #290
Misc
- Added metadata, title and intro text to the index file of the generated docs by @TucksonDev in #272
- Added support for new
nitro-testnode
container name by @tsahee in #292
New Contributors
- @shotaronowhere made their first contribution in #290
- @tsahee made their first contribution in #292
Full Changelog: v3.1.3...v3.1.4
v3.1.3
What's Changed
Erc20Bridger
- Added WETH support to
getL1ERC20Address
by @bartlomiej94 in #269
Dependencies
- Bumped
@arbitrum/nitro-contracts
to1.0.1
by @Jason-Wanxt in #265 - Bumped
typedoc
to^0.24.6
and cleaned up the config by @TucksonDev in #270
Full Changelog: v3.1.2...v3.1.3
v3.1.2
What's Changed
Networks
- Added
addDefaultLocalNetwork
for registering the default local network configuration during development (@TucksonDev in #258) - Increased default timeout for creation and redemption of retryable tickets (@TucksonDev in #256)
Full Changelog: v3.1.1...v3.1.2
v3.1.1
v3.1.0
What's Changed
EthBridger
- Added
fromProvider
static method for instantiating with aProvider
(@spsjvc in #214) - Added
depositTo
method for depositing via a retryable ticket, with option for a different destination address (@TucksonDev in #238)
Erc20Bridger
L1TransactionReceipt
- Added
getL1ToL2MessagesClassic
for reading Classic L1-to-L2 messages (@bartlomiej94 in #221 and #240) - Added
isClassic
method to check if the transaction happened on Classic or Nitro (@bartlomiej94 in #239) - Updated
getL1ToL2Messages
to throw if trying to read Classic messages (@bartlomiej94 in #221)
L1ToL2MessageCreator
- Fixed
createRetryableTicket
not properly spreading over properties (@TucksonDev in #237)
InboxTools
- Added
signL2Tx
for creating a signed L2 transaction (@Jason-Wanxt in #194) - Added
sendL2SignedTx
for posting a signed L2 transaction to the Inbox (@Jason-Wanxt in #194)
Networks
- Added
nitroGenesisL1Block
toL2Network
objects, specifying the first L1 Nitro block (@bartlomiej94 and @spsjvc in #221 and #242) - Updated block explorer links for Arbitrum Goerli and Arbitrum Nova (@gzeoneth in #220)
- Removed Rinkeby and Arbitrum Rinkeby from list of supported networks (@bartlomiej94 in #235)
Misc
- Various fixes to docs
- (Internal) Changes to CI
- (Internal) Changes to tests
New Contributors
- @TucksonDev made their first contribution in #237
- @chrstph-dvx made their first contribution in #244
Full Changelog: v3.0.0...v3.1.0
v3.0.0
Highlights
- All Arbitrum Classic functionality, except withdrawals, has now been removed. Classic withdrawals are still supported since there exist pending withdrawals to the classic Outbox.
- All functions that send transactions directly now have a
get*Request
variant for getting a request for the transaction that would be sent. This allows sdk consumers to get a request and send it themselves later. - Retryable data tools for improved estimation of retryable parameters
EthBridger
- New
getDepositRequest
andgetWithdrawalRequest
get transaction request objects that can be sent later.deposit
andwithdraw
now accept transaction request objects as arguments as well as existing params. Return object also contains L2 gas estimate information. - Removed
depositEstimateGas
andwithdrawEstimateGas
. Equivalent estimates can now be made by callinggetDepositRequest
orgetWithdrawalRequest
and then callingprovider.estimateGas
with the result deposit
params no longer contain anl2Provider
propertydestinationAddress
inEthWithdrawParams
interface is mandatory. There’s no more default l2Signer's address. So, inputs ofgetWithdrawalRequest
andwithdraw
method should containdestinationAddress
.
Erc20Bridger
- New
getDepositRequest
,getWithdrawalRequest
andgetApproveTokenRequest
functions for getting transaction request objects that can be sent later.deposit
,withdraw
andapproveToken
now accept transaction request objects as arguments as well as existing params. Return object also contains L2 gas estimate information. - Removed
depositEstimateGas
andwithdrawEstimateGas
. Equivalent estimates can now be made by callinggetDepositRequest
orgetWithdrawalRequest
and then callingprovider.estimateGas
with the result excessFeeRefundAddress
andcallValueRefundAddress
can now be customised when callingdeposit
.from
must now be supplied when callingdeposit
Retryable data tools
- Inbox methods now return an error when called with specific parameters. This error contains retryable data information useful for estimating L1ToL2 gas limits.
- New class
RetryableDataTools
for parsing these error messages
L1ToL2Message
fromClassic
andfromNitro
removedfromTxComponents
renamed tofromEventComponents
- Arguments
retryableCreationId
andl2TxHash
removed from theL1ToL2Message
constructor getInputs
function removed in favour ofmessageData
property- Added
getSuccessfulRedeem
function for getting the first redeem transaction that succeeded. - Added
getAutoRedeemAttempt
function for getting the redeem transaction that was automatically executed - Added
getLifetime
function for getting the retryable lifetime setting - Added
keepAlive
function for increasing the timeout of a retryable - Added new
EthDepositMessage
class a separate from generalL1ToL2Message
class - Added new
EthDepositStatus
for the return ofEthDepositMessage.status
method
L1ToL2MessageCreator
- New method
getTicketCreationRequest
for creatingL1ToL2Messages
as transaction requests createRetryableTicket
arguments updated. Individual arguments moved into a params object, also accepts a transaction request object instead of params
L1ToL2MessageGasEstimator
- Refactored
estimateRetryableTicketGasLimit
to accept a single params object and an optionalsenderDeposit
value - Added
estimateMaxFeePerGas
method for estimating l2 max fee per gas - Added
isValid
method for determining whether gas parameters are still valid - Refactored
estimateAll
params - Added
populateFunctionParams
method that internally usesRetryableDataTools
to estimate the parameters for a contract that internally creates a retryable ticket
L1Transaction
- Added
getMessageDeliveredEvents
andgetInboxMessageDeliveredEvents
methods for getting events emitted from Inbox.sol and Bridge.sol - Added
getMessageEvents
method for linking message delivered and inbox message delivered - Renamed
getEthDepositMessages
togetEthDeposits
- Removed
getL1ToL2Message
, only the pluralgetL1ToL2Messages
is now available
L2ToL1Transaction
- Added
L2ToL1TransactionNitro
andL2ToL1TransactionClassic
for interacting with nitro and classic outboxes respectively.L2ToL1Transaction
still exists as composition class that internally calls the correct nitro or classic class when relevant - Removed
outboxAddress
fromfromEvent
static constructor - Renamed
getEventLogs
togetL2ToL1Events
L2Transaction
- Added
getRedeemScheduledEvents
method - Removed
l2Provider
parameter fromgetL2ToL1Messages
method - Added
getBatchConfirmations
method for getting the number of L1 block confirmations that a batch has - Added
getBatchNumber
method for getting the batch number of an L2 transaction - Removed
l1Provider
parameter fromisDataAvailable
method - Added
toRedeemTransaction
to convert an L2 transaction into aRedeemTransaction
Misc
- Reduced production dependency and package size
- Integration tests now run against nitro v2.0.0
ArbSdkError
can now capture inner errors and stack traces- Address is now optional and moved into
filter
object inEventFetcher
- Event objects used to accept either named, or unnamed tuples. This lead to complicated types, that were difficult to construct. Now only named tuples are supported.
- In line with L2 network objects, all L1 network objects now have the property
isArbitrum
with the valuefalse
. L2Network
objects now contains anitroGenesisBlock
specifying when the l2 block at which nitro was enabled - value set to 0 for networks that have always been nitro.rpcUrl
removed from the network object