func (self *adminApi) SaveInfo(req *shared.Request) (interface{}, error) { args := new(SaveInfoArgs) if err := self.coder.Decode(req.Params, &args); err != nil { return nil, shared.NewDecodeParamError(err.Error()) } contenthash, err := compiler.SaveInfo(&args.ContractInfo, args.Filename) if err != nil { return nil, err } return contenthash.Hex(), nil }
// SaveInfo stores contract information on the local file system. func (api *PrivateRegistarAPI) SaveInfo(info *compiler.ContractInfo, filename string) (contenthash common.Hash, err error) { return compiler.SaveInfo(info, filename) }