% SCABBARD-CONTRACT-UPLOAD(1) Cargill, Incorporated | Splinter Commands
scabbard-contract-upload — Uploads a smart contract to scabbard
scabbard contract upload [FLAGS] [OPTIONS] SCAR
This command takes a sabre contract archive (scar) file and uploads its smart contract to a scabbard service. The scar file is specified using a name, version requirement, and a list of paths. The file to upload is dynamically determined by searching the specified paths for a scar file matching the given name and version requirement. If multiple scar files are found that match the name/version, the file with the latest version will be used.
- Prints help information.
- Increases verbosity. Specify multiple times for more output.
- Indicates the key file to use for signing scabbard transactions. The
FILEcan be a relative or absolute file path, or it can be the name of a .priv file in the
$HOME/.splinter/keysdirectory. The target file must contain a valid secp256k1 private key. This option is required.
- Specifies the directory path(s) to use when searching for the scar file to
upload. This option can be specified multiple times to provide multiple
directories to search. If this option is not provided, the
$SCAR_PATHenvironment variable will be checked. If the environment variable has not been set, the default path
/usr/share/scarwill be used.
- Specifies the fully-qualified service ID of the targeted scabbard service,
using the format
CIRCUIT_ID::SERVICE_ID. This option is required.
- Specifies the URL for the
splinterdREST API that is running the targeted scabbard service. (default
http://localhost:8080) This option is required.
- If provided, waits the given number of seconds for the batch to commit. Displays an error message if the batch does not commit in time.
- Specifies the name and version requirements of the scar file to upload, using
NAME:VERSION_REQ. The name must not include underscores (
_), since these are invalid in scar file names. The version requirement can be any valid semantic versioning requirement string (for details on semantic versioning, visit https://semver.org/).
- List of directories to use when searching for the scar file to upload. (See
The following command uploads the smart contract from a scar file located at
/usr/share/scar/xo_0.3.3.scar. It uploads the contract to a scabbard service
01234-ABCDE with service ID
abcd, running on the node with the
REST API endpoint
$ scabbard contract upload \ --url http://localhost:8088 \ --service-id 01234-ABCDE::abcd \ --key ~/user.priv \ xo:0.3.3
For the next command, there are two scar files in the
intkey_0.1.1.scar. This command uploads the smart
intkey_0.1.1.scar, since it specifies a minimum version
0.1.1 is later than
$ scabbard contract upload \ --url http://localhost:8088 \ --service-id 01234-ABCDE::abcd \ --key ~/user.priv \ --path ~/scar \ xo:0.1
The next example uploads the contract from the same
intkey_0.1.1.scar file to
he same scabbard service, but it uses a wildcard to match any version. It also
specifies a key in the
$HOME/.splinter/keys directory by name and waits up to
10 seconds for the contract upload batch to commit.
$ scabbard contract upload \ --url http://localhost:8088 \ --service-id 01234-ABCDE::abcd \ --key ~/user.priv \ --wait 10 \ --path ~/scar \ xo:*
| Splinter documentation: https://www.splinter.dev/docs/