Skip to content

chore(abi): sync tnt-core v0.15.0 (Round 4 audit consolidation)#3199

Merged
drewstone merged 1 commit into
developfrom
chore/abi-sync-tnt-core-v0.15.0
May 11, 2026
Merged

chore(abi): sync tnt-core v0.15.0 (Round 4 audit consolidation)#3199
drewstone merged 1 commit into
developfrom
chore/abi-sync-tnt-core-v0.15.0

Conversation

@drewstone
Copy link
Copy Markdown
Contributor

Summary

Sync ABIs from tnt-core@v0.15.0 (PRs #126, #127, #129) covering the v0.14.0 + v0.15.0 audit-hardening cycle. Two consumer-side fixes accompany the regen for the only breaking changes whose callsites live in this dapp.

Previous sync was v0.13.0 in #3198.

ABI changes (auto-generated via yarn sync:tnt-core-assets)

  • ITangleFull (libs/tangle-shared-ui/src/abi/tangle.ts)
    • + claimDisputeBond() (v0.14.0 pull-pattern dispute refunds)
    • + pendingDisputeBondRefund(address) -> uint256 view
    • PaymentLib.ServiceEscrow struct: trailing __reservedAggregateCursor + subscriptionBaselineStake appended. Named decoders (e.g. useServiceEscrow) ignore the new fields; positional reads at the old offsets are preserved.
  • IMultiAssetDelegation (libs/tangle-shared-ui/src/abi/multiAssetDelegation.ts)
    • + getCumStakeSeconds(operator, asset) view (live TWAP stake-seconds)
    • + AdapterChangeWhileDepositsExist(token, currentDeposits) error
  • ValidatorPodManager (hand-maintained ABI under apps/tangle-dapp/src/abi/validatorPodManager.ts)
    • \− podOwnerShares (removed in the v0.15.0 share-pool refactor)
    • totalShares retyped int256 -> uint256
    • + getSharesUint(address) -> uint256 companion to getShares
    • + recordBeaconChainDeposit(address, uint256) (replaces removed recordBeaconChainEthBalanceUpdate)
    • + recordBeaconChainRebase(address, int256)
    • + BeaconRebase(owner, assetsDelta, newTotalAssets, totalSharesPool) event
    • SharesUpdated signature expanded to (owner, sharesDelta, newShares uint256, totalAssets, totalSharesPool) (was 3 args, newShares was int256)
    • WithdrawalQueued / WithdrawalCompleted gained trailing uint256 assets

Consumer fixes (the only breaking changes whose callsites exist in this dapp)

  • apps/tangle-dapp/src/features/native-staking/hooks/useValidatorPodManager.ts
    • usePodOwnerShares now reads getShares (legacy podOwnerShares was removed in v0.15.0). getShares returns int256 so values can transiently be negative after a beacon rebase; downstream renderers (DelegationCard, WithdrawalCard, PodOverviewCard) already clamp at zero for display.
  • apps/tangle-cloud/src/pages/operators/manage/components/modals/DisputeSlashModal.tsx
    • Bond hint reworded from "refunded if dispute upheld" to "claimable via claimDisputeBond if dispute upheld" — v0.14.0 switched dispute refunds to pull-pattern so the previous text overpromised.
  • libs/tangle-shared-ui/src/data/graphql/useSlashing.ts
    • Inline NOTE on useCancelSlashTx documenting the pull-pattern change, plus a TODO(v0.15.0) for the follow-up useClaimDisputeBondTx hook + disputer-side claim affordance (see deferred items below).

Breaking changes intentionally NOT actioned in this PR

These are real v0.14/v0.15 contract-side breaks but have zero consumer code in the dapp, so the regen alone is enough:

  • TangleToken.burn / burnFrom revert with BurnDisabled() — no dapp surface exposes a TNT burn action.
  • TangleGovernor.MAX_PROPOSAL_ACTIONS 50 -> 10, MAX_ACTION_VALUE 100k -> 10k ETH — the dapp doesn't construct governor proposals from user UI.
  • Quote payment + ERC20 deposits reject fee-on-transfer tokens — no FoT token whitelisting in the dapp.
  • L2SlashingReceiver + 4 bridges are now UUPS-upgradeable; deploys live in tnt-core scripts, not the dapp.
  • ArbitrumCrossChainMessenger.setL2RefundAddress — not invoked from dapp UI.
  • Tangle.billSubscription(uint64) TWAP-fair semantics — signature unchanged, dapp does not call.

Deferred follow-up (TODOs in code)

  • claimDisputeBond() + pendingDisputeBondRefund(address) UI affordance for disputers after their bond becomes claimable. Tracked as TODO(v0.15.0) inside libs/tangle-shared-ui/src/data/graphql/useSlashing.ts on useCancelSlashTx. Recommend a follow-up useClaimDisputeBondTx hook + a "Claim refund" button on the disputer-side slash detail view, gated on a non-zero pendingDisputeBondRefund read.

Verification

  • yarn nx typecheck tangle-dapp — clean
  • yarn nx typecheck tangle-cloud — clean
  • yarn nx lint tangle-dapp — clean
  • yarn nx lint tangle-cloud — clean
  • yarn nx lint tangle-shared-ui — clean
  • prettier --check on every touched file — clean

Test plan

  • CI green (typecheck, lint, build for tangle-dapp + tangle-cloud)
  • Manual smoke: native-staking pod overview/delegate/withdraw cards still render owner shares (getShares path)
  • Manual smoke: tangle-cloud slash dispute modal renders the new bond-claim copy

Regenerate ABIs from tnt-core@v0.15.0 (PRs #126, #127, #129) and fix
the two callsites in this dapp that the v0.14/v0.15 breaking changes
actually touched. Everything else either landed as additive surface or
was outside our consumer set.

ABI changes (auto-generated):
- ITangleFull: + claimDisputeBond(), + pendingDisputeBondRefund(address);
  ServiceEscrow struct gains trailing __reservedAggregateCursor +
  subscriptionBaselineStake fields (positional reads at the old offsets
  are unchanged, named decoders ignore the new fields).
- IMultiAssetDelegation: + getCumStakeSeconds(operator, asset) view,
  + AdapterChangeWhileDepositsExist error.
- ValidatorPodManager (hand-maintained ABI under tangle-dapp/src/abi):
  drop removed `podOwnerShares`, retype `totalShares` int256 -> uint256,
  add `getSharesUint`, `recordBeaconChainDeposit`,
  `recordBeaconChainRebase`, and the new `BeaconRebase` event. Extend
  `SharesUpdated` / `WithdrawalQueued` / `WithdrawalCompleted` with
  their newly-appended fields (`newShares` retyped to uint256 to match
  share-pool semantics; trailing `assets` on the withdrawal events).

Consumer fixes:
- features/native-staking/useValidatorPodManager.ts: `usePodOwnerShares`
  now calls `getShares` instead of the removed `podOwnerShares` view.
  `getShares` returns int256, but the bigint shape used by
  PodOwnerInfo / DelegationCard / WithdrawalCard is preserved and the
  downstream renderers already clamp negative values for display.
- operators/manage/components/modals/DisputeSlashModal.tsx: the bond
  hint text used to claim the bond was "refunded if dispute upheld";
  v0.14.0 switched dispute-bond refunds to a pull pattern (cancelSlash
  no longer pushes), so reword to "claimable via claimDisputeBond if
  dispute upheld" to set the right expectation.
- data/graphql/useSlashing.ts: add an inline NOTE on `useCancelSlashTx`
  documenting the pull-pattern + a TODO(v0.15.0) for the follow-up
  `useClaimDisputeBondTx` hook and disputer-side UI affordance.

Out-of-scope deferred items (left as TODOs / not surfaced in UI yet):
- claimDisputeBond() / pendingDisputeBondRefund(address) hooks + UI for
  the disputer-side refund claim flow. Tracked in the inline TODO above.
- TangleToken.burn / burnFrom now revert with BurnDisabled(); no dapp
  callsite exposes a burn action today, so nothing to gate.
- L2SlashingReceiver bridge deploy flow (proxy + initialize) is not
  invoked from the dapp; deploys live in tnt-core scripts.
- billSubscription semantics shifted to TWAP-fair but the ABI signature
  is unchanged and we don't call it from the dapp.

Verification:
- yarn typecheck (tangle-dapp, tangle-cloud) -> clean
- yarn lint (tangle-dapp, tangle-cloud, tangle-shared-ui) -> clean
- prettier --check on every touched file -> clean

Refs: tangle-network/tnt-core#126, #127, #129
@drewstone drewstone requested a review from AtelyPham as a code owner May 11, 2026 13:05
@netlify
Copy link
Copy Markdown

netlify Bot commented May 11, 2026

Deploy Preview for tangle-cloud ready!

Name Link
🔨 Latest commit a0823ba
🔍 Latest deploy log https://app.netlify.com/projects/tangle-cloud/deploys/6a01d407b11f8700087d0c2a
😎 Deploy Preview https://deploy-preview-3199--tangle-cloud.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 11, 2026

Deploy Preview for tangle-dapp ready!

Name Link
🔨 Latest commit a0823ba
🔍 Latest deploy log https://app.netlify.com/projects/tangle-dapp/deploys/6a01d407755f1e0008cb4fcd
😎 Deploy Preview https://deploy-preview-3199--tangle-dapp.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 11, 2026

Deploy Preview for tangle-leaderboard ready!

Name Link
🔨 Latest commit a0823ba
🔍 Latest deploy log https://app.netlify.com/projects/tangle-leaderboard/deploys/6a01d407bdf7180007241d88
😎 Deploy Preview https://deploy-preview-3199--tangle-leaderboard.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

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