Send Transaction
Last updated
Last updated
Make sure you initialize Blocto SDK first
Once your app is connected to Blocto wallet, it can send transactions on behalf of the user, with the user's permission.
In order to send a transaction, the SDK provides two methods of signing for SendTransaction:
The app needs to:
Create data which is the content of transacting with a smart contract
Create value if needs to send the Ether to smart contract
Parameter | Type | Description |
---|---|---|
Using the EvmTransaction
class. The SDK defines a Class that includes four properties: From, To, Value, and Data. Users can create an instance of this Class, set the property values accordingly, and then pass it to SendTransaction.
fromAddress
address string
the sender address
toAddress
address string
the smart contract address
value
BigInteger
the amount of Ether deposit in the smart contract (if the smart contract accepts ether)
data
hex string (0x
prefix)
the content of transacting with a smart contract, can use library, such as NEthereum, to generate