-
Notifications
You must be signed in to change notification settings - Fork 260
feat: add Sui and Starknet devtools packages #1918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Add SuiSigner for transaction signing with sender context - Add createConnectionFactory and createRpcUrlFactory for RPC connections - Add OmniSDK base class with transaction serialization - Add Sui chain type to normalizePeer/denormalizePeer in devtools Key design decisions: - Transaction.serialize() used instead of build() to defer sender context - Signer reconstructs transaction and sets sender during signing - Connection factory reads from RPC_URL_SUI environment variable
- Add EndpointV2 SDK implementing IEndpointV2 interface - Add Uln302 SDK for ULN configuration management - Fix setConfig to call populateSetConfigTransaction (Move result consumption) - Add graceful handling of missing configurations Key fixes for lz:oapp:wire: - setConfigMoveCall returns Call<Param, Result> that must be consumed - populateSetConfigTransaction() adds necessary follow-up move call - Missing config queries return defaults instead of throwing
- Add OFT SDK implementing IOApp interface - Fix setPeer to pad EVM addresses (20 bytes) to 32 bytes - Fix hasPeer to use areBytes32Equal for normalized comparison - Add isMissingSuiPeer helper for graceful error handling Key fixes for lz:oapp:wire: - EVM addresses must be right-padded with zeros to 32 bytes for Sui - Address comparison must normalize both addresses before comparing - Missing peer/enforced_options errors return defaults instead of throwing
- Add @layerzerolabs/devtools-starknet for Starknet signer/provider - Add @layerzerolabs/ua-devtools-starknet for Starknet OFT SDK - Add @layerzerolabs/protocol-devtools-starknet for EndpointV2/ULN302 SDKs - Fix address comparison in ua-devtools to use areBytes32Equal - Fix library skip logic to prevent SAME_VALUE errors Wire task now works correctly for Starknet OFTs with proper address normalization and idempotent configuration detection. Note: Send FROM Starknet has protocol-level bug in SendLib contract. Send TO Starknet works correctly.
Key fixes: - Fix fromHex to handle odd-length hex strings by padding with leading '0' (Buffer.from silently truncates odd-length strings) - Fix ByteArray encoding in setEnforcedOptions to use raw calldata instead of string-based encoding (starknet.js UTF-8 re-encodes bytes >= 128) - Update sendStarknet to use createRpcUrlFactory() for RPC URL resolution - Update starknet.js v8 Account constructor format These fixes resolve the "out of bound" error when sending from Starknet OFT caused by corrupted enforced options (byte 0x80 becoming UTF-8 0xc2 0x80).
PR SummaryIntroduces first-class Sui and Starknet support across the repo with new SDKs and utilities.
Written by Cursor Bugbot for commit 750457b. Configure here. |
🧪 E2E Test StatusE2E tests are non-blocking and validate real blockchain interactions. Failures may occur due to network issues, RPC rate limits, or external service downtime. Test Runs (Newest First): |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
| hexValue = value | ||
| } else if (typeof value === 'bigint') { | ||
| hexValue = `0x${value.toString(16)}` | ||
| } else if (typeof value === 'object' && value !== null && 'value' in value) { |
| if (value instanceof Uint8Array || Buffer.isBuffer(value)) { | ||
| return `0x${Buffer.from(value).toString('hex')}` | ||
| } | ||
| if (typeof value === 'object' && value !== null && 'data' in value && 'pending_word' in value) { |
| if (typeof value === 'bigint') { | ||
| return `0x${value.toString(16)}` | ||
| } | ||
| if (typeof value === 'object' && value !== null && 'value' in value) { |
- Add isNonEvmDeployment() to skip address checksumming for Sui/Starknet - Update setPeer() in ua-devtools-sui to handle addresses ≤32 bytes (Starknet is 31 bytes)
…ngeset - Remove CHANGELOG.md from new sui/starknet packages (will be auto-generated on publish) - Add changeset for modified existing packages (devtools, metadata-tools, ua-devtools)
Summary
devtools-suipackage with Sui signer and connection factoryprotocol-devtools-suipackage with EndpointV2 SDK for Suiua-devtools-suipackage with OFT SDK for Suidevtools-starknetpackage with Starknet connection factoryprotocol-devtools-starknetpackage with EndpointV2 SDK for Starknetua-devtools-starknetpackage with OFT SDK for Starknetpackages/devtools/src/common/bytes.tsto support SUI and STARKNET chain types indenormalizePeerTest plan
Note: Example usage in oft-main will be added in a follow-up PR after these packages are published.
🤖 Generated with Claude Code