Closed twwu123 closed 2 weeks ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
mesh-docs | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Nov 12, 2024 1:37pm |
mesh-playground | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Nov 12, 2024 1:37pm |
Summary
Currently it is practically impossible to build a transaction completely offline, because there is no API to provide script ref size for inputs. I have added this in the
txIn
type, and added logic to get rid of the need for a fetcher. The current txBuilder will add any inputs with refScriptSize also to therefTxIn
so that the txBuilder correctly accounts for these script sizes when calculating fees. It is somewhat of a hacky fix, but will work until we figure out a better method.Affect components
@meshsdk/common
@meshsdk/contract
@meshsdk/core
@meshsdk/core-csl
@meshsdk/core-cst
@meshsdk/provider
@meshsdk/react
@meshsdk/transaction
@meshsdk/wallet
Type of Change
Related Issues
Closes #374
Checklist
npm run test
)npm run build
)Additional context
Now offline transaction building requires an extra input for scriptRefSize, if there is no scriptRef at the input, please explicitly put 0 as scriptRefSize. If it is left undefined, it is assumed to be an incomplete input info, and will require a fetcher instance.