eos-jvm icon indicating copy to clipboard operation
eos-jvm copied to clipboard

Implementing push, same as `cleos push action`

Open kination opened this issue 6 years ago • 4 comments

Hello I'm currenlty following the EOS tutorial, and trying to send event from android application same as cleos push action ... . I just looked on eos-chain-action, but couldn't found detail implementation about this.

Could you give me a guide about this? Or I'm also looking on eosreach project, so it is okay to let me know the file name that includes push handling if it has been implemented here.

Thanks.

kination avatar Oct 16 '18 05:10 kination

Hi mate, This class uses the nodeos api to push the transactions: https://github.com/memtrip/eos-jvm/blob/master/eos-chain-actions/src/main/kotlin/com/memtrip/eos/chain/actions/transaction/ChainTransaction.kt

The annotation preprocessor from the eos-abi-writer module is used to generate boiler plate code for the packed transaction and abi bytes. I would recommend looking at the eos-chain-action integration tests and building your actions in a similar way, the ChainTransaction abstract class handles the signature signing and packs the transaction bytes for you.

Integration tests: https://github.com/memtrip/eos-jvm/tree/master/eos-chain-actions/src/test/kotlin/com/memtrip/eos/chain/actions/transaction

samkirton avatar Oct 16 '18 07:10 samkirton

I will write a step by step guide also, but I hope the above helps for now

samkirton avatar Oct 16 '18 08:10 samkirton

@samkirton thanks! I'll look on it.

kination avatar Oct 16 '18 08:10 kination

@samkirton Can you please post here a little example of how to send transaction to a custom contract with some descriptions? I can't figure out how to do it, even after taking a look at library and your app

marinrusu1997 avatar Mar 05 '19 13:03 marinrusu1997