Closed NicolasMahe closed 5 years ago
The command service:detail returns a correct service definition:
cli git:(feature/new-deploy) ./bin/run service:detail CfXKjFHwNo8GXyyg5qpEWaHzb6ec27NCma52k1hgUEBw
[
{
"status": 1,
"definition": {
"name": "Ethereum",
"description": "Ethereum Service to interact with any Smart Contract",
"tasks": [
{
"name": "Execute a Smart Contract Method",
"description": "This task executes a method on any Smart Contract",
"inputs": [
{
"name": "Method ABI",
"description": "The ABI of the method to execute. Only pass the ABI of the method and NOT all the Smart Contract's ABI.",
"type": "Any",
"key": "methodAbi"
},
{
"name": "Inputs",
"description": "The inputs to use during the execution of the method. Pass an Object with parameter's name as key and parameter's value as value.",
"type": "Any",
"key": "inputs"
},
{
"name": "Contract address",
"description": "The address of the contract",
"type": "String",
"key": "contractAddress"
},
{
"name": "Signer private key",
"description": "The private key to sign the transaction",
"type": "String",
"key": "privateKey"
},
{
"type": "String",
"optional": true,
"key": "value"
},
{
"name": "Gas Price",
"description": "The gas price in wei to use for this transaction",
"type": "String",
"optional": true,
"key": "gasPrice"
},
{
"name": "Gas Limit",
"description": "The maximum gas provided for this transaction",
"type": "Number",
"optional": true,
"key": "gas"
}
],
"outputs": [
{
"name": "Success",
"description": "Output when the task executes successfully"
},
{
"name": "Error",
"description": "Output when an error occurs"
}
],
"key": "executeSmartContractMethod"
},
{
"name": "Call a Smart Contract Method",
"description": "This task call a 'constant' method on any Smart Contract. It does not require fees.",
"inputs": [
{
"name": "Method ABI",
"description": "The ABI of the method to execute. Only pass the ABI of the method and NOT all the Smart Contract's ABI.",
"type": "Any",
"key": "methodAbi"
},
{
"name": "Inputs",
"description": "The inputs to use during the execution of the method. Pass an Object with parameter's name as key and parameter's value as value.",
"type": "Any",
"key": "inputs"
},
{
"name": "Contract address",
"description": "The address of the contract",
"type": "String",
"key": "contractAddress"
}
],
"outputs": [
{
"name": "Success",
"description": "Output when the task executes successfully"
},
{
"name": "Error",
"description": "Output when an error occurs"
}
],
"key": "callSmartContractMethod"
},
{
"inputs": [
{
"type": "Any",
"key": "abi"
},
{
"type": "String",
"key": "address"
},
{
"type": "String",
"key": "data"
},
{
"type": "Any",
"key": "topics"
},
{
"type": "Number",
"key": "logIndex"
},
{
"type": "String",
"key": "transactionHash"
},
{
"type": "Number",
"key": "transactionIndex"
},
{
"type": "String",
"key": "blockHash"
},
{
"type": "Number",
"key": "blockNumber"
}
],
"outputs": [
{},
{
"name": "Error",
"description": "Output when an error occurs"
}
],
"key": "decodeLog"
}
],
"events": [
{
"data": [
{
"type": "String",
"key": "address"
},
{
"type": "String",
"key": "data"
},
{
"type": "Any",
"key": "topics"
},
{
"type": "Number",
"key": "logIndex"
},
{
"type": "String",
"key": "transactionHash"
},
{
"type": "Number",
"key": "transactionIndex"
},
{
"type": "String",
"key": "blockHash"
},
{
"type": "Number",
"key": "blockNumber"
}
],
"key": "log"
},
{
"data": [
{
"type": "Number",
"key": "number"
},
{
"type": "String",
"key": "hash"
},
{
"type": "String",
"key": "parentHash"
},
{
"type": "String",
"key": "sha3Uncles"
},
{
"type": "String",
"key": "logsBloom"
},
{
"type": "String",
"key": "stateRoot"
},
{
"type": "String",
"key": "miner"
},
{
"type": "String",
"key": "extraData"
},
{
"type": "Number",
"key": "gasLimit"
},
{
"type": "Number",
"key": "gasUsed"
},
{
"type": "Number",
"key": "timestamp"
},
{
"type": "Number",
"key": "size"
},
{
"type": "String",
"key": "difficulty"
}
],
"key": "block"
},
{
"data": [
{
"type": "String",
"key": "transactionHash"
},
{
"type": "Number",
"key": "transactionIndex"
},
{
"type": "String",
"key": "blockHash"
},
{
"type": "Number",
"key": "blockNumber"
},
{
"type": "String",
"key": "from"
},
{
"type": "String",
"optional": true,
"key": "to"
},
{
"type": "Boolean",
"key": "status"
},
{
"type": "String",
"key": "value"
},
{
"type": "String",
"key": "gasPrice"
},
{
"type": "Number",
"key": "gas"
},
{
"type": "Number",
"key": "gasUsed"
},
{
"type": "String",
"key": "input"
},
{
"type": "String",
"optional": true,
"key": "contractAddress"
},
{
"type": "Number",
"key": "cumulativeGasUsed"
},
{
"type": "Object",
"optional": true,
"key": "logs",
"repeated": true,
"object": [
{
"type": "String",
"key": "address"
},
{
"type": "String",
"key": "data"
},
{
"type": "String",
"key": "topics",
"repeated": true
},
{
"type": "Number",
"key": "logIndex"
},
{
"type": "String",
"key": "transactionHash"
},
{
"type": "Number",
"key": "transactionIndex"
},
{
"type": "String",
"optional": true,
"key": "blockHash"
},
{
"type": "Number",
"key": "blockNumber"
}
]
}
],
"key": "transaction"
}
],
"configuration": {},
"hash": "CfXKjFHwNo8GXyyg5qpEWaHzb6ec27NCma52k1hgUEBw",
"sid": "com.mesg.ethereum"
}
}
]
@NicolasMahe I've locally fixed this but didn't create a PR for now since service:start
is meant to be used with service:deploy
. I'm experimenting with new deploy & start commands and I'll create some fix PRs to complete missing parts of new deploy afterwards.
This issue is related to missing "service" key on service definition's Configuration. It also misses holding the default env vars given by the compile command.
Related to https://github.com/mesg-foundation/cli/pull/32 and https://github.com/mesg-foundation/engine/pull/1014
I got a weird error when I want to start a service deployed with this new command:
I previously executed the command:
It returned:
The command service list of the Go cli show this service: