diff options
author | zsfelfoldi <zsfelfoldi@gmail.com> | 2015-04-14 21:20:52 +0800 |
---|---|---|
committer | zelig <viktor.tron@gmail.com> | 2015-04-20 03:57:49 +0800 |
commit | dba2367157fc4ad7947ee1632dbe76d6a110f49f (patch) | |
tree | 5d50f5f68a0ccc689ff8adf606359c949a3eab16 /common/resolver | |
parent | f255336c2cf989be52502f0f384da7c2d44d2109 (diff) | |
download | dexon-dba2367157fc4ad7947ee1632dbe76d6a110f49f.tar dexon-dba2367157fc4ad7947ee1632dbe76d6a110f49f.tar.gz dexon-dba2367157fc4ad7947ee1632dbe76d6a110f49f.tar.bz2 dexon-dba2367157fc4ad7947ee1632dbe76d6a110f49f.tar.lz dexon-dba2367157fc4ad7947ee1632dbe76d6a110f49f.tar.xz dexon-dba2367157fc4ad7947ee1632dbe76d6a110f49f.tar.zst dexon-dba2367157fc4ad7947ee1632dbe76d6a110f49f.zip |
NatSpec contracts are now not in the genesis block but added by the test
Diffstat (limited to 'common/resolver')
-rw-r--r-- | common/resolver/resolver.go | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/common/resolver/resolver.go b/common/resolver/resolver.go index 2858a049d..45afb2971 100644 --- a/common/resolver/resolver.go +++ b/common/resolver/resolver.go @@ -5,8 +5,8 @@ import ( "fmt" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/crypto" + xe "github.com/ethereum/go-ethereum/xeth" ) /* @@ -17,10 +17,24 @@ UrlHint : Content Hash -> Url Hint The resolver is meant to be called by the roundtripper transport implementation of a url scheme */ -const ( - URLHintContractAddress = core.ContractAddrURLhint - HashRegContractAddress = core.ContractAddrHashReg -) + +// contract addresses will be hardcoded after they're created +var URLHintContractAddress string = "0000000000000000000000000000000000000000000000000000000000001234" +var HashRegContractAddress string = "0000000000000000000000000000000000000000000000000000000000005678" + +func CreateContracts(xeth *xe.XEth, addr string) { + var err error + URLHintContractAddress, err = xeth.Transact(addr, "", "100000000000", "1000000", "100000", ContractCodeURLhint) + if err != nil { + panic(err) + } + HashRegContractAddress, err = xeth.Transact(addr, "", "100000000000", "1000000", "100000", ContractCodeHashReg) + if err != nil { + panic(err) + } + URLHintContractAddress = URLHintContractAddress[2:] + HashRegContractAddress = HashRegContractAddress[2:] +} type Resolver struct { backend Backend |