Skip to main content
Use this reference only when your integration executes the transaction returned by GET /partner/v1/{chainId}/quote through a partner-owned smart contract. If an EOA sends the returned transaction directly, you do not need an executor contract. This source is published here so integrators do not need access to AKKA’s private contract repository. It is an integration example, not a production deployment or an audited library. Your team must review, test, deploy, own, and monitor its adapted version.

Execution model

  • Set the quote request’s payer to the executor contract address.
  • The executor must be the address that calls quote.tx.to.
  • For ERC-20 input, the user approves the executor; the executor pulls the exact input amount and grants the allowlisted AKKA Router an exact, per-call approval.
  • For native input, forward exactly quote.tx.value.
  • The output recipient is already encoded in quote.tx.data; do not modify the returned calldata.
  • Allowlist only active router addresses returned by GET /partner/v1/chains, and validate their published bytecode hashes before enabling them.

Solidity reference

The example targets Solidity 0.8.20 and OpenZeppelin Contracts 5.x.
AkkaPartnerExecutor.sol

Before production

At minimum, partners should add tests for router allowlisting, fee-on-transfer and non-standard tokens relevant to their product, native-value mismatches, refund behavior, malicious-token callbacks, paused execution, and router upgrades. Use a multisig or governed role for router permissions and define an emergency process to disable a router immediately. AKKA does not deploy this executor for partners. A contract is optional, and when a partner chooses this model, its deployment, audit, upgrades, and operational controls remain the partner’s responsibility.