mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-25 11:05:10 +00:00
Use the SDKs contract router Main, not a local entrypoint
Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>
This commit is contained in:
parent
f7a2eb38f8
commit
088e1d51b4
2 changed files with 1 additions and 24 deletions
|
|
@ -31,7 +31,7 @@ repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
application {
|
application {
|
||||||
mainClass = 'org.hyperledger.fabric.samples.assettransfer.ContractMain'
|
mainClass = 'org.hyperledger.fabric.contract.ContractRouter'
|
||||||
}
|
}
|
||||||
|
|
||||||
checkstyle {
|
checkstyle {
|
||||||
|
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
/*
|
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
package org.hyperledger.fabric.samples.assettransfer;
|
|
||||||
|
|
||||||
import org.hyperledger.fabric.contract.ContractRouter;
|
|
||||||
|
|
||||||
public final class ContractMain {
|
|
||||||
|
|
||||||
private ContractMain() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(final String[] args) throws Exception {
|
|
||||||
if (!System.getenv().containsKey("CHAINCODE_SERVER_ADDRESS")) {
|
|
||||||
throw new IllegalArgumentException("Missing required 'CHAINCODE_SERVER_ADDRESS' parameter from env");
|
|
||||||
|
|
||||||
} else if (!System.getenv().containsKey("CORE_CHAINCODE_ID_NAME")) {
|
|
||||||
throw new IllegalArgumentException("Missing required 'CORE_CHAINCODE_ID_NAME' parameter from env");
|
|
||||||
}
|
|
||||||
|
|
||||||
ContractRouter.main(args);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in a new issue