forked from cerc-io/cosmos-explorer
Merge pull request #522 from 0xhsy/update-verification
Update verification
This commit is contained in:
commit
586fb2ecf1
17
src/assets/images/welldone-logo.svg
Normal file
17
src/assets/images/welldone-logo.svg
Normal file
@ -0,0 +1,17 @@
|
||||
<svg width="500" height="501" viewBox="0 0 500 501" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect y="0.871582" width="500" height="500" rx="120" fill="url(#paint0_linear_1821_9051)"/>
|
||||
<path d="M360.098 109C354.708 109 349.372 110.048 344.399 112.123C339.415 114.197 334.902 117.235 331.084 121.063C327.277 124.903 324.261 129.448 322.197 134.463C320.144 139.479 319.085 144.848 319.096 150.27V412.754C319.096 415.78 322.112 417.855 324.871 416.647C351.307 405.097 374.022 386.274 390.363 362.276C407.881 336.556 417.26 306.098 417.26 274.903V113.31C417.26 110.936 415.346 109 412.982 109H360.098Z" fill="#1A1A1A"/>
|
||||
<path d="M180.153 113.278C180.153 110.914 178.239 109 175.876 109H86.2671C83.9036 109 82 110.914 82 113.278V302.056C82 303.04 82.3315 303.992 82.9518 304.751L172.56 415.406C175.095 418.54 180.164 416.743 180.164 412.711V113.278H180.153Z" fill="#1A1A1A"/>
|
||||
<path d="M298.714 150.27V218.789C298.714 220.586 297.591 222.201 295.901 222.81C294.383 223.356 292.864 223.922 291.346 224.5C276.844 230.125 263.166 237.654 250.707 246.883C232.066 260.668 216.335 278.218 204.528 298.11C203.416 299.981 200.561 299.201 200.561 297.019V113.31C200.561 110.925 202.475 109 204.838 109H257.722C263.102 108.989 268.438 110.059 273.422 112.123C278.395 114.198 282.918 117.235 286.726 121.074C290.533 124.903 293.559 129.459 295.613 134.464C297.677 139.479 298.725 144.848 298.714 150.27Z" fill="#1A1A1A"/>
|
||||
<path d="M298.714 402.505V249.778C298.714 246.709 295.57 244.613 292.757 245.843C282.223 250.441 272.181 256.227 262.834 263.146C236.333 282.749 216.837 310.362 207.234 341.9C202.774 356.509 200.561 371.609 200.561 386.688V402.505C200.561 405.307 203.202 407.339 205.908 406.633C219.875 403.029 234.526 401.104 249.627 401.104C264.727 401.104 279.389 403.029 293.356 406.644C296.073 407.35 298.714 405.318 298.714 402.516V402.505Z" fill="url(#paint1_linear_1821_9051)"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_1821_9051" x1="250" y1="0.871582" x2="250" y2="500.872" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0.490672" stop-color="white"/>
|
||||
<stop offset="1" stop-color="#DDDDDD"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_linear_1821_9051" x1="249.637" y1="260.569" x2="249.637" y2="402.751" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0.28" stop-color="#2D6CFF"/>
|
||||
<stop offset="0.97" stop-color="#6AB8FF"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 2.3 KiB |
@ -5,6 +5,14 @@ import { computed, onMounted, ref } from "vue";
|
||||
|
||||
import DynamicComponent from '@/components/dynamic/DynamicComponent.vue';
|
||||
|
||||
interface Verification {
|
||||
chainId?: string;
|
||||
account?: string;
|
||||
codeId?: string;
|
||||
contract?: string;
|
||||
txHash?: string;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
const props = defineProps({
|
||||
contract: { type: String },
|
||||
@ -12,21 +20,21 @@ const props = defineProps({
|
||||
|
||||
const baseurl = "https://prod.compiler.welldonestudio.io"
|
||||
|
||||
const verification = ref({});
|
||||
const verification = ref<Verification>({});
|
||||
|
||||
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)
|
||||
const url = `${baseurl}/deploy-histories/${chainId}?contract=${props.contract}`
|
||||
console.log("url:", url)
|
||||
get(url).then((x) => {
|
||||
console.log("verification:", x)
|
||||
verification.value = x
|
||||
}).catch(e => {
|
||||
console.error(e)
|
||||
})
|
||||
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)
|
||||
const url = `${baseurl}/deploy-histories/${chainId}?contract=${props.contract}`
|
||||
console.log("url:", url)
|
||||
get(url).then((x) => {
|
||||
console.log("verification:", x)
|
||||
verification.value = x
|
||||
}).catch(e => {
|
||||
console.error(e)
|
||||
})
|
||||
})
|
||||
|
||||
function verify() {
|
||||
@ -39,23 +47,45 @@ function verify() {
|
||||
if(x.result) verification.value = x.result
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
<template>
|
||||
<div class="bg-base-100 px-4 pt-3 pb-4 rounded mb-4 shadow">
|
||||
<div class="flex justify-between">
|
||||
<span><h2 class="card-title truncate w-full mt-4 text-left">Verification</h2></span>
|
||||
<span class="avatar tooltip tooltip-left" data-tip="Powered By welldonestudio">
|
||||
<span class="avatar tooltip tooltip-left" data-tip="Powered By WELLDONE Studio">
|
||||
<div class="w-8 rounded">
|
||||
<img src="https://docs.welldonestudio.io/assets/images/welldone-610a90e2ebf1d86bc6ef3e1a0a18b0ef.gif" alt="Powered By welldonestudio" />
|
||||
<img src="../assets/images/welldone-logo.svg" alt="Powered By WELLDONE Studio"/>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
<!-- alert-info -->
|
||||
<div
|
||||
class="text-[#00cfe8] bg-[rgba(0,207,232,0.12)] rounded shadow mt-4 alert-info"
|
||||
>
|
||||
<div
|
||||
class="drop-shadow-md px-4 pt-2 pb-2"
|
||||
style="box-shadow: rgba(0, 207, 232, 0.4) 0px 6px 15px -7px"
|
||||
>
|
||||
<h2 class="text-base font-semibold">{{ $t('consensus.tips') }}</h2>
|
||||
</div>
|
||||
<div class="px-4 py-4">
|
||||
<ul style="list-style-type: disc" class="pl-8">
|
||||
<li>
|
||||
{{ $t('cosmwasm.tips_description_1') }}
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://docs.welldonestudio.io/code/verification-api/" target="_blank">Link to Verification API Manual</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div><DynamicComponent :value="verification"/></div>
|
||||
<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>
|
||||
<button class="btn btn-primary mt-5" @click="verify" :disabled="verification.error !== undefined">verify</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
@ -119,7 +119,8 @@
|
||||
"contract_balances": "合约余额",
|
||||
"no_escrowed_assets": "没有托管地址",
|
||||
"contract_states": "合约状态",
|
||||
"query_contract": "查询合约"
|
||||
"query_contract": "查询合约",
|
||||
"tips_description_1": "This feature is available when deploying contracts via WELLDONE Code. For more information, please check the document at the link below."
|
||||
},
|
||||
"gov": {
|
||||
"voting": "投票中",
|
||||
|
@ -127,7 +127,8 @@
|
||||
"contract_balances": "Contract Balances",
|
||||
"no_escrowed_assets": "No Escrowed Assets",
|
||||
"contract_states": "Contract States",
|
||||
"query_contract": "Query Contract"
|
||||
"query_contract": "Query Contract",
|
||||
"tips_description_1": "This feature is available when deploying contracts via WELLDONE Code. For more information, please check the document at the link below."
|
||||
},
|
||||
"gov": {
|
||||
"voting": "Voting",
|
||||
|
@ -118,7 +118,8 @@
|
||||
"contract_balances": "Saldo Kontrak",
|
||||
"no_escrowed_assets": "Tidak Ada Aset yang Dititipkan",
|
||||
"contract_states": "Bagian Kontrak",
|
||||
"query_contract": "Query Kontrak"
|
||||
"query_contract": "Query Kontrak",
|
||||
"tips_description_1": "This feature is available when deploying contracts via WELLDONE Code. For more information, please check the document at the link below."
|
||||
},
|
||||
"gov": {
|
||||
"voting": "Voting",
|
||||
|
Loading…
Reference in New Issue
Block a user