Send Raw Transaction

Send a raw transaction object to the blockchain from the connected wallet.

About

Use this action to send a custom transaction to the blockchain.

The raw transaction will be signed by the connected wallet's private key, then submitted to the Blockchain.

Why would I need to send a custom transaction?

Every action write action on the Blockchain is received by the Blockchain as a "Transaction".

Transactions are objects that hold information that can be parsed by the Blockchain to and run by the EVM.

Simple transactions look something like:

{
  from: "0xEA674fdDe714fd979de3EdF0F56AA9716B898ec8",
  to: "0xac03bb73b6a9e108530aff4df5077c2b3d481e5a",
  gasLimit: "21000",
  maxFeePerGas: "300",
  maxPriorityFeePerGas: "10",
  nonce: "0",
  value: "10000000000"
}

This transaction will send native token (ETH, MATIC etc.) from one address to another.

Complex transactions that interact with smart contracts like 0x or Uniswap look something like:

{
  chainId: 1,
  price: '1819.24780097598123892',
  guaranteedPrice: '1801.05532296622142652',
  to: '0xdef1c0ded9bec7f1a1670819833240f027b25eff',
  data: '0x3598d8ab0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000004e1bbb1b11f673a5e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002bc02aaa39b223fe8d0a0e5c4f27ead9083c756cc20001f46b175474e89094c44da98b954eedeac495271d0f000000000000000000000000000000000000000000869584cd00000000000000000000000010000000000000000000000000000000000000110000000000000000000000000000000000000000000000c2bfe11f3560f5b443',
  value: '50000000000000000',
  gas: '151000',
  estimatedGas: '151000',
  gasPrice: '59000000000',
  protocolFee: '0',
  minimumProtocolFee: '0',
  buyTokenAddress: '0x6b175474e89094c44da98b954eedeac495271d0f',
  sellTokenAddress: '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',
  buyAmount: '90962390048799061946',
  sellAmount: '50000000000000000',
  sources: [
    { name: '0x', proportion: '0' },
    { name: 'Uniswap', proportion: '0' },
    { name: 'Uniswap_V2', proportion: '0' },
    
  ],
  orders: [
    {
      makerToken: '0x6b175474e89094c44da98b954eedeac495271d0f',
      takerToken: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
      makerAmount: '90962390048799061946',
      takerAmount: '50000000000000000',
      fillData: [Object],
      source: 'Uniswap_V2',
      sourcePathId: '0xfe215f0d81d8367ed86f2044b4b354d556f564f8bcb5bfec85fa07c54f31015c',
      type: 0
    }
  ],
  allowanceTarget: '0x0000000000000000000000000000000000000000',
  sellTokenToEthRate: '1',
  buyTokenToEthRate: '1813.2096453862199738'
}
[
  { name: '0x', proportion: '0' },
  { name: 'Uniswap', proportion: '0' },
  { name: 'Uniswap_V2', proportion: '0' },
  
]

The transaction will swap one token for another using the 0x swap proxy contract.

Parent Element

Wallet Actions

Drop this element onto the page first to access this action.

Action Name

Send Transaction a Wallet Actions.

Exposed States

The following states are available once this action has run.

Transaction Hash

The transaction hash of the successful transaction.

This will be available once the transaction has been successfully mined.

Events

Send Transaction Executed

A transaction was successfully executed.

More questions? Join our Discord

Last updated