Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
README.md | 2025-05-19 | 3.0 kB | |
v0.101.0 source code.tar.gz | 2025-05-19 | 4.8 MB | |
v0.101.0 source code.zip | 2025-05-19 | 5.8 MB | |
Totals: 3 Items | 10.6 MB | 0 |
Summary
In this release, we:
- Added method setData
to Predicate
class
- Added support for on-the-fly modifications to TransactionRequest
when using InvocationScope
- Made provider.assembleTx()
to consider reserveGas
when setting TX gasLimit
- Enforced Predicate's data
property when the Predicate has arguments
- Close subscription after Preconfirmation
when another status is not awaited by the user
- Removed BaseInvocationScope.getTransactionId()
Breaking
- Fixes
- #3886 - Enforce
predicateData
when predicate has arguments, by @Torres-ssf
- #3886 - Enforce
- Chores
- #3864 - Remove
BaseInvocationScope.getTransactionId()
, by @Torres-ssf
- #3864 - Remove
Features
- #3885 - Add
Predicate
methodsetData
, by @Torres-ssf - #3875 - Support TX customization at BaseInvocationScope, by @Torres-ssf
Fixes
- #3887 - Close subscription after
Preconfirmation
status when applicable, by @Torres-ssf
Migration Notes
Fixes
#3886 - Enforce predicateData
when predicate has arguments
Predicates that define arguments must now be instantiated with the data property. It is no longer allowed to omit data when the predicate expects input arguments.
For example, for the given predicate:
:::rs
predicate;
fn main(pin: u64) -> bool {
return 999 == pin;
}
The following code would compile, even though the predicate expects arguments:
:::ts
// before
const predicateNoData = new PredicatePin({ provider }) // ✅ Allowed (incorrectly)
const predicate = new PredicatePin({ provider, data: [100] }) // ✅ Correct
TypeScript now enforces that data must be provided:
:::ts
// after
const predicateNoData = new PredicatePin({ provider }) // ❌ Error: missing required `data`
const predicate = new PredicatePin({ provider, data: [100] }) // ✅ Correct
Chores
#3864 - Remove BaseInvocationScope.getTransactionId()
-
getTransactionId()
is no longer available on theBaseInvocationScope
.:::ts // before const contract = new CounterContract(contractId, wallet)
const scope = contract.functions.get_counter()
const txId = await scope.getTransactionId()
:::ts // after const contract = new CounterContract(contractId, wallet)
const request = contract.functions.get_counter().fundWithRequiredCoins()
const chainId = await provider.getChainId()
const txId = await scope.getTransactionId(chainId)