Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def command_desc(self):
p1 = ParameterDesc('symbol', 'token symbol or script hash')
p2 = ParameterDesc('from_addr', 'address to send token from')
p3 = ParameterDesc('to_addr', 'address to send token to')
return CommandDesc('allowance', 'get the amount an account can transfer from another acount', [p1, p2, p3])
def command_desc(self):
p1 = ParameterDesc('path', 'path to the desired smart contract (.avm) file')
p2 = ParameterDesc('storage', 'boolean input to determine if smart contract requires storage')
p3 = ParameterDesc('dynamic_invoke', 'boolean input to determine if smart contract requires dynamic invoke')
p4 = ParameterDesc('payable', 'boolean input to determine if smart contract is payable')
p5 = ParameterDesc('params', 'input parameter types of the smart contract')
p6 = ParameterDesc('returntype', 'the return type of the smart contract output')
p7 = ParameterDesc('inputs', 'test parameters fed to the smart contract, or use "--i" for prompted parameter input', optional=True)
p8 = ParameterDesc('--no-parse-addr', 'flag to turn off address parsing when input into the smart contract', optional=True)
p9 = ParameterDesc('--from-addr',
'source address to take fee funds from (if not specified, take first address in wallet)\n\n'
f"{' ':>17} Usage Examples:\n"
f"{' ':>20} load_run path.py True False False 0710 05 input1 input2\n"
f"{' ':>20} load_run path.py True False False 0710 05 --i\n\n"
f"{' ':>17} For more information about parameter types see\n"
f"{' ':>17} https://neo-python.readthedocs.io/en/latest/data-types.html#contractparametertypes\n", optional=True)
params = [p1, p2, p3, p4, p5, p6, p7, p8, p9]
return CommandDesc('load_run', 'load a specified smart contract (.avm) file and test it', params=params)
def command_desc(self):
p1 = ParameterDesc('--from-addr', 'source address to claim gas from (if not specified, take first address in wallet)', optional=True)
p2 = ParameterDesc('--to-addr',
'destination address for claimed gas (if not specified, take first address in wallet; or, use the from address, if specified)',
optional=True)
return CommandDesc('claim', 'claim gas', params=[p1, p2])
def command_desc(self):
p1 = ParameterDesc('path', 'path to the desired Python (.py) file')
return CommandDesc('build', 'compile a specified Python (.py) script into a smart contract (.avm) file', [p1])
def command_desc(self):
p1 = ParameterDesc('attribute', 'either "on"|"off" or 1|0, or "reset"')
return CommandDesc('debugstorage', 'use a separate database for smart contract storage item debugging', params=[p1])
def command_desc(self):
p1 = ParameterDesc('contract', 'token contract hash (script hash)')
p2 = ParameterDesc('inputs', 'test parameters fed to the smart contract, or use "--i" for prompted parameter input', optional=True)
p3 = ParameterDesc('--attach-neo', 'amount of neo to attach to the transaction. Required if --attach-gas is not specified', optional=True)
p4 = ParameterDesc('--attach-gas', 'amount of gas to attach to the transaction. Required if --attach-neo is not specified', optional=True)
p5 = ParameterDesc('--no-parse-addr', 'flag to turn off address parsing when input into the smart contract', optional=True)
p6 = ParameterDesc('--from-addr', 'source address to take fee funds from (if not specified, take first address in wallet)', optional=True)
p7 = ParameterDesc('--fee', 'Attach GAS amount to give your transaction priority (> 0.001) e.g. --fee=0.01', optional=True)
p8 = ParameterDesc('--owners', 'list of NEO addresses indicating the transaction owners e.g. --owners=[address1,address2]', optional=True)
p9 = ParameterDesc('--tx-attr',
'a list of transaction attributes to attach to the transaction\n\n'
f"{' ':>17} See: http://docs.neo.org/en-us/network/network-protocol.html section 4 for a description of possible attributes\n\n"
f"{' ':>17} Example\n"
f"{' ':>20} --tx-attr=[{{\"usage\": ,\"data\":\"\"}}, ...]\n"
f"{' ':>20} --tx-attr=[{{\"usage\": 0x90,\"data\":\"my brief description\"}}]\n\n"
f"{' ':>17} For more information about parameter types see\n"
f"{' ':>17} https://neo-python.readthedocs.io/en/latest/data-types.html#contractparametertypes\n", optional=True)
params = [p1, p2, p3, p4, p5, p6, p7, p8, p9]
return CommandDesc('invoke', 'Call functions on the smart contract. Will prompt before sending to the network', params=params)
def command_desc(self):
p1 = ParameterDesc('path', 'path to the desired smart contract (.avm) file')
p2 = ParameterDesc('storage', 'boolean input to determine if smart contract requires storage')
p3 = ParameterDesc('dynamic_invoke', 'boolean input to determine if smart contract requires dynamic invoke')
p4 = ParameterDesc('payable', 'boolean input to determine if smart contract is payable')
p5 = ParameterDesc('params', 'input parameter types of the smart contract')
p6 = ParameterDesc('returntype', 'the return type of the smart contract output')
p7 = ParameterDesc('inputs', 'test parameters fed to the smart contract, or use "--i" for prompted parameter input', optional=True)
p8 = ParameterDesc('--no-parse-addr', 'flag to turn off address parsing when input into the smart contract', optional=True)
p9 = ParameterDesc('--from-addr',
'source address to take fee funds from (if not specified, take first address in wallet)\n\n'
f"{' ':>17} Usage Examples:\n"
f"{' ':>20} load_run path.py True False False 0710 05 input1 input2\n"
f"{' ':>20} load_run path.py True False False 0710 05 --i\n\n"
f"{' ':>17} For more information about parameter types see\n"
f"{' ':>17} https://neo-python.readthedocs.io/en/latest/data-types.html#contractparametertypes\n", optional=True)
params = [p1, p2, p3, p4, p5, p6, p7, p8, p9]
return CommandDesc('load_run', 'load a specified smart contract (.avm) file and test it', params=params)
def command_desc(self):
p1 = ParameterDesc('address', 'address to split from')
p2 = ParameterDesc('asset', 'type of asset to split (NEO/GAS)')
p3 = ParameterDesc('unspent_index', 'index of the vin to split')
p4 = ParameterDesc('divisions', 'number of vouts to divide into ')
p5 = ParameterDesc('fee', 'Attach GAS amount to give your transaction priority (> 0.001) e.g. --fee=0.01', optional=True)
return CommandDesc('split', 'split an asset unspent output into N outputs', params=[p1, p2, p3, p4, p5])
def command_desc(self):
p1 = ParameterDesc('path', 'path to the desired Python (.py) file')
p2 = ParameterDesc('storage', 'boolean input to determine if smart contract requires storage')
p3 = ParameterDesc('dynamic_invoke', 'boolean input to determine if smart contract requires dynamic invoke')
p4 = ParameterDesc('payable', 'boolean input to determine if smart contract is payable')
p5 = ParameterDesc('params', 'input parameter types of the smart contract')
p6 = ParameterDesc('returntype', 'return type of the smart contract output')
p7 = ParameterDesc('inputs', 'test parameters fed to the smart contract, or use "--i" for prompted parameter input', optional=True)
p8 = ParameterDesc('--no-parse-addr', 'flag to turn off address parsing when input into the smart contract', optional=True)
p9 = ParameterDesc('--from-addr', 'source address to take fee funds from (if not specified, take first address in wallet)', optional=True)
p10 = ParameterDesc('--owners', 'list of NEO addresses indicating the transaction owners e.g. --owners=[address1,address2]', optional=True)
p11 = ParameterDesc('--tx-attr',
'a list of transaction attributes to attach to the transaction\n\n'
f"{' ':>17} See: http://docs.neo.org/en-us/network/network-protocol.html section 4 for a description of possible attributes\n\n"
f"{' ':>17} Example\n"
f"{' ':>20} --tx-attr=[{{\"usage\": ,\"data\":\"\"}}, ...]\n"
f"{' ':>20} --tx-attr=[{{\"usage\": 0x90,\"data\":\"my brief description\"}}]\n\n"
f"{' ':>17} Usage Examples:\n"
f"{' ':>20} build_run path.py True False False 0710 05 input1 input2\n"