File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ contract P2PKH() {
44 function spend() {
55 // bytes2 left, bytes2 right = 0x123456.split(2);
66 // require(left == right);
7-
8- require(tx.outputs[0].value == tx.inputs[this.activeInputIndex].value - 1000);
7+ require(tx.outputs[0].value == tx.inputs[this.activeInputIndex].value - 10*10);
98 }
109}
Original file line number Diff line number Diff line change @@ -62,10 +62,6 @@ export default class CashscriptCompletionProvider implements vscode.CompletionIt
6262 if ( arr [ 2 ] ) keyword += "_indexed" ; // ex. inputs[0].
6363 console . log ( "keyword: " , keyword ) ;
6464
65- // return [{
66- // label:keyword,
67- // kind:CompletionItemKind.Field
68- // }]
6965 return DOT_COMPLETIONS [ keyword ] ;
7066 }
7167
Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ class CashscriptHoverProvider implements vscode.HoverProvider{
2525 const miscel = this . getMiscellaneousHovers ( document , position ) ;
2626 if ( miscel ) return new vscode . Hover ( miscel , range )
2727
28- const dotHovers = this . getTxDotHovers ( document , position ) ;
29- if ( dotHovers ) return new vscode . Hover ( dotHovers , range )
28+ // const dotHovers = this.getTxDotHovers(document, position);
29+ // if(dotHovers) return new vscode.Hover(dotHovers, range)
3030
3131
3232 return null ;
@@ -83,12 +83,12 @@ class CashscriptHoverProvider implements vscode.HoverProvider{
8383 return matches [ 1 ] ;
8484 }
8585
86+ // NEED TO UPDATE THIS AFTER NEW DOCS COME OUT
8687 getTxDotHovers ( document :vscode . TextDocument , position :vscode . Position ) :vscode . MarkdownString [ ] {
8788 const reg = / t x .[ a - z A - Z 0 - 9 ] + / ;
8889 let range = document . getWordRangeAtPosition ( position , reg ) ;
8990 let word = document . getText ( range ) . substring ( 3 ) ;
9091
91- // /### tx.(\w+)\n+```solidity\n(.+)\n```/
9292 const TX_HOVERS = {
9393 time :{
9494 code :'require(tx.time >= <expression>);'
Original file line number Diff line number Diff line change @@ -110,57 +110,6 @@ let TYPECASTS:Data = {
110110let LANGUAGE :Data = { ...GLOBAL_FUNCTIONS , ...OUTPUT_INSTANTIATION , ...STATEMENTS } ;
111111
112112
113- /*
114- {
115- label:"time",
116- kind:CompletionItemKind.Field,
117- },
118- {
119- label:"age",
120- kind:CompletionItemKind.Field
121- },
122- {
123- label:"version",
124- kind:CompletionItemKind.Field
125- },
126- {
127- label:"hashPrevouts",
128- kind:CompletionItemKind.Field
129- },
130- {
131- label:"hashSequence",
132- kind:CompletionItemKind.Field
133- },
134- {
135- label:"outpoint",
136- kind:CompletionItemKind.Field
137- },
138- {
139- label:"bytecode",
140- kind:CompletionItemKind.Field
141- },
142- {
143- label:"value",
144- kind:CompletionItemKind.Field
145- },
146- {
147- label:"sequence",
148- kind:CompletionItemKind.Field
149- },
150- {
151- label:"hashOutputs",
152- kind:CompletionItemKind.Field
153- },
154- {
155- label:"locktime",
156- kind:CompletionItemKind.Field
157- },
158- {
159- label:"hashtype",
160- kind:CompletionItemKind.Field
161- },
162- */
163-
164113let DOT_COMPLETIONS :{ [ key :string ] :CompletionItem [ ] } = {
165114 tx :[
166115 {
You can’t perform that action at this time.
0 commit comments