Interface with SuperContracts
Description
This command allows interacting with SC.
Child commands
Command | Description |
---|---|
dfms-client sc deploy | Deploys SuperContract to Drive |
dfms-client sc exec | Executes SuperContract |
dfms-client-client sc get | Gets SuperContract |
dfms-client sc ls | Lists all SuperContracts for Drive |
dfms-client sc results | Lists SuperContracts results for specific Execution transaction hash |
dfms-client sc executions | Lists SuperContracts result Execution hashes |
dfms-client sc deactivate | Deactivates SuperContracts. After that, SuperContracts will be impossible to execute |
dfms-client sc deploy
Deploys SuperContract to Drive.
Arguments
Name | Description |
---|---|
contract | Drive Contract CID |
file | Drive path to SuperContract WAT source file |
Examples
Deploy a new SC:
$ dfms sc deploy baegaajaiaqjcacr4daqz4bcjw67md3dws6rtjqklxeyeetjxzputgpgrg6ivzabg newSC.wat SuperContract ID: baegqajaiaqjcbpxt6l4e3lbvkityq5q673j4v4tcyst34xzxtfkot65a5nmjbjem
dfms-client sc exec
Executes SuperContract.
Arguments
Name | Description |
---|---|
superContract | SuperContract CID |
gas | SuperContract GAS units for execution |
func | SuperContract function |
params | Execution function parameters (if required) |
Examples
Execute some func from the SC:
$ dfms sc exec baegqajaiaqjcbpxt6l4e3lbvkityq5q673j4v4tcyst34xzxtfkot65a5nmjbjem 1000 test Started execution SuperContract(baegqajaiaqjcbpxt6l4e3lbvkityq5q673j4v4tcyst34xzxtfkot65a5nmjbjem) txID: bafybeifbqukufovlk5oyjujzgev6t7co2ygtfcavcgvj5onph6v2mvwujm
dfms-client sc get
Gets SuperContract.
Arguments
Name | Description |
---|---|
superContract | SuperContract CID |
Examples
Show SC info:
$ dfms sc get baegqajaiaqjcbpxt6l4e3lbvkityq5q673j4v4tcyst34xzxtfkot65a5nmjbjem { "id": "baegqajaiaqjcbpxt6l4e3lbvkityq5q673j4v4tcyst34xzxtfkot65a5nmjbjem", "drive": { "drive": "baegaajaiaqjcacr4daqz4bcjw67md3dws6rtjqklxeyeetjxzputgpgrg6ivzabg", "owner": "08041220ad54820387c3e27c7ecb97c8d69866aa5917bb9c0b675e18f9506c9697f8dddb", "replicators": [ "080412200eb448d07c7ccb312989ac27aa052738ff589e2f83973f909b506b450dc5c4e2", "0804122068f50e10e5b8be2b7e9ddb687a667d6e94dd55fe02b4aed8195f51f9a242558b", "0804122073472a2e9dcea5c2a36eb7f6a34a634010391ec89e883d67360db16f28b9443c", "08041220d03918e35573c66578b5a0eed723fe2a46208783e13498751d9315115ca06d4b" ], "root": "bafybeif6nnag4e3fsgmc5bli3if2sfdjmtz3tflz2dzmohuj2cwbj7j26e", "created": 340, "duration": 518400, "space": 1000000000, "replicas": 5, "minReplicators": 3, "percentApprovers": 66, "billingPrice": 1, "billingPeriod": 172800 }, "file": "bafybeicx4cqljrdbjlzdohdumds7vfsm4jpuvijsv4hqbltztpdkgx2hme", "vmversion": 1, "functions": null }
dfms-client sc ls
Lists all SuperContracts for Drive.
Arguments
Name | Description |
---|---|
drive | Drive CID |
Examples
Show all drive's SC:
$ dfms sc ls baegaajaiaqjcb62j535f4p6ukuo5pagrdq2r2dcxvinxrn2u7rs7mh3lo5h3ph3w baegqajaiaqjca6p6kxxvuz4uw4ftf2e6emdmgj3i3peoyh277kz3dzzlfitsyqdj baegqajaiaqjcbaeg5bvbkp6m4zqvavvfrsklf6nuxcrooj6coywpiffs2wdvqxcf
dfms-client sc results
Lists SuperContracts results for specific Execution transaction hash.
Arguments
Name | Description |
---|---|
hash | Execution transaction hash |
Examples
Show results of some execute transaction:
$ dfms sc results bafybeiblduyqqlpuvwfl4dotuxebexqdhjzcovi4537ytxttl5ppvxwy6y /supercontracts/data32.txt bafybeihx52ggdr7izy6upoo4leackhoqogvbpu3ytufgpstesshpuulgli
dfms-client sc executions
Lists SuperContracts result Execution hashes.
Examples
Show all results of some SC:
$ dfms sc executions bafybeihx52ggdr7izy6upoo4leackhoqogvbpu3ytufgpstesshpuulgli
dfms-client sc deactivate
Deactivates SuperContracts. After that, SuperContracts will be impossible to execute.
Arguments
Examples
Deactivate some SC:
$ dfms sc deactivate baegqajaiaqjcbgiy66ue6nlrzwmvfni5ad77qj5xyblazeg3rqgrfdapvjysw5ir Deactivated SuperContract ID: baegqajaiaqjcbgiy66ue6nlrzwmvfni5ad77qj5xyblazeg3rqgrfdapvjysw5ir