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
This commit is contained in:
@ -72,19 +72,15 @@ func TestNoCompiler(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestExtractInfo(t *testing.T) {
|
||||
func TestSaveInfo(t *testing.T) {
|
||||
var cinfo ContractInfo
|
||||
err := json.Unmarshal([]byte(info), &cinfo)
|
||||
if err != nil {
|
||||
t.Errorf("%v", err)
|
||||
}
|
||||
contract := &Contract{
|
||||
Code: "",
|
||||
Info: cinfo,
|
||||
}
|
||||
filename := "/tmp/solctest.info.json"
|
||||
os.Remove(filename)
|
||||
cinfohash, err := ExtractInfo(contract, filename)
|
||||
cinfohash, err := SaveInfo(&cinfo, filename)
|
||||
if err != nil {
|
||||
t.Errorf("error extracting info: %v", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user