Skip to content

chore(abi): sync tnt-core ABI through bindings v0.11.2#3170

Merged
drewstone merged 1 commit intodevelopfrom
chore/sync-tnt-core-v0.11.2
May 5, 2026
Merged

chore(abi): sync tnt-core ABI through bindings v0.11.2#3170
drewstone merged 1 commit intodevelopfrom
chore/sync-tnt-core-v0.11.2

Conversation

@drewstone
Copy link
Copy Markdown
Contributor

Summary

Regenerates `libs/tangle-shared-ui/src/abi/tangle.ts` from tnt-core@abd065c. Pulls in two upstream merges that the dapp ABI was lagging on:

  • tnt-core Better chain switching #118 (slashing correctness, manager-hook reentrancy, lifecycle, EIP-712) — `disputeSlash` now payable, `SlashProposal` gains `disputer` / `disputeBond` / `disputeDeadline`, `ServiceRequest` gains `activated` flag.
  • tnt-core Wallet connect && mobile wallets fixes #122 (interface declaration of `expireServiceRequest`) — adds the permissionless cleanup entrypoint so off-chain consumers can drive refunds of stale unapproved requests after the grace window.

Why now

The dapp was building against a stale ABI: existing dispute-slash calls compiled fine, but the contract's payable signature wasn't represented in TS, and `expireServiceRequest` simply didn't exist in our typed surface. tnt-core just merged both fixes; resyncing keeps the typed ABI honest.

Diff

One file, +54/-1 lines. Generated entirely by `yarn sync:tnt-core-assets` then `yarn prettier --write`.

Caveat: `disputeSlash` is now payable

`useDisputeSlashTx` calls `disputeSlash(slashId, reason)` without a `value`. The protocol's current `disputeBond` config is `0`, so the call path still works. If/when an admin sets a non-zero bond, the operator-side dispute flow will revert — a follow-up PR should:

  • Read the active `disputeBond` from `SlashConfig`
  • Pass `{ value: disputeBond }` on the operator path
  • Skip the value when the caller has SLASH_ADMIN_ROLE

Filing this as a follow-up rather than fixing here so the ABI sync stays mechanical and auditable.

Test plan

  • `yarn typecheck` clean (5 projects, 2 tasks)
  • Generated diff inspected: only the actual ABI surface changes are present (no spurious quote-style churn after prettier)
  • Smoke-test slash dispute UI on a local devnet once Wallet connect && mobile wallets fixes #122 is merged + bindings v0.11.2 published

Pulls in surface changes that landed in tnt-core PR #118 (slashing
correctness) and PR #122 (interface declaration of expireServiceRequest):

- disputeSlash is now payable. The contract requires `msg.value ==
  disputeBond` (zero for SLASH_ADMIN, else the configured bond). Today's
  protocol config has bond=0 so existing call sites still work; flagging
  for follow-up if/when admin sets a non-zero bond.
- expireServiceRequest(uint64) added — permissionless cleanup path that
  refunds escrow on stale unapproved requests after the grace period.
- ServiceRequest gains `bool activated` (post-activation refund guard).
- SlashProposal gains disputer/disputeBond/disputeDeadline fields.

No UI changes here. Generated by `yarn sync:tnt-core-assets` against
tnt-core@abd065c (post-#121); follow-up PR to surface
expireServiceRequest in operator/owner UIs once a flow is designed.
@drewstone drewstone requested a review from AtelyPham as a code owner May 5, 2026 17:26
@netlify
Copy link
Copy Markdown

netlify Bot commented May 5, 2026

Deploy Preview for tangle-dapp ready!

Name Link
🔨 Latest commit 7dfbeca
🔍 Latest deploy log https://app.netlify.com/projects/tangle-dapp/deploys/69fa284e1ef89900085d5cc0
😎 Deploy Preview https://deploy-preview-3170--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 5, 2026

Deploy Preview for tangle-leaderboard ready!

Name Link
🔨 Latest commit 7dfbeca
🔍 Latest deploy log https://app.netlify.com/projects/tangle-leaderboard/deploys/69fa284eb4fa2b00096460a8
😎 Deploy Preview https://deploy-preview-3170--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.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 5, 2026

Deploy Preview for tangle-cloud ready!

Name Link
🔨 Latest commit 7dfbeca
🔍 Latest deploy log https://app.netlify.com/projects/tangle-cloud/deploys/69fa284e94f9a00008d3411c
😎 Deploy Preview https://deploy-preview-3170--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.

@drewstone drewstone merged commit 0999dac into develop May 5, 2026
20 checks passed
@drewstone drewstone deleted the chore/sync-tnt-core-v0.11.2 branch May 5, 2026 17:42
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