Skip to content

feat(contract): add write function support via --write flag#297

Open
Ad-Capital wants to merge 5 commits intorsksmart:mainfrom
Ad-Capital:feat/contract-write-support
Open

feat(contract): add write function support via --write flag#297
Ad-Capital wants to merge 5 commits intorsksmart:mainfrom
Ad-Capital:feat/contract-write-support

Conversation

@Ad-Capital
Copy link
Copy Markdown
Contributor

Adds a --write flag to the contract command that lets users call nonpayable and payable functions on verified contracts. Includes Solidity type coercion, pre-flight simulation via simulateContract, payable RBTC value handling with balance check, and confirmation receipt with explorer link.

Ad-Capital and others added 5 commits March 15, 2026 08:27
Adds a --write flag to the contract command that lets users call nonpayable and payable functions on verified contracts. Includes Solidity type coercion, pre-flight simulation via simulateContract, payable RBTC value handling with balance check, and confirmation receipt with explorer link.
Add confirmation prompt before irreversible transaction submission
Validate ABI structure from external API before use
Reject scientific notation in RBTC value input
Enforce bytesN length constraints in coerceArg
Sanitize simulation error messages in external mode
Wrap writeContract and waitForTransactionReceipt in try/catch
Wire --wallet flag through to contract command
Display full function signatures for overloaded functions
Use indexed keys for arg prompts to avoid name collisions
Add null guard after ABI function lookup
Handle fixed/ufixed Solidity types in coerceArg
Add build step to contract:write script, remove hardcoded address
Rename ReadContract to contractCommand with backward-compatible alias
Add int/uint bounds and sign validation in coerceArg
Apply isExternal error sanitization to submission catch block
Validate input.type fields in validateAbi
Use indexed arg keys in read path prompt
Replace walletClient.account! with explicit null guard
Use full function signatures in read function selector
Add Object.hasOwn guard for wallet name lookup in viemProvider
Add contract:read npm script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant