diff --git a/README.md b/README.md index 59fdedf6..c86b5c1f 100644 --- a/README.md +++ b/README.md @@ -136,12 +136,12 @@ metadata][service-configuration-metadata] * **registry_address_key** (required) - Ethereum address of the Registry contract instance. -* **organization_name** (required) - -name of the organization to search for [service configuration +* **organization_id** (required) - +Id of the organization to search for [service configuration metadata][service-configuration-metadata]. -* **service_name** (required) - -name of the service to search for [service configuration +* **service_id** (required) - +Id of the service to search for [service configuration metadata][service-configuration-metadata]. * **passthrough_enabled** (optional; default: `false`) - diff --git a/blockchain/ethereum_test_util.go b/blockchain/ethereum_test_util.go index 4908ba76..8418102a 100644 --- a/blockchain/ethereum_test_util.go +++ b/blockchain/ethereum_test_util.go @@ -52,7 +52,7 @@ func (env *SimulatedEthereumEnvironment) MpeDeposit(from *bind.TransactOpts, amo } func (env *SimulatedEthereumEnvironment) MpeOpenChannel(from *bind.TransactOpts, to *bind.TransactOpts, amount int64, expiration int64, groupId [32]byte) *SimulatedEthereumEnvironment { - _, err := env.MultiPartyEscrow.OpenChannel(EstimateGas(from), to.From, big.NewInt(amount), big.NewInt(expiration), groupId, from.From) + _, err := env.MultiPartyEscrow.OpenChannel(EstimateGas(from), from.From, to.From, groupId, big.NewInt(amount), big.NewInt(expiration)) if err != nil { panic(fmt.Sprintf("Unable to open MPE payment channel: %v", err)) } diff --git a/blockchain/serviceMetadata.go b/blockchain/serviceMetadata.go index 95c463d9..f2b81479 100644 --- a/blockchain/serviceMetadata.go +++ b/blockchain/serviceMetadata.go @@ -88,14 +88,14 @@ func getMetaDataUrifromRegistry() []byte { log.WithError(err).WithField("registryContractAddress", registryContractAddress). Panic("Error instantiating Registry contract for the given Contract Address") } - orgName := StringToBytes32(config.GetString(config.OrganizationName)) - serviceName := StringToBytes32(config.GetString(config.ServiceName)) + orgId := StringToBytes32(config.GetString(config.OrganizationId)) + serviceId := StringToBytes32(config.GetString(config.ServiceId)) - serviceRegistration, err := reg.GetServiceRegistrationByName(nil, orgName, serviceName) + serviceRegistration, err := reg.GetServiceRegistrationById(nil, orgId, serviceId) if err != nil { - log.WithError(err).WithField("OrganizationName", config.GetString(config.OrganizationName)). - WithField("ServiceName", config.GetString(config.ServiceName)). - Panic("Error Retrieving contract details for the Given Organization and Service Name ") + log.WithError(err).WithField("OrganizationId", config.GetString(config.OrganizationId)). + WithField("ServiceId", config.GetString(config.ServiceId)). + Panic("Error Retrieving contract details for the Given Organization and Service Ids ") } return serviceRegistration.MetadataURI[:] diff --git a/config/config.go b/config/config.go index 79f7a544..8fb74dd4 100644 --- a/config/config.go +++ b/config/config.go @@ -29,8 +29,8 @@ const ( HdwalletMnemonicKey = "hdwallet_mnemonic" IpfsEndPoint = "ipfs_end_point" LogKey = "log" - OrganizationName = "organization_name" - ServiceName = "service_name" + OrganizationId = "organization_id" + ServiceId = "service_id" PassthroughEnabledKey = "passthrough_enabled" PassthroughEndpointKey = "passthrough_endpoint" PrivateKeyKey = "private_key" @@ -52,11 +52,10 @@ const ( "hdwallet_index": 0, "hdwallet_mnemonic": "", "ipfs_end_point": "http://localhost:5002/", - "organization_name": "ExampleOrganization", + "organization_id": "ExampleOrganizationId", "passthrough_enabled": false, - "registry_address_key": "0x4e74fefa82e83e0964f0d9f53c68e03f7298a8b2", - "service_name": "ExampleService", + "service_id": "ExampleServiceId", "private_key": "", "ssl_cert": "", "ssl_key": "", diff --git a/resources/blockchain/package.json b/resources/blockchain/package.json index b764009c..736b511e 100644 --- a/resources/blockchain/package.json +++ b/resources/blockchain/package.json @@ -3,7 +3,7 @@ "bip39": "2.5.0", "fs-extra": "5.0.0", "ganache-cli": "6.1.6", - "singularitynet-platform-contracts": "https://github.com/singnet/platform-contracts/releases/download/v0.2.4/singularitynet-platform-contracts-0.2.4.tgz", + "singularitynet-platform-contracts": "https://github.com/singnet/platform-contracts/releases/download/v0.2.5/singularitynet-platform-contracts-0.2.5.tgz", "singularitynet-token-contracts": "2.0.0", "truffle": "4.1.13", "truffle-contract": "3.0.6",