Skip to content

Add an explicit EVM contract-call capability to App Kit #209

Description

@gaysonloser

Summary

Please consider adding a distinct EVM contract-call capability to App Kit.

The current SendParams interface in @circle-fin/app-kit@1.10.0 supports from, to, amount, and optional token, but it cannot express a payable EVM function call with calldata. This blocks payment applications whose settlement and application state must remain atomic.

Concrete Arc Testnet use case

Payment Receipt uses a verified Arc Testnet contract with:

pay(bytes32 orderId, bytes32 metadataHash)

The call accepts native USDC, transfers it to the merchant, stores an application receipt, rejects duplicate order IDs, and emits PaymentReceived in one transaction.

A correct payment must carry that selector, two ABI-encoded bytes32 arguments, and native value together.

Current behavior

The closest documented App Kit operation is:

await kit.send({
  from: { adapter, chain: "Arc_Testnet" },
  to: paymentReceipt,
  amount: "0.01",
  token: "NATIVE",
});

This transfers value without the required selector or arguments. The current contract intentionally has no receive or fallback, so a bare transfer to it reverts. Sending directly to the merchant can move funds, but bypasses receipt storage, duplicate-order protection, and the PaymentReceived event.

The application therefore uses a custom pay() call for settlement and keeps Circle Contracts/Event Monitor plus an independent RPC monitor as read-only evidence sources.

Expected capability

A separate EVM contract-call operation could accept source adapter/chain, target, calldata, and native value, with matching estimation and explicit wallet confirmation. A typed ABI/function/args convenience layer could sit above the raw call.

I am not suggesting that send() silently reinterpret token transfers as arbitrary contract calls; a distinct capability would keep the API boundary clear.

Suggested acceptance criteria

  1. An EVM browser-wallet adapter can estimate and submit one call containing to, data, and native value.
  2. The wallet displays normal user confirmation; App Kit never signs or submits silently.
  3. Reverts are surfaced as failures and do not produce a false success state.
  4. The result exposes the transaction hash and explorer URL consistently with existing operations.
  5. The capability is documented as EVM-only where other adapters cannot provide equivalent semantics.

Environment

  • @circle-fin/app-kit@1.10.0
  • Arc Testnet, chain ID 5042002
  • Browser EVM wallet / Viem-style contract call

This is a feature request based on a reproducible Arc Testnet payment flow, not a claim that the existing Send capability is broken.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ecosystemComponent: ecosystemenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions