diff --git a/bun.lockb b/bun.lockb
index 4159f1ecc..1656cbbb2 100755
Binary files a/bun.lockb and b/bun.lockb differ
diff --git a/package.json b/package.json
index 04ed151c6..e89aa25ab 100644
--- a/package.json
+++ b/package.json
@@ -52,7 +52,7 @@
"@coinbase/cbpay-js": "^2.4.0",
"@fontsource/jetbrains-mono": "^5.1.0",
"@tailwindcss/container-queries": "^0.1.1",
- "@wharfkit/account": "^1.2.0",
+ "@wharfkit/account": "^1.3.0",
"@wharfkit/account-creation-plugin-greymass": "^1.2.0",
"@wharfkit/account-creation-plugin-metamask": "^1.1.1",
"@wharfkit/antelope": "^1.0.11",
@@ -63,6 +63,7 @@
"@wharfkit/session": "^1.4.0",
"@wharfkit/transact-plugin-resource-provider": "^1.1.1",
"@wharfkit/wallet-plugin-anchor": "^1.4.0",
+ "@wharfkit/wallet-plugin-cleos": "^1.2.0",
"@wharfkit/wallet-plugin-metamask": "^1.1.1",
"@wharfkit/wallet-plugin-privatekey": "^1.1.0",
"@wharfkit/wallet-plugin-scatter": "^1.5.1",
diff --git a/src/hooks.server.ts b/src/hooks.server.ts
index ad2be39c6..857587df0 100644
--- a/src/hooks.server.ts
+++ b/src/hooks.server.ts
@@ -37,6 +37,22 @@ function isNetwork(value: string) {
return isNetworkShortName(value);
}
+const redirects: Record = {
+ '/earn': '/staking',
+ '/resources/ram/buy': '/ram/buy',
+ '/resources/ram/sell': '/ram/sell'
+};
+
+function getManualRedirectPath(pathMore: string[]): string {
+ const pathname = '/' + pathMore.join('/');
+ return redirects[pathname];
+}
+
+function isManualRedirectPath(pathMore: string[]): boolean {
+ const pathname = '/' + pathMore.join('/');
+ return pathname in redirects;
+}
+
export async function redirectHandle({ event, resolve }: HandleParams): Promise {
const { pathname, search } = new URL(event.request.url);
@@ -79,10 +95,15 @@ export async function redirectHandle({ event, resolve }: HandleParams): Promise<
url += `/${network}`;
}
if (pathMore.length > 0) {
- url += `/${pathMore.join('/')}`;
+ if (isManualRedirectPath(pathMore)) {
+ url += getManualRedirectPath(pathMore);
+ } else {
+ url += `/${pathMore.join('/')}`;
+ }
}
if (pathname !== url) {
+ console.log('redirecting to', url + search);
return new Response(undefined, {
headers: { Location: url + search },
status: 301
diff --git a/src/lib/components/button/button.svelte b/src/lib/components/button/button.svelte
index 243588d90..c554fa4c6 100644
--- a/src/lib/components/button/button.svelte
+++ b/src/lib/components/button/button.svelte
@@ -1,4 +1,5 @@
- {@render props.children()}
+ {@render props.children()}
-
-
diff --git a/src/lib/components/button/copy.svelte b/src/lib/components/button/copy.svelte
index 579fe5f01..2cded7523 100644
--- a/src/lib/components/button/copy.svelte
+++ b/src/lib/components/button/copy.svelte
@@ -5,14 +5,16 @@
import { browser } from '$app/environment';
import type { UnicoveContext } from '$lib/state/client.svelte';
import { getContext } from 'svelte';
+ import { cn } from '$lib/utils';
const context = getContext('state');
interface Props {
data: string;
+ slop?: boolean;
}
- let props: Props = $props();
+ let { slop = true, ...props }: Props = $props();
let hint = $state(false);
@@ -26,6 +28,8 @@
if (context.settings.data.debugMode) console.error('Failed to copy text: ', err);
}
}
+
+ let buttonSize = $derived(slop ? 'size-12' : 'size-4');
@@ -35,7 +39,10 @@
>
- {/each}
-
diff --git a/src/lib/components/descriptionlist/dd.svelte b/src/lib/components/descriptionlist/dd.svelte
new file mode 100644
index 000000000..5a6a5af23
--- /dev/null
+++ b/src/lib/components/descriptionlist/dd.svelte
@@ -0,0 +1,5 @@
+
+
+{@render props.children()}
diff --git a/src/lib/components/descriptionlist/dl.svelte b/src/lib/components/descriptionlist/dl.svelte
index ef7e1cdca..f184044bc 100644
--- a/src/lib/components/descriptionlist/dl.svelte
+++ b/src/lib/components/descriptionlist/dl.svelte
@@ -3,8 +3,8 @@
import Dlrow from './dlrow.svelte';
type DescriptionItem = {
- key: string;
- value: string;
+ title: string;
+ description: string;
};
interface Props {
@@ -17,10 +17,8 @@
{#if props.items}
- {#each props.items as item}
-
- {item.value}
-
+ {#each props.items as { title, description }}
+
{/each}
{:else if props.children}
{@render props.children()}
diff --git a/src/lib/components/descriptionlist/dlrow.svelte b/src/lib/components/descriptionlist/dlrow.svelte
index 70128fda8..6bea9b8ff 100644
--- a/src/lib/components/descriptionlist/dlrow.svelte
+++ b/src/lib/components/descriptionlist/dlrow.svelte
@@ -1,16 +1,29 @@
-
- {title}
-
- {@render children()}
+
- {title}
+
+ {#if description}
+
- {description}
+ {/if}
+ {#if children}
+ {@render children()}
+ {/if}
+
diff --git a/src/lib/components/descriptionlist/dt.svelte b/src/lib/components/descriptionlist/dt.svelte
new file mode 100644
index 000000000..852406c2f
--- /dev/null
+++ b/src/lib/components/descriptionlist/dt.svelte
@@ -0,0 +1,5 @@
+
+
+- {@render props.children()}
diff --git a/src/lib/components/descriptionlist/index.ts b/src/lib/components/descriptionlist/index.ts
index 8947140af..6f2b22ec7 100644
--- a/src/lib/components/descriptionlist/index.ts
+++ b/src/lib/components/descriptionlist/index.ts
@@ -1,2 +1,4 @@
export { default as DL } from './dl.svelte';
export { default as DLRow } from './dlrow.svelte';
+export { default as DD } from './dd.svelte';
+export { default as DT } from './dt.svelte';
diff --git a/src/lib/components/elements/account.svelte b/src/lib/components/elements/account.svelte
index 8eb4fa8a4..ea150dd94 100644
--- a/src/lib/components/elements/account.svelte
+++ b/src/lib/components/elements/account.svelte
@@ -4,7 +4,7 @@
import type { HTMLAnchorAttributes } from 'svelte/elements';
import { createLinkPreview, melt, type CreateLinkPreviewProps } from '@melt-ui/svelte';
import { fly } from 'svelte/transition';
- import { User } from 'lucide-svelte';
+ import { User, UserIcon } from 'lucide-svelte';
import { Name } from '@wharfkit/antelope';
import type { UnicoveContext } from '$lib/state/client.svelte';
import { AccountState } from '$lib/state/client/account.svelte';
@@ -15,6 +15,7 @@
contract?: boolean;
children?: Snippet;
preview?: boolean;
+ icon?: boolean;
}
let { name, contract = false, preview = false, children, ...props }: Props = $props();
@@ -51,11 +52,14 @@
+ {#if props.icon}
+
+ {/if}
{#if children}
{@render children()}
{:else}
diff --git a/src/lib/components/elements/action.svelte b/src/lib/components/elements/action.svelte
index 7648c34f2..48b5cbbac 100644
--- a/src/lib/components/elements/action.svelte
+++ b/src/lib/components/elements/action.svelte
@@ -1,13 +1,39 @@
-{#if props.data}
- {JSON.stringify(props.data, null, 2)}
+{#if action}
+
+
{JSON.stringify(action.data, null, 2)}
+
+ {String(action.name)}
+
+
+ -
+
+
+
+
+ {#each action.authorization as auth}
+ -
+ {auth}
+
+ {/each}
+
+
+
+
{/if}
diff --git a/src/lib/components/elements/asset.svelte b/src/lib/components/elements/asset.svelte
index 9be07b616..2ff9c7fa8 100644
--- a/src/lib/components/elements/asset.svelte
+++ b/src/lib/components/elements/asset.svelte
@@ -6,12 +6,13 @@
import { cn } from '$lib/utils';
import type { UnicoveContext } from '$lib/state/client.svelte';
import { getContext } from 'svelte';
+ import Big from 'big.js';
const context = getContext('state');
interface AssetProps extends HTMLAttributes {
value?: Asset;
- variant?: 'value' | 'full';
+ variant?: 'value' | 'full' | 'short';
fallback?: number;
}
@@ -33,8 +34,28 @@
minimumFractionDigits: context.settings.data.advancedMode ? asset?.symbol.precision : undefined
};
+ function abbreviatedValue(): string {
+ const suffixes = ['', 'K', 'M', 'B', 'T'];
+ let suffixIndex = 0;
+
+ if (!asset) {
+ return '';
+ }
+
+ let value = asset.value;
+ while (value >= 1000 && suffixIndex < suffixes.length - 1) {
+ value /= 1000;
+ suffixIndex++;
+ }
+
+ return `${value.toFixed(2)}${suffixes[suffixIndex]} ${asset.symbol.name}`;
+ }
+
function formatAssetValue() {
- return Intl.NumberFormat(locale, assetOptions).format(asset?.value || fallback);
+ // Use Big.js to accurately convert the string into a usable number
+ // Some precision may be lost in extreme circumstances
+ const number = Number(new Big(asset?.quantity || fallback));
+ return Intl.NumberFormat(locale, assetOptions).format(number);
}
function formatCurrencyValue() {
@@ -48,7 +69,9 @@
{string}
{/snippet}
-{#if isCurrency && variant === 'value'}
+{#if variant === 'short'}
+ {@render span(abbreviatedValue())}
+{:else if isCurrency && variant === 'value'}
{@render span(formatCurrencyValue())}
{:else if isCurrency && variant === 'full'}
{@render span(`${formatCurrencyValue()} ${asset?.symbol.name}`)}
diff --git a/src/lib/components/elements/contract.svelte b/src/lib/components/elements/contract.svelte
new file mode 100644
index 000000000..49f6ccb53
--- /dev/null
+++ b/src/lib/components/elements/contract.svelte
@@ -0,0 +1,35 @@
+
+
+{#if name}
+
+ {#if children}
+ {@render children()}
+ {:else}
+ {String(name)}
+ {/if}
+
+{/if}
diff --git a/src/lib/components/elements/key.svelte b/src/lib/components/elements/key.svelte
new file mode 100644
index 000000000..70d363d54
--- /dev/null
+++ b/src/lib/components/elements/key.svelte
@@ -0,0 +1,31 @@
+
+
+{#if key}
+
+ {#if icon}
+
+
+
+ {/if}
+
+ {String(key)}
+
+
+{/if}
diff --git a/src/lib/components/elements/voteweight.svelte b/src/lib/components/elements/voteweight.svelte
new file mode 100644
index 000000000..cfca55157
--- /dev/null
+++ b/src/lib/components/elements/voteweight.svelte
@@ -0,0 +1,34 @@
+
+
+
diff --git a/src/lib/state/client/account.svelte.ts b/src/lib/state/client/account.svelte.ts
index c4a136635..c8d918e51 100644
--- a/src/lib/state/client/account.svelte.ts
+++ b/src/lib/state/client/account.svelte.ts
@@ -3,7 +3,9 @@ import {
APIClient,
Asset,
Checksum256,
+ Float64,
Int128,
+ Int64,
Name,
UInt64,
type NameType
@@ -26,6 +28,24 @@ const defaultDataSources = {
rexfund: undefined
};
+interface VoterInfo {
+ isProxy: boolean;
+ proxyWeight: Float64;
+ proxy: Name;
+ weight: Float64;
+ votes: Name[];
+ staked: Int64;
+}
+
+const defaultVoteInfo: VoterInfo = {
+ isProxy: false,
+ proxy: Name.from(''),
+ proxyWeight: Float64.from(0),
+ weight: Float64.from(0),
+ votes: [],
+ staked: Int64.from(0)
+};
+
export class AccountState {
public client?: APIClient = $state();
public fetch = $state(fetch);
@@ -62,6 +82,7 @@ export class AccountState {
? getAccountValue(this.network, this.balance, this.ram)
: undefined;
});
+ public voter: VoterInfo = $state(defaultVoteInfo);
constructor(network: NetworkState, name: NameType, fetchOverride?: typeof fetch) {
if (fetchOverride) {
@@ -94,6 +115,18 @@ export class AccountState {
client: this.network.client,
data: API.v1.AccountObject.from(json.account_data)
});
+ if (json.account_data.voter_info) {
+ this.voter = {
+ isProxy: json.account_data.voter_info.is_proxy,
+ proxy: Name.from(json.account_data.voter_info.proxy),
+ proxyWeight: Float64.from(json.account_data.voter_info.proxied_vote_weight),
+ weight: Float64.from(json.account_data.voter_info.last_vote_weight),
+ votes: json.account_data.voter_info.producers.map((producer: string) =>
+ Name.from(producer)
+ ),
+ staked: Int64.from(json.account_data.voter_info.staked)
+ };
+ }
this.loaded = true;
}
@@ -111,7 +144,8 @@ export class AccountState {
cpu: this.cpu,
net: this.net,
ram: this.ram
- }
+ },
+ voter: this.voter
};
}
}
diff --git a/src/lib/state/client/wharf.svelte.ts b/src/lib/state/client/wharf.svelte.ts
index 030ba6831..3cc3a028c 100644
--- a/src/lib/state/client/wharf.svelte.ts
+++ b/src/lib/state/client/wharf.svelte.ts
@@ -38,13 +38,15 @@ import {
type QueuedTransaction,
StatusType,
queueTransaction,
- sendErrorToast,
- sendSuccessToast
+ sendErrorToast
+ // sendSuccessToast
} from '$lib/wharf/transact.svelte';
import { chainMapper } from '$lib/wharf/chains';
+import type { SettingsState } from '../settings.svelte';
+import { WalletPluginCleos } from '@wharfkit/wallet-plugin-cleos';
-const walletPlugins: WalletPlugin[] = [
+const defaultWalletPlugins: WalletPlugin[] = [
new WalletPluginAnchor(),
new WalletPluginMetaMask(),
new WalletPluginScatter(),
@@ -69,7 +71,7 @@ const transactPlugins: TransactPlugin[] = [
// If a local key is provided, add the private key wallet
if (PUBLIC_LOCAL_SIGNER) {
- walletPlugins.unshift(new WalletPluginPrivateKey(PUBLIC_LOCAL_SIGNER));
+ defaultWalletPlugins.unshift(new WalletPluginPrivateKey(PUBLIC_LOCAL_SIGNER));
}
export class WharfState {
@@ -79,8 +81,10 @@ export class WharfState {
public sessions: SerializedSession[] = $state([]);
public sessionKit?: SessionKit;
public transacting = $state(false);
+ public settings: SettingsState = $state() as SettingsState;
- constructor() {
+ constructor(settings: SettingsState) {
+ this.settings = settings;
if (browser) {
this.chainsSession = JSON.parse(localStorage.getItem('chainsSession') || '{}');
}
@@ -90,6 +94,10 @@ export class WharfState {
if (!browser) {
throw new Error('Wharf should only be used in the browser');
}
+ const walletPlugins = [...defaultWalletPlugins];
+ if (this.settings.data.advancedMode) {
+ walletPlugins.push(new WalletPluginCleos());
+ }
this.sessionKit = new SessionKit(
{
appName: '2nicove',
@@ -109,6 +117,11 @@ export class WharfState {
});
}
+ public setSettings(settings: SettingsState) {
+ this.settings = settings;
+ this.init();
+ }
+
public async login(options?: LoginOptions) {
if (!this.sessionKit) {
throw new Error('User not initialized');
@@ -221,8 +234,8 @@ export class WharfState {
transaction.status = StatusType.BROADCAST;
transaction.response = result.response;
transaction.transaction = result.resolved.transaction;
- const { id } = sendSuccessToast(transaction);
- transaction.toastId = id;
+ // const { id } = sendSuccessToast(transaction);
+ // transaction.toastId = id;
queueTransaction(transaction);
return result;
diff --git a/src/lib/state/network.svelte.ts b/src/lib/state/network.svelte.ts
index 389469e44..6293804f2 100644
--- a/src/lib/state/network.svelte.ts
+++ b/src/lib/state/network.svelte.ts
@@ -1,7 +1,7 @@
import { APIClient, Asset, FetchProvider, Int128, type AssetType } from '@wharfkit/antelope';
import { Chains, ChainDefinition, TokenMeta } from '@wharfkit/common';
import { RAMState, Resources, REXState, PowerUpState } from '@wharfkit/resources';
-import { chainIdsToIndices } from '@wharfkit/session';
+import { ABICache, chainIdsToIndices } from '@wharfkit/session';
import { snapOrigins } from '@wharfkit/wallet-plugin-metamask';
import { Types as DelphiOracleTypes } from '$lib/wharf/contracts/delphioracle';
@@ -40,12 +40,20 @@ export class NetworkState {
public contracts: DefaultContracts;
+ public abis?: ABICache = $state();
+ public globalstate?: SystemTypes.eosio_global_state = $state();
+ public marketcap: Asset = $derived.by(() => {
+ if (this.supply && this.tokenprice) {
+ return calculateValue(this.supply, this.tokenprice);
+ }
+ return Asset.fromUnits(0, '4,USD');
+ });
public ramstate?: RAMState = $state();
public resources?: Resources = $state();
public rexstate?: REXState = $state();
- public globalstate?: SystemTypes.eosio_global_state = $state();
public powerupstate?: PowerUpState = $state();
public sampledUsage?: SampledUsage = $state();
+ public supply?: Asset = $state();
public tokenmeta?: TokenMeta[] = $state();
public tokenstate?: DelphiOracleTypes.datapoints = $state();
public tokenprice = $derived.by(() => {
@@ -76,6 +84,8 @@ export class NetworkState {
);
}
+ this.abis = new ABICache(this.client);
+
this.resources = new Resources({
api: this.client,
sampleAccount: 'eosio.reserv'
@@ -135,6 +145,21 @@ export class NetworkState {
console.log(json);
}
+ try {
+ const index = String(this.chain.systemToken?.symbol.name);
+ const supply = Asset.from(json.supply[index].supply);
+ if (json.lockedsupply && json.lockedsupply.length) {
+ for (const balance of json.lockedsupply) {
+ const locked = Asset.from(balance);
+ supply.units.subtract(locked.units);
+ }
+ }
+ this.supply = supply;
+ } catch (error) {
+ console.log('Supply Parse', error);
+ console.log(json);
+ }
+
this.loaded = true;
}
@@ -172,10 +197,12 @@ export class NetworkState {
return {
chain: this.chain,
last_update: this.last_update,
+ marketcap: this.marketcap,
ramstate: this.ramstate,
ramprice: this.ramprice,
rexstate: this.rexstate,
sampleAccount: this.resources?.sampleAccount,
+ supply: this.supply,
tokenprice: this.tokenprice,
tokenstate: this.tokenstate
};
diff --git a/src/lib/utils/dayjs.ts b/src/lib/utils/dayjs.ts
new file mode 100644
index 000000000..06e7412c9
--- /dev/null
+++ b/src/lib/utils/dayjs.ts
@@ -0,0 +1,6 @@
+import dayjs from 'dayjs';
+import duration from 'dayjs/plugin/duration';
+import relativeTime from 'dayjs/plugin/relativeTime';
+
+dayjs.extend(duration);
+dayjs.extend(relativeTime);
diff --git a/src/lib/utils/staking.ts b/src/lib/utils/staking.ts
index 12486f6ca..f02f8dfb8 100644
--- a/src/lib/utils/staking.ts
+++ b/src/lib/utils/staking.ts
@@ -146,5 +146,5 @@ export function getUnstakableBalance(
export function getAPR(network: NetworkState): string {
const annualReward = 31250000;
const totalStaked = Number(network.rexstate!.total_lendable.value);
- return ((annualReward / totalStaked) * 100).toFixed(2);
+ return ((annualReward / totalStaked) * 100).toFixed(1);
}
diff --git a/src/lib/wharf/chains.ts b/src/lib/wharf/chains.ts
index 02290ad2d..cc779155a 100644
--- a/src/lib/wharf/chains.ts
+++ b/src/lib/wharf/chains.ts
@@ -1,4 +1,4 @@
-import type { Asset } from '@wharfkit/antelope';
+import type { Asset, NameType } from '@wharfkit/antelope';
import type { ChainIndices } from '@wharfkit/common';
import { Contract as DelphiOracleContract } from '$lib/wharf/contracts/delphioracle';
@@ -16,6 +16,7 @@ export interface DefaultContracts {
export interface ChainConfig {
name: ChainShortName;
features: Record;
+ lockedsupply?: NameType[]; // Accounts where tokens exist but are not in circulation
symbol: Asset.SymbolType;
timeseries_api?: string;
}
@@ -61,6 +62,7 @@ export const chainConfigs: Record = {
stakeresource: false,
staking: true
},
+ lockedsupply: ['eosio'],
symbol: '4,EOS'
},
// Jungle4
diff --git a/src/lib/wharf/contracts/msig.ts b/src/lib/wharf/contracts/msig.ts
index 2e9c5ea1e..d08d2c01c 100644
--- a/src/lib/wharf/contracts/msig.ts
+++ b/src/lib/wharf/contracts/msig.ts
@@ -1,264 +1,264 @@
-import type {Action, BytesType, Checksum256Type, NameType, UInt16Type} from '@wharfkit/antelope'
+import type { Action, BytesType, Checksum256Type, NameType, UInt16Type } from '@wharfkit/antelope';
import {
- ABI,
- Blob,
- Bytes,
- Checksum256,
- Name,
- Struct,
- TimePoint,
- TimePointSec,
- UInt16,
- UInt32,
- UInt8,
- VarUInt,
-} from '@wharfkit/antelope'
-import type {ActionOptions, ContractArgs, PartialBy, Table} from '@wharfkit/contract'
-import {Contract as BaseContract} from '@wharfkit/contract'
+ ABI,
+ Blob,
+ Bytes,
+ Checksum256,
+ Name,
+ Struct,
+ TimePoint,
+ TimePointSec,
+ UInt16,
+ UInt32,
+ UInt8,
+ VarUInt
+} from '@wharfkit/antelope';
+import type { ActionOptions, ContractArgs, PartialBy, Table } from '@wharfkit/contract';
+import { Contract as BaseContract } from '@wharfkit/contract';
export const abiBlob = Blob.from(
- 'DmVvc2lvOjphYmkvMS4yABAGYWN0aW9uAAQHYWNjb3VudARuYW1lBG5hbWUEbmFtZQ1hdXRob3JpemF0aW9uEnBlcm1pc3Npb25fbGV2ZWxbXQRkYXRhBWJ5dGVzCGFwcHJvdmFsAAIFbGV2ZWwQcGVybWlzc2lvbl9sZXZlbAR0aW1lCnRpbWVfcG9pbnQOYXBwcm92YWxzX2luZm8ABAd2ZXJzaW9uBXVpbnQ4DXByb3Bvc2FsX25hbWUEbmFtZRNyZXF1ZXN0ZWRfYXBwcm92YWxzCmFwcHJvdmFsW10ScHJvdmlkZWRfYXBwcm92YWxzCmFwcHJvdmFsW10HYXBwcm92ZQAECHByb3Bvc2VyBG5hbWUNcHJvcG9zYWxfbmFtZQRuYW1lBWxldmVsEHBlcm1pc3Npb25fbGV2ZWwNcHJvcG9zYWxfaGFzaAxjaGVja3N1bTI1NiQGY2FuY2VsAAMIcHJvcG9zZXIEbmFtZQ1wcm9wb3NhbF9uYW1lBG5hbWUIY2FuY2VsZXIEbmFtZQRleGVjAAMIcHJvcG9zZXIEbmFtZQ1wcm9wb3NhbF9uYW1lBG5hbWUIZXhlY3V0ZXIEbmFtZQlleHRlbnNpb24AAgR0eXBlBnVpbnQxNgRkYXRhBWJ5dGVzCmludmFsaWRhdGUAAQdhY2NvdW50BG5hbWUMaW52YWxpZGF0aW9uAAIHYWNjb3VudARuYW1lFmxhc3RfaW52YWxpZGF0aW9uX3RpbWUKdGltZV9wb2ludBJvbGRfYXBwcm92YWxzX2luZm8AAw1wcm9wb3NhbF9uYW1lBG5hbWUTcmVxdWVzdGVkX2FwcHJvdmFscxJwZXJtaXNzaW9uX2xldmVsW10ScHJvdmlkZWRfYXBwcm92YWxzEnBlcm1pc3Npb25fb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RkMmQzNWEyOTMwOGU5M2MyZDgyNmVjNzcwZDZiYjUyMGRiNjY4ZjUzMDc2NGJlNzE1MwotLS0KCnt7bGV2ZWwuYWN0b3J9fSByZXZva2VzIHRoZSBhcHByb3ZhbCBwcmV2aW91c2x5IHByb3ZpZGVkIGF0IHRoZWlyIHt7bGV2ZWwucGVybWlzc2lvbn19IHBlcm1pc3Npb24gbGV2ZWwgZnJvbSB0aGUge3twcm9wb3NhbF9uYW1lfX0gcHJvcG9zYWwgcHJvcG9zZWQgYnkge3twcm9wb3Nlcn19LgQAAMDRbHprNQNpNjQAABJvbGRfYXBwcm92YWxzX2luZm8AgMDRbHprNQNpNjQAAA5hcHByb3ZhbHNfaW5mbwAAAADgaPZ0A2k2NAAADGludmFsaWRhdGlvbgAAANFgWumtA2k2NAAACHByb3Bvc2FsAAAAAAA='
+);
+export const abi = ABI.from(abiBlob);
export namespace Types {
- @Struct.type('permission_level')
- export class permission_level extends Struct {
- @Struct.field(Name)
- declare actor: Name
- @Struct.field(Name)
- declare permission: Name
- }
- @Struct.type('action')
- export class action extends Struct {
- @Struct.field(Name)
- declare account: Name
- @Struct.field(Name)
- declare name: Name
- @Struct.field(permission_level, {array: true})
- declare authorization: permission_level[]
- @Struct.field(Bytes)
- declare data: Bytes
- }
- @Struct.type('approval')
- export class approval extends Struct {
- @Struct.field(permission_level)
- declare level: permission_level
- @Struct.field(TimePoint)
- declare time: TimePoint
- }
- @Struct.type('approvals_info')
- export class approvals_info extends Struct {
- @Struct.field(UInt8)
- declare version: UInt8
- @Struct.field(Name)
- declare proposal_name: Name
- @Struct.field(approval, {array: true})
- declare requested_approvals: approval[]
- @Struct.field(approval, {array: true})
- declare provided_approvals: approval[]
- }
- @Struct.type('approve')
- export class approve extends Struct {
- @Struct.field(Name)
- declare proposer: Name
- @Struct.field(Name)
- declare proposal_name: Name
- @Struct.field(permission_level)
- declare level: permission_level
- @Struct.field(Checksum256, {optional: true})
- declare proposal_hash?: Checksum256
- }
- @Struct.type('cancel')
- export class cancel extends Struct {
- @Struct.field(Name)
- declare proposer: Name
- @Struct.field(Name)
- declare proposal_name: Name
- @Struct.field(Name)
- declare canceler: Name
- }
- @Struct.type('exec')
- export class exec extends Struct {
- @Struct.field(Name)
- declare proposer: Name
- @Struct.field(Name)
- declare proposal_name: Name
- @Struct.field(Name)
- declare executer: Name
- }
- @Struct.type('extension')
- export class extension extends Struct {
- @Struct.field(UInt16)
- declare type: UInt16
- @Struct.field(Bytes)
- declare data: Bytes
- }
- @Struct.type('invalidate')
- export class invalidate extends Struct {
- @Struct.field(Name)
- declare account: Name
- }
- @Struct.type('invalidation')
- export class invalidation extends Struct {
- @Struct.field(Name)
- declare account: Name
- @Struct.field(TimePoint)
- declare last_invalidation_time: TimePoint
- }
- @Struct.type('old_approvals_info')
- export class old_approvals_info extends Struct {
- @Struct.field(Name)
- declare proposal_name: Name
- @Struct.field(permission_level, {array: true})
- declare requested_approvals: permission_level[]
- @Struct.field(permission_level, {array: true})
- declare provided_approvals: permission_level[]
- }
- @Struct.type('proposal')
- export class proposal extends Struct {
- @Struct.field(Name)
- declare proposal_name: Name
- @Struct.field(Bytes)
- declare packed_transaction: Bytes
- @Struct.field(TimePoint, {optional: true})
- declare earliest_exec_time?: TimePoint
- }
- @Struct.type('transaction_header')
- export class transaction_header extends Struct {
- @Struct.field(TimePointSec)
- declare expiration: TimePointSec
- @Struct.field(UInt16)
- declare ref_block_num: UInt16
- @Struct.field(UInt32)
- declare ref_block_prefix: UInt32
- @Struct.field(VarUInt)
- declare max_net_usage_words: VarUInt
- @Struct.field(UInt8)
- declare max_cpu_usage_ms: UInt8
- @Struct.field(VarUInt)
- declare delay_sec: VarUInt
- }
- @Struct.type('transaction')
- export class transaction extends transaction_header {
- @Struct.field(action, {array: true})
- declare context_free_actions: action[]
- @Struct.field(action, {array: true})
- declare actions: action[]
- @Struct.field(extension, {array: true})
- declare transaction_extensions: extension[]
- }
- @Struct.type('propose')
- export class propose extends Struct {
- @Struct.field(Name)
- declare proposer: Name
- @Struct.field(Name)
- declare proposal_name: Name
- @Struct.field(permission_level, {array: true})
- declare requested: permission_level[]
- @Struct.field(transaction)
- declare trx: transaction
- }
- @Struct.type('unapprove')
- export class unapprove extends Struct {
- @Struct.field(Name)
- declare proposer: Name
- @Struct.field(Name)
- declare proposal_name: Name
- @Struct.field(permission_level)
- declare level: permission_level
- }
+ @Struct.type('permission_level')
+ export class permission_level extends Struct {
+ @Struct.field(Name)
+ declare actor: Name;
+ @Struct.field(Name)
+ declare permission: Name;
+ }
+ @Struct.type('action')
+ export class action extends Struct {
+ @Struct.field(Name)
+ declare account: Name;
+ @Struct.field(Name)
+ declare name: Name;
+ @Struct.field(permission_level, { array: true })
+ declare authorization: permission_level[];
+ @Struct.field(Bytes)
+ declare data: Bytes;
+ }
+ @Struct.type('approval')
+ export class approval extends Struct {
+ @Struct.field(permission_level)
+ declare level: permission_level;
+ @Struct.field(TimePoint)
+ declare time: TimePoint;
+ }
+ @Struct.type('approvals_info')
+ export class approvals_info extends Struct {
+ @Struct.field(UInt8)
+ declare version: UInt8;
+ @Struct.field(Name)
+ declare proposal_name: Name;
+ @Struct.field(approval, { array: true })
+ declare requested_approvals: approval[];
+ @Struct.field(approval, { array: true })
+ declare provided_approvals: approval[];
+ }
+ @Struct.type('approve')
+ export class approve extends Struct {
+ @Struct.field(Name)
+ declare proposer: Name;
+ @Struct.field(Name)
+ declare proposal_name: Name;
+ @Struct.field(permission_level)
+ declare level: permission_level;
+ @Struct.field(Checksum256, { optional: true })
+ declare proposal_hash?: Checksum256;
+ }
+ @Struct.type('cancel')
+ export class cancel extends Struct {
+ @Struct.field(Name)
+ declare proposer: Name;
+ @Struct.field(Name)
+ declare proposal_name: Name;
+ @Struct.field(Name)
+ declare canceler: Name;
+ }
+ @Struct.type('exec')
+ export class exec extends Struct {
+ @Struct.field(Name)
+ declare proposer: Name;
+ @Struct.field(Name)
+ declare proposal_name: Name;
+ @Struct.field(Name)
+ declare executer: Name;
+ }
+ @Struct.type('extension')
+ export class extension extends Struct {
+ @Struct.field(UInt16)
+ declare type: UInt16;
+ @Struct.field(Bytes)
+ declare data: Bytes;
+ }
+ @Struct.type('invalidate')
+ export class invalidate extends Struct {
+ @Struct.field(Name)
+ declare account: Name;
+ }
+ @Struct.type('invalidation')
+ export class invalidation extends Struct {
+ @Struct.field(Name)
+ declare account: Name;
+ @Struct.field(TimePoint)
+ declare last_invalidation_time: TimePoint;
+ }
+ @Struct.type('old_approvals_info')
+ export class old_approvals_info extends Struct {
+ @Struct.field(Name)
+ declare proposal_name: Name;
+ @Struct.field(permission_level, { array: true })
+ declare requested_approvals: permission_level[];
+ @Struct.field(permission_level, { array: true })
+ declare provided_approvals: permission_level[];
+ }
+ @Struct.type('proposal')
+ export class proposal extends Struct {
+ @Struct.field(Name)
+ declare proposal_name: Name;
+ @Struct.field(Bytes)
+ declare packed_transaction: Bytes;
+ @Struct.field(TimePoint, { optional: true })
+ declare earliest_exec_time?: TimePoint;
+ }
+ @Struct.type('transaction_header')
+ export class transaction_header extends Struct {
+ @Struct.field(TimePointSec)
+ declare expiration: TimePointSec;
+ @Struct.field(UInt16)
+ declare ref_block_num: UInt16;
+ @Struct.field(UInt32)
+ declare ref_block_prefix: UInt32;
+ @Struct.field(VarUInt)
+ declare max_net_usage_words: VarUInt;
+ @Struct.field(UInt8)
+ declare max_cpu_usage_ms: UInt8;
+ @Struct.field(VarUInt)
+ declare delay_sec: VarUInt;
+ }
+ @Struct.type('transaction')
+ export class transaction extends transaction_header {
+ @Struct.field(action, { array: true })
+ declare context_free_actions: action[];
+ @Struct.field(action, { array: true })
+ declare actions: action[];
+ @Struct.field(extension, { array: true })
+ declare transaction_extensions: extension[];
+ }
+ @Struct.type('propose')
+ export class propose extends Struct {
+ @Struct.field(Name)
+ declare proposer: Name;
+ @Struct.field(Name)
+ declare proposal_name: Name;
+ @Struct.field(permission_level, { array: true })
+ declare requested: permission_level[];
+ @Struct.field(transaction)
+ declare trx: transaction;
+ }
+ @Struct.type('unapprove')
+ export class unapprove extends Struct {
+ @Struct.field(Name)
+ declare proposer: Name;
+ @Struct.field(Name)
+ declare proposal_name: Name;
+ @Struct.field(permission_level)
+ declare level: permission_level;
+ }
}
export const TableMap = {
- approvals: Types.old_approvals_info,
- approvals2: Types.approvals_info,
- invals: Types.invalidation,
- proposal: Types.proposal,
-}
+ approvals: Types.old_approvals_info,
+ approvals2: Types.approvals_info,
+ invals: Types.invalidation,
+ proposal: Types.proposal
+};
export interface TableTypes {
- approvals: Types.old_approvals_info
- approvals2: Types.approvals_info
- invals: Types.invalidation
- proposal: Types.proposal
+ approvals: Types.old_approvals_info;
+ approvals2: Types.approvals_info;
+ invals: Types.invalidation;
+ proposal: Types.proposal;
}
-export type RowType = T extends keyof TableTypes ? TableTypes[T] : any
-export type TableNames = keyof TableTypes
+export type RowType = T extends keyof TableTypes ? TableTypes[T] : any;
+export type TableNames = keyof TableTypes;
export namespace ActionParams {
- export namespace Type {
- export interface permission_level {
- actor: NameType
- permission: NameType
- }
- export interface transaction {
- context_free_actions: Type.action[]
- actions: Type.action[]
- transaction_extensions: Type.extension[]
- }
- export interface action {
- account: NameType
- name: NameType
- authorization: Type.permission_level[]
- data: BytesType
- }
- export interface extension {
- type: UInt16Type
- data: BytesType
- }
- }
- export interface approve {
- proposer: NameType
- proposal_name: NameType
- level: Type.permission_level
- proposal_hash?: Checksum256Type
- }
- export interface cancel {
- proposer: NameType
- proposal_name: NameType
- canceler: NameType
- }
- export interface exec {
- proposer: NameType
- proposal_name: NameType
- executer: NameType
- }
- export interface invalidate {
- account: NameType
- }
- export interface propose {
- proposer: NameType
- proposal_name: NameType
- requested: Type.permission_level[]
- trx: Type.transaction
- }
- export interface unapprove {
- proposer: NameType
- proposal_name: NameType
- level: Type.permission_level
- }
+ export namespace Type {
+ export interface permission_level {
+ actor: NameType;
+ permission: NameType;
+ }
+ export interface transaction {
+ context_free_actions: Type.action[];
+ actions: Type.action[];
+ transaction_extensions: Type.extension[];
+ }
+ export interface action {
+ account: NameType;
+ name: NameType;
+ authorization: Type.permission_level[];
+ data: BytesType;
+ }
+ export interface extension {
+ type: UInt16Type;
+ data: BytesType;
+ }
+ }
+ export interface approve {
+ proposer: NameType;
+ proposal_name: NameType;
+ level: Type.permission_level;
+ proposal_hash?: Checksum256Type;
+ }
+ export interface cancel {
+ proposer: NameType;
+ proposal_name: NameType;
+ canceler: NameType;
+ }
+ export interface exec {
+ proposer: NameType;
+ proposal_name: NameType;
+ executer: NameType;
+ }
+ export interface invalidate {
+ account: NameType;
+ }
+ export interface propose {
+ proposer: NameType;
+ proposal_name: NameType;
+ requested: Type.permission_level[];
+ trx: Type.transaction;
+ }
+ export interface unapprove {
+ proposer: NameType;
+ proposal_name: NameType;
+ level: Type.permission_level;
+ }
}
export interface ActionNameParams {
- approve: ActionParams.approve
- cancel: ActionParams.cancel
- exec: ActionParams.exec
- invalidate: ActionParams.invalidate
- propose: ActionParams.propose
- unapprove: ActionParams.unapprove
+ approve: ActionParams.approve;
+ cancel: ActionParams.cancel;
+ exec: ActionParams.exec;
+ invalidate: ActionParams.invalidate;
+ propose: ActionParams.propose;
+ unapprove: ActionParams.unapprove;
}
-export type ActionNames = keyof ActionNameParams
+export type ActionNames = keyof ActionNameParams;
export class Contract extends BaseContract {
- constructor(args: PartialBy) {
- super({
- client: args.client,
- abi: abi,
- account: args.account || Name.from('eosio.msig'),
- })
- }
- action(
- name: T,
- data: ActionNameParams[T],
- options?: ActionOptions
- ): Action {
- return super.action(name, data, options)
- }
- table(name: T, scope?: NameType): Table> {
- return super.table(name, scope, TableMap[name])
- }
+ constructor(args: PartialBy) {
+ super({
+ client: args.client,
+ abi: abi,
+ account: args.account || Name.from('eosio.msig')
+ });
+ }
+ action(
+ name: T,
+ data: ActionNameParams[T],
+ options?: ActionOptions
+ ): Action {
+ return super.action(name, data, options);
+ }
+ table(name: T, scope?: NameType): Table> {
+ return super.table(name, scope, TableMap[name]);
+ }
}
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
index 2e55c1649..c53b41a7f 100644
--- a/src/routes/+layout.svelte
+++ b/src/routes/+layout.svelte
@@ -2,6 +2,7 @@
import '../app.css';
import 'inter-ui/inter-latin.css';
import '@fontsource/jetbrains-mono/600.css'; // Semibold
+ import '$lib/utils/dayjs'; // setup dayjs
import extend from 'just-extend';
import { Head, type SeoConfig } from 'svead';
import { ParaglideJS } from '@inlang/paraglide-sveltekit';
diff --git a/src/routes/+page.server.ts b/src/routes/+page.server.ts
index 4964c551e..08c3e1381 100644
--- a/src/routes/+page.server.ts
+++ b/src/routes/+page.server.ts
@@ -1,5 +1,5 @@
import { redirect } from '@sveltejs/kit';
export function load() {
- throw redirect(302, '/eos');
+ throw redirect(301, '/eos');
}
diff --git a/src/routes/[network]/(account)/fund/+page.svelte b/src/routes/[network]/(account)/fund/+page.svelte
index 340361761..5ae9daa29 100644
--- a/src/routes/[network]/(account)/fund/+page.svelte
+++ b/src/routes/[network]/(account)/fund/+page.svelte
@@ -66,6 +66,11 @@
}
+Onramps
+
+ After logging in with your EOS account, EOS tokens can be purchased directly from the following
+ platforms and the tokens will immediately be sent to your on-chain account.
+
{#if !context.account}
You must be logged in with an account to use this feature.
{:else if !coinbaseInstance}
@@ -74,6 +79,22 @@
{/if}
+Exchanges
+
+ EOS can be purchased through a number of platforms, depending on the users needs and location.
+ Below are some of the most popular options available.
+
+
+
{#if context.settings.data.debugMode}
{m.common_debugging()}
diff --git a/src/routes/[network]/(account)/ram/(forms)/buy/+page.svelte b/src/routes/[network]/(account)/ram/(forms)/buy/+page.svelte
index 6fd898ce7..e8b835d1a 100644
--- a/src/routes/[network]/(account)/ram/(forms)/buy/+page.svelte
+++ b/src/routes/[network]/(account)/ram/(forms)/buy/+page.svelte
@@ -20,6 +20,7 @@
import { BuyRAMState } from './state.svelte';
import { calAvailableSize, preventDefault } from '$lib/utils';
+ import { DD, DL, DLRow } from '$lib/components/descriptionlist';
let bytesInput: BytesInput | undefined = $state();
let assetInput: AssetInput | undefined = $state();
@@ -139,34 +140,39 @@
-
-
- {m.common_labeled_unit_price({
- unit: `${context.network.chain.systemToken?.symbol.name}/RAM`
- })} (KB)
-
-
-
-
-
-
{m.ram_to_purchase()}
-
-
-
-
-
{m.ram_purchase_value()}
-
-
-
-
-
{m.common_network_fees()} (0.5%)
-
-
-
-
-
{m.common_total_cost()}
-
-
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
{#if buyRamState.valid}
{#if buyRamState.format === 'asset'}
diff --git a/src/routes/[network]/(account)/ram/(forms)/sell/+page.svelte b/src/routes/[network]/(account)/ram/(forms)/sell/+page.svelte
index f6d7ab8a5..bb9583580 100644
--- a/src/routes/[network]/(account)/ram/(forms)/sell/+page.svelte
+++ b/src/routes/[network]/(account)/ram/(forms)/sell/+page.svelte
@@ -19,6 +19,7 @@
import { SellRAMState } from './state.svelte';
import { calAvailableSize, preventDefault } from '$lib/utils';
+ import { DD, DL, DLRow } from '$lib/components/descriptionlist';
let bytesInput: BytesInput | undefined = $state();
let assetInput: AssetInput | undefined = $state();
@@ -125,36 +126,40 @@
{m.common_unit_sell({ unit: 'RAM' })}
-
-
-
- {m.common_labeled_unit_price({
- unit: `${context.network.chain.systemToken?.symbol.name}/RAM`
- })} (KB)
-
-
-
-
-
-
{m.ram_to_sell()}
-
-
-
-
-
{m.total_proceeds()}
-
-
-
-
-
{m.common_network_fees()} (0.5%)
-
-
-
-
-
{m.common_expected_receive()}
-
-
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
{#if sellRamState.valid}
diff --git a/src/routes/[network]/(account)/refund/manager.svelte.ts b/src/routes/[network]/(account)/refund/manager.svelte.ts
index b4af7dc28..c52696493 100644
--- a/src/routes/[network]/(account)/refund/manager.svelte.ts
+++ b/src/routes/[network]/(account)/refund/manager.svelte.ts
@@ -47,7 +47,7 @@ export class RefundManager {
});
public refundable: boolean = $derived.by(() => {
- return this.dateAvailable ? new Date() >= this.dateAvailable : false;
+ return this.dateAvailable ? new Date() >= this.dateAvailable : true;
});
constructor(network: NetworkState) {
diff --git a/src/routes/[network]/(account)/staking/(staking)/stake/+page.svelte b/src/routes/[network]/(account)/staking/(staking)/stake/+page.svelte
index 5ee33b9ae..940c11a44 100644
--- a/src/routes/[network]/(account)/staking/(staking)/stake/+page.svelte
+++ b/src/routes/[network]/(account)/staking/(staking)/stake/+page.svelte
@@ -9,7 +9,7 @@
import type { UnicoveContext } from '$lib/state/client.svelte';
import { getContext } from 'svelte';
import { StakeManager } from './manager.svelte';
- import Descriptionlist from '$lib/components/descriptionlist.svelte';
+ import { DL } from '$lib/components/descriptionlist';
import * as m from '$lib/paraglide/messages';
const context = getContext('state');
@@ -19,14 +19,12 @@
let hints = $derived([
{
- key: m.common_amount_to_act({
- action: m.common_stake()
- }),
- value: manager.assetValue.toString()
+ title: m.common_amount_to_act({ action: m.common_stake() }),
+ description: manager.assetValue.toString()
},
- { key: m.staking_minimum_lockup(), value: '21 days' },
- { key: m.common_apr_current(), value: manager.apr + '%' },
- { key: m.staking_estimated_yield_yearly(), value: String(manager.estimateYield) }
+ { title: m.staking_minimum_lockup(), description: '21 days' },
+ { title: m.common_apr_current(), description: manager.apr + '%' },
+ { title: m.staking_estimated_yield_yearly(), description: String(manager.estimateYield) }
]);
$effect(() => {
@@ -90,6 +88,6 @@
>
-
+
{/if}
diff --git a/src/routes/[network]/(account)/staking/(staking)/unstake/+page.svelte b/src/routes/[network]/(account)/staking/(staking)/unstake/+page.svelte
index 924cf90d8..c8837028e 100644
--- a/src/routes/[network]/(account)/staking/(staking)/unstake/+page.svelte
+++ b/src/routes/[network]/(account)/staking/(staking)/unstake/+page.svelte
@@ -6,7 +6,7 @@
import Button from '$lib/components/button/button.svelte';
import Label from '$lib/components/input/label.svelte';
import TransactionSummary from '$lib/components/transactionSummary.svelte';
- import Descriptionlist from '$lib/components/descriptionlist.svelte';
+ import { DL } from '$lib/components/descriptionlist';
import type { UnicoveContext } from '$lib/state/client.svelte';
import { getContext } from 'svelte';
import { UnstakeManager } from './manager.svelte';
@@ -18,7 +18,7 @@
let manager: UnstakeManager = $state(new UnstakeManager(data.network));
let hints = $derived([
- { key: m.staking_withdraw_timeframe(), value: manager.assetValue.toString() }
+ { title: m.staking_withdraw_timeframe(), description: manager.assetValue.toString() }
]);
$effect(() => {
@@ -78,6 +78,6 @@
-
+
{/if}
diff --git a/src/routes/[network]/(dev)/debug/components/sections/tables.svelte b/src/routes/[network]/(dev)/debug/components/sections/tables.svelte
index a5f021078..51d297d0b 100644
--- a/src/routes/[network]/(dev)/debug/components/sections/tables.svelte
+++ b/src/routes/[network]/(dev)/debug/components/sections/tables.svelte
@@ -1,6 +1,7 @@
@@ -50,8 +51,39 @@
row striping here.
+
+
+
+
+
+ For displaying a component in the description, or multiple values under a single key, you can
+ use the components declaratively.
+
+
+
+ Note: You need to wrap the child component correctly or you'll get a warning. There are CSS
+ rules that'll visually yell at you to fix it :)
+
+
-
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+
+
+
diff --git a/src/routes/[network]/(explorer)/account/[name]/+layout.svelte b/src/routes/[network]/(explorer)/account/[name]/+layout.svelte
index 0d007e55d..9fa18876c 100644
--- a/src/routes/[network]/(explorer)/account/[name]/+layout.svelte
+++ b/src/routes/[network]/(explorer)/account/[name]/+layout.svelte
@@ -14,13 +14,17 @@
{ href: `/${network}/account/${account}`, text: 'Overview' },
{ href: `/${network}/account/${account}/activity`, text: 'Activity' },
{ href: `/${network}/account/${account}/balances`, text: 'Balances' }
- // { href: `/${network}/account/${account}/permissions`, text: 'Permissions' },
- // { href: `/${network}/account/${account}/ram`, text: 'RAM' },
- // { href: `/${network}/account/${account}/resources`, text: 'Resources' },
- // { href: `/${network}/account/${account}/staked`, text: 'Staked' },
];
+ if (context.settings.data.advancedMode) {
+ items.push({ href: `/${network}/account/${account}/votes`, text: 'Votes' });
+ }
+
if (context.settings.data.debugMode) {
+ items.push({ href: `/${network}/account/${account}/permissions`, text: 'Permissions' });
+ items.push({ href: `/${network}/account/${account}/ram`, text: 'RAM' });
+ items.push({ href: `/${network}/account/${account}/resources`, text: 'Resources' });
+ items.push({ href: `/${network}/account/${account}/staked`, text: 'Staked' });
items.push({ href: `/${network}/account/${account}/chaindata`, text: 'Data' });
}
diff --git a/src/routes/[network]/(explorer)/account/[name]/balances/+page.svelte b/src/routes/[network]/(explorer)/account/[name]/balances/+page.svelte
index e15a14b32..e51e8c7a8 100644
--- a/src/routes/[network]/(explorer)/account/[name]/balances/+page.svelte
+++ b/src/routes/[network]/(explorer)/account/[name]/balances/+page.svelte
@@ -32,7 +32,8 @@
Token |
- Amount |
+ Amount |
+ Value |
{#if isCurrentUser}
|
{/if}
@@ -48,12 +49,17 @@
{/if}
- {balance.asset.symbol.name}
+
+ {balance.asset.symbol.name}
+
-
+ |
|
+ |
{#if isCurrentUser}
{@render tableAction(balance.asset)}
{/if}
diff --git a/src/routes/[network]/(explorer)/account/[name]/permissions/+page.svelte b/src/routes/[network]/(explorer)/account/[name]/permissions/+page.svelte
index 98a6d8e09..161f1b60b 100644
--- a/src/routes/[network]/(explorer)/account/[name]/permissions/+page.svelte
+++ b/src/routes/[network]/(explorer)/account/[name]/permissions/+page.svelte
@@ -1,12 +1,9 @@
{#if data.account}
-
-
Permissions
- {JSON.stringify(data.account.permissions, null, 2)}
-
+
{/if}
diff --git a/src/routes/[network]/(explorer)/account/[name]/permissions/+page.ts b/src/routes/[network]/(explorer)/account/[name]/permissions/+page.ts
new file mode 100644
index 000000000..b3524481a
--- /dev/null
+++ b/src/routes/[network]/(explorer)/account/[name]/permissions/+page.ts
@@ -0,0 +1,45 @@
+import type { Permission } from '@wharfkit/account';
+import type { PageLoad } from './$types';
+import { Name } from '@wharfkit/antelope';
+
+export interface TreePermission {
+ permission: Permission;
+ children?: TreePermission[];
+}
+
+function buildTree(data: TreePermission[], parentId = Name.from('')): TreePermission[] {
+ const tree: TreePermission[] = [];
+ data.forEach((item) => {
+ // Check if the item belongs to the current parent
+ if (item.permission.parent.equals(parentId)) {
+ // Recursively build the children of the current item
+ const children = buildTree(data, item.permission.perm_name);
+ // If children exist, assign them to the current item
+ if (children.length) {
+ item.children = children;
+ }
+ // Add the current item to the tree
+ tree.push(item);
+ }
+ });
+ return tree;
+}
+
+export const load: PageLoad = async ({ params, parent }) => {
+ const { network, account } = await parent();
+
+ let tree: TreePermission[] = [];
+ if (account.permissions) {
+ const permissionTree = account.permissions.map((p) => ({ permission: p }));
+ tree = buildTree(permissionTree);
+ }
+
+ return {
+ subtitle: `Permissions on the ${network.chain.name} Network.`,
+ tree: tree,
+ pageMetaTags: {
+ title: `Permissions | ${params.name} | ${network.chain.name} Network`,
+ description: `Permissions for ${params.name} on the ${network.chain.name} network.`
+ }
+ };
+};
diff --git a/src/routes/[network]/(explorer)/account/[name]/permissions/permission.svelte b/src/routes/[network]/(explorer)/account/[name]/permissions/permission.svelte
new file mode 100644
index 000000000..3ab698494
--- /dev/null
+++ b/src/routes/[network]/(explorer)/account/[name]/permissions/permission.svelte
@@ -0,0 +1,151 @@
+
+
+
+
+
+
- Permission Name
+ - {permission.perm_name}
+
+
+
- Threshold Required
+ - {permission.required_auth.threshold}
+
+ {#if permission.linked_actions}
+
+
- Actions
+ {#each permission.linked_actions as { action, account }}
+ -
+
+ {account}
+ {#if action}
+ ::{action}
+ {/if}
+
+
+ {/each}
+
+ {/if}
+
+
+
+ {#if anyPermissions}
+
+
+
+ Weight |
+ Authorization |
+
+
+
+ {#if permission.required_auth.keys}
+ {#each permission.required_auth.keys as { weight, key }}
+
+
+ +{weight.toString()}
+ |
+
+
+ |
+
+
+ |
+
+ {/each}
+ {/if}
+ {#if permission.required_auth.accounts}
+ {#each permission.required_auth.accounts as { weight, permission: account }}
+
+
+ +{weight.toString()}
+ |
+
+
+ {account}
+
+ |
+
+
+ |
+
+ {/each}
+ {/if}
+ {#if permission.required_auth.waits}
+ {#each permission.required_auth.waits as { weight, wait_sec }}
+
+
+ +{weight.toString()}
+ |
+
+
+ {wait_sec.toString()}s ({dayjs
+ .duration(wait_sec.toNumber(), 'seconds')
+ .humanize()})
+ |
+
+ {/each}
+ {/if}
+
+
+ {/if}
+
+
+ {#if level > 0}
+
+ {/if}
+
+
+{#if children}
+
+
+ 0}
+ class:ml-4={level === 0}
+ >
+
+ {#each children as child}
+
+ {/each}
+
+
+{/if}
diff --git a/src/routes/[network]/(explorer)/account/[name]/permissions/permissiontree.svelte b/src/routes/[network]/(explorer)/account/[name]/permissions/permissiontree.svelte
new file mode 100644
index 000000000..b92407a3d
--- /dev/null
+++ b/src/routes/[network]/(explorer)/account/[name]/permissions/permissiontree.svelte
@@ -0,0 +1,11 @@
+
+
+
+ {#each props.permissions as permission}
+
+ {/each}
+
diff --git a/src/routes/[network]/(explorer)/account/[name]/votes/+page.svelte b/src/routes/[network]/(explorer)/account/[name]/votes/+page.svelte
new file mode 100644
index 000000000..7dc35b31b
--- /dev/null
+++ b/src/routes/[network]/(explorer)/account/[name]/votes/+page.svelte
@@ -0,0 +1,70 @@
+
+
+
+
+
+ Proxied To |
+
+
+ |
+
+
+ Is Proxy? |
+
+ {#if data.account.voter.isProxy}
+ Yes
+ {:else}
+ No
+ {/if}
+ |
+
+
+ Total Vote Weight |
+
+
+ |
+
+
+ Self Vote Weight |
+
+
+ |
+
+
+ Proxied Weight |
+
+
+ |
+
+
+
+
+{#if data.account.voter.votes.length}
+
+
+
+ Block Producer |
+
+
+
+ {#each data.account.voter.votes as vote}
+
+
+
+ |
+
+ {/each}
+
+
+{/if}
diff --git a/src/routes/[network]/(explorer)/block/[number]/+page.svelte b/src/routes/[network]/(explorer)/block/[number]/+page.svelte
index 1443c0e8a..1091aeb7a 100644
--- a/src/routes/[network]/(explorer)/block/[number]/+page.svelte
+++ b/src/routes/[network]/(explorer)/block/[number]/+page.svelte
@@ -4,7 +4,7 @@
import AccountText from '$lib/components/elements/account.svelte';
import Button from '$lib/components/button/button.svelte';
import { ArrowLeftRight, ArrowRight, ArrowLeft } from 'lucide-svelte';
- import { DL, DLRow } from '$lib/components/descriptionlist/index.js';
+ import { DD, DL, DLRow } from '$lib/components/descriptionlist/index.js';
import { goto } from '$lib/utils';
let { data } = $props();
@@ -78,22 +78,34 @@
- {data.details.blockNumber}
+ -
+ {data.details.blockNumber}
+
-
+ -
+
+
- {data.details.totalCpu} μs
+ -
+ {data.details.totalCpu} μs
+
- {data.details.totalNet * 8} Bytes
+ -
+ {data.details.totalNet * 8} Bytes
+
- {data.details.totalActions}
+ -
+ {data.details.totalActions}
+
- {data.details.blockId}
+ -
+ {data.details.blockId}
+
diff --git a/src/routes/[network]/(explorer)/key/[publicKey]/+page.svelte b/src/routes/[network]/(explorer)/key/[publicKey]/+page.svelte
index c1a43677d..88bbf2c95 100644
--- a/src/routes/[network]/(explorer)/key/[publicKey]/+page.svelte
+++ b/src/routes/[network]/(explorer)/key/[publicKey]/+page.svelte
@@ -1,5 +1,5 @@
-
+
-
-