File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
components/SubgraphEditor/SubgraphConfig Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,16 @@ const ContractInput = styled(InputField)`
4949
5050const ADDRESS_REGEX = / ^ 0 x [ 0 - 9 a - f ] { 40 } $ / i
5151
52+ const IGNORED_FUNCTIONS = [
53+ 'id_of_type' ,
54+ 'allocate' ,
55+ '__new' ,
56+ '__pin' ,
57+ '__unpin' ,
58+ '__collect' ,
59+ '_start' ,
60+ ]
61+
5262interface TErrorState {
5363 address ?: string
5464 compiler ?: string
@@ -126,7 +136,7 @@ export const SubgraphConfig = (props: SubgraphConfigProps) => {
126136 const module = await loadAsBytecode ( bytecode )
127137 const exports = WebAssembly . Module . exports ( module . module )
128138 const functionNames = exports
129- . filter ( _export => _export . kind === 'function' )
139+ . filter ( _export => _export . kind === 'function' && ! IGNORED_FUNCTIONS . includes ( _export . name ) )
130140 . map ( _export => _export . name )
131141 setMappingFunctionNames ( functionNames )
132142 setFnExtractionLoading ( false )
@@ -170,7 +180,7 @@ export const SubgraphConfig = (props: SubgraphConfigProps) => {
170180 return null
171181 }
172182
173- const updateSelectedContract = ( address : string , newProps : any ) => {
183+ const updateSelectedContract = ( address : string , newProps : Partial < Contract > ) => {
174184 if ( ! subgraph ) {
175185 throw new Error ( 'No subgraph' )
176186 }
You can’t perform that action at this time.
0 commit comments