@@ -82,9 +82,8 @@ export async function compile(url: string, contract: Contract): Promise<VyperCom
82
82
[ contractName ] : { content : contract . content }
83
83
}
84
84
}
85
- console . log ( 'compilePackage' , `${ url } compile` )
86
- let response = await axios . post ( `${ url } compile` , compilePackage )
87
85
86
+ let response = await axios . post ( `${ url . endsWith ( '/' ) ? url + 'compile' : url + '/compile' } ` , compilePackage )
88
87
if ( response . status === 404 ) {
89
88
throw new Error ( `Vyper compiler not found at "${ url } ".` )
90
89
}
@@ -97,17 +96,17 @@ console.log('compilePackage', `${url}compile`)
97
96
response = null
98
97
let result : any
99
98
100
- const status = await ( await axios . get ( url + 'status/' + compileCode , {
99
+ const status = await ( await axios . get ( ` ${ url . endsWith ( '/' ) ? url + 'status/' : url + '/status/' } ` + compileCode , {
101
100
method : 'Get'
102
101
} ) ) . data
103
102
if ( status === 'SUCCESS' ) {
104
- result = await ( await axios . get ( url + 'artifacts/' + compileCode , {
103
+ result = await ( await axios . get ( ` ${ url . endsWith ( '/' ) ? url + 'artifacts/' : url + '/artifacts/' } ` + compileCode , {
105
104
method : 'Get'
106
105
} ) ) . data
107
106
108
107
return result
109
108
} else if ( status === 'FAILED' ) {
110
- const intermediate = await ( await axios . get ( url + 'exceptions/' + compileCode , {
109
+ const intermediate = await ( await axios . get ( ` ${ url . endsWith ( '/' ) ? url + 'exceptions/' : url + '/exceptions/' } ` + compileCode , {
111
110
method : 'Get'
112
111
} ) ) . data
113
112
return intermediate
@@ -189,7 +188,7 @@ export async function compileContract(contract: string, compilerUrl: string, set
189
188
title : 'Compiling'
190
189
} )
191
190
// try {
192
- let output = await compile ( compilerUrl , _contract )
191
+ const output = await compile ( compilerUrl , _contract )
193
192
if ( output && output [ 0 ] && output [ 0 ] . status === 'failed' ) {
194
193
remixClient . changeStatus ( {
195
194
key : 'failed' ,
0 commit comments