Improve helper scripts #41
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/improve-scripts"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
now using the library in add-proposal.js, too. And the CLI is smarter and allows calling functions on the contract and on the wrapper.
Some comments
Do you have a linter now?
Where does
contributorscome from?So good that we went with upper case contract names and the properties instead of the functions!
But it will breaks on
Contributor, wouldn’t it? I think we should rename that contract next and align the module code to it. Will make the future much brighter!@ -30,2 +30,4 @@return;}let argumentInput = await promptly.prompt('Arguments (comma separated): ', { default: '' });let args = [];👀 nice!
@ -34,1 +44,4 @@func = contractWrapper.functions[method];}func.apply(contractWrapper, args).then((result) => {console.log("\nResult:");Haha master of es6. I think you don’t need the if and the initial
argslet args = argumentInput.split(',')should return an empty array.nah, not yet. :(
@ -34,1 +44,4 @@func = contractWrapper.functions[method];}func.apply(contractWrapper, args).then((result) => {console.log("\nResult:");oh yeah, true.
@ -34,1 +44,4 @@func = contractWrapper.functions[method];}func.apply(contractWrapper, args).then((result) => {console.log("\nResult:");ah noo. it returns an array with an empty string, that was the reason for the if. or what am I missing?
@ -29,0 +25,4 @@method = await promptly.prompt('Function: ');}if (!contractWrapper[method] && !contractWrapper.functions[method]) {yes, agree on renaming it! and maybe adding an alias for Contributor <=> Contributors
@ -34,1 +44,4 @@func = contractWrapper.functions[method];}func.apply(contractWrapper, args).then((result) => {console.log("\nResult:");Ah ok.
@ -34,1 +44,4 @@func = contractWrapper.functions[method];}func.apply(contractWrapper, args).then((result) => {console.log("\nResult:");But if input is already not an empty string, wouldn't it return an array with one argument string?
@ -29,0 +25,4 @@method = await promptly.prompt('Function: ');}if (!contractWrapper[method] && !contractWrapper.functions[method]) {I opened #44 for the alias
@ -34,1 +44,4 @@func = contractWrapper.functions[method];}func.apply(contractWrapper, args).then((result) => {console.log("\nResult:");https://jsbin.com/qarikabane/edit?js,console
it would return
[""]but if no arguments are given I need[].@ -34,1 +44,4 @@func = contractWrapper.functions[method];}func.apply(contractWrapper, args).then((result) => {console.log("\nResult:");I was actually asking about the
triminside, but no idea why. It's for removing whitespace, so that's still needed.@ -34,1 +44,4 @@func = contractWrapper.functions[method];}func.apply(contractWrapper, args).then((result) => {console.log("\nResult:");yep, trim() for potential whitespace as for example in
"first, second"mergeable? or is anything missing?