diff --git a/.env b/.env
index 16dc854865..45c6a8b344 100644
--- a/.env
+++ b/.env
@@ -7,7 +7,7 @@ REACT_APP_E2E_TEST=1
REACT_APP_META_CSP=
EXTENSION_CSP=
-REACT_APP_BACKEND=oasisscan
+REACT_APP_BACKEND=oasisscanV2
REACT_APP_TRANSAK_URL=https://global-stg.transak.com
# Our staging API key from transak dashboard
REACT_APP_TRANSAK_PARTNER_ID=3566e9e3-d3b7-493c-a33e-91d33c5c32cb
diff --git a/.github/dump_validators.sh b/.github/dump_validators.sh
index c9e46ffe85..e2e0125ece 100755
--- a/.github/dump_validators.sh
+++ b/.github/dump_validators.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-curl -s https://api.oasisscan.com/mainnet/validator/list?pageSize=500 |
+curl -s https://api.oasisscan.com/v2/mainnet/validator/list?pageSize=500 |
jq '{
dump_timestamp: (now * 1000 | floor),
dump_timestamp_iso: (now | strftime("%Y-%m-%dT%H:%M:%SZ")),
diff --git a/cypress/e2e/api-transaction-methods.cy.ts b/cypress/e2e/api-transaction-methods.cy.ts
index c78fccca34..4b2a57d120 100644
--- a/cypress/e2e/api-transaction-methods.cy.ts
+++ b/cypress/e2e/api-transaction-methods.cy.ts
@@ -18,7 +18,7 @@ describe('check all transaction methods from API are mapped in transactionMethod
ignoreTimeoutError() // Ignore if API is not responding
cy.request({
- url: 'https://api.oasisscan.com/mainnet/chain/methods', // does not include consensus methods
+ url: 'https://api.oasisscan.com/v2/mainnet/chain/methods', // does not include consensus methods
retryOnNetworkFailure: false,
failOnStatusCode: false,
timeout: 5000,
diff --git a/playwright/tests/refreshing-balance.spec.ts b/playwright/tests/refreshing-balance.spec.ts
index 9be7883037..fa5ef7753e 100644
--- a/playwright/tests/refreshing-balance.spec.ts
+++ b/playwright/tests/refreshing-balance.spec.ts
@@ -38,7 +38,7 @@ test('Accounts page should continuously refresh balance', async ({ page }) => {
await expect(page.getByTestId('account-balance-summary')).toContainText('123.0')
await expect(page.getByTestId('account-choice')).toContainText('123.0')
await mockApi(page, 456)
- await page.waitForRequest('**/chain/account/info/*', { timeout: 60_000 })
+ await page.waitForRequest('**/account/info/*', { timeout: 60_000 })
await page.waitForRequest('**/chain/transactions*', { timeout: 60_000 })
await expect(page.getByTestId('account-balance-summary')).toContainText('456.0')
await expect(page.getByTestId('account-choice')).toContainText('456.0')
diff --git a/playwright/tests/syncTabs.spec.ts b/playwright/tests/syncTabs.spec.ts
index 29933ede0e..056df6dd6b 100644
--- a/playwright/tests/syncTabs.spec.ts
+++ b/playwright/tests/syncTabs.spec.ts
@@ -12,7 +12,7 @@ import {
} from '../../src/utils/__fixtures__/test-inputs'
import { addPersistedStorageV1, clearPersistedStorage } from '../utils/storage'
import { fillPrivateKeyWithoutPassword, fillPrivateKeyAndPassword } from '../utils/fillPrivateKey'
-import type { AccountsRow } from '../../src/vendors/oasisscan/index'
+import type { AccountInfoResponse } from '../../src/vendors/oasisscan-v2/index'
test.beforeEach(async ({ context, page }) => {
await warnSlowApi(context)
@@ -312,7 +312,7 @@ test.describe('syncTabs', () => {
// Delay getAccountBalanceWithFallback so addWallet is called after wallet is locked.
let apiBalance: Route
- await context.route('**/chain/account/info/*', route => (apiBalance = route))
+ await context.route('**/account/info/*', route => (apiBalance = route))
await page.getByPlaceholder('Enter your private key here').fill(privateKey2)
await page.keyboard.press('Enter')
@@ -321,7 +321,6 @@ test.describe('syncTabs', () => {
body: JSON.stringify({
code: 0,
data: {
- rank: 0,
address: '',
available: '0',
escrow: '0',
@@ -329,7 +328,7 @@ test.describe('syncTabs', () => {
total: '0',
nonce: 1,
allowances: [],
- } satisfies AccountsRow,
+ } satisfies AccountInfoResponse,
}),
})
await page.waitForTimeout(100)
diff --git a/playwright/utils/mockApi.ts b/playwright/utils/mockApi.ts
index a2f8e3f210..7cbbd24a56 100644
--- a/playwright/utils/mockApi.ts
+++ b/playwright/utils/mockApi.ts
@@ -1,37 +1,35 @@
import { BrowserContext, Page } from '@playwright/test'
+import type { OperationsRowMethodEnum } from '../../src/vendors/oasisscan/index'
import type {
- AccountsRow,
- DelegationRow,
- OperationsRow,
- OperationsRowMethodEnum,
- RuntimeTransactionInfoRow,
- ValidatorRow,
-} from '../../src/vendors/oasisscan/index'
+ AccountInfoResponse,
+ AccountDelegationsInfo,
+ ChainTransactionInfoResponse,
+ ValidatorInfo,
+} from '../../src/vendors/oasisscan-v2/index'
export async function mockApi(context: BrowserContext | Page, balance: number) {
- await context.route('**/chain/account/info/*', route => {
+ await context.route('**/account/info/*', route => {
route.fulfill({
body: JSON.stringify({
code: 0,
data: {
- rank: 0,
- address: route.request().url().split('/chain/account/info/')[1],
+ address: route.request().url().split('/account/info/')[1],
available: balance.toString(),
escrow: '0',
debonding: '0',
total: balance.toString(),
nonce: 1,
allowances: [],
- } satisfies AccountsRow,
+ } satisfies AccountInfoResponse,
}),
})
})
- await context.route('**/chain/account/delegations?*', route => {
+ await context.route('**/account/delegations?*', route => {
route.fulfill({
body: JSON.stringify({ code: 0, data: { list: [], page: 1, size: 500, maxPage: 0, totalSize: 0 } }),
})
})
- await context.route('**/chain/account/debonding?*', route => {
+ await context.route('**/account/debonding?*', route => {
route.fulfill({
body: JSON.stringify({ code: 0, data: { list: [], page: 1, size: 500, maxPage: 0, totalSize: 0 } }),
})
@@ -111,39 +109,37 @@ export async function mockApi(context: BrowserContext | Page, balance: number) {
export async function mockApiMoreData(context: BrowserContext | Page) {
await mockApi(context, 0)
- await context.route('**/chain/account/info/*', route => {
+ await context.route('**/account/info/*', route => {
route.fulfill({
body: JSON.stringify({
code: 0,
data: {
- rank: 0,
- address: route.request().url().split('/chain/account/info/')[1],
+ address: route.request().url().split('/account/info/')[1],
available: '23.239060788',
escrow: '100.996756163',
debonding: '0',
total: '124.235816951',
nonce: 70,
allowances: [],
- } satisfies AccountsRow,
+ } satisfies AccountInfoResponse,
}),
})
})
- await context.route('**/chain/account/delegations?*', route => {
+ await context.route('**/account/delegations?*', route => {
route.fulfill({
body: JSON.stringify({
code: 0,
data: {
list: [
{
- validatorAddress: 'oasis1qpn83e8hm3gdhvpfv66xj3qsetkj3ulmkugmmxn3',
+ entityAddress: 'oasis1qpn83e8hm3gdhvpfv66xj3qsetkj3ulmkugmmxn3',
validatorName: 'Chorus One',
icon: 'https://s3.amazonaws.com/keybase_processed_uploads/3a844f583b686ec5285403694b738a05_360_360.jpg',
- entityAddress: null,
shares: '71.939343766',
amount: '100.996756163',
active: true,
},
- ] as DelegationRow[],
+ ] as AccountDelegationsInfo[],
page: 1,
size: 500,
maxPage: 0,
@@ -152,7 +148,7 @@ export async function mockApiMoreData(context: BrowserContext | Page) {
}),
})
})
- await context.route('**/chain/account/debonding?*', route => {
+ await context.route('**/account/debonding?*', route => {
route.fulfill({
body: JSON.stringify({ code: 0, data: { list: [], page: 1, size: 500, maxPage: 0, totalSize: 0 } }),
})
@@ -169,13 +165,14 @@ export async function mockApiMoreData(context: BrowserContext | Page) {
method: 'staking.AddEscrow' as OperationsRowMethodEnum,
fee: '0',
amount: '100.00',
- shares: '0.00',
- add: true,
timestamp: 1642862677,
time: 81860045,
status: true,
from: new URL(route.request().url()).searchParams.get('address')!,
to: 'oasis1qq3xrq0urs8qcffhvmhfhz4p0mu7ewc8rscnlwxe',
+ nonce: 2,
+ raw: '',
+ errorMessage: '',
},
{
txHash: '9d5a9eb4e82633e7847989d3e84bce6a51b18434dea83e7f038091dbbb5c8bd5',
@@ -183,15 +180,16 @@ export async function mockApiMoreData(context: BrowserContext | Page) {
method: 'staking.Transfer' as OperationsRowMethodEnum,
fee: '0',
amount: '119.90',
- shares: null,
- add: true,
timestamp: 1642862287,
time: 81860435,
status: true,
from: 'oasis1qprje45lh2qqrsy4rcvgx4zpnpzkhkqcm58emr3l',
to: new URL(route.request().url()).searchParams.get('address')!,
+ nonce: 2,
+ raw: '',
+ errorMessage: '',
},
- ] satisfies (OperationsRow | RuntimeTransactionInfoRow)[],
+ ] satisfies ChainTransactionInfoResponse[],
page: 1,
size: 20,
maxPage: 1,
@@ -215,10 +213,10 @@ export async function mockApiMoreData(context: BrowserContext | Page) {
name: 'Mars Staking | Long term fee 1%',
icon: 'https://s3.amazonaws.com/keybase_processed_uploads/f30f9b2207b7d83ef05219ca483b6f05_360_360.jpg',
website: 'https://linktr.ee/marssuper',
- twitter: null,
+ twitter: 'marssuper',
keybase: 'marssuper',
email: 'marssuper@outlook.com',
- description: null,
+ description: '',
escrow: '134193743.56',
escrowChange24: '-1097851.50',
escrowPercent: 0.0326,
@@ -229,15 +227,9 @@ export async function mockApiMoreData(context: BrowserContext | Page) {
nonce: 0,
score: 20912186,
delegators: 23446,
- nodes: null,
uptime: '100%',
active: true,
commission: 0.01,
- bound: null,
- rates: null,
- bounds: null,
- escrowSharesStatus: null,
- escrowAmountStatus: null,
status: true,
},
{
@@ -252,7 +244,7 @@ export async function mockApiMoreData(context: BrowserContext | Page) {
twitter: 'stakefish',
keybase: 'bflabs',
email: 'hi@stake.fish',
- description: null,
+ description: '',
escrow: '185814524.64',
escrowChange24: '-206667.72',
escrowPercent: 0.0452,
@@ -263,15 +255,9 @@ export async function mockApiMoreData(context: BrowserContext | Page) {
nonce: 0,
score: 21933228,
delegators: 8756,
- nodes: null,
uptime: '100%',
active: true,
commission: 0.05,
- bound: null,
- rates: null,
- bounds: null,
- escrowSharesStatus: null,
- escrowAmountStatus: null,
status: true,
},
{
@@ -281,12 +267,12 @@ export async function mockApiMoreData(context: BrowserContext | Page) {
nodeId: '6wbL5/OxvFGxi55o7AxcwKmfjXbXGC1hw4lfnEZxBXA=',
nodeAddress: 'oasis1qqp0h2h92eev7nsxgqctvuegt8ge3vyg0qyluc4k',
name: 'BinanceStaking',
- icon: null,
+ icon: 'https://s3.amazonaws.com/keybase_processed_uploads/e1378cd4d5203ded716906687ad53905_360_360.jpg',
website: 'https://www.binance.com',
- twitter: null,
- keybase: null,
- email: null,
- description: null,
+ twitter: 'binance',
+ keybase: 'binance',
+ email: 'binance',
+ description: '',
escrow: '131080178.79',
escrowChange24: '-7133.04',
escrowPercent: 0.0319,
@@ -297,15 +283,9 @@ export async function mockApiMoreData(context: BrowserContext | Page) {
nonce: 0,
score: 20933210,
delegators: 7988,
- nodes: null,
uptime: '100%',
active: true,
commission: 0.1,
- bound: null,
- rates: null,
- bounds: null,
- escrowSharesStatus: null,
- escrowAmountStatus: null,
status: true,
},
{
@@ -319,8 +299,8 @@ export async function mockApiMoreData(context: BrowserContext | Page) {
website: 'https://www.stake5labs.com',
twitter: 'stake5labs',
keybase: 'stake5labs',
- email: null,
- description: null,
+ email: 'stake5labs',
+ description: '',
escrow: '40029484.50',
escrowChange24: '2718.71',
escrowPercent: 0.0097,
@@ -331,15 +311,9 @@ export async function mockApiMoreData(context: BrowserContext | Page) {
nonce: 0,
score: 20640813,
delegators: 5120,
- nodes: null,
uptime: '100%',
active: true,
commission: 0.2,
- bound: null,
- rates: null,
- bounds: null,
- escrowSharesStatus: null,
- escrowAmountStatus: null,
status: true,
},
{
@@ -352,9 +326,9 @@ export async function mockApiMoreData(context: BrowserContext | Page) {
icon: 'https://s3.amazonaws.com/keybase_processed_uploads/3a844f583b686ec5285403694b738a05_360_360.jpg',
website: 'https://chorus.one',
twitter: 'ChorusOne',
- keybase: null,
- email: null,
- description: null,
+ keybase: 'ChorusOne',
+ email: 'ChorusOne',
+ description: '',
escrow: '135556888.36',
escrowChange24: '3137.73',
escrowPercent: 0.033,
@@ -365,18 +339,12 @@ export async function mockApiMoreData(context: BrowserContext | Page) {
nonce: 0,
score: 21753374,
delegators: 2360,
- nodes: null,
uptime: '100%',
active: true,
commission: 0.05,
- bound: null,
- rates: null,
- bounds: null,
- escrowSharesStatus: null,
- escrowAmountStatus: null,
status: true,
},
- ] satisfies ValidatorRow[],
+ ] satisfies ValidatorInfo[],
active: 120,
delegators: 49619,
inactive: 82,
diff --git a/src/app/components/Footer/__tests__/__snapshots__/index.test.tsx.snap b/src/app/components/Footer/__tests__/__snapshots__/index.test.tsx.snap
index 4883a3f577..33e57aac54 100644
--- a/src/app/components/Footer/__tests__/__snapshots__/index.test.tsx.snap
+++ b/src/app/components/Footer/__tests__/__snapshots__/index.test.tsx.snap
@@ -171,7 +171,7 @@ exports[` should render mobile version of footer 1`] = `
- Oasis Scan API & Oasis gRPC
+ Oasis Scan API v2 & Oasis gRPC
diff --git a/src/app/pages/AccountPage/__tests__/index.test.tsx b/src/app/pages/AccountPage/__tests__/index.test.tsx
index 14e7aa3ba5..1d601bab1a 100644
--- a/src/app/pages/AccountPage/__tests__/index.test.tsx
+++ b/src/app/pages/AccountPage/__tests__/index.test.tsx
@@ -90,7 +90,7 @@ describe('', () => {
}),
)
const page = renderPage(store, ['/account/oasis1qz0k5q8vjqvu4s4nwxyj406ylnflkc4vrcjghuwk'])
- expect(page.container).toHaveTextContent('Oasis Scan API appears to be down')
+ expect(page.container).toHaveTextContent('Oasis Scan API v2 appears to be down')
const balance = await screen.findByTestId('account-balance-total')
expect(balance).toHaveTextContent('-')
const balanceSummary = await screen.findByTestId('account-balance-summary')
diff --git a/src/utils/__fixtures__/test-inputs.ts b/src/utils/__fixtures__/test-inputs.ts
index 65c24abba8..49b88d6dee 100644
--- a/src/utils/__fixtures__/test-inputs.ts
+++ b/src/utils/__fixtures__/test-inputs.ts
@@ -176,7 +176,7 @@ export const walletExtensionV0PersistedState = {
{
id: 0,
name: 'Mainnet',
- url: 'https://api.oasisscan.com/mainnet',
+ url: 'https://api.oasisscan.com/v2/mainnet',
explorer: 'https://www.oasisscan.com/',
netType: 'Mainnet',
nodeType: 'DEFAULT',
@@ -186,7 +186,7 @@ export const walletExtensionV0PersistedState = {
{
id: 1,
name: 'Testnet',
- url: 'https://api.oasisscan.com/testnet',
+ url: 'https://api.oasisscan.com/v2/testnet',
explorer: 'https://testnet.oasisscan.com/',
netType: 'Testnet',
nodeType: 'DEFAULT',
@@ -198,7 +198,7 @@ export const walletExtensionV0PersistedState = {
{
id: 1,
name: 'Testnet',
- url: 'https://api.oasisscan.com/testnet',
+ url: 'https://api.oasisscan.com/v2/testnet',
explorer: 'https://testnet.oasisscan.com/',
netType: 'Testnet',
nodeType: 'DEFAULT',
@@ -208,7 +208,7 @@ export const walletExtensionV0PersistedState = {
{
id: 0,
name: 'Mainnet',
- url: 'https://api.oasisscan.com/mainnet',
+ url: 'https://api.oasisscan.com/v2/mainnet',
explorer: 'https://www.oasisscan.com/',
netType: 'Mainnet',
nodeType: 'DEFAULT',
diff --git a/src/vendors/__tests__/throwAPIErrors.test.ts b/src/vendors/__tests__/throwAPIErrors.test.ts
index d4448d96cb..0f77eba6a8 100644
--- a/src/vendors/__tests__/throwAPIErrors.test.ts
+++ b/src/vendors/__tests__/throwAPIErrors.test.ts
@@ -10,7 +10,7 @@ describe('throwAPIErrors', () => {
jest.spyOn(window, 'fetch').mockImplementationOnce(async () => {
throw new TypeError('Failed to fetch')
})
- const fetchFail = getOasisscanAPIs('https://api.oasisscan.com/mainnet').getAccount('oasis1')
+ const fetchFail = getOasisscanAPIs('https://api.oasisscan.com/v2/mainnet').getAccount('oasis1')
await expect(fetchFail).rejects.toThrowError(WalletError)
await expect(fetchFail).rejects.toHaveProperty('type', WalletErrors.IndexerAPIError)
})
@@ -26,7 +26,7 @@ describe('throwAPIErrors', () => {
},
)
})
- const http502 = getOasisscanAPIs('https://api.oasisscan.com/mainnet').getAccount('oasis1')
+ const http502 = getOasisscanAPIs('https://api.oasisscan.com/v2/mainnet').getAccount('oasis1')
await expect(http502).rejects.toThrowError(WalletError)
await expect(http502).rejects.toHaveProperty('type', WalletErrors.IndexerAPIError)
})
diff --git a/src/vendors/oasisscan.ts b/src/vendors/oasisscan.ts
index 4e452bdb74..414d143777 100644
--- a/src/vendors/oasisscan.ts
+++ b/src/vendors/oasisscan.ts
@@ -25,7 +25,7 @@ import { throwAPIErrors } from './helpers'
const getTransactionCacheMap: Record = {}
const getRuntimeTransactionInfoCacheMap: Record = {}
-export function getOasisscanAPIs(url: string | 'https://api.oasisscan.com/mainnet') {
+export function getOasisscanAPIs(url: string | 'https://api.oasisscan.com/v2/mainnet') {
const explorerConfig = new Configuration({
basePath: url,
...throwAPIErrors,
diff --git a/src/vendors/oasisscan/models/OperationsRow.ts b/src/vendors/oasisscan/models/OperationsRow.ts
index af711f82c6..637997fc99 100644
--- a/src/vendors/oasisscan/models/OperationsRow.ts
+++ b/src/vendors/oasisscan/models/OperationsRow.ts
@@ -2,181 +2,177 @@
/* eslint-disable */
/**
* Oasisscan API
- * https://github.com/bitcat365/oasisscan-backend#readme https://api.oasisscan.com/mainnet/swagger-ui/#/ https://api.oasisscan.com/mainnet/v2/api-docs
+ * https://github.com/bitcat365/oasisscan-backend#readme https://api.oasisscan.com/mainnet/swagger-ui/#/ https://api.oasisscan.com/mainnet/v2/api-docs
*
* The version of the OpenAPI document: 1
- *
+ *
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
-import { exists, mapValues } from '../runtime';
+import { exists, mapValues } from '../runtime'
/**
- *
+ *
* @export
* @interface OperationsRow
*/
export interface OperationsRow {
- /**
- *
- * @type {string}
- * @memberof OperationsRow
- */
- txHash: string;
- /**
- *
- * @type {number}
- * @memberof OperationsRow
- */
- height: number;
- /**
- *
- * @type {string}
- * @memberof OperationsRow
- */
- method: OperationsRowMethodEnum;
- /**
- *
- * @type {string}
- * @memberof OperationsRow
- */
- fee: string;
- /**
- *
- * @type {string}
- * @memberof OperationsRow
- */
- amount: string | null;
- /**
- *
- * @type {string}
- * @memberof OperationsRow
- */
- shares?: string | null;
- /**
- *
- * @type {boolean}
- * @memberof OperationsRow
- */
- add: boolean;
- /**
- *
- * @type {number}
- * @memberof OperationsRow
- */
- timestamp: number;
- /**
- *
- * @type {number}
- * @memberof OperationsRow
- */
- time: number;
- /**
- *
- * @type {boolean}
- * @memberof OperationsRow
- */
- status: boolean;
- /**
- *
- * @type {string}
- * @memberof OperationsRow
- */
- from: string;
- /**
- *
- * @type {string}
- * @memberof OperationsRow
- */
- to: string | null;
- /**
- * ParaTime only
- * @type {string}
- * @memberof OperationsRow
- */
- runtimeId?: string;
+ /**
+ * ChainTransactionInfoResponse
+ * @type {string}
+ * @memberof OperationsRow
+ */
+ txHash: string
+ /**
+ *
+ * @type {number}
+ * @memberof OperationsRow
+ */
+ height: number
+ /**
+ *
+ * @type {string}
+ * @memberof OperationsRow
+ */
+ method: OperationsRowMethodEnum
+ /**
+ *
+ * @type {string}
+ * @memberof OperationsRow
+ */
+ fee: string
+ /**
+ *
+ * @type {string}
+ * @memberof OperationsRow
+ */
+ amount: string | null
+ /**
+ *
+ * @type {string}
+ * @memberof OperationsRow
+ */
+ shares?: string | null
+ /**
+ *
+ * @type {boolean}
+ * @memberof OperationsRow
+ */
+ add: boolean
+ /**
+ *
+ * @type {number}
+ * @memberof OperationsRow
+ */
+ timestamp: number
+ /**
+ *
+ * @type {number}
+ * @memberof OperationsRow
+ */
+ time: number
+ /**
+ *
+ * @type {boolean}
+ * @memberof OperationsRow
+ */
+ status: boolean
+ /**
+ *
+ * @type {string}
+ * @memberof OperationsRow
+ */
+ from: string
+ /**
+ *
+ * @type {string}
+ * @memberof OperationsRow
+ */
+ to: string | null
+ /**
+ * ParaTime only
+ * @type {string}
+ * @memberof OperationsRow
+ */
+ runtimeId?: string
}
/**
-* @export
-* @enum {string}
-*/
+ * @export
+ * @enum {string}
+ */
export enum OperationsRowMethodEnum {
- StakingTransfer = 'staking.Transfer',
- StakingAddEscrow = 'staking.AddEscrow',
- StakingReclaimEscrow = 'staking.ReclaimEscrow',
- StakingAmendCommissionSchedule = 'staking.AmendCommissionSchedule',
- StakingAllow = 'staking.Allow',
- StakingWithdraw = 'staking.Withdraw',
- StakingBurn = 'staking.Burn',
- RoothashExecutorCommit = 'roothash.ExecutorCommit',
- RoothashExecutorProposerTimeout = 'roothash.ExecutorProposerTimeout',
- RoothashSubmitMsg = 'roothash.SubmitMsg',
- RegistryDeregisterEntity = 'registry.DeregisterEntity',
- RegistryRegisterEntity = 'registry.RegisterEntity',
- RegistryRegisterNode = 'registry.RegisterNode',
- RegistryRegisterRuntime = 'registry.RegisterRuntime',
- RegistryUnfreezeNode = 'registry.UnfreezeNode',
- GovernanceCastVote = 'governance.CastVote',
- GovernanceSubmitProposal = 'governance.SubmitProposal',
- BeaconPvssCommit = 'beacon.PVSSCommit',
- BeaconPvssReveal = 'beacon.PVSSReveal',
- BeaconVrfProve = 'beacon.VRFProve',
- ConsensusMeta = 'consensus.Meta',
- VaultCreate = 'vault.Create'
+ StakingTransfer = 'staking.Transfer',
+ StakingAddEscrow = 'staking.AddEscrow',
+ StakingReclaimEscrow = 'staking.ReclaimEscrow',
+ StakingAmendCommissionSchedule = 'staking.AmendCommissionSchedule',
+ StakingAllow = 'staking.Allow',
+ StakingWithdraw = 'staking.Withdraw',
+ StakingBurn = 'staking.Burn',
+ RoothashExecutorCommit = 'roothash.ExecutorCommit',
+ RoothashExecutorProposerTimeout = 'roothash.ExecutorProposerTimeout',
+ RoothashSubmitMsg = 'roothash.SubmitMsg',
+ RegistryDeregisterEntity = 'registry.DeregisterEntity',
+ RegistryRegisterEntity = 'registry.RegisterEntity',
+ RegistryRegisterNode = 'registry.RegisterNode',
+ RegistryRegisterRuntime = 'registry.RegisterRuntime',
+ RegistryUnfreezeNode = 'registry.UnfreezeNode',
+ GovernanceCastVote = 'governance.CastVote',
+ GovernanceSubmitProposal = 'governance.SubmitProposal',
+ BeaconPvssCommit = 'beacon.PVSSCommit',
+ BeaconPvssReveal = 'beacon.PVSSReveal',
+ BeaconVrfProve = 'beacon.VRFProve',
+ ConsensusMeta = 'consensus.Meta',
+ VaultCreate = 'vault.Create',
}
export function OperationsRowFromJSON(json: any): OperationsRow {
- return OperationsRowFromJSONTyped(json, false);
+ return OperationsRowFromJSONTyped(json, false)
}
export function OperationsRowFromJSONTyped(json: any, ignoreDiscriminator: boolean): OperationsRow {
- if ((json === undefined) || (json === null)) {
- return json;
- }
- return {
-
- 'txHash': json['txHash'],
- 'height': json['height'],
- 'method': json['method'],
- 'fee': json['fee'],
- 'amount': json['amount'],
- 'shares': !exists(json, 'shares') ? undefined : json['shares'],
- 'add': json['add'],
- 'timestamp': json['timestamp'],
- 'time': json['time'],
- 'status': json['status'],
- 'from': json['from'],
- 'to': json['to'],
- 'runtimeId': !exists(json, 'runtimeId') ? undefined : json['runtimeId'],
- };
+ if (json === undefined || json === null) {
+ return json
+ }
+ return {
+ txHash: json['txHash'],
+ height: json['height'],
+ method: json['method'],
+ fee: json['fee'],
+ amount: json['amount'],
+ shares: !exists(json, 'shares') ? undefined : json['shares'],
+ add: json['add'],
+ timestamp: json['timestamp'],
+ time: json['time'],
+ status: json['status'],
+ from: json['from'],
+ to: json['to'],
+ runtimeId: !exists(json, 'runtimeId') ? undefined : json['runtimeId'],
+ }
}
export function OperationsRowToJSON(value?: OperationsRow | null): any {
- if (value === undefined) {
- return undefined;
- }
- if (value === null) {
- return null;
- }
- return {
-
- 'txHash': value.txHash,
- 'height': value.height,
- 'method': value.method,
- 'fee': value.fee,
- 'amount': value.amount,
- 'shares': value.shares,
- 'add': value.add,
- 'timestamp': value.timestamp,
- 'time': value.time,
- 'status': value.status,
- 'from': value.from,
- 'to': value.to,
- 'runtimeId': value.runtimeId,
- };
+ if (value === undefined) {
+ return undefined
+ }
+ if (value === null) {
+ return null
+ }
+ return {
+ txHash: value.txHash,
+ height: value.height,
+ method: value.method,
+ fee: value.fee,
+ amount: value.amount,
+ shares: value.shares,
+ add: value.add,
+ timestamp: value.timestamp,
+ time: value.time,
+ status: value.status,
+ from: value.from,
+ to: value.to,
+ runtimeId: value.runtimeId,
+ }
}
-
-