diff --git a/frontend/src/app/app.service.ts b/frontend/src/app/app.service.ts index 91ed8f51a2..94d6135d44 100644 --- a/frontend/src/app/app.service.ts +++ b/frontend/src/app/app.service.ts @@ -1,9 +1,10 @@ import { Injectable } from '@angular/core'; -import { catchError, map, Observable, of } from 'rxjs'; +import { map, Observable, of } from 'rxjs'; import { MinaNode } from '@shared/types/core/environment/mina-env.type'; import { CONFIG } from '@shared/constants/config'; import { RustService } from '@core/services/rust.service'; import { AppNodeDetails, AppNodeStatus } from '@shared/types/app/app-node-details.type'; +import { getNetwork } from '@shared/helpers/mina.helper'; @Injectable({ providedIn: 'root', @@ -39,6 +40,7 @@ export class AppService { snarks: data.snark_pool.snarks, transactions: data.transaction_pool.transactions, chainId: data.chain_id, + network: getNetwork(data.chain_id), } as AppNodeDetails)), ); } diff --git a/frontend/src/app/features/block-production/overview/slot-details/block-production-overview-slot-details.component.ts b/frontend/src/app/features/block-production/overview/slot-details/block-production-overview-slot-details.component.ts index 9053b13ce2..22bdfe2db2 100644 --- a/frontend/src/app/features/block-production/overview/slot-details/block-production-overview-slot-details.component.ts +++ b/frontend/src/app/features/block-production/overview/slot-details/block-production-overview-slot-details.component.ts @@ -1,10 +1,11 @@ -import { ChangeDetectionStrategy, Component, Input, OnChanges } from '@angular/core'; +import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; import { BlockProductionOverviewSlot, } from '@shared/types/block-production/overview/block-production-overview-slot.type'; import { AppSelectors } from '@app/app.state'; -import { CONFIG } from '@shared/constants/config'; import { StoreDispatcher } from '@shared/base-classes/store-dispatcher.class'; +import { AppNodeDetails } from '@shared/types/app/app-node-details.type'; +import { filter } from 'rxjs'; @Component({ selector: 'mina-block-production-overview-slot-details', @@ -13,7 +14,7 @@ import { StoreDispatcher } from '@shared/base-classes/store-dispatcher.class'; changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'h-minus-xl flex-column' }, }) -export class BlockProductionOverviewSlotDetailsComponent extends StoreDispatcher implements OnChanges { +export class BlockProductionOverviewSlotDetailsComponent extends StoreDispatcher { @Input({ required: true }) activeSlot: BlockProductionOverviewSlot; private minaExplorer: string; @@ -22,18 +23,15 @@ export class BlockProductionOverviewSlotDetailsComponent extends StoreDispatcher this.listenToActiveNode(); } - ngOnChanges(): void { - } - private listenToActiveNode(): void { - this.select(AppSelectors.activeNode, (node) => { - this.minaExplorer = node.minaExplorerNetwork ?? CONFIG.globalConfig?.minaExplorerNetwork; - }); + this.select(AppSelectors.activeNodeDetails, (node: AppNodeDetails) => { + this.minaExplorer = node.network.toLowerCase(); + }, filter(Boolean)); } viewInMinaExplorer(): void { - const network = this.minaExplorer !== 'mainnet' ? this.minaExplorer : ''; - const url = `https://${network}.minaexplorer.com/block/${this.activeSlot.hash}`; + const network = this.minaExplorer !== 'mainnet' ? (this.minaExplorer + '.') : ''; + const url = `https://${network}minaexplorer.com/block/${this.activeSlot.hash}`; window.open(url, '_blank'); } } diff --git a/frontend/src/app/features/block-production/won-slots/side-panel/block-production-won-slots-side-panel.component.ts b/frontend/src/app/features/block-production/won-slots/side-panel/block-production-won-slots-side-panel.component.ts index 2f7e9cf392..bf7af53fed 100644 --- a/frontend/src/app/features/block-production/won-slots/side-panel/block-production-won-slots-side-panel.component.ts +++ b/frontend/src/app/features/block-production/won-slots/side-panel/block-production-won-slots-side-panel.component.ts @@ -19,7 +19,7 @@ import { any, hasValue, noMillisFormat, ONE_THOUSAND, SecDurationConfig, toReada import { filter } from 'rxjs'; import { BlockProductionWonSlotsActions } from '@block-production/won-slots/block-production-won-slots.actions'; import { AppSelectors } from '@app/app.state'; -import { CONFIG } from '@shared/constants/config'; +import { AppNodeDetails } from '@shared/types/app/app-node-details.type'; @Component({ selector: 'mina-block-production-won-slots-side-panel', @@ -68,9 +68,9 @@ export class BlockProductionWonSlotsSidePanelComponent extends StoreDispatcher i } private listenToActiveNode(): void { - this.select(AppSelectors.activeNode, (node) => { - this.minaExplorer = node.minaExplorerNetwork ?? CONFIG.globalConfig?.minaExplorerNetwork; - }); + this.select(AppSelectors.activeNodeDetails, (node: AppNodeDetails) => { + this.minaExplorer = node.network.toLowerCase(); + }, filter(Boolean)); } private listenToActiveSlot(): void { @@ -108,8 +108,8 @@ export class BlockProductionWonSlotsSidePanelComponent extends StoreDispatcher i } viewInMinaExplorer(): void { - const network = this.minaExplorer !== 'mainnet' ? this.minaExplorer : ''; - const url = `https://${network}.minaexplorer.com/block/${this.slot.hash}`; + const network = this.minaExplorer !== 'mainnet' ? (this.minaExplorer + '.') : ''; + const url = `https://${network}minaexplorer.com/block/${this.slot.hash}`; window.open(url, '_blank'); } diff --git a/frontend/src/app/features/mempool/mempoolmock.ts b/frontend/src/app/features/mempool/mempoolmock.ts deleted file mode 100644 index 8a6955a221..0000000000 --- a/frontend/src/app/features/mempool/mempoolmock.ts +++ /dev/null @@ -1,1565 +0,0 @@ -import { MempoolTransactionResponse } from '@app/features/mempool/mempool.service'; - -export const mempoolMock: MempoolTransactionResponse[] = [ - { - 'data': { - 'SignedCommand': { - 'payload': { - 'common': { - 'fee': '100000000', - 'fee_payer_pk': 'B62qpfgnUm7zVqi8MJHNB2m37rtgMNDbFNhC2DpMmmVpQt8x6gKv9Ww', - 'nonce': '113856', - 'valid_until': { - 'SinceGenesis': '4294967295', - }, - 'memo': '\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000', - }, - 'body': { - 'Payment': { - 'receiver_pk': 'B62qr2GHjDKnX3Qv5YonCQ4u7SfD8sKyEZVXPpzPzQm4cm9XtbckbcA', - 'amount': '2000000000', - }, - }, - }, - 'signer': 'B62qpfgnUm7zVqi8MJHNB2m37rtgMNDbFNhC2DpMmmVpQt8x6gKv9Ww', - 'signature': '7mXJDMhWweQwbyjs5Gbmt1bVPsGnrxCaoXkD62MiQFMJ2kS3vZ3F85EwyuuayCbP7oF3C1upenuwivdv9vXd1DEyV4Aq2ab9', - }, - }, - 'hash': [ - 204, - 252, - 159, - 127, - 160, - 128, - 48, - 38, - 132, - 17, - 183, - 250, - 196, - 145, - 181, - 119, - 203, - 73, - 248, - 49, - 253, - 43, - 184, - 15, - 103, - 217, - 200, - 179, - 223, - 94, - 112, - 192, - ], - }, - { - 'data': { - 'ZkappCommand': { - 'fee_payer': { - 'body': { - 'public_key': 'B62qpfgnUm7zVqi8MJHNB2m37rtgMNDbFNhC2DpMmmVpQt8x6gKv9Ww', - 'fee': '100000000', - 'valid_until': null, - 'nonce': '113861', - }, - 'authorization': '7mXEmRPjAoVsKyEY5GgHKJJHD8ikm7pHJsZvDFpuc6ormNK4G3QF7oCR2GeorBRtHFAhc7WwzB6zvd2irwM5JgkyMAFiBb9G', - }, - 'account_updates': [ - { - 'elt': { - 'account_update': { - 'body': { - 'public_key': 'B62qpfgnUm7zVqi8MJHNB2m37rtgMNDbFNhC2DpMmmVpQt8x6gKv9Ww', - 'token_id': 'wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf', - 'update': { - 'app_state': [ - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - ], - 'delegate': 'Keep', - 'verification_key': 'Keep', - 'permissions': 'Keep', - 'zkapp_uri': 'Keep', - 'token_symbol': 'Keep', - 'timing': 'Keep', - 'voting_for': 'Keep', - }, - 'balance_change': { - 'magnitude': '2000000000', - 'sgn': [ - 'Neg', - ], - }, - 'increment_nonce': false, - 'events': [], - 'actions': [], - 'call_data': '0x0000000000000000000000000000000000000000000000000000000000000000', - 'preconditions': { - 'network': { - 'snarked_ledger_hash': 'Ignore', - 'blockchain_length': 'Ignore', - 'min_window_density': 'Ignore', - 'total_currency': 'Ignore', - 'global_slot_since_genesis': 'Ignore', - 'staking_epoch_data': { - 'ledger': { - 'hash': 'Ignore', - 'total_currency': 'Ignore', - }, - 'seed': 'Ignore', - 'start_checkpoint': 'Ignore', - 'lock_checkpoint': 'Ignore', - 'epoch_length': 'Ignore', - }, - 'next_epoch_data': { - 'ledger': { - 'hash': 'Ignore', - 'total_currency': 'Ignore', - }, - 'seed': 'Ignore', - 'start_checkpoint': 'Ignore', - 'lock_checkpoint': 'Ignore', - 'epoch_length': 'Ignore', - }, - }, - 'account': { - 'balance': 'Ignore', - 'nonce': 'Ignore', - 'receipt_chain_hash': 'Ignore', - 'delegate': 'Ignore', - 'state': [ - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - ], - 'action_state': 'Ignore', - 'proved_state': 'Ignore', - 'is_new': 'Ignore', - }, - 'valid_while': 'Ignore', - }, - 'use_full_commitment': true, - 'implicit_account_creation_fee': false, - 'may_use_token': 'No', - 'authorization_kind': 'Signature', - }, - 'authorization': { - 'Signature': '7mXEmRPjAoVsKyEY5GgHKJJHD8ikm7pHJsZvDFpuc6ormNK4G3QF7oCR2GeorBRtHFAhc7WwzB6zvd2irwM5JgkyMAFiBb9G', - }, - }, - 'account_update_digest': null, - 'calls': [ - { - 'elt': { - 'account_update': { - 'body': { - 'public_key': 'B62qqpbub2D4DuzaFDUz1LAGm3rWHKsM36zKSG8dQaAbvYxrSdwaeMS', - 'token_id': 'wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf', - 'update': { - 'app_state': [ - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - ], - 'delegate': 'Keep', - 'verification_key': 'Keep', - 'permissions': 'Keep', - 'zkapp_uri': 'Keep', - 'token_symbol': 'Keep', - 'timing': 'Keep', - 'voting_for': 'Keep', - }, - 'balance_change': { - 'magnitude': '2000000000', - 'sgn': [ - 'Pos', - ], - }, - 'increment_nonce': false, - 'events': [], - 'actions': [], - 'call_data': '0x0000000000000000000000000000000000000000000000000000000000000000', - 'preconditions': { - 'network': { - 'snarked_ledger_hash': 'Ignore', - 'blockchain_length': 'Ignore', - 'min_window_density': 'Ignore', - 'total_currency': 'Ignore', - 'global_slot_since_genesis': 'Ignore', - 'staking_epoch_data': { - 'ledger': { - 'hash': 'Ignore', - 'total_currency': 'Ignore', - }, - 'seed': 'Ignore', - 'start_checkpoint': 'Ignore', - 'lock_checkpoint': 'Ignore', - 'epoch_length': 'Ignore', - }, - 'next_epoch_data': { - 'ledger': { - 'hash': 'Ignore', - 'total_currency': 'Ignore', - }, - 'seed': 'Ignore', - 'start_checkpoint': 'Ignore', - 'lock_checkpoint': 'Ignore', - 'epoch_length': 'Ignore', - }, - }, - 'account': { - 'balance': 'Ignore', - 'nonce': 'Ignore', - 'receipt_chain_hash': 'Ignore', - 'delegate': 'Ignore', - 'state': [ - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - ], - 'action_state': 'Ignore', - 'proved_state': 'Ignore', - 'is_new': 'Ignore', - }, - 'valid_while': 'Ignore', - }, - 'use_full_commitment': false, - 'implicit_account_creation_fee': false, - 'may_use_token': 'No', - 'authorization_kind': 'NoneGiven', - }, - 'authorization': 'NoneGiven', - }, - 'account_update_digest': null, - 'calls': [], - }, - 'stack_hash': null, - }, - ], - }, - 'stack_hash': null, - }, - ], - 'memo': '\u0001\u0016Test ZKApp to Receiver\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000', - }, - }, - 'hash': [ - 176, - 86, - 184, - 65, - 74, - 91, - 177, - 151, - 46, - 85, - 129, - 177, - 151, - 168, - 10, - 87, - 73, - 45, - 73, - 122, - 6, - 153, - 65, - 142, - 208, - 9, - 133, - 118, - 189, - 24, - 73, - 48, - ], - }, - { - 'data': { - 'SignedCommand': { - 'payload': { - 'common': { - 'fee': '100000000', - 'fee_payer_pk': 'B62qpfgnUm7zVqi8MJHNB2m37rtgMNDbFNhC2DpMmmVpQt8x6gKv9Ww', - 'nonce': '113864', - 'valid_until': { - 'SinceGenesis': '4294967295', - }, - 'memo': '\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000', - }, - 'body': { - 'Payment': { - 'receiver_pk': 'B62qrsaLKgMey9Y6aZjdL5FVFa1dkYC4u4qr69Mw1vp54QRt5KVk98o', - 'amount': '2000000000', - }, - }, - }, - 'signer': 'B62qpfgnUm7zVqi8MJHNB2m37rtgMNDbFNhC2DpMmmVpQt8x6gKv9Ww', - 'signature': '7mXHzwBLQXXjroHCioCZZekcth5TyMaqQc8CXrPpW5uz5Ay2qeKTvWYcZhH3QepvV724nRVNdvtLNuRR1S4PvfY9ye2uYjKp', - }, - }, - 'hash': [ - 162, - 43, - 225, - 71, - 212, - 87, - 181, - 56, - 235, - 61, - 5, - 254, - 245, - 126, - 101, - 20, - 203, - 3, - 28, - 239, - 185, - 5, - 113, - 62, - 7, - 68, - 19, - 230, - 129, - 224, - 173, - 118, - ], - }, - { - 'data': { - 'ZkappCommand': { - 'fee_payer': { - 'body': { - 'public_key': 'B62qpfgnUm7zVqi8MJHNB2m37rtgMNDbFNhC2DpMmmVpQt8x6gKv9Ww', - 'fee': '100000000', - 'valid_until': null, - 'nonce': '113859', - }, - 'authorization': '7mXH4BBarbfyUPrpvrTy8vgDs6xxYC2PbhqF3Npqc8wawQ8ascLFraEYAavLdnxxVvMYhTvDKccZWsXBuXMPvJFMpdL98jou', - }, - 'account_updates': [ - { - 'elt': { - 'account_update': { - 'body': { - 'public_key': 'B62qpfgnUm7zVqi8MJHNB2m37rtgMNDbFNhC2DpMmmVpQt8x6gKv9Ww', - 'token_id': 'wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf', - 'update': { - 'app_state': [ - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - ], - 'delegate': 'Keep', - 'verification_key': 'Keep', - 'permissions': 'Keep', - 'zkapp_uri': 'Keep', - 'token_symbol': 'Keep', - 'timing': 'Keep', - 'voting_for': 'Keep', - }, - 'balance_change': { - 'magnitude': '2000000000', - 'sgn': [ - 'Neg', - ], - }, - 'increment_nonce': false, - 'events': [], - 'actions': [], - 'call_data': '0x0000000000000000000000000000000000000000000000000000000000000000', - 'preconditions': { - 'network': { - 'snarked_ledger_hash': 'Ignore', - 'blockchain_length': 'Ignore', - 'min_window_density': 'Ignore', - 'total_currency': 'Ignore', - 'global_slot_since_genesis': 'Ignore', - 'staking_epoch_data': { - 'ledger': { - 'hash': 'Ignore', - 'total_currency': 'Ignore', - }, - 'seed': 'Ignore', - 'start_checkpoint': 'Ignore', - 'lock_checkpoint': 'Ignore', - 'epoch_length': 'Ignore', - }, - 'next_epoch_data': { - 'ledger': { - 'hash': 'Ignore', - 'total_currency': 'Ignore', - }, - 'seed': 'Ignore', - 'start_checkpoint': 'Ignore', - 'lock_checkpoint': 'Ignore', - 'epoch_length': 'Ignore', - }, - }, - 'account': { - 'balance': 'Ignore', - 'nonce': 'Ignore', - 'receipt_chain_hash': 'Ignore', - 'delegate': 'Ignore', - 'state': [ - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - ], - 'action_state': 'Ignore', - 'proved_state': 'Ignore', - 'is_new': 'Ignore', - }, - 'valid_while': 'Ignore', - }, - 'use_full_commitment': true, - 'implicit_account_creation_fee': false, - 'may_use_token': 'No', - 'authorization_kind': 'Signature', - }, - 'authorization': { - 'Signature': '7mXH4BBarbfyUPrpvrTy8vgDs6xxYC2PbhqF3Npqc8wawQ8ascLFraEYAavLdnxxVvMYhTvDKccZWsXBuXMPvJFMpdL98jou', - }, - }, - 'account_update_digest': null, - 'calls': [ - { - 'elt': { - 'account_update': { - 'body': { - 'public_key': 'B62qkCHcbWjMDWTyVL21wWsRv7oV8XyfYwVKTNtCC7rM3qTit8jNavD', - 'token_id': 'wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf', - 'update': { - 'app_state': [ - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - ], - 'delegate': 'Keep', - 'verification_key': 'Keep', - 'permissions': 'Keep', - 'zkapp_uri': 'Keep', - 'token_symbol': 'Keep', - 'timing': 'Keep', - 'voting_for': 'Keep', - }, - 'balance_change': { - 'magnitude': '2000000000', - 'sgn': [ - 'Pos', - ], - }, - 'increment_nonce': false, - 'events': [], - 'actions': [], - 'call_data': '0x0000000000000000000000000000000000000000000000000000000000000000', - 'preconditions': { - 'network': { - 'snarked_ledger_hash': 'Ignore', - 'blockchain_length': 'Ignore', - 'min_window_density': 'Ignore', - 'total_currency': 'Ignore', - 'global_slot_since_genesis': 'Ignore', - 'staking_epoch_data': { - 'ledger': { - 'hash': 'Ignore', - 'total_currency': 'Ignore', - }, - 'seed': 'Ignore', - 'start_checkpoint': 'Ignore', - 'lock_checkpoint': 'Ignore', - 'epoch_length': 'Ignore', - }, - 'next_epoch_data': { - 'ledger': { - 'hash': 'Ignore', - 'total_currency': 'Ignore', - }, - 'seed': 'Ignore', - 'start_checkpoint': 'Ignore', - 'lock_checkpoint': 'Ignore', - 'epoch_length': 'Ignore', - }, - }, - 'account': { - 'balance': 'Ignore', - 'nonce': 'Ignore', - 'receipt_chain_hash': 'Ignore', - 'delegate': 'Ignore', - 'state': [ - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - ], - 'action_state': 'Ignore', - 'proved_state': 'Ignore', - 'is_new': 'Ignore', - }, - 'valid_while': 'Ignore', - }, - 'use_full_commitment': false, - 'implicit_account_creation_fee': false, - 'may_use_token': 'No', - 'authorization_kind': 'NoneGiven', - }, - 'authorization': 'NoneGiven', - }, - 'account_update_digest': null, - 'calls': [], - }, - 'stack_hash': null, - }, - ], - }, - 'stack_hash': null, - }, - ], - 'memo': '\u0001\u0016Test ZKApp to Receiver\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000', - }, - }, - 'hash': [ - 194, - 10, - 245, - 103, - 134, - 165, - 210, - 249, - 165, - 94, - 208, - 79, - 43, - 246, - 135, - 109, - 135, - 179, - 73, - 79, - 156, - 188, - 144, - 135, - 252, - 248, - 232, - 219, - 116, - 204, - 69, - 239, - ], - }, - { - 'data': { - 'ZkappCommand': { - 'fee_payer': { - 'body': { - 'public_key': 'B62qiTrtDyWmDFMQvUDRUdWVsVwNFhUV4rkPVgeANi4adKhrUwfdNFT', - 'fee': '100000000', - 'valid_until': null, - 'nonce': '10', - }, - 'authorization': '7mXKrivmqvSdy8NYMVmxPPxP598ExXPbe2ZTYXQ9ribueaCRa2b2w34ep1DVVAEwAw3nstkRKxp95SHzsHb8oV6WyZc3aea1', - }, - 'account_updates': [ - { - 'elt': { - 'account_update': { - 'body': { - 'public_key': 'B62qs2NthDuxAT94tTFg6MtuaP1gaBxTZyNv9D3uQiQciy1VsaimNFT', - 'token_id': 'wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf', - 'update': { - 'app_state': [ - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - ], - 'delegate': 'Keep', - 'verification_key': { - 'Set': { - 'max_proofs_verified': 'N0', - 'actual_wrap_domain_size': 'N0', - 'wrap_index': { - 'sigma_comm': [ - [ - '0x2f5c9d397e0f22fc4ae9c11c8e078d7c846f8664d9dfce5c8bfd516b35a389e6', - '0x2378d58c8387df4059cc194479bd24c4716851ebdf275e32b17950bd2e5694bf', - ], - [ - '0x20dd0a3f89585bbc7d61a70c4c80e33053455ac8c1470f721ab50092c691e737', - '0x3ed12ebef9785c31b1a6eb906bd87dc401c7ab60e0c41fc60a45fc019fa610f8', - ], - [ - '0x35eea5ff4291153db3c25ca2093a399c5fb01125cbf37b895f8fb0be8b090dff', - '0x2b751960fef12bbf3a60e87dd66398ae59a6f7e6a9163284d80f201cc0fe1c90', - ], - [ - '0x10f0afbc00ea504249c0f6ed4e5f9899f932890b23c90a4310dcc03799825a58', - '0x262860f52076017bda5ed704632b440e557d15f137446caf15d614ccf4e1354d', - ], - [ - '0x16d2a62a3ea55f57ea7e1241b6b3aee4bde93d189a07f0b76a9376aabe129abf', - '0x0f3430a0a5e900b0b8d6e47ec86010ad314f93ec6016684af5ae0acd17d3a64b', - ], - [ - '0x1fd718eecfca769cc1dcf3e1142900e51a0b6273c7052c2bfebf964fa9806396', - '0x27d1f6433662837c8e3c77cb3fae5e7b6278ecdfffd71aa69418be3f94ac4307', - ], - [ - '0x3b86ad54a4613845c22c4f84a8e1c244d294e718926eb5987b259fefc8acc8c8', - '0x35358379d23813f6ce3bdd156e556fefc7f7f693b23736508644b797e63c320d', - ], - ], - 'coefficients_comm': [ - [ - '0x22ec95117cfb1774d53cdb790d7a7a2ef9ee5e266acfc742f97b0cb54de819b3', - '0x34aaf6ca2b3734ddaf2520a804e2cd93252482d8b0f24e088dccd9200c6dcda6', - ], - [ - '0x0b35e42991c9033be5454f2648908279fc4399280bf3f2bb8e0727464a66857e', - '0x19ea851e8b45df4c28784c85c3c79514c0aa7357ebaea7d97cc4137d8d8a63c4', - ], - [ - '0x0a5a057465dc0e690b51df25ffdf5fe1b1fc0ac2e68d8f365c5921a126949727', - '0x20f3d144f73616e3ff800560265bdf6a22d77ba2a6aec1569266f470b831aa05', - ], - [ - '0x3b6ed596cfa492f2cc3a60bf169008859c3f8de5681195f042aa1a06687cea3b', - '0x26f343501adb0fb6d0a48cc1d93e119083bf0dfa5e7d285d404b92c92dca683f', - ], - [ - '0x0da7ad36959795066e0370aee2cd24cdd3e9f1dd21ab00e1f038e1e2c434b531', - '0x30ae382d01fe1c97e78574592a1e9933a0e8d5bc26dc939a4e552e058be684ca', - ], - [ - '0x0f14ef1eb1aa4a05054a8915c90ce693c86cb47888818da15d4ff9c8edcccb3d', - '0x37037005db273b4252c028a0c02aef101d918d3df9730673efc3456731cfa137', - ], - [ - '0x07b9029a5a89e526f580a6c60e53b947ecd6e6039d7c675b0b68f35dddd71d4b', - '0x0b157b8f577a5e9f4ba7788266bfd19e26f44087a74479beca4c22ed841046f0', - ], - [ - '0x2c5203e5e1d3409c4fe84c6de4949e9c71d4e6ad8070ed75f957f966a1ca5c6d', - '0x1dd4f8ec8dc6d80478d4d72e9d0d52e0bad7fa7d698775f49d7924644e2c5e94', - ], - [ - '0x142be497f718d5463bc2c55647a0b76c8a853bfde19080f3d7f2843e81612a3f', - '0x2e8b0f4063b3bfdcd6373066d4037770ac1a2032b7763d0c2f94ebcdaa60500a', - ], - [ - '0x1572f0d0573f0d7018754e9f1a343905c5301c9c99074b41fe56892b49903265', - '0x1aad3669a057236a5b816fa95996b0af4b8b027634d7973025a7a940bbda4243', - ], - [ - '0x1ab767258f361cb2d6b20c3df904cd2fab623ad7ae3cd25bf54350b281b3c6a8', - '0x034881bb942ed697cc72f9864a8b3129a31517b80ec3a4ac78065a15ffcc2d1a', - ], - [ - '0x35c10bd1266e5b74f8c442ef936fed3f1a3ce9ef8c5b70b5c8d3de36bf0d586c', - '0x2f5b41bb8350188ba65f125eabcc9f8d7bb244acd2af30bb6a8bac33769406d6', - ], - [ - '0x16cb88e6ea862b5f98d7f3931bcb41740a8c590d6f3eafb67784590a222ac37d', - '0x27d23f75d5d924bb3174fc30f0278727e243e52c85a5b611aef104feda3827a8', - ], - [ - '0x1375b913ac1bce2251b31ebf9a2948aa36d8796ae414998243f8e8f4ac381de6', - '0x0213881d5e4e0920af014f0e8a792ed9f5dd0b35142c457db1b3c0a113ddde43', - ], - [ - '0x17f9f69f413d92a05f40ad2a9b86f1361880542d491df06f1412a14de027bd7b', - '0x2b25dbd031ec8b5e13859487caae3e2c86122a4951a9297de4ebb0d87accb758', - ], - ], - 'generic_comm': [ - '0x21836f27da1c06589ef7199da136f023781f0f85688fa22a6c9cbdf9b700eb1a', - '0x236e44b2aa10d1fb07466d2ebd6fedb1692048a2a59834e7c7cad2aece9fdd63', - ], - 'psm_comm': [ - '0x127f36c8058a33148f747be7a9f4a606f3afb54ca4a09a19a8a16e68a82ac938', - '0x136c55a23ea6e33cf8a44fef54202a4567be1468e38588f53b3b61c19e65d12d', - ], - 'complete_add_comm': [ - '0x1bb74ebe265674b886771267be61d38cc992403012de6fc4151676fa3ff91f7a', - '0x05797a4eb8a3c71993866239ddf526751fde31fe26cf31b094dcb1ee3bc2b095', - ], - 'mul_comm': [ - '0x3770295a3eb9dd1803c9f36c0164f6e72b8b42df45db50d56eb7e0ef7a865e94', - '0x00ac7602127e492e15d837695619c5eca07faa0b85feed6a71e7193ae2a3bd0c', - ], - 'emul_comm': [ - '0x2f19c246f9504f5879ce071fa439cad2f6eadb99d70fe1553ad5dfcae264a1d5', - '0x0d06974146affde6aea1b416068debac6c4d88ef4e5be996b1de463a59259710', - ], - 'endomul_scalar_comm': [ - '0x372e6d478e846a8336d0e283d4a9e81e7adef603ff055f3cd86daad50acf2625', - '0x3e781d07121dcbd83786af12e9ad7d0c9362a693898684edc6948a93847288e0', - ], - }, - }, - }, - 'permissions': 'Keep', - 'zkapp_uri': 'Keep', - 'token_symbol': 'Keep', - 'timing': 'Keep', - 'voting_for': 'Keep', - }, - 'balance_change': { - 'magnitude': '0', - 'sgn': [ - 'Pos', - ], - }, - 'increment_nonce': true, - 'events': [], - 'actions': [], - 'call_data': '0x0000000000000000000000000000000000000000000000000000000000000000', - 'preconditions': { - 'network': { - 'snarked_ledger_hash': 'Ignore', - 'blockchain_length': 'Ignore', - 'min_window_density': 'Ignore', - 'total_currency': 'Ignore', - 'global_slot_since_genesis': 'Ignore', - 'staking_epoch_data': { - 'ledger': { - 'hash': 'Ignore', - 'total_currency': 'Ignore', - }, - 'seed': 'Ignore', - 'start_checkpoint': 'Ignore', - 'lock_checkpoint': 'Ignore', - 'epoch_length': 'Ignore', - }, - 'next_epoch_data': { - 'ledger': { - 'hash': 'Ignore', - 'total_currency': 'Ignore', - }, - 'seed': 'Ignore', - 'start_checkpoint': 'Ignore', - 'lock_checkpoint': 'Ignore', - 'epoch_length': 'Ignore', - }, - }, - 'account': { - 'balance': 'Ignore', - 'nonce': { - 'Check': { - 'lower': '1', - 'upper': '1', - }, - }, - 'receipt_chain_hash': 'Ignore', - 'delegate': 'Ignore', - 'state': [ - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - ], - 'action_state': 'Ignore', - 'proved_state': 'Ignore', - 'is_new': 'Ignore', - }, - 'valid_while': 'Ignore', - }, - 'use_full_commitment': false, - 'implicit_account_creation_fee': false, - 'may_use_token': 'No', - 'authorization_kind': 'Signature', - }, - 'authorization': { - 'Signature': '7mXCsep9Tqcy1RygQsTFN46CghZkJDib64FDAVT7Sx1kbTNshsJYUGJUkMUTb6nfoMsEoJzswGjWunwLz2e5yDGrQcXaubHm', - }, - }, - 'account_update_digest': null, - 'calls': [], - }, - 'stack_hash': null, - }, - ], - 'memo': '\u0001\u0016upgrade minanft.io 1/2\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000', - }, - }, - 'hash': [ - 225, - 247, - 214, - 67, - 136, - 255, - 214, - 33, - 61, - 120, - 207, - 197, - 138, - 118, - 103, - 93, - 64, - 244, - 101, - 109, - 187, - 249, - 178, - 230, - 170, - 125, - 218, - 53, - 225, - 189, - 33, - 53, - ], - }, - { - 'data': { - 'SignedCommand': { - 'payload': { - 'common': { - 'fee': '100000000', - 'fee_payer_pk': 'B62qpfgnUm7zVqi8MJHNB2m37rtgMNDbFNhC2DpMmmVpQt8x6gKv9Ww', - 'nonce': '113858', - 'valid_until': { - 'SinceGenesis': '4294967295', - }, - 'memo': '\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000', - }, - 'body': { - 'Payment': { - 'receiver_pk': 'B62qr2GHjDKnX3Qv5YonCQ4u7SfD8sKyEZVXPpzPzQm4cm9XtbckbcA', - 'amount': '2000000000', - }, - }, - }, - 'signer': 'B62qpfgnUm7zVqi8MJHNB2m37rtgMNDbFNhC2DpMmmVpQt8x6gKv9Ww', - 'signature': '7mXEPBXKQAUrUkqVTSnK6dZyZM7BPrmebqJc3dwvxt2JQfQDMCtkgBQw2qtTUe9kdvk5Nr5s5genanMPgxzeVkBgX5Aoxb5c', - }, - }, - 'hash': [ - 205, - 139, - 232, - 123, - 31, - 203, - 2, - 157, - 135, - 52, - 238, - 55, - 192, - 107, - 203, - 154, - 53, - 109, - 86, - 136, - 99, - 179, - 144, - 83, - 134, - 27, - 92, - 70, - 98, - 40, - 213, - 220, - ], - }, - { - 'data': { - 'ZkappCommand': { - 'fee_payer': { - 'body': { - 'public_key': 'B62qpfgnUm7zVqi8MJHNB2m37rtgMNDbFNhC2DpMmmVpQt8x6gKv9Ww', - 'fee': '100000000', - 'valid_until': null, - 'nonce': '113863', - }, - 'authorization': '7mX4ZCpEtngQmif9W8H2PupuP1QGruSSQmPkck3TREj57vmhg1bQSq3WaZPXMnizT119xS7UCjpmNxZBTBZuMZD7bKvjn2aW', - }, - 'account_updates': [ - { - 'elt': { - 'account_update': { - 'body': { - 'public_key': 'B62qpfgnUm7zVqi8MJHNB2m37rtgMNDbFNhC2DpMmmVpQt8x6gKv9Ww', - 'token_id': 'wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf', - 'update': { - 'app_state': [ - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - ], - 'delegate': 'Keep', - 'verification_key': 'Keep', - 'permissions': 'Keep', - 'zkapp_uri': 'Keep', - 'token_symbol': 'Keep', - 'timing': 'Keep', - 'voting_for': 'Keep', - }, - 'balance_change': { - 'magnitude': '2000000000', - 'sgn': [ - 'Neg', - ], - }, - 'increment_nonce': false, - 'events': [], - 'actions': [], - 'call_data': '0x0000000000000000000000000000000000000000000000000000000000000000', - 'preconditions': { - 'network': { - 'snarked_ledger_hash': 'Ignore', - 'blockchain_length': 'Ignore', - 'min_window_density': 'Ignore', - 'total_currency': 'Ignore', - 'global_slot_since_genesis': 'Ignore', - 'staking_epoch_data': { - 'ledger': { - 'hash': 'Ignore', - 'total_currency': 'Ignore', - }, - 'seed': 'Ignore', - 'start_checkpoint': 'Ignore', - 'lock_checkpoint': 'Ignore', - 'epoch_length': 'Ignore', - }, - 'next_epoch_data': { - 'ledger': { - 'hash': 'Ignore', - 'total_currency': 'Ignore', - }, - 'seed': 'Ignore', - 'start_checkpoint': 'Ignore', - 'lock_checkpoint': 'Ignore', - 'epoch_length': 'Ignore', - }, - }, - 'account': { - 'balance': 'Ignore', - 'nonce': 'Ignore', - 'receipt_chain_hash': 'Ignore', - 'delegate': 'Ignore', - 'state': [ - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - ], - 'action_state': 'Ignore', - 'proved_state': 'Ignore', - 'is_new': 'Ignore', - }, - 'valid_while': 'Ignore', - }, - 'use_full_commitment': true, - 'implicit_account_creation_fee': false, - 'may_use_token': 'No', - 'authorization_kind': 'Signature', - }, - 'authorization': { - 'Signature': '7mX4ZCpEtngQmif9W8H2PupuP1QGruSSQmPkck3TREj57vmhg1bQSq3WaZPXMnizT119xS7UCjpmNxZBTBZuMZD7bKvjn2aW', - }, - }, - 'account_update_digest': null, - 'calls': [ - { - 'elt': { - 'account_update': { - 'body': { - 'public_key': 'B62qn8WCvanEBBxXf5iMmi3rFLVxUPrXDXtHaPuZ2fD7KsX3KogzTXs', - 'token_id': 'wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf', - 'update': { - 'app_state': [ - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - ], - 'delegate': 'Keep', - 'verification_key': 'Keep', - 'permissions': 'Keep', - 'zkapp_uri': 'Keep', - 'token_symbol': 'Keep', - 'timing': 'Keep', - 'voting_for': 'Keep', - }, - 'balance_change': { - 'magnitude': '2000000000', - 'sgn': [ - 'Pos', - ], - }, - 'increment_nonce': false, - 'events': [], - 'actions': [], - 'call_data': '0x0000000000000000000000000000000000000000000000000000000000000000', - 'preconditions': { - 'network': { - 'snarked_ledger_hash': 'Ignore', - 'blockchain_length': 'Ignore', - 'min_window_density': 'Ignore', - 'total_currency': 'Ignore', - 'global_slot_since_genesis': 'Ignore', - 'staking_epoch_data': { - 'ledger': { - 'hash': 'Ignore', - 'total_currency': 'Ignore', - }, - 'seed': 'Ignore', - 'start_checkpoint': 'Ignore', - 'lock_checkpoint': 'Ignore', - 'epoch_length': 'Ignore', - }, - 'next_epoch_data': { - 'ledger': { - 'hash': 'Ignore', - 'total_currency': 'Ignore', - }, - 'seed': 'Ignore', - 'start_checkpoint': 'Ignore', - 'lock_checkpoint': 'Ignore', - 'epoch_length': 'Ignore', - }, - }, - 'account': { - 'balance': 'Ignore', - 'nonce': 'Ignore', - 'receipt_chain_hash': 'Ignore', - 'delegate': 'Ignore', - 'state': [ - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - ], - 'action_state': 'Ignore', - 'proved_state': 'Ignore', - 'is_new': 'Ignore', - }, - 'valid_while': 'Ignore', - }, - 'use_full_commitment': false, - 'implicit_account_creation_fee': false, - 'may_use_token': 'No', - 'authorization_kind': 'NoneGiven', - }, - 'authorization': 'NoneGiven', - }, - 'account_update_digest': null, - 'calls': [], - }, - 'stack_hash': null, - }, - ], - }, - 'stack_hash': null, - }, - ], - 'memo': '\u0001\u0016Test ZKApp to Receiver\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000', - }, - }, - 'hash': [ - 201, - 221, - 158, - 22, - 11, - 216, - 0, - 121, - 223, - 44, - 7, - 16, - 220, - 19, - 121, - 202, - 41, - 44, - 241, - 225, - 115, - 194, - 168, - 92, - 102, - 128, - 44, - 90, - 6, - 57, - 44, - 185, - ], - }, - { - 'data': { - 'ZkappCommand': { - 'fee_payer': { - 'body': { - 'public_key': 'B62qpfgnUm7zVqi8MJHNB2m37rtgMNDbFNhC2DpMmmVpQt8x6gKv9Ww', - 'fee': '100000000', - 'valid_until': null, - 'nonce': '113857', - }, - 'authorization': '7mXRKizAbVHa28Nt9sjCRT1MZGkcwiMAcEJwW5G2Lq27gH2NBTZKkVeVddT9Dn92pXzLu3UEG6Qb5arFLXBCFVYURUVUUgTR', - }, - 'account_updates': [ - { - 'elt': { - 'account_update': { - 'body': { - 'public_key': 'B62qpfgnUm7zVqi8MJHNB2m37rtgMNDbFNhC2DpMmmVpQt8x6gKv9Ww', - 'token_id': 'wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf', - 'update': { - 'app_state': [ - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - ], - 'delegate': 'Keep', - 'verification_key': 'Keep', - 'permissions': 'Keep', - 'zkapp_uri': 'Keep', - 'token_symbol': 'Keep', - 'timing': 'Keep', - 'voting_for': 'Keep', - }, - 'balance_change': { - 'magnitude': '2000000000', - 'sgn': [ - 'Neg', - ], - }, - 'increment_nonce': false, - 'events': [], - 'actions': [], - 'call_data': '0x0000000000000000000000000000000000000000000000000000000000000000', - 'preconditions': { - 'network': { - 'snarked_ledger_hash': 'Ignore', - 'blockchain_length': 'Ignore', - 'min_window_density': 'Ignore', - 'total_currency': 'Ignore', - 'global_slot_since_genesis': 'Ignore', - 'staking_epoch_data': { - 'ledger': { - 'hash': 'Ignore', - 'total_currency': 'Ignore', - }, - 'seed': 'Ignore', - 'start_checkpoint': 'Ignore', - 'lock_checkpoint': 'Ignore', - 'epoch_length': 'Ignore', - }, - 'next_epoch_data': { - 'ledger': { - 'hash': 'Ignore', - 'total_currency': 'Ignore', - }, - 'seed': 'Ignore', - 'start_checkpoint': 'Ignore', - 'lock_checkpoint': 'Ignore', - 'epoch_length': 'Ignore', - }, - }, - 'account': { - 'balance': 'Ignore', - 'nonce': 'Ignore', - 'receipt_chain_hash': 'Ignore', - 'delegate': 'Ignore', - 'state': [ - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - ], - 'action_state': 'Ignore', - 'proved_state': 'Ignore', - 'is_new': 'Ignore', - }, - 'valid_while': 'Ignore', - }, - 'use_full_commitment': true, - 'implicit_account_creation_fee': false, - 'may_use_token': 'No', - 'authorization_kind': 'Signature', - }, - 'authorization': { - 'Signature': '7mXRKizAbVHa28Nt9sjCRT1MZGkcwiMAcEJwW5G2Lq27gH2NBTZKkVeVddT9Dn92pXzLu3UEG6Qb5arFLXBCFVYURUVUUgTR', - }, - }, - 'account_update_digest': null, - 'calls': [ - { - 'elt': { - 'account_update': { - 'body': { - 'public_key': 'B62qqR53HoY7h9Fg5os5yQaSEX3m2Zeec1H2JAchaN5amWnoBYaNcnk', - 'token_id': 'wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf', - 'update': { - 'app_state': [ - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - 'Keep', - ], - 'delegate': 'Keep', - 'verification_key': 'Keep', - 'permissions': 'Keep', - 'zkapp_uri': 'Keep', - 'token_symbol': 'Keep', - 'timing': 'Keep', - 'voting_for': 'Keep', - }, - 'balance_change': { - 'magnitude': '2000000000', - 'sgn': [ - 'Pos', - ], - }, - 'increment_nonce': false, - 'events': [], - 'actions': [], - 'call_data': '0x0000000000000000000000000000000000000000000000000000000000000000', - 'preconditions': { - 'network': { - 'snarked_ledger_hash': 'Ignore', - 'blockchain_length': 'Ignore', - 'min_window_density': 'Ignore', - 'total_currency': 'Ignore', - 'global_slot_since_genesis': 'Ignore', - 'staking_epoch_data': { - 'ledger': { - 'hash': 'Ignore', - 'total_currency': 'Ignore', - }, - 'seed': 'Ignore', - 'start_checkpoint': 'Ignore', - 'lock_checkpoint': 'Ignore', - 'epoch_length': 'Ignore', - }, - 'next_epoch_data': { - 'ledger': { - 'hash': 'Ignore', - 'total_currency': 'Ignore', - }, - 'seed': 'Ignore', - 'start_checkpoint': 'Ignore', - 'lock_checkpoint': 'Ignore', - 'epoch_length': 'Ignore', - }, - }, - 'account': { - 'balance': 'Ignore', - 'nonce': 'Ignore', - 'receipt_chain_hash': 'Ignore', - 'delegate': 'Ignore', - 'state': [ - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - 'Ignore', - ], - 'action_state': 'Ignore', - 'proved_state': 'Ignore', - 'is_new': 'Ignore', - }, - 'valid_while': 'Ignore', - }, - 'use_full_commitment': false, - 'implicit_account_creation_fee': false, - 'may_use_token': 'No', - 'authorization_kind': 'NoneGiven', - }, - 'authorization': 'NoneGiven', - }, - 'account_update_digest': null, - 'calls': [], - }, - 'stack_hash': null, - }, - ], - }, - 'stack_hash': null, - }, - ], - 'memo': '\u0001\u0016Test ZKApp to Receiver\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000', - }, - }, - 'hash': [ - 78, - 22, - 94, - 190, - 231, - 39, - 54, - 7, - 45, - 70, - 32, - 142, - 203, - 127, - 129, - 96, - 28, - 235, - 52, - 123, - 232, - 206, - 48, - 48, - 178, - 103, - 234, - 12, - 157, - 79, - 56, - 110, - ], - }, - { - 'data': { - 'SignedCommand': { - 'payload': { - 'common': { - 'fee': '100000000', - 'fee_payer_pk': 'B62qpfgnUm7zVqi8MJHNB2m37rtgMNDbFNhC2DpMmmVpQt8x6gKv9Ww', - 'nonce': '113860', - 'valid_until': { - 'SinceGenesis': '4294967295', - }, - 'memo': '\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000', - }, - 'body': { - 'Payment': { - 'receiver_pk': 'B62qrsaLKgMey9Y6aZjdL5FVFa1dkYC4u4qr69Mw1vp54QRt5KVk98o', - 'amount': '2000000000', - }, - }, - }, - 'signer': 'B62qpfgnUm7zVqi8MJHNB2m37rtgMNDbFNhC2DpMmmVpQt8x6gKv9Ww', - 'signature': '7mXXqcMKBo2zqa5GZvGnE1Y4izRtJTJiizn7jx44rwyQYySQ6NkAF5DDDU6pxt256gHzQT1XFmLaKZyxR7abru6MnjVouBuL', - }, - }, - 'hash': [ - 124, - 222, - 121, - 220, - 175, - 113, - 241, - 107, - 48, - 138, - 156, - 109, - 90, - 156, - 34, - 138, - 249, - 244, - 27, - 221, - 59, - 151, - 235, - 110, - 183, - 38, - 103, - 231, - 176, - 27, - 29, - 63, - ], - }, - { - 'data': { - 'SignedCommand': { - 'payload': { - 'common': { - 'fee': '100000000', - 'fee_payer_pk': 'B62qpfgnUm7zVqi8MJHNB2m37rtgMNDbFNhC2DpMmmVpQt8x6gKv9Ww', - 'nonce': '113862', - 'valid_until': { - 'SinceGenesis': '4294967295', - }, - 'memo': '\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000', - }, - 'body': { - 'Payment': { - 'receiver_pk': 'B62qqR53HoY7h9Fg5os5yQaSEX3m2Zeec1H2JAchaN5amWnoBYaNcnk', - 'amount': '2000000000', - }, - }, - }, - 'signer': 'B62qpfgnUm7zVqi8MJHNB2m37rtgMNDbFNhC2DpMmmVpQt8x6gKv9Ww', - 'signature': '7mX6E6AMEbFuuHYfPPCv9oJQH76xneD66kVe9Y6tm7uxXHwCuq28BZeT6Uu2CZzF5mJwG6VMQdPnSQToUvKaa3jfnC3gP4CB', - }, - }, - 'hash': [ - 21, - 213, - 182, - 138, - 50, - 90, - 122, - 243, - 141, - 236, - 124, - 124, - 17, - 138, - 124, - 85, - 145, - 198, - 79, - 252, - 212, - 11, - 17, - 50, - 141, - 128, - 129, - 3, - 84, - 7, - 121, - 176, - ], - }, -]; diff --git a/frontend/src/app/layout/menu/menu.component.ts b/frontend/src/app/layout/menu/menu.component.ts index e240c6bd89..a2054dd2e5 100644 --- a/frontend/src/app/layout/menu/menu.component.ts +++ b/frontend/src/app/layout/menu/menu.component.ts @@ -55,7 +55,7 @@ export class MenuComponent extends ManualDetection implements OnInit { appIdentifier: string = CONFIG.identifier; activeNode: MinaNode; activeRoute: string; - network: string; + network?: MinaNetwork; chainId?: string; constructor(private router: Router, @@ -102,8 +102,6 @@ export class MenuComponent extends ManualDetection implements OnInit { ) .subscribe((node: MinaNode) => { this.activeNode = node; - this.network = node.minaExplorerNetwork ?? CONFIG.globalConfig?.minaExplorerNetwork; - this.network = this.network.charAt(0).toUpperCase() + this.network.slice(1); this.menuItems = this.allowedMenuItems; this.detect(); }); @@ -113,8 +111,9 @@ export class MenuComponent extends ManualDetection implements OnInit { filter(Boolean), untilDestroyed(this), ) - .subscribe(({ chainId }) => { + .subscribe(({ chainId, network }) => { this.chainId = chainId; + this.network = network as MinaNetwork; this.detect(); }); } diff --git a/frontend/src/app/shared/helpers/mina.helper.ts b/frontend/src/app/shared/helpers/mina.helper.ts new file mode 100644 index 0000000000..03df515e6d --- /dev/null +++ b/frontend/src/app/shared/helpers/mina.helper.ts @@ -0,0 +1,10 @@ +import { MinaNetwork } from '@shared/types/core/mina/mina.type'; + +export function getNetwork(chainId: string): MinaNetwork { + if (chainId === 'a7351abc7ddf2ea92d1b38cc8e636c271c1dfd2c081c637f62ebc2af34eb7cc1') { + return MinaNetwork.MAINNET; + } else if (chainId === '29936104443aaf264a7f0192ac64b1c7173198c1ed404c1bcff5e562e05eb7f6') { + return MinaNetwork.DEVNET; + } + return MinaNetwork.UNKNOWN; +} diff --git a/frontend/src/app/shared/types/app/app-node-details.type.ts b/frontend/src/app/shared/types/app/app-node-details.type.ts index df46aefd37..eeb87cab61 100644 --- a/frontend/src/app/shared/types/app/app-node-details.type.ts +++ b/frontend/src/app/shared/types/app/app-node-details.type.ts @@ -1,3 +1,5 @@ +import { MinaNetwork } from '@shared/types/core/mina/mina.type'; + export interface AppNodeDetails { status: AppNodeStatus; blockHeight: number; @@ -11,6 +13,7 @@ export interface AppNodeDetails { snarks: number; chainId?: string; + network?: MinaNetwork; } export enum AppNodeStatus { diff --git a/frontend/src/app/shared/types/core/environment/mina-env.type.ts b/frontend/src/app/shared/types/core/environment/mina-env.type.ts index bbfc5d2d96..028dcf4363 100644 --- a/frontend/src/app/shared/types/core/environment/mina-env.type.ts +++ b/frontend/src/app/shared/types/core/environment/mina-env.type.ts @@ -1,5 +1,3 @@ -import { MinaNetwork } from '@shared/types/core/mina/mina.type'; - export interface MinaEnv { production: boolean; configs: MinaNode[]; @@ -9,7 +7,6 @@ export interface MinaEnv { globalConfig?: { features?: FeaturesConfig; canAddNodes?: boolean; - minaExplorerNetwork?: MinaNetwork; }; } @@ -19,7 +16,6 @@ export interface MinaNode { memoryProfiler?: string; debugger?: string; features?: FeaturesConfig; - minaExplorerNetwork?: MinaNetwork; isCustom?: boolean; isWebNode?: boolean; } diff --git a/frontend/src/app/shared/types/core/mina/mina.type.ts b/frontend/src/app/shared/types/core/mina/mina.type.ts index d6f758e5d3..29ae2aaf88 100644 --- a/frontend/src/app/shared/types/core/mina/mina.type.ts +++ b/frontend/src/app/shared/types/core/mina/mina.type.ts @@ -1 +1,5 @@ -export type MinaNetwork = 'mainnet' | 'devnet'; +export enum MinaNetwork { + MAINNET = 'Mainnet', + DEVNET = 'Devnet', + UNKNOWN = 'Unknown', +} diff --git a/frontend/src/assets/environments/staging.js b/frontend/src/assets/environments/staging.js index f8b6070557..d3f0e75a57 100644 --- a/frontend/src/assets/environments/staging.js +++ b/frontend/src/assets/environments/staging.js @@ -11,7 +11,6 @@ export default { 'benchmarks': ['wallets'], }, canAddNodes: false, - minaExplorerNetwork: 'devnet', }, configs: [ { diff --git a/frontend/src/environments/environment.staging.ts b/frontend/src/environments/environment.staging.ts index d78a92290e..aff951d38d 100644 --- a/frontend/src/environments/environment.staging.ts +++ b/frontend/src/environments/environment.staging.ts @@ -13,7 +13,6 @@ export const environment: Readonly = { 'benchmarks': ['wallets'], }, canAddNodes: false, - minaExplorerNetwork: 'devnet', }, configs: [ { diff --git a/frontend/src/environments/environment.ts b/frontend/src/environments/environment.ts index 4c65411bbc..8f4c56f5e3 100644 --- a/frontend/src/environments/environment.ts +++ b/frontend/src/environments/environment.ts @@ -2,7 +2,7 @@ import { MinaEnv } from '@shared/types/core/environment/mina-env.type'; export const environment: Readonly = { production: false, - identifier: 'Docker image', + identifier: 'Dev FE', globalConfig: { features: { dashboard: [], @@ -18,7 +18,6 @@ export const environment: Readonly = { zk: ['test'], }, canAddNodes: true, - minaExplorerNetwork: 'devnet', }, configs: [ // {