apply chain id in url
This commit is contained in:
parent
b5a889a205
commit
bfedae38f1
@ -14,17 +14,14 @@ const baseurl = "https://prod.compiler.welldonestudio.io"
|
|||||||
|
|
||||||
const verification = ref({});
|
const verification = ref({});
|
||||||
|
|
||||||
const chainId = computed(() => {
|
|
||||||
const base = useBaseStore()
|
|
||||||
return base.latest?.block?.header?.chain_id || "unknown"
|
|
||||||
})
|
|
||||||
|
|
||||||
console.log("contract:", props.contract)
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|
||||||
|
const base = useBaseStore()
|
||||||
|
const chainId = base.latest?.block?.header?.chain_id || "neutron-1"
|
||||||
// console.log("mounted", `${baseurl}/deploy-histories/neutron?contract=${props.contract}`, chainId.value)
|
// console.log("mounted", `${baseurl}/deploy-histories/neutron?contract=${props.contract}`, chainId.value)
|
||||||
get(`${baseurl}/deploy-histories/neutron?contract=${props.contract}`).then((x) => {
|
const url = `${baseurl}/deploy-histories/${chainId}?contract=${props.contract}`
|
||||||
|
console.log("url:", url)
|
||||||
|
get(url).then((x) => {
|
||||||
console.log("verification:", x)
|
console.log("verification:", x)
|
||||||
verification.value = x
|
verification.value = x
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
@ -39,7 +36,7 @@ function verify() {
|
|||||||
const data = {"contractAddress": props.contract, "chainId": id}
|
const data = {"contractAddress": props.contract, "chainId": id}
|
||||||
|
|
||||||
post(`${baseurl}/verification/neutron`, data).then((x)=> {
|
post(`${baseurl}/verification/neutron`, data).then((x)=> {
|
||||||
verification.value = x.result
|
if(x.result) verification.value = x.result
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user