Blog/backend/edit_route.py

62 lines
No EOL
1.7 KiB
Python

import json
route = {
"1": {
"command": "neo-go wallet init",
"flags": {
"wallet": "wallet file name",
"account": "create new account"
}
},
"2": {
"command": "neo-go wallet dump-keys",
"flags": {
"wallet": "wallet file name",
}
},
"3": {
"command": "neo-go wallet nep17 balance",
"flags": {
"wallet": "wallet file name",
}
},
"4": {
"command": "neo-go wallet nep17 transfer",
"flags": {
"wallet": "wallet file name(wallet from which transfer is made)",
"from": "hash of wallet from which transfer is made",
"to" : "hash of wallet to which transfer is made",
"amount": "gas transfer amount",
"token": "token for transfer NEO/GAS",
}
},
"5": {
"command": "neo-go contract compile",
"flags": {
"in": "smart contract file name(*.go)",
"manifest": "contract manifest file name(*.json)",
"contract_config" : "contract config file name(*.yml)",
}
},
"6": {
"command": "neo-go contract deploy",
"flags": {
"wallet": "wallet file name",
"in": "compiled smart contract file name(*.nef)",
"manifest" : "manifest file name(*.json)",
}
},
"7": {
"command": "neo-go contract invokefunction",
"flags": {
"wallet": "wallet file name",
"contract_hash": "hash of contract",
"func_name": "name of invoked func",
"parameters": "list([]) of func parameters"
}
}
}
with open("route.json", "w") as f:
f.write(json.dumps(route))