Geth version: 1.6.0
OS & Version: Android
Commit hash :
I do not know if it is my issue, or if it is go ethereum mobile, but raising this issue could help me. I already tried it on stackoverflow.
I want to interact with a Smart Contract in Ethereum from a mobile Device (here Android). The Smart Contract is working fine with the Javascript API from ethereum. So I want to use the Go Ethereum Mobile Client (1.6.0) (included by gradle). I could connect to the blockchain, getting a peer count, reading balances, but interacting with a contract is my problem.
Generating the Java-Class with the commandline-tool "abigen" is fine. I only have to change "bool" to "boolean", and the class should be ready to go. Whenever I try to interact, Go Ethereum is throwing an exception at: this.Contract.call()
Call contract function
throwing Error (Universe proxy)
Please see details on stackoverflow:
http://stackoverflow.com/questions/43298324/go-ethereum-mobile-android-contract-abi-error
calling constant function:
go.Universe$proxyerror: getString abi: cannot use invalid as type ptr as argument
calling functions:
go.Universe$proxyerror: argument count mismatch: 1 for 2
Thanks for the detailed report. The code generator is quite old and people have been mucking around with the abi package since, to it might happen that something got out of sync (mobile being experimental it's not thoroughly tested). I'll take a look.
@akamarukiba did you find a workaround?
@ligi no sorry, i have not found any workaround yet. I would like to publish my project, but not in this alpha stage :(
If you find any solution, i would appreciate it really much. I already spent really much time on this issue, before even raising it.
too bad @akamarukiba - thanks for the info - hope @karalabe finds some time to look over this again - sounded like he has an idea about the cause of this issue.
@ligi I am also looking forward to the next reply from @karalabe
Still nothing? I also have this issue
@akamarukiba: go.Universe$proxyerror: argument count mismatch: 1 for 2
Please go to: https://github.com/ethereum/go-ethereum/blob/master/mobile/bind.go#L168
You can try to replace this line from:
rawTx, err := c.contract.Transact(&opts.opts, method, args.objects)
to
rawTx, err := c.contract.Transact(&opts.opts, method, args.objects...)
Then rebuild mobile package (geth.aar) again.
@karalabe : Could you please take a look on it?
@nthtson you save me
Should be fixed on master now. Thanks @ligi!
Most helpful comment
@nthtson you save me