From fec25e393d3ca458f5e65f31894c6a63d7c52f64 Mon Sep 17 00:00:00 2001 From: Erichin Date: Wed, 22 Nov 2017 00:40:35 +0900 Subject: [PATCH 1/2] bugfix --- accounts/abi/event.go | 10 ++++++++++ accounts/abi/method.go | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/accounts/abi/event.go b/accounts/abi/event.go index 44ed7b8df2..23faab2ce6 100644 --- a/accounts/abi/event.go +++ b/accounts/abi/event.go @@ -130,6 +130,16 @@ func (e Event) singleUnpack(v interface{}, output []byte) error { if err != nil { return err } + + // if we reach this part, there is only one output member from the contract event. + // for mobile, the result type is always a slice. + if reflect.Slice == value.Kind() && value.Len() >= 1 { + //check if it's not a byte slice + if reflect.TypeOf([]byte{}) != value.Type() { + value = value.Index(0).Elem() + } + } + if err := set(value, reflect.ValueOf(marshalledValue), e.Inputs[0]); err != nil { return err } diff --git a/accounts/abi/method.go b/accounts/abi/method.go index d8838e9ed6..12d299fcc3 100644 --- a/accounts/abi/method.go +++ b/accounts/abi/method.go @@ -150,6 +150,16 @@ func (method Method) singleUnpack(v interface{}, output []byte) error { if err != nil { return err } + + // if we reach this part, there is only one output member from the contract method. + // for mobile, the result type is always a slice. + if reflect.Slice == value.Kind() && value.Len() >= 1 { + //check if it's not a byte slice + if reflect.TypeOf([]byte{}) != value.Type() { + value = value.Index(0).Elem() + } + } + if err := set(value, reflect.ValueOf(marshalledValue), method.Outputs[0]); err != nil { return err } From 7d6b054de25625a7a7458d409fba9d45d00616ff Mon Sep 17 00:00:00 2001 From: Erichin Date: Wed, 21 Feb 2018 10:59:49 +0900 Subject: [PATCH 2/2] update --- build/pod.podspec | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/build/pod.podspec b/build/pod.podspec index 2c14c280c7..421db21cdd 100644 --- a/build/pod.podspec +++ b/build/pod.podspec @@ -1,22 +1,14 @@ Pod::Spec.new do |spec| spec.name = 'Geth' - spec.version = '{{.Version}}' + spec.version = '1.7.4' spec.license = { :type => 'GNU Lesser General Public License, Version 3.0' } spec.homepage = 'https://github.com/ethereum/go-ethereum' - spec.authors = { {{range .Contributors}} - '{{.Name}}' => '{{.Email}}',{{end}} - } + spec.authors = { 'erichin' => 'erichinbato@gmail.com' } + spec.summary = 'iOS Ethereum Client' - spec.source = { :git => 'https://github.com/ethereum/go-ethereum.git', :commit => '{{.Commit}}' } + spec.source = { :git => 'https://github.com/ethereum/go-ethereum.git' } spec.platform = :ios spec.ios.deployment_target = '9.0' - spec.ios.vendored_frameworks = 'Frameworks/Geth.framework' - - spec.prepare_command = <<-CMD - curl https://gethstore.blob.core.windows.net/builds/{{.Archive}}.tar.gz | tar -xvz - mkdir Frameworks - mv {{.Archive}}/Geth.framework Frameworks - rm -rf {{.Archive}} - CMD + spec.ios.vendored_frameworks = 'bin/Geth.framework' end