File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,12 @@ An interactive Solidity shell with lightweight session recording.
2121 » uint b = 200
2222 » a + b + 2 + uint8 (50 )
2323352
24+ » $_
25+ 352
26+ » msg .sender
27+ 0x70e9B09abd6A13D2F5083CD5814076b77427199F
28+ » address (uint160 (address (msg .sender )))
29+ 0x70e9B09abd6A13D2F5083CD5814076b77427199F
2430```
2531
2632### Hints
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ const { convert, multilineInput } = require('../src/utils');
1616const CONFIG_HOME = path . join ( os . homedir ( ) , '.solidity-shell' ) ;
1717const CONFIG_FILE = '.config' ;
1818
19- const REX_PLACEHOLDER = / \s ( \$ _ ) ( \s | $ ) / ig /* LAST_KNOWN_RESULT placeholder */
19+ const REX_PLACEHOLDER = / ( ^ | \s ) ( \$ _ ) ( \s | $ ) / ig /* LAST_KNOWN_RESULT placeholder */
2020
2121var LAST_KNOWN_RESULT = 'ss' ;
2222var SESSION = 'previous.session' ;
@@ -100,7 +100,8 @@ vorpal
100100 .reset ... reset cmd history. start from scratch.
101101
102102 ${ c . bold ( 'Debug:' ) } :
103- .dump ... (debug) show template contract
103+ .proc ... show processes managed by solidity-shell (ganache)
104+ .dump ... show template contract
104105 .echo ... every shell needs an echo command
105106
106107
@@ -135,6 +136,11 @@ cheers 🙌
135136 } ; break ;
136137 case '.dump' : return cb ( c . yellow ( shell . template ( ) ) ) ;
137138 case '.echo' : return cb ( c . bold ( c . yellow ( commandParts . slice ( 1 ) . join ( ' ' ) ) ) )
139+ case '.proc' :
140+ if ( ! shell . blockchain . proc ) {
141+ return cb ( ) ;
142+ }
143+ return cb ( `${ c . bold ( c . yellow ( shell . blockchain . proc . pid ) ) } - ${ shell . blockchain . proc . spawnargs . join ( ', ' ) } ` )
138144
139145 default :
140146 console . error ( `Unknown Command: '${ command } '. Type ${ c . bold ( '.help' ) } for a list of commands.` ) ;
You can’t perform that action at this time.
0 commit comments