Prerequisites
Install the required dependencies:Signing Utility for Contract Calls
For complete signing documentation covering all account types (EVM, Solana, EIP-7702), see the Signing Guide with detailed explanations and troubleshooting.
Example 1: USDC (Solana) → EVM Contract Call
Use USDC on Solana to fund and execute contract calls on Arbitrum:First, prepare the contract call by specifying the target chain operations and token requirements:
The
fromAssetId: "ob:usdc"
tells OneBalance to use USDC from your Solana account to fund the EVM contract call.Example 2: SOL → EVM Contract Call
Use native SOL to fund contract calls on Arbitrum. This example shows more complex operations including Jupiter swaps:When using
fromAssetId: "ob:sol"
, OneBalance will swap SOL to USDC on Solana via Jupiter, then bridge to Arbitrum.EIP-7702 Integration
OneBalance supports EIP-7702 delegated accounts that can be funded using Solana assets. This enables seamless cross-chain contract execution where Solana provides the funding and EIP-7702 provides the execution context.Multi-Account Setup (Solana + EIP-7702)
When using Solana assets to fund EIP-7702 operations, you need both account types:Delegation Signature Requirements
EIP-7702 accounts require delegation signatures before execution:Delegation Required: When using
deploymentType: "EIP7702"
, you must sign the delegation object from the prepare-call-quote
response before proceeding to call-quote
.1
Get Delegation Object
The
prepare-call-quote
response includes delegation data that must be signed:2
Sign Delegation
Sign the delegation using your EIP-7702 signer:
3
Execute Operation
The signed delegation enables atomic execution:
Complete EIP-7702 Example
Here’s a complete example using SOL to fund an EIP-7702 contract call:EIP-7702 integration is supported on chains with EIP-7702 enabled. Check the supported networks for current availability.