Translations: ERC20 to Ignis/21/en

From ArdorDocs
Jump to: navigation, search

transferFrom

This is specific to Ethereum. It deals with transferring tokens from a sender account to a recipient account in case the transaction issuer is not the sender and it is not directly supported by Ignis; however in case you need to support it, you can implement the following procedure: Submit a tranferAsset API but instead of specifying the sender secretPharse specify the sender publicKey which you can obtain using the getAccountPublicKey API by providing the sender address. As a result you'll receive the unsigned transaction bytes in hex format. Send these bytes to the owner of the sender account - you can use a sendMessage transaction or send it off blockchain. The sender account should then submit a broadcastTransaction API to sign the bytes with his passphrase and record the transaction on the blockchain. The following procedure described above is suitable for lightweight contracts automation