Contract Whitelist Generation
When setting or updating the network parameters, the Network Map Service scans the JAR files referenced in the
configuration file (i.e. cordappsJar ) for the presence of any contract classes. If such a class is found then it is
added to the whitelist. It is possible to exclude certain contract classes by adding their package names to the
exclude section of the configuration file. A user can also define the whitelist using the contract classes and
corresponding JAR hashes explicitly. To do so, the contracts
attribute holding the list of the explicitly specified
whitelisted contracts needs to be set. Following is an example of the contract whitelist generation specific
configuration:
whitelistContracts = {
cordappsJars = [
"/Path/To/CorDapp/JarFile1",
"/Path/To/CorDapp/JarFile2"
],
exclude = [
"com.cordapp.contracts.ContractToExclude1",
"com.cordapp.contracts.ContractToExclude2"
],
contracts = [
{
className = "com.cordapp.contracts.Contract1",
attachmentIds = [ "C9FD27992C01F4DA04F060382F52039E3B2024D46092A890BED80BB2BE58E5B9", "AAAD27992C01F4DA04F060382F52039E3B2024D46092A890BED80BB2BE58E5B9" ]
},
{
className = "com.cordapp.contracts.Contract2",
attachmentIds = [ "C9FD27992C01F4DA04F060382F52039E3B2024D46092A890BED80BB2BE58E5B9" ]
}
]
}
exclude
option allows for filtering contracts during the whitelisting process. For example:
If a JAR file consists of multiple contracts but only some of them need to be whitelisted, then the exclude list
should consist of class names only of those contracts that should NOT be included in the whitelist.
If both cordappsJars
and contracts
are set, then the union of both is considered in the network parameters.Was this page helpful?
Thanks for your feedback!
Chat with us
Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.
Propose documentation improvements directly
Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.
We're sorry this page wasn't helpful. Let us know how we can make it better!
Chat with us
Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.
Create an issue
Create a new GitHub issue in this repository - submit technical feedback, draw attention to a potential documentation bug, or share ideas for improvement and general feedback.
Propose documentation improvements directly
Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.