From 2078e4a870abf58625ff80894b8f0cddf86dd775 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Sun, 24 Sep 2023 09:11:07 +0200 Subject: [PATCH 1/2] add decode --- .../src/lib/providers/completion/completionGlobals.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libs/remix-ui/editor/src/lib/providers/completion/completionGlobals.ts b/libs/remix-ui/editor/src/lib/providers/completion/completionGlobals.ts index c3b1db62a3a..90548405167 100644 --- a/libs/remix-ui/editor/src/lib/providers/completion/completionGlobals.ts +++ b/libs/remix-ui/editor/src/lib/providers/completion/completionGlobals.ts @@ -293,6 +293,14 @@ export function getAbiCompletionItems(range: monacoTypes.IRange, monaco): monaco label: 'encodeWithSignature', range }, + { + label: 'decode', + kind: monaco.languages.CompletionItemKind.Method, + insertText: 'decode(${1:arg});', + insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet, + detail: 'decode(bytes encodedData, (...)) returns (...): ABI-decodes the given arguments from the given encodedData', + range + } ]; } From 1d534695c69fe0a74d582a3dcca44c8769fcd163 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Sun, 24 Sep 2023 09:21:28 +0200 Subject: [PATCH 2/2] 2 args --- .../editor/src/lib/providers/completion/completionGlobals.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-ui/editor/src/lib/providers/completion/completionGlobals.ts b/libs/remix-ui/editor/src/lib/providers/completion/completionGlobals.ts index 90548405167..27066b9237b 100644 --- a/libs/remix-ui/editor/src/lib/providers/completion/completionGlobals.ts +++ b/libs/remix-ui/editor/src/lib/providers/completion/completionGlobals.ts @@ -296,7 +296,7 @@ export function getAbiCompletionItems(range: monacoTypes.IRange, monaco): monaco { label: 'decode', kind: monaco.languages.CompletionItemKind.Method, - insertText: 'decode(${1:arg});', + insertText: 'decode(${1:arg}, ${2:arg});', insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet, detail: 'decode(bytes encodedData, (...)) returns (...): ABI-decodes the given arguments from the given encodedData', range