Build --tx for A1 appears to HANG because it is prompting interactively for VotingSystems. WHAT IS AN EXAMPLE VotingSystems VALUE?

My A1 build was appearing to hang when I ran it from python in a command process script.
Finally I decided to try running it interactively myself in the CLI.

[email protected]:~/go/src/github.com/tokenized/smart-contract$ source ./conf/service-envs/covid19greenlight_cli.env && go run ./cmd/smartcontract/main.go build A1 ./covid19greenlight_asset_definition_SHC2.json --tx
How many voting systems are in the contract: 1
Checking Asset Definition
2020/06/09 17:22:50.933181 [Main] wallet.go:161 Info - Loaded wallet with 0 outputs, 0 unspent, and balance of 0.00000000
2020/06/09 17:22:50.933299 [Main] wallet.go:164 Info - Wallet address : 16GgqN2sWSTZAZobNkR6uLVUUmD8LnnSPM
2020/06/09 17:22:50.933330 [Main] node.go:114 Info - Contract address : 1QAinrbEfjv46jdpwZcqc1nB4tWH9AE8in
Response estimated : 324 bytes, 1546 funding
Insufficient balance for tx fee 0.00000096 : balance 0.00000000
[email protected]:~/go/src/github.com/tokenized/smart-contract$

VotingSystems is not in the Example on page 15 in Tokenized-smart-contract-agent-setup-final.pdf:
This is the layout of my JSON file:
{
“TransfersPermitted” : true,
“EnforcementOrdersPermitted” : true,
“VotingRights” : true,
“TokenQty” : 5,
“AssetType” : “SHC”,
“AssetPayload” :
“120543534752552228466f756e646572732073686172657320696e20436f69
6e73746f72616765205074792e204c74642e”
}

So I believe there is no problem with Build- it only blocked since I was trying to automate the CLI
call in a python command process.

SO WHAT SHOULD I SPECIFY FOR VOTINGSYSTEMS AS A DON’T CARE VALUE OR
A GOOD DEFAULT VALUE?

If your contract has no voting systems then specify zero. It uses that to ensure the permissions are correct because they are based on the number of voting systems in the contract.

I was guessing that there was a VotingSystems property in the AssetDefintion which I had missed.
I understand from the reply that I should set VotingSystems to 0 to prevent build from interactively prompting for How many voting systems…
However after more research, I see that a VotingSystems property does not exist explicitly in the AssetDefinition.
Instead, it is specified in the AssetPermissions structure.
I found these References, but there is no actual example:
https://tokenized.com/docs/protocol/actions#type-voting-system

OHHH In the AssetDefinition, I need to include the AssetPermissions property, where I can set VotingSystems to 0:
https://tokenized.com/docs/protocol/actions#action-asset-definition
AssetPermissions varbin(small) A set of permission objects containing switches and field references that define the permissions
for modifying this asset. See the Permission documentation for more detail.
https://tokenized.com/docs/concepts/permissions
The booleans that make up the array of (M) represent a voting system (by index) and a value of
1 = that voting system may control the field, 0 = that voting system does not control that field.

So I specified {“AssetPermissions”: [0], …
Then according to the console output, it converted that to
{“AssetPermissions”: “00”, …
Then,
IT STILL PROMPTED FOR “How many voting systems are in the contract:”

I am able to work around this by sending a 0 through a pipe into the build command:
echo 0 | go run ./cmd/smartcontract/main.go build
That satisfies the prompt and prevents the build command from hanging.

Question: So is it possible to prevent the prompt, and if yes, then exactly how?

The CLI is meant as a command line interface for development and testing. There is no way to prevent the prompt. It is not designed to be used in any automated system. If you are building a product, then you should find libraries that support those functions in your language. It is not a good idea to build a product on top of a test tool and we will not support it as a project dependency. We have only currently built out golang, but plan to add support for other languages in the future.

Right. But remember it is necessary to understand the system first. And the CLI is much easier and quicker to understand than the low level golang methods. Over time, I will convert the python calls to CLI to instead hit the golang library by a grpc wrapper or REST API wrapper.
This is an example of a customer using a system not in the way it was intended but in fact it is a good way to do it. It is like having a verbose API to use for initial learning curve.
It is a VERY GOOD idea to build a POC on top of a test tool.