forked from LaconicNetwork/cosmos-explorer
add wasm inter operation
This commit is contained in:
@@ -8,7 +8,7 @@ import type {
|
||||
} from '../types';
|
||||
import DynamicComponent from '@/components/dynamic/DynamicComponent.vue';
|
||||
import type { CustomInputContent } from '@/plugins/vuetify/@core/types';
|
||||
import { useFormatter } from '@/stores';
|
||||
import { useFormatter, useTxDialog } from '@/stores';
|
||||
import PaginationBar from '@/components/PaginationBar.vue';
|
||||
import { PageRequest } from '@/types';
|
||||
|
||||
@@ -27,6 +27,7 @@ function loadContract(pageNum: number) {
|
||||
}
|
||||
loadContract(1)
|
||||
|
||||
const dialog = useTxDialog()
|
||||
const format = useFormatter();
|
||||
const infoDialog = ref(false);
|
||||
const stateDialog = ref(false);
|
||||
@@ -136,16 +137,22 @@ const result = ref('');
|
||||
</label>
|
||||
<label
|
||||
for="modal-contract-query"
|
||||
class="btn btn-primary btn-sm text-xs"
|
||||
class="btn btn-primary btn-sm text-xs mr-2"
|
||||
@click="showQuery(v)"
|
||||
>
|
||||
Query
|
||||
</label>
|
||||
<label for="wasm_execute_contract" class="btn btn-primary btn-sm text-xs" @click="dialog.open('wasm_execute_contract', {contract: v})">
|
||||
Execute
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<PaginationBar :limit="50" :total="response.pagination?.total" :callback="loadContract"/>
|
||||
<div class="flex justify-between">
|
||||
<PaginationBar :limit="50" :total="response.pagination?.total" :callback="loadContract"/>
|
||||
<label for="wasm_instantiate_contract" class="btn btn-primary my-5" @click="dialog.open('wasm_instantiate_contract', {codeId: props.code_id})">Instantiate Contract</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -192,7 +199,7 @@ const result = ref('');
|
||||
{{ format.base64ToString(v.value) }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
<PaginationBar :limit="pageRequest.limit" :total="state.pagination?.total" :callback="pageload"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import { useBlockchain, useFormatter } from '@/stores';
|
||||
import { useBlockchain, useFormatter, useTxDialog } from '@/stores';
|
||||
import { useWasmStore } from './WasmStore';
|
||||
import { ref } from 'vue';
|
||||
import type { PaginabledCodeInfos } from './types';
|
||||
@@ -12,6 +12,7 @@ const codes = ref({} as PaginabledCodeInfos);
|
||||
|
||||
const pageRequest = ref(new PageRequest())
|
||||
const wasmStore = useWasmStore();
|
||||
const dialog = useTxDialog()
|
||||
|
||||
function pageload(pageNum: number) {
|
||||
pageRequest.value.setPage(pageNum)
|
||||
@@ -57,7 +58,15 @@ pageload(1)
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<PaginationBar :limit="pageRequest.limit" :total="codes.pagination?.total" :callback="pageload"/>
|
||||
<div class="flex justify-between">
|
||||
<PaginationBar :limit="pageRequest.limit" :total="codes.pagination?.total" :callback="pageload"/>
|
||||
<label
|
||||
for="wasm_store_code"
|
||||
class="btn btn-primary my-5"
|
||||
@click="dialog.open('wasm_store_code', {})"
|
||||
>Upload Smart Contract</label
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -224,9 +224,7 @@ async function addAddress(acc: AccountEntry) {
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<th colspan="10">
|
||||
<div v-if="editable">
|
||||
|
||||
</div>
|
||||
<RouterLink to="/wallet/keplr"> Add chain to Keplr </RouterLink>
|
||||
</th>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
@@ -97,7 +97,7 @@ function suggest() {
|
||||
<textarea v-model="conf" class="textarea textarea-bordered w-full" rows="15"></textarea>
|
||||
</div>
|
||||
<div class="mt-4 mb-4">
|
||||
You can edit above params if you want.
|
||||
If the chain is not offically support on Keplr, you can submit these parameters to enable Keplr.
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user