commit
53f2c0d134
19
chains/mainnet/humans.json
Normal file
19
chains/mainnet/humans.json
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"chain_name": "humans",
|
||||||
|
"api":["https://api.humans-mainnet.stake-take.com"],
|
||||||
|
"rpc":["https://rpc.humans-mainnet.stake-take.com"],
|
||||||
|
"snapshot_provider": "",
|
||||||
|
"sdk_version": "0.46.3",
|
||||||
|
"coin_type": 60,
|
||||||
|
"min_tx_fee": "5000",
|
||||||
|
"addr_prefix": "human",
|
||||||
|
"logo": "/logos/humans.jpg",
|
||||||
|
"keplr_features": ["ibc-transfer", "ibc-go", "eth-address-gen", "eth-key-sign"],
|
||||||
|
"assets": [{
|
||||||
|
"base": "aheart",
|
||||||
|
"symbol": "HEART",
|
||||||
|
"exponent": 18,
|
||||||
|
"coingecko_id": "humans-ai",
|
||||||
|
"logo": "/logos/humans.jpg"
|
||||||
|
}]
|
||||||
|
}
|
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"chain_name": "osmosis",
|
"chain_name": "osmosis",
|
||||||
"coingecko": "osmosis",
|
"coingecko": "osmosis",
|
||||||
"api": ["https://api-osmosis-ia.cosmosia.notional.ventures", "https://osmosis-api.polkachu.com", "https://lcd-osmosis.blockapsis.com"],
|
"api": ["https://lcd.osmosis.zone","https://api-osmosis-ia.cosmosia.notional.ventures", "https://osmosis-api.polkachu.com", "https://lcd-osmosis.blockapsis.com"],
|
||||||
"rpc": ["https://rpc-osmosis-ia.cosmosia.notional.ventures:443", "https://osmosis-rpc.polkachu.com:443", "https://osmosis.validator.network:443", "https://rpc-osmosis.blockapsis.com:443"],
|
"rpc": ["https://rpc.osmosis.zone", "https://rpc-osmosis-ia.cosmosia.notional.ventures:443", "https://osmosis-rpc.polkachu.com:443", "https://osmosis.validator.network:443", "https://rpc-osmosis.blockapsis.com:443"],
|
||||||
"snapshot_provider": "",
|
"snapshot_provider": "",
|
||||||
"sdk_version": "0.46.1",
|
"sdk_version": "0.46.1",
|
||||||
"coin_type": "118",
|
"coin_type": "118",
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"chain_name": "quicksilver",
|
"chain_name": "quicksilver",
|
||||||
"coingecko": "",
|
"coingecko": "",
|
||||||
"api": ["https://quicksilver-api.polkachu.com", "https://api-quicksilver.nodeist.net"],
|
"api": ["https://quicksilver-api.polkachu.com", "https://api-quicksilver.nodeist.net", "https://api.quicksilver.stake-take.com"],
|
||||||
"rpc": ["https://quicksilver-rpc.polkachu.com", "https://rpc-quicksilver.nodeist.net"],
|
"rpc": ["https://quicksilver-rpc.polkachu.com", "https://rpc-quicksilver.nodeist.net", "https://rpc.quicksilver.stake-take.com"],
|
||||||
"sdk_version": "0.46.7",
|
"sdk_version": "0.46.7",
|
||||||
"coin_type": "118",
|
"coin_type": "118",
|
||||||
"min_tx_fee": "8000",
|
"min_tx_fee": "8000",
|
||||||
|
19
chains/mainnet/uptick.json
Normal file
19
chains/mainnet/uptick.json
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"chain_id":"uptick_117-1",
|
||||||
|
"chain_name": "uptick-network-mainnet",
|
||||||
|
"api": "https://rest.uptick.network",
|
||||||
|
"sdk_version": "v0.46.0",
|
||||||
|
"coin_type": "60",
|
||||||
|
"min_tx_fee": "40000",
|
||||||
|
"addr_prefix": "uptick",
|
||||||
|
"logo": "https://file.uptick.network/file/image/dNOLswid7dGe29CFhPp3Ow.png",
|
||||||
|
"assets": [
|
||||||
|
{
|
||||||
|
"base": "auptick",
|
||||||
|
"symbol": "UPTICK",
|
||||||
|
"exponent": "18",
|
||||||
|
"coingecko_id": "uptick-network",
|
||||||
|
"logo": "https://file.uptick.network/file/image/dNOLswid7dGe29CFhPp3Ow.png"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
19
chains/testnet/humans.json
Normal file
19
chains/testnet/humans.json
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"chain_name": "humans",
|
||||||
|
"api":["https://api.humans.stake-take.com"],
|
||||||
|
"rpc":["https://rpc.humans.stake-take.com"],
|
||||||
|
"snapshot_provider": "",
|
||||||
|
"sdk_version": "0.46.3",
|
||||||
|
"coin_type": 60,
|
||||||
|
"min_tx_fee": "5000",
|
||||||
|
"addr_prefix": "human",
|
||||||
|
"logo": "/logos/humans.jpg",
|
||||||
|
"keplr_features": ["ibc-transfer", "ibc-go", "eth-address-gen", "eth-key-sign"],
|
||||||
|
"assets": [{
|
||||||
|
"base": "aheart",
|
||||||
|
"symbol": "HEART",
|
||||||
|
"exponent": 18,
|
||||||
|
"coingecko_id": "humans-ai",
|
||||||
|
"logo": "/logos/humans.jpg"
|
||||||
|
}]
|
||||||
|
}
|
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"chain_name": "osmosis",
|
"chain_name": "osmosis",
|
||||||
"coingecko": "osmosis",
|
"coingecko": "osmosis",
|
||||||
"api": ["https://lcd-test.osmosis.zone", "https://lcd.osmo-test.ccvalidators.com", "https://osmosistest-lcd.quickapi.com"],
|
"api": ["https://lcd.osmotest5.osmosis.zone"],
|
||||||
"rpc": ["https://rpc-test.osmosis.zone", "https://testnet-rpc.osmosis.zone:443", "https://rpc.osmo-test.ccvalidators.com:443"," https://osmosistest-rpc.quickapi.com:443"],
|
"rpc": ["https://rpc.osmotest5.osmosis.zone"],
|
||||||
"snapshot_provider": "",
|
"snapshot_provider": "",
|
||||||
"sdk_version": "0.44.5",
|
"sdk_version": "0.44.5",
|
||||||
"coin_type": "118",
|
"coin_type": "118",
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"chain_name": "quicksilver",
|
"chain_name": "quicksilver",
|
||||||
"coingecko": "",
|
"coingecko": "",
|
||||||
"api": ["https://quicksilver-testnet-api.polkachu.com"],
|
"api": ["https://api.quicksilver-testnet.stake-take.com", "https://quicksilver-testnet-api.polkachu.com"],
|
||||||
"rpc": ["https://quicksilver-testnet-rpc.polkachu.com"],
|
"rpc": ["https://rpc.quicksilver-testnet.stake-take.com", "https://quicksilver-testnet-rpc.polkachu.com"],
|
||||||
"sdk_version": "0.46.1",
|
"sdk_version": "0.46.1",
|
||||||
"coin_type": "118",
|
"coin_type": "118",
|
||||||
"min_tx_fee": "8000",
|
"min_tx_fee": "8000",
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
"md-editor-v3": "^2.8.1",
|
"md-editor-v3": "^2.8.1",
|
||||||
"numeral": "^2.0.6",
|
"numeral": "^2.0.6",
|
||||||
"osmojs": "^14.0.0-rc.0",
|
"osmojs": "^14.0.0-rc.0",
|
||||||
"ping-widget": "^0.0.30",
|
"ping-widget": "^0.0.33",
|
||||||
"pinia": "^2.0.28",
|
"pinia": "^2.0.28",
|
||||||
"postcss": "^8.4.23",
|
"postcss": "^8.4.23",
|
||||||
"qrcode": "^1.5.3",
|
"qrcode": "^1.5.3",
|
||||||
|
BIN
public/logos/humans.jpg
Normal file
BIN
public/logos/humans.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
@ -8,5 +8,7 @@ const store = useTxDialog();
|
|||||||
:sender="store.sender"
|
:sender="store.sender"
|
||||||
:endpoint="store.endpoint"
|
:endpoint="store.endpoint"
|
||||||
:params="store.params"
|
:params="store.params"
|
||||||
|
@view="store.view"
|
||||||
|
@confirmed="store.confirmed"
|
||||||
></ping-tx-dialog>
|
></ping-tx-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
@ -87,7 +87,11 @@ function loadAccount(address: string) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
loadAccount(props.address);
|
|
||||||
|
|
||||||
|
function updateEvent() {
|
||||||
|
loadAccount(props.address);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div v-if="account">
|
<div v-if="account">
|
||||||
@ -130,7 +134,7 @@ loadAccount(props.address);
|
|||||||
<label
|
<label
|
||||||
for="send"
|
for="send"
|
||||||
class="btn btn-primary btn-sm mr-2"
|
class="btn btn-primary btn-sm mr-2"
|
||||||
@click="dialog.open('send', {})"
|
@click="dialog.open('send', {}, updateEvent)"
|
||||||
>Send</label
|
>Send</label
|
||||||
>
|
>
|
||||||
<label
|
<label
|
||||||
@ -139,7 +143,7 @@ loadAccount(props.address);
|
|||||||
@click="
|
@click="
|
||||||
dialog.open('transfer', {
|
dialog.open('transfer', {
|
||||||
chain_name: blockchain.current?.prettyName,
|
chain_name: blockchain.current?.prettyName,
|
||||||
})
|
}, updateEvent)
|
||||||
"
|
"
|
||||||
>transfer</label
|
>transfer</label
|
||||||
>
|
>
|
||||||
@ -302,13 +306,13 @@ loadAccount(props.address);
|
|||||||
<label
|
<label
|
||||||
for="delegate"
|
for="delegate"
|
||||||
class="btn btn-primary btn-sm mr-2"
|
class="btn btn-primary btn-sm mr-2"
|
||||||
@click="dialog.open('delegate', {})"
|
@click="dialog.open('delegate', {}, updateEvent)"
|
||||||
>Delegate</label
|
>Delegate</label
|
||||||
>
|
>
|
||||||
<label
|
<label
|
||||||
for="withdraw"
|
for="withdraw"
|
||||||
class="btn btn-primary btn-sm"
|
class="btn btn-primary btn-sm"
|
||||||
@click="dialog.open('withdraw', {})"
|
@click="dialog.open('withdraw', {}, updateEvent)"
|
||||||
>Withdraw</label
|
>Withdraw</label
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
@ -353,7 +357,7 @@ loadAccount(props.address);
|
|||||||
@click="
|
@click="
|
||||||
dialog.open('delegate', {
|
dialog.open('delegate', {
|
||||||
validator_address: v.delegation.validator_address,
|
validator_address: v.delegation.validator_address,
|
||||||
})
|
}, updateEvent)
|
||||||
"
|
"
|
||||||
>delegate</label
|
>delegate</label
|
||||||
>
|
>
|
||||||
@ -363,7 +367,7 @@ loadAccount(props.address);
|
|||||||
@click="
|
@click="
|
||||||
dialog.open('redelegate', {
|
dialog.open('redelegate', {
|
||||||
validator_address: v.delegation.validator_address,
|
validator_address: v.delegation.validator_address,
|
||||||
})
|
}, updateEvent)
|
||||||
"
|
"
|
||||||
>Redelegate</label
|
>Redelegate</label
|
||||||
>
|
>
|
||||||
@ -373,7 +377,7 @@ loadAccount(props.address);
|
|||||||
@click="
|
@click="
|
||||||
dialog.open('unbond', {
|
dialog.open('unbond', {
|
||||||
validator_address: v.delegation.validator_address,
|
validator_address: v.delegation.validator_address,
|
||||||
})
|
}, updateEvent)
|
||||||
"
|
"
|
||||||
>Unbond</label
|
>Unbond</label
|
||||||
>
|
>
|
||||||
|
@ -275,13 +275,12 @@ const result = ref('');
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<textarea v-model="query" placeholder="Query String, {}" label="Query String" class="my-2 textarea textarea-bordered w-full" />
|
||||||
<VTextarea v-model="query" label="Query String" class="my-2" />
|
<textarea v-model="result" readonly placeholder="Query Result" label="Result" class="textarea textarea-bordered w-full" />
|
||||||
<VTextarea v-model="result" label="Result" />
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-4 mb-4">
|
<div class="mt-4 mb-4 text-center">
|
||||||
<button
|
<button
|
||||||
class="btn !btn-yes !border-yes px-4 text-white"
|
class="btn btn-primary px-4 text-white"
|
||||||
@click="queryContract()"
|
@click="queryContract()"
|
||||||
>
|
>
|
||||||
Query Contract
|
Query Contract
|
||||||
|
80
src/modules/[chain]/ibc/connection.vue
Normal file
80
src/modules/[chain]/ibc/connection.vue
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
<script lang="ts" setup>
|
||||||
|
import PaginationBar from '@/components/PaginationBar.vue';
|
||||||
|
import { useBlockchain, useFormatter } from '@/stores';
|
||||||
|
import { PageRequest, type Connection, type Pagination } from '@/types';
|
||||||
|
import { onMounted } from 'vue';
|
||||||
|
import { ref } from 'vue';
|
||||||
|
|
||||||
|
const props = defineProps(['chain']);
|
||||||
|
const chainStore = useBlockchain();
|
||||||
|
const list = ref([] as Connection[]);
|
||||||
|
const pageRequest = ref(new PageRequest())
|
||||||
|
const pageResponse = ref({} as Pagination)
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
pageload(1)
|
||||||
|
});
|
||||||
|
|
||||||
|
function pageload(p: number) {
|
||||||
|
pageRequest.value.setPage(p)
|
||||||
|
chainStore.rpc.getIBCConnections(pageRequest.value).then((x) => {
|
||||||
|
list.value = x.connections;
|
||||||
|
pageResponse.value = x.pagination
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function color(v: string) {
|
||||||
|
if (v && v.indexOf('_OPEN') > -1) {
|
||||||
|
return 'success';
|
||||||
|
}
|
||||||
|
return 'warning';
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div class="bg-base-100 px-4 pt-3 pb-4 rounded shadow">
|
||||||
|
<h2 class="card-title py-4">IBC Connections</h2>
|
||||||
|
<div class="flex">
|
||||||
|
<div class="">
|
||||||
|
<table class="table table-compact w-full table-zebra">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="py-3">Connection Id</th>
|
||||||
|
<th class="py-3">Status</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr v-for="(v, index) in list" :key="index">
|
||||||
|
<td class="py-2">
|
||||||
|
<RouterLink :to="`/${chain}/ibc/connection/${v.id}`" class="text-primary">
|
||||||
|
{{ v.id }}
|
||||||
|
</RouterLink>
|
||||||
|
</td>
|
||||||
|
<td class="py-2">
|
||||||
|
<div class="text-xs truncate relative py-[2px] px-3 rounded-full w-fit"
|
||||||
|
:class="`text-${color(v.state)}`">
|
||||||
|
<span class="inset-x-0 inset-y-0 opacity-10 absolute" :class="`bg-${color(v.state)}`"></span>
|
||||||
|
{{ String(v.state).replace("STATE_", "") }}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="grow overflow-auto">
|
||||||
|
<router-view :key="$route.fullPath"></router-view>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<PaginationBar :limit="pageRequest.limit" :total="pageResponse.total" :callback="pageload" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<route>
|
||||||
|
{
|
||||||
|
meta: {
|
||||||
|
i18n: 'ibc',
|
||||||
|
order: 9
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</route>
|
@ -11,6 +11,7 @@ const baseStore = useBaseStore();
|
|||||||
const conn = ref({} as Connection);
|
const conn = ref({} as Connection);
|
||||||
const clientState = ref({} as { client_id: string; client_state: ClientState });
|
const clientState = ref({} as { client_id: string; client_state: ClientState });
|
||||||
const channels = ref([] as Channel[]);
|
const channels = ref([] as Channel[]);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (props.connection_id) {
|
if (props.connection_id) {
|
||||||
chainStore.rpc.getIBCConnectionsById(props.connection_id).then((x) => {
|
chainStore.rpc.getIBCConnectionsById(props.connection_id).then((x) => {
|
||||||
@ -41,15 +42,13 @@ function color(v: string) {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="card card-bordered border-primary ml-4 rounded-t-md">
|
||||||
<div class="px-4 pt-3 pb-4 bg-base-100 rounded mb-4 shadow py-24 sm:!py-32">
|
<div class="px-4 pt-3 pb-4 bg-base-100 rounded mb-4 shadow ">
|
||||||
<div class="mx-auto max-w-7xl px-6 lg:!px-8">
|
<div class="mx-auto max-w-7xl px-6 lg:!px-8">
|
||||||
<dl class="grid grid-cols-1 gap-x-8 text-center lg:!grid-cols-3">
|
<dl class="grid grid-cols-1 gap-x-6 text-center lg:!grid-cols-3">
|
||||||
<div class="mx-auto flex items-center">
|
<div class="mx-auto flex items-center">
|
||||||
<div>
|
<div>
|
||||||
<div
|
<div class="order-first text-3xl font-semibold tracking-tight text-main mb-1">
|
||||||
class="order-first text-3xl font-semibold tracking-tight text-main mb-1"
|
|
||||||
>
|
|
||||||
{{ baseStore.latest?.block?.header?.chain_id }}
|
{{ baseStore.latest?.block?.header?.chain_id }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-sm text-gray-500 dark:text-gray-400">
|
<div class="text-sm text-gray-500 dark:text-gray-400">
|
||||||
@ -60,18 +59,13 @@ function color(v: string) {
|
|||||||
<div class="mx-auto flex items-center">
|
<div class="mx-auto flex items-center">
|
||||||
<div>
|
<div>
|
||||||
<Icon icon="mdi:arrow-left-right" class="text-4xl mx-auto" />
|
<Icon icon="mdi:arrow-left-right" class="text-4xl mx-auto" />
|
||||||
<div
|
|
||||||
class="bg-success w-24 h-1 rounded-sm mt-1 mb-3 opacity-60"
|
|
||||||
></div>
|
|
||||||
<div class="text-sm text-gray-500 dark:text-gray-400">
|
<div class="text-sm text-gray-500 dark:text-gray-400">
|
||||||
{{ conn.state }}
|
{{ conn.state }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mx-auto">
|
<div class="mx-auto">
|
||||||
<div
|
<div class="order-first text-3xl font-semibold tracking-tight text-main mb-2">
|
||||||
class="order-first text-3xl font-semibold tracking-tight text-main mb-2"
|
|
||||||
>
|
|
||||||
{{ clientState.client_state?.chain_id }}
|
{{ clientState.client_state?.chain_id }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-sm text-gray-500 dark:text-gray-400">
|
<div class="text-sm text-gray-500 dark:text-gray-400">
|
||||||
@ -138,9 +132,9 @@ function color(v: string) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<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 overflow-hidden">
|
||||||
<h2 class="card-title">Channels</h2>
|
<h2 class="card-title">Channels</h2>
|
||||||
<div class="overflow-x-auto"></div>
|
<div class="overflow-auto">
|
||||||
<table class="table w-full mt-4">
|
<table class="table w-full mt-4">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -168,14 +162,8 @@ function color(v: string) {
|
|||||||
<td>{{ v.version }}</td>
|
<td>{{ v.version }}</td>
|
||||||
<td>{{ v.ordering }}</td>
|
<td>{{ v.ordering }}</td>
|
||||||
<td>
|
<td>
|
||||||
<div
|
<div class="text-xs truncate relative py-2 px-4 rounded-full w-fit" :class="`text-${color(v.state)}`">
|
||||||
class="text-xs truncate relative py-2 px-4 rounded-full w-fit"
|
<span class="inset-x-0 inset-y-0 opacity-10 absolute" :class="`bg-${color(v.state)}`"></span>
|
||||||
:class="`text-${color(v.state)}`"
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
class="inset-x-0 inset-y-0 opacity-10 absolute"
|
|
||||||
:class="`bg-${color(v.state)}`"
|
|
||||||
></span>
|
|
||||||
{{ v.state }}
|
{{ v.state }}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@ -184,4 +172,5 @@ function color(v: string) {
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
6
src/modules/[chain]/ibc/connection/index.vue
Normal file
6
src/modules/[chain]/ibc/connection/index.vue
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<script lang="ts" setup>
|
||||||
|
import router from '@/router'
|
||||||
|
const props = defineProps(['chain']);
|
||||||
|
console.log("props:", props)
|
||||||
|
router.push(`/${props.chain}/ibc/connection/connection-0`)
|
||||||
|
</script>
|
@ -1,88 +0,0 @@
|
|||||||
<script lang="ts" setup>
|
|
||||||
import PaginationBar from '@/components/PaginationBar.vue';
|
|
||||||
import { useBlockchain, useFormatter } from '@/stores';
|
|
||||||
import { PageRequest, type Connection, type Pagination } from '@/types';
|
|
||||||
import { onMounted } from 'vue';
|
|
||||||
import { ref } from 'vue';
|
|
||||||
|
|
||||||
const props = defineProps(['chain']);
|
|
||||||
const chainStore = useBlockchain();
|
|
||||||
const list = ref([] as Connection[]);
|
|
||||||
const pageRequest = ref(new PageRequest())
|
|
||||||
const pageResponse = ref({} as Pagination)
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
pageload(1)
|
|
||||||
});
|
|
||||||
|
|
||||||
function pageload(p: number) {
|
|
||||||
pageRequest.value.setPage(p)
|
|
||||||
chainStore.rpc.getIBCConnections(pageRequest.value).then((x) => {
|
|
||||||
list.value = x.connections;
|
|
||||||
pageResponse.value = x.pagination
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function color(v: string) {
|
|
||||||
if (v && v.indexOf('_OPEN') > -1) {
|
|
||||||
return 'success';
|
|
||||||
}
|
|
||||||
return 'warning';
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<template>
|
|
||||||
<div>
|
|
||||||
<div class="bg-base-100 px-4 pt-3 pb-4 rounded shadow">
|
|
||||||
<h2 class="card-title">IBC Connections</h2>
|
|
||||||
<div class="overflow-x-auto mt-4">
|
|
||||||
<table class="table table-compact w-full table-zebra">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th class="py-3">Connection Id</th>
|
|
||||||
<th class="py-3">Connection</th>
|
|
||||||
<th class="py-3">Delay Period</th>
|
|
||||||
<th class="py-3">State</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr v-for="(v, index) in list" :key="index">
|
|
||||||
<td class="py-2">
|
|
||||||
<RouterLink :to="`/${chain}/ibc/${v.id}`" class="text-primary">
|
|
||||||
{{ v.id }}
|
|
||||||
</RouterLink>
|
|
||||||
</td>
|
|
||||||
<td class="py-2">
|
|
||||||
{{ v.client_id }} {{ v.id }} <br />
|
|
||||||
{{ v.counterparty.client_id }}
|
|
||||||
{{ v.counterparty.connection_id }}
|
|
||||||
</td>
|
|
||||||
<td class="py-2">{{ v.delay_period }}</td>
|
|
||||||
<td class="py-2">
|
|
||||||
<div
|
|
||||||
class="text-xs truncate relative py-[2px] px-3 rounded-full w-fit"
|
|
||||||
:class="`text-${color(v.state)}`"
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
class="inset-x-0 inset-y-0 opacity-10 absolute"
|
|
||||||
:class="`bg-${color(v.state)}`"
|
|
||||||
></span>
|
|
||||||
{{ v.state }}
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<PaginationBar :limit="pageRequest.limit" :total="pageResponse.total" :callback="pageload"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<route>
|
|
||||||
{
|
|
||||||
meta: {
|
|
||||||
i18n: 'ibc',
|
|
||||||
order: 9
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</route>
|
|
@ -95,6 +95,10 @@ const color = computed(() => {
|
|||||||
return 'text-red-600';
|
return 'text-red-600';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function updateState() {
|
||||||
|
walletStore.loadMyAsset()
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -216,9 +220,8 @@ const color = computed(() => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="bg-base-100 rounded mt-4 shadow">
|
<div class="bg-base-100 rounded mt-4 shadow">
|
||||||
<div class="flex items-center px-4 pt-4 pb-2 text-lg font-semibold text-main">
|
<div class="flex justify-between px-4 pt-4 pb-2 text-lg font-semibold text-main">
|
||||||
<span class="truncate" >{{ walletStore.currentAddress || 'Not Connected' }}</span>
|
<span class="truncate" >{{ walletStore.currentAddress || 'Not Connected' }}</span>
|
||||||
|
|
||||||
<RouterLink v-if="walletStore.currentAddress"
|
<RouterLink v-if="walletStore.currentAddress"
|
||||||
class="float-right text-sm cursor-pointert link link-primary no-underline font-medium"
|
class="float-right text-sm cursor-pointert link link-primary no-underline font-medium"
|
||||||
:to="`/${chain}/account/${walletStore.currentAddress}`">More</RouterLink>
|
:to="`/${chain}/account/${walletStore.currentAddress}`">More</RouterLink>
|
||||||
@ -295,11 +298,11 @@ const color = computed(() => {
|
|||||||
<td>
|
<td>
|
||||||
<div>
|
<div>
|
||||||
<label for="delegate" class="btn !btn-xs !btn-primary btn-ghost rounded-sm mr-2"
|
<label for="delegate" class="btn !btn-xs !btn-primary btn-ghost rounded-sm mr-2"
|
||||||
@click="dialog.open('delegate', { validator_address: item.delegation.validator_address })">
|
@click="dialog.open('delegate', { validator_address: item.delegation.validator_address }, updateState)">
|
||||||
Delegate
|
Delegate
|
||||||
</label>
|
</label>
|
||||||
<label for="withdraw" class="btn !btn-xs !btn-primary btn-ghost rounded-sm"
|
<label for="withdraw" class="btn !btn-xs !btn-primary btn-ghost rounded-sm"
|
||||||
@click="dialog.open('withdraw', { validator_address: item.delegation.validator_address })">
|
@click="dialog.open('withdraw', { validator_address: item.delegation.validator_address }, updateState)">
|
||||||
Withdraw Rewards
|
Withdraw Rewards
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
@ -311,9 +314,9 @@ const color = computed(() => {
|
|||||||
|
|
||||||
<div class="grid grid-cols-3 gap-4 px-4 pb-6 mt-4">
|
<div class="grid grid-cols-3 gap-4 px-4 pb-6 mt-4">
|
||||||
<label for="PingTokenConvert" class="btn btn-primary text-white">Swap</label>
|
<label for="PingTokenConvert" class="btn btn-primary text-white">Swap</label>
|
||||||
<label for="send" class="btn !bg-yes !border-yes text-white" @click="dialog.open('send', {})">Send</label>
|
<label for="send" class="btn !bg-yes !border-yes text-white" @click="dialog.open('send', {}, updateState)">Send</label>
|
||||||
<label for="delegate" class="btn !bg-info !border-info text-white"
|
<label for="delegate" class="btn !bg-info !border-info text-white"
|
||||||
@click="dialog.open('delegate', {})">Delegate</label>
|
@click="dialog.open('delegate', {}, updateState)">Delegate</label>
|
||||||
<RouterLink to="/wallet/receive" class="btn !bg-info !border-info text-white hidden">Receive</RouterLink>
|
<RouterLink to="/wallet/receive" class="btn !bg-info !border-info text-white hidden">Receive</RouterLink>
|
||||||
</div>
|
</div>
|
||||||
<Teleport to="body">
|
<Teleport to="body">
|
||||||
|
@ -9,7 +9,7 @@ import {
|
|||||||
import { useDistributionStore } from '@/stores/useDistributionStore';
|
import { useDistributionStore } from '@/stores/useDistributionStore';
|
||||||
import { useMintStore } from '@/stores/useMintStore';
|
import { useMintStore } from '@/stores/useMintStore';
|
||||||
import { useStakingStore } from '@/stores/useStakingStore';
|
import { useStakingStore } from '@/stores/useStakingStore';
|
||||||
import type { GovProposal, PaginatedProposals, Tally } from '@/types';
|
import type { Tally } from '@/types';
|
||||||
import numeral from 'numeral';
|
import numeral from 'numeral';
|
||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
|
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
import { useWalletStore } from './useWalletStore';
|
import { useWalletStore } from './useWalletStore';
|
||||||
import { useBlockchain } from './useBlockchain';
|
import { useBlockchain } from './useBlockchain';
|
||||||
|
import router from '@/router'
|
||||||
|
|
||||||
|
let CALLBACK: any = null
|
||||||
|
|
||||||
export const useTxDialog = defineStore('txDialogStore', {
|
export const useTxDialog = defineStore('txDialogStore', {
|
||||||
state: () => {
|
state: () => {
|
||||||
@ -17,6 +20,9 @@ export const useTxDialog = defineStore('txDialogStore', {
|
|||||||
},
|
},
|
||||||
currentEndpoint() {
|
currentEndpoint() {
|
||||||
return useBlockchain().endpoint?.address
|
return useBlockchain().endpoint?.address
|
||||||
|
},
|
||||||
|
blockchain() {
|
||||||
|
return useBlockchain()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
@ -29,13 +35,31 @@ export const useTxDialog = defineStore('txDialogStore', {
|
|||||||
this.endpoint = endpoint;
|
this.endpoint = endpoint;
|
||||||
this.params = JSON.stringify(param)
|
this.params = JSON.stringify(param)
|
||||||
},
|
},
|
||||||
open(type: string, param: any) {
|
open(type: string, param: any, callback?: Function) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
this.sender = this.walletAddress;
|
this.sender = this.walletAddress;
|
||||||
this.endpoint = this.currentEndpoint || "";
|
this.endpoint = this.currentEndpoint || "";
|
||||||
this.params = JSON.stringify(param)
|
this.params = JSON.stringify(param)
|
||||||
|
if(callback) {
|
||||||
// console.log("dialog:", this.$state)
|
CALLBACK = callback
|
||||||
|
}else {
|
||||||
|
CALLBACK = undefined
|
||||||
|
}
|
||||||
|
},
|
||||||
|
view(tx: {
|
||||||
|
detail: {
|
||||||
|
eventType: string,
|
||||||
|
hash: string
|
||||||
|
}
|
||||||
|
}) {
|
||||||
|
console.log(tx.detail)
|
||||||
|
if (tx.detail && tx.detail.hash) router.push({ path: `/${this.blockchain.chainName}/tx/${tx.detail.hash}` })
|
||||||
|
},
|
||||||
|
confirmed(tx: any) {
|
||||||
|
console.log("confirmed:", tx)
|
||||||
|
if(CALLBACK) {
|
||||||
|
CALLBACK()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -5476,10 +5476,10 @@ pify@^3.0.0:
|
|||||||
resolved "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz"
|
resolved "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz"
|
||||||
integrity sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==
|
integrity sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==
|
||||||
|
|
||||||
ping-widget@^0.0.30:
|
ping-widget@^0.0.33:
|
||||||
version "0.0.30"
|
version "0.0.33"
|
||||||
resolved "https://registry.yarnpkg.com/ping-widget/-/ping-widget-0.0.30.tgz#f417cff47fb8a95e443e953bc5eb3c912801f605"
|
resolved "https://registry.yarnpkg.com/ping-widget/-/ping-widget-0.0.33.tgz#ea546499d24e96c6fb407f4707b237f5f5014da4"
|
||||||
integrity sha512-bKa47dHNqUw/TaRBbjxQkb5+yXMwEq0+EiIs3b9Q5/0HlFcs19rdzH/RDQj4S3tpClOX7N5hTpAFikOInHq20g==
|
integrity sha512-bMAgyXleHKK6YWlI7M7VEu0fFH0YKoXRnJo85Umz3AF4EkNEHrRuJG1BUQq6yQK1p0k4Fzkk331zQMLG7jvnLA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@cosmjs/amino" "^0.30.1"
|
"@cosmjs/amino" "^0.30.1"
|
||||||
"@cosmjs/cosmwasm-stargate" "^0.30.1"
|
"@cosmjs/cosmwasm-stargate" "^0.30.1"
|
||||||
|
Loading…
Reference in New Issue
Block a user