forked from cerc-io/cosmos-explorer
add verification
This commit is contained in:
parent
64460a686c
commit
10d95e9d0b
src
@ -23,9 +23,9 @@ console.log("contract:", props.contract)
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|
||||||
console.log("mounted", `${baseurl}/deploy-histories/neutron-1?contract=${props.contract}`, chainId.value)
|
// console.log("mounted", `${baseurl}/deploy-histories/neutron?contract=${props.contract}`, chainId.value)
|
||||||
get(`${baseurl}/deploy-histories/${chainId.value}?contract=${props.contract}`).then((x) => {
|
get(`${baseurl}/deploy-histories/neutron?contract=${props.contract}`).then((x) => {
|
||||||
console.log("x:", x)
|
console.log("verification:", x)
|
||||||
verification.value = x
|
verification.value = x
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
@ -36,17 +36,22 @@ function verify() {
|
|||||||
|
|
||||||
const base = useBaseStore()
|
const base = useBaseStore()
|
||||||
const id = base.latest?.block?.header?.chain_id || "unknown"
|
const id = base.latest?.block?.header?.chain_id || "unknown"
|
||||||
const data = {"contractAddress": props.contract, "chainId": "neutron"}
|
const data = {"contractAddress": props.contract, "chainId": id}
|
||||||
console.log(data)
|
|
||||||
post(`${baseurl}/verification/neutron`, data).then((x)=> {
|
post(`${baseurl}/verification/neutron`, data).then((x)=> {
|
||||||
console.log("x", x)
|
verification.value = x.result
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="bg-base-100 px-4 pt-3 pb-4 rounded mb-4 shadow">
|
<div class="bg-base-100 px-4 pt-3 pb-4 rounded mb-4 shadow">
|
||||||
<h2 class="card-title truncate w-full mt-4">Verification {{ chainId }}</h2>
|
<h2 class="card-title truncate w-full mt-4">Verification</h2>
|
||||||
<div><DynamicComponent :value="verification"/></div>
|
<div><DynamicComponent :value="verification"/></div>
|
||||||
<button class="btn btn-primary" @click="verify">verify</button>
|
<div class="text-center">
|
||||||
|
<div v-if="Object.keys(verification).length == 0" >
|
||||||
|
<Icon icon="mdi:emoticon-sad-outline"></Icon>Haven't found verification
|
||||||
|
</div>
|
||||||
|
<button class="btn btn-primary mt-5" @click="verify">verify</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
@ -40,7 +40,7 @@ export async function post(url: string, data: any) {
|
|||||||
// credentials: 'same-origin', // redirect: 'follow', // manual, *follow, error
|
// credentials: 'same-origin', // redirect: 'follow', // manual, *follow, error
|
||||||
// referrerPolicy: 'origin', // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url
|
// referrerPolicy: 'origin', // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'text/plain',
|
'Content-Type': 'application/json',
|
||||||
Accept: '*/*',
|
Accept: '*/*',
|
||||||
'Accept-Encoding': 'gzip, deflate, br',
|
'Accept-Encoding': 'gzip, deflate, br',
|
||||||
},
|
},
|
||||||
|
@ -202,7 +202,7 @@ const result = ref({});
|
|||||||
<PaginationBar :limit="page.limit" :total="txs.pagination?.total" :callback="pageload" />
|
<PaginationBar :limit="page.limit" :total="txs.pagination?.total" :callback="pageload" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<WasmVerification v-if="contractAddress=='1'" :contract="contractAddress" class="hide"/>
|
<WasmVerification :contract="contractAddress"/>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<input type="checkbox" id="modal-contract-funds" class="modal-toggle" />
|
<input type="checkbox" id="modal-contract-funds" class="modal-toggle" />
|
||||||
|
Loading…
Reference in New Issue
Block a user