Skip to content

Conversation

@beer-1
Copy link

@beer-1 beer-1 commented Nov 3, 2025

Summary of Changes

  • Allow usage with the latest Initiad release
  • Update dependency to the latest initia.js
  • Fix to correctly pass local decimal values when creating MoveOFTAdapter on Initia
    • In many cases, tokens on Initia have 0 decimals because the IBC transfer module does not support transmitting decimal metadata

@St0rmBr3w St0rmBr3w requested a review from shankars99 November 8, 2025 01:15
@socket-security
Copy link

socket-security bot commented Nov 15, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​rimraf@​6.0.1 ⏵ 6.1.099 +110010085 +4100

View full report

@cursor
Copy link

cursor bot commented Jan 15, 2026

PR Summary

Updates Initia support and OFT adapter initialization across contracts, SDK, CLI, and examples.

  • Move contract: oft_adapter_fa::initialize now accepts local_decimals: Option<u8> and defaults to metadata decimals when not provided
  • SDK/CLI: initializeAdapterFAPayload updated (Aptos/Initia clients) to pass localDecimals; new OFTAdapterFaInitParams.localDecimals; init task prints and forwards shared/local decimals; removed Initiad version gating in build/deploy
  • Examples: README/scripts use deploy-move/OFTAdapterInitParams.ts with localDecimals; send command flags cleaned; EVM deploy adds gasLimit; .gitignore includes deployments
  • Configs: Switch example EVM network to bsc-testnet; adjust ULN confirmations and enforced gas; update omni-graph libraries/addresses
  • Deps/lockfile: Bump @initia/initia.js to ^1.0.0 in devtools-move and refresh transitive packages

Written by Cursor Bugbot for commit 19754b9. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

types: ['address', 'u8'],
multiSigArgs: [tokenMetadataAddress, sharedDecimals],
types: ['address', 'u8', 'u8'],
multiSigArgs: [tokenMetadataAddress, sharedDecimals, localDecimals || 0],
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multi-sig args incorrectly handle undefined localDecimals as zero

Medium Severity

The multiSigArgs for initializeAdapterFAPayload uses localDecimals || 0, which converts undefined to 0. This loses the semantic distinction between "not specified" (should be Option::None, meaning use default decimals from metadata) and "explicitly 0 decimals" (should be Option::Some(0)). When multi-sig users export and reconstruct transactions, this causes incorrect behavior where the contract uses 0 decimals instead of the token's metadata decimals.

Fix in Cursor Fix in Web

functionArguments: [tokenMetadataAddress, sharedDecimals],
types: ['address', 'u8'],
functionArguments: [tokenMetadataAddress, sharedDecimals, localDecimals || 0],
types: ['address', 'u8', 'u8'],
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aptos SDK passes three arguments to two-parameter contract function

High Severity

The initializeAdapterFAPayload function in aptosOFT.ts and oft.ts now passes three arguments (tokenMetadataAddress, sharedDecimals, localDecimals || 0) to the contract's oft_adapter_fa::initialize function. However, the Aptos contract at examples/oft-adapter-aptos-move only accepts two parameters (token_metadata_address: address, shared_decimals: u8). This parameter count mismatch will cause all Aptos OFT adapter initialization transactions to fail at runtime.

Additional Locations (1)

Fix in Cursor Fix in Web

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