diff options
author | zelig <viktor.tron@gmail.com> | 2015-04-01 19:29:16 +0800 |
---|---|---|
committer | zelig <viktor.tron@gmail.com> | 2015-04-20 03:57:49 +0800 |
commit | ac0e5e8b6de43a40bbc25f541aa2399202bbe420 (patch) | |
tree | 1f17675caec7ef387d19d6da167c13cd26eb4845 /common/natspec | |
parent | 3a540425a3d7fc29233b5cd3e7b79b4866f35d57 (diff) | |
download | dexon-ac0e5e8b6de43a40bbc25f541aa2399202bbe420.tar.gz dexon-ac0e5e8b6de43a40bbc25f541aa2399202bbe420.tar.zst dexon-ac0e5e8b6de43a40bbc25f541aa2399202bbe420.zip |
resolver tests
- add resolver tests and fix resolver to pass
- statereg constructor fixed
- comments added to natspec plus docserver integration for natspec userdoc fetching
Diffstat (limited to 'common/natspec')
-rw-r--r-- | common/natspec/natspec.go | 2 | ||||
-rw-r--r-- | common/natspec/statereg.go | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/common/natspec/natspec.go b/common/natspec/natspec.go index a9ac2d1b2..145da14fe 100644 --- a/common/natspec/natspec.go +++ b/common/natspec/natspec.go @@ -104,6 +104,7 @@ func NewWithDocs(abiDocJson, userDocJson []byte, tx string) (self *NatSpec, err data: data, } + // load and require natspec js (but it is meant to be protected environment) _, err = self.jsvm.Run(natspecJS) if err != nil { return @@ -132,6 +133,7 @@ func NewWithDocs(abiDocJson, userDocJson []byte, tx string) (self *NatSpec, err // Type string `json:type` // } +// json skeleton for abi doc (contract method definitions) type method struct { Notice string `json:notice` name string diff --git a/common/natspec/statereg.go b/common/natspec/statereg.go index b76990540..53d4a3081 100644 --- a/common/natspec/statereg.go +++ b/common/natspec/statereg.go @@ -9,9 +9,9 @@ type StateReg struct { caURL, caNatSpec string //contract addresses } -func NewStateReg(_xeth *xeth.XEth) (self *StateReg) { - - self.xeth = _xeth +func NewStateReg(xeth *xeth.XEth) (self *StateReg) { + self = &StateReg{} + self.xeth = xeth self.testCreateContracts() return |