Skip to main content

sdk.evm

EVM blockchain operations module for Ethereum and compatible chains.

createPublicClient

Create a public client for a specific chain.

Parameters

  • chainId (Int) - Chain ID of the network

Returns

  • PublicClient - Public client for the specified chain

Example

sendTransaction

Send an EVM transaction.

Parameters

  • transaction (EthereumTransaction) - Transaction to send
  • wallet (BaseWallet) - Wallet to send from

Returns

  • String - Transaction hash

Example

signTransaction

Sign a transaction without sending it.

Parameters

  • transaction (EthereumTransaction) - Transaction to sign
  • wallet (BaseWallet) - Wallet to sign with

Returns

  • String - Signed transaction

Example

writeContract

Write to a smart contract.

Parameters

  • wallet (BaseWallet) - Wallet to send from
  • input (WriteContractInput) - Contract call input

Returns

  • String - Transaction hash

Example

sdk.networks.evm

Get available EVM networks.

Example

EthereumTransaction

Transaction object for EVM chains. Requires import SwiftBigInt.

Properties

WriteContractInput

Input for smart contract interactions. The ABI must be parsed from JSON string to array.

Properties

Parsing ABI

Complete EVM Example

Next Steps

Last modified on February 2, 2026