Skip to main content

EVM Operations (sdk.evm)

createPublicClient

Create a public client for interacting with an EVM chain.

Parameters

  • chainId (int) - The chain ID (e.g., 1 for Ethereum mainnet, 137 for Polygon)

Returns

  • EvmPublicClient - Public client for the chain

Example

getGasPrice

Get the current gas price for a chain.

Returns

  • GasPrice - Current gas price information

Example

sendTransaction

Send a transaction on an EVM chain.

Parameters

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

Returns

  • String - Transaction hash

Example

Complete Example with Gas Estimation

signTransaction

Sign a transaction without sending it.

Parameters

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

Returns

  • String - Signed transaction

Example

writeContract

Write to a smart contract (call a contract function).

Parameters

  • wallet (BaseWallet) - The wallet to call from
  • input (WriteContractInput) - Contract call parameters

Returns

  • String - Transaction hash

Example

Complete ERC20 Token Transfer Example

Solana Operations (sdk.solana)

createConnection

Create a connection to a Solana network.

Returns

  • SolanaConnection - Connection to the Solana network

Example

getLatestBlockhash

Get the latest blockhash for transaction creation.

Returns

  • BlockhashResult - Contains the blockhash and last valid block height

Example

createSigner

Create a signer for signing Solana transactions.

Parameters

  • wallet (BaseWallet) - The Solana wallet

Returns

  • SolanaSigner - Signer for the wallet

Example

signMessage

Sign a message with a Solana wallet.

Parameters

  • message (String) - The message to sign

Returns

  • String - The signature

Example

signEncodedTransaction

Sign a Solana transaction (base64 encoded).

Parameters

  • base64Transaction (String) - Base64 encoded transaction

Returns

  • String - Signed transaction (base64 encoded)

Example

signAndSendEncodedTransaction

Sign and send a Solana transaction.

Parameters

  • base64Transaction (String) - Base64 encoded transaction

Returns

  • String - Transaction signature

Example

Complete Solana Transfer Example

Network Management (sdk.networks)

Available Networks

Get lists of available EVM and Solana networks.

Example

Network Selector Widget

Data Types

EthereumTransaction

WriteContractInput

GasPrice

GenericNetwork

BlockhashResult

Using web3dart for Advanced EVM Operations

The Dynamic SDK provides integration classes for using the web3dart package with Dynamic wallets.

DynamicRpcService

Extends RpcService from web3dart to make RPC calls through the Dynamic SDK.

Example

DynamicCredential

Implements CredentialsWithKnownAddress and CustomTransactionSender for signing messages and transactions with Dynamic wallets.

Example

Advanced Token Operations

For more complex EVM operations, you can use the web3dart package alongside the Dynamic SDK:

Using solana package for Advanced Solana Operations

For complex Solana operations, use the solana package with Dynamic SDK:
Last modified on February 3, 2026