[Bug] Legacy tx.pure moveCall argument syntax in account.ts and manual.ts fails under modern @mysten/sui
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- api
Research direction
Start in packages/sdk/src/account.ts at addDelegateKey and removeDelegateKey, then inspect recallManual in packages/sdk/src/manual.ts. Compare the existing pure argument calls with the proposed @mysten/sui v2 helpers and reproduce the transaction-building flow using @mysten/sui@2.5.0 or higher. Done means the listed PTBs construct and execute cleanly without invalid pure arguments.
Written by the indexing model from the issue text.
Description
Surface
TypeScript SDK (@mysten-incubation/memwal)
Network
All networks (Mainnet / Testnet / Local)
Package version
@mysten-incubation/memwal@0.1.5 (main)
What happened?
packages/sdk/package.json specifies "@mysten/sui": ">=2.5.0". In @mysten/sui v1+ and v2+, the Transaction builder (@mysten/sui/transactions) replaced the legacy @mysten/sui.js two-argument x.pure(typeString, value) API with typed method calls (e.g. x.pure.vector('u8', value), x.pure.string(value)) or direct BCS serializations.
However, several on-chain Move call wrappers in packages/sdk/src/account.ts and packages/sdk/src/manual.ts still use the legacy two-argument form:
-
ddDelegateKey (packages/sdk/src/account.ts:290-291):
ypescript tx.moveCall({ target: ${opts.packageId}::account::add_delegate_key, arguments: [ tx.object(opts.accountId), tx.object(opts.registryId), tx.pure("vector<u8>", Array.from(pkBytes)), tx.pure("string", opts.label), tx.object(SUI_CLOCK), ], }); -
**
emoveDelegateKey** (packages/sdk/src/account.ts:341):
ypescript tx.moveCall({ target: ${opts.packageId}::account::remove_delegate_key, arguments: [ tx.object(opts.accountId), tx.object(opts.registryId), tx.pure("vector<u8>", Array.from(pkBytes)), ], }); -
**
ecallManual** (packages/sdk/src/manual.ts:508):
ypescript tx.moveCall({ target: ${this.config.sealPolicyPackageId ?? this.config.packageId}::account::seal_approve, arguments: [ tx.pure("vector<u8>", idBytes), tx.object(this.config.registryId), tx.object(this.config.accountId), ], });
Steps to reproduce
- Instantiate MemWalManual or call ddDelegateKey /
emoveDelegateKey in a project with @mysten/sui@2.5.0 or higher. - Execute wait addDelegateKey(...) or wait memwalManual.recallManual(...).
- The transaction builder fails serialization or aborts on-chain because "vector" is treated as the input argument rather than the Move type declaration.
Expected
Transaction arguments should use @mysten/sui v2+ compatible serialization helpers so PTBs construct and execute cleanly.
Actual
The call fails or generates invalid PTB pure arguments.
Proposed Fix
Update packages/sdk/src/account.ts and packages/sdk/src/manual.ts to use x.pure.vector("u8", ...) and x.pure.string(...):
` ypescript
// account.ts - addDelegateKey
arguments: [
tx.object(opts.accountId),
tx.object(opts.registryId),
tx.pure.vector("u8", Array.from(pkBytes)),
tx.pure.string(opts.label),
tx.object(SUI_CLOCK),
]
// account.ts - removeDelegateKey
arguments: [
tx.object(opts.accountId),
tx.object(opts.registryId),
tx.pure.vector("u8", Array.from(pkBytes)),
]
// manual.ts - recallManual seal_approve
arguments: [
tx.pure.vector("u8", idBytes),
tx.object(this.config.registryId),
tx.object(this.config.accountId),
]
`
Checks
- I searched existing issues and this is not a duplicate.
- This report contains no private keys, mnemonics, or other secrets.
- Dominant language
- TypeScript
- Stars
- 107
- Forks
- 37
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 101
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MystenLabs/MemWal
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
MystenLabs/MemWal#708 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
MystenLabs/MemWal#691 · 1 comment ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
MystenLabs/MemWal#686 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
MystenLabs/MemWal#476 · 1 comment ·
-
Difficulty 2/5 1-2 days Newbie friendliness 74/100
MystenLabs/MemWal#462 · 1 comment ·
All issues in MystenLabs/MemWal
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100