0

I try to create, sign and broadcast transactions through the Tatum. But can't find any example of how to do this. All I know is that BSC network is based on Ethereum Virtual Machine. So my transaction should be like this:

let signerInput = EthereumSigningInput.with {
    $0.chainID = chainID
    $0.gasPrice = gasPrice
    $0.gasLimit = gasLimit
    $0.to = address
    $0.nonce = transactionsCount
    $0.transaction = EthereumTransaction.with {
               $0.transfer = EthereumTransaction.Transfer.with {
                   $0.amount = amountData
               }
    }
    $0.privateKey = wallet.getKeyForCoin(coin: .smartChain).data
}

let output: EthereumSigningOutput = AnySigner.sign(
    input: signerInput,
    coin: .smartChain
)

Am I wrong? Should I prepare the transaction in some other way? Thank you!

I try to use Ethereum style transactions via BNB Smart Chain network.

fatihyildizhan
  • 8,614
  • 7
  • 64
  • 88
Hmmka
  • 1
  • 2

0 Answers0