aboutsummaryrefslogtreecommitdiffstats
path: root/common/compiler/solidity.go
diff options
context:
space:
mode:
authorzelig <viktor.tron@gmail.com>2015-06-23 22:48:33 +0800
committerJeffrey Wilcke <geffobscura@gmail.com>2015-07-07 16:43:31 +0800
commit83ee39448e0f23d42dff27bccde27f828afa3707 (patch)
tree429fa8f20a4bc017a58ffc4c7c0ed8596d1d206f /common/compiler/solidity.go
parentd764bd058457cd9eb91d205d1ac187d40c4866d6 (diff)
downloadgo-tangerine-83ee39448e0f23d42dff27bccde27f828afa3707.tar.gz
go-tangerine-83ee39448e0f23d42dff27bccde27f828afa3707.tar.zst
go-tangerine-83ee39448e0f23d42dff27bccde27f828afa3707.zip
Registrar and contractInfo handling
* resolver -> common/registrar * global registrar name registry interface * add Call to resolver backend interface * the hashReg and UrlHing contracts now initialised from global registry * initialization of contracts uniform * improve errors and more econsistent method names * common/registrar/ethreg: versioned registrar * integrate new naming and registrar in natspec * js console api: setGlobalRegistrar, setHashReg, setUrlHint * js test TestContract uses mining - tests fixed all pass * eth/backend: allow PoW test mode (small ethash DAG) * console jsre refers to resolver.abi/addr, * cmd/geth/contracts.go moved to common/registrar
Diffstat (limited to 'common/compiler/solidity.go')
-rw-r--r--common/compiler/solidity.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/compiler/solidity.go b/common/compiler/solidity.go
index caf86974e..4d5ffb473 100644
--- a/common/compiler/solidity.go
+++ b/common/compiler/solidity.go
@@ -185,12 +185,12 @@ func (sol *Solidity) Compile(source string) (contracts map[string]*Contract, err
return
}
-func ExtractInfo(contract *Contract, filename string) (contenthash common.Hash, err error) {
- contractInfo, err := json.Marshal(contract.Info)
+func SaveInfo(info *ContractInfo, filename string) (contenthash common.Hash, err error) {
+ infojson, err := json.Marshal(info)
if err != nil {
return
}
- contenthash = common.BytesToHash(crypto.Sha3(contractInfo))
- err = ioutil.WriteFile(filename, contractInfo, 0600)
+ contenthash = common.BytesToHash(crypto.Sha3(infojson))
+ err = ioutil.WriteFile(filename, infojson, 0600)
return
}