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