|
|
@ -43,11 +43,10 @@ export async function compile(url: string, contract: Contract): Promise<VyperCom |
|
|
|
if (extension !== 'vy') { |
|
|
|
if (extension !== 'vy') { |
|
|
|
throw new Error('Use extension .vy for Vyper.') |
|
|
|
throw new Error('Use extension .vy for Vyper.') |
|
|
|
} |
|
|
|
} |
|
|
|
const data = JSON.stringify({ code: contract.content }) |
|
|
|
|
|
|
|
const response = await fetch(url, { |
|
|
|
const response = await fetch(url, { |
|
|
|
method: 'POST', |
|
|
|
method: 'POST', |
|
|
|
headers: { 'Content-Type': 'application/json', 'Content-Length': data.length.toString() }, |
|
|
|
headers: { 'Content-Type': 'application/json' }, |
|
|
|
body: data |
|
|
|
body: JSON.stringify({ code: contract.content }) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
if (response.status === 404) { |
|
|
|
if (response.status === 404) { |
|
|
|