parent
7f8f7c2aa1
commit
b32527e057
352 changed files with 49537 additions and 49537 deletions
|
@ -341,7 +341,7 @@ export default {
|
|||
if (currency !== this.nativeCurrency) {
|
||||
this.$store.dispatch('application/setDefaultEthToReceive', { currency })
|
||||
}
|
||||
this.$store.dispatch('loading/updateProgress', { progress: -1 })
|
||||
this.$store.dispatch('loading/updateProgress', { progress: 100 })
|
||||
this.depositsPast = Number(depositsPast) <= 0 ? 0 : depositsPast
|
||||
this.depositTxHash = txHash
|
||||
this.depositTimestamp = timestamp
|
||||
|
|
|
@ -3,10 +3,10 @@ import ABI from '../abis/Instance.abi.json'
|
|||
import { loadCachedEvents, getPastEvents } from './helpers'
|
||||
|
||||
const EVENTS_PATH = './static/events/'
|
||||
const enabledChains = ['1', '56', '100', '137']
|
||||
const enabledChains = ['1', '56', '100', '137' ]
|
||||
|
||||
async function main() {
|
||||
for (const network in enabledChains) {
|
||||
for (let network in enabledChains) {
|
||||
const netId = enabledChains[network]
|
||||
const config = networkConfig[`netId${netId}`]
|
||||
const { constants, tokens, nativeCurrency, deployedBlock } = config
|
||||
|
@ -46,6 +46,7 @@ async function main() {
|
|||
console.log('- Notes')
|
||||
console.log('cachedEvents count - ', notesCachedEvents.events.length)
|
||||
console.log('lastBlock - ', notesCachedEvents.lastBlock)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ export async function loadCachedEvents({ name, directory, deployedBlock }) {
|
|||
|
||||
return {
|
||||
events,
|
||||
lastBlock: events[events.length - 1].blockNumber
|
||||
lastBlock: events[events.length - 1].blockNumber
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
|
|
|
@ -2,16 +2,16 @@ import fs from 'fs'
|
|||
import Jszip from 'jszip'
|
||||
|
||||
const compressionConfig = {
|
||||
type: 'nodebuffer',
|
||||
compression: 'DEFLATE',
|
||||
type: "nodebuffer",
|
||||
compression: "DEFLATE",
|
||||
compressionOptions: {
|
||||
level: 9
|
||||
}
|
||||
}
|
||||
|
||||
const fileConfig = {
|
||||
binary: true,
|
||||
compression: 'DEFLATE'
|
||||
binary: true,
|
||||
compression: "DEFLATE"
|
||||
}
|
||||
|
||||
export async function save(filePath) {
|
||||
|
@ -23,12 +23,11 @@ export async function save(filePath) {
|
|||
const data = fs.readFileSync(`${filePath}`)
|
||||
|
||||
await jszip.file(`${fileName}`, data, fileConfig)
|
||||
await jszip
|
||||
.generateNodeStream({
|
||||
...compressionConfig,
|
||||
streamFiles: true
|
||||
})
|
||||
.pipe(fs.createWriteStream(`${filePath}.zip`))
|
||||
await jszip.generateNodeStream({
|
||||
...compressionConfig,
|
||||
streamFiles: true
|
||||
})
|
||||
.pipe(fs.createWriteStream(`${filePath}.zip`))
|
||||
|
||||
return true
|
||||
} catch (err) {
|
||||
|
|
|
@ -9,7 +9,7 @@ import { loadCachedEvents, getPastEvents } from './helpers'
|
|||
|
||||
const EVENTS_PATH = './static/events/'
|
||||
const EVENTS = ['Deposit', 'Withdrawal']
|
||||
const enabledChains = ['1', '56', '5', '100', '137']
|
||||
const enabledChains = ['1', '56', '5', '100', '137' ]
|
||||
|
||||
async function main(type, netId) {
|
||||
const { tokens, nativeCurrency, deployedBlock } = networkConfig[`netId${netId}`]
|
||||
|
|
|
@ -14,7 +14,7 @@ const TREES_PATH = './static/trees/'
|
|||
const EVENTS_PATH = './static/events/'
|
||||
|
||||
const EVENTS = ['deposit']
|
||||
const enabledChains = ['1', '56', '100', '137']
|
||||
const enabledChains = ['1', '56', '100', '137' ]
|
||||
let mimcHash
|
||||
|
||||
const trees = {
|
||||
|
|
|
@ -58,7 +58,7 @@ async function testCommon(netId, type, filename) {
|
|||
}
|
||||
|
||||
async function main() {
|
||||
const NETWORKS = [1, 5, 56, 100, 137]
|
||||
const NETWORKS = [1, 5, 56, 100, 137 ]
|
||||
|
||||
for await (const netId of NETWORKS) {
|
||||
updateEncrypted(netId)
|
||||
|
|
|
@ -1,48 +1,48 @@
|
|||
export const state = () => {
|
||||
return {
|
||||
message: '',
|
||||
progress: -1,
|
||||
enabled: false,
|
||||
type: null
|
||||
return {
|
||||
message: '',
|
||||
progress: '',
|
||||
enabled: false,
|
||||
type: null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const getters = {}
|
||||
export const getters = {}
|
||||
|
||||
export const mutations = {
|
||||
ENABLE(state, { message, progress, type }) {
|
||||
state.message = message
|
||||
state.enabled = true
|
||||
state.progress = progress
|
||||
state.type = type
|
||||
},
|
||||
DISABLE(state) {
|
||||
state.message = ''
|
||||
state.enabled = false
|
||||
state.progress = -1
|
||||
state.type = null
|
||||
export const mutations = {
|
||||
ENABLE(state, { message, progress, type }) {
|
||||
state.message = message
|
||||
state.enabled = true
|
||||
state.progress = progress
|
||||
state.type = type
|
||||
},
|
||||
DISABLE(state) {
|
||||
state.message = ''
|
||||
state.enabled = false
|
||||
state.progress = ''
|
||||
state.type = null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const actions = {
|
||||
enable({ commit }, { message = this.app.i18n.t('loading') }) {
|
||||
commit('ENABLE', { message })
|
||||
},
|
||||
changeText({ commit }, { message, type }) {
|
||||
commit('ENABLE', { message, type })
|
||||
},
|
||||
updateProgress({ commit }, { message, progress }) {
|
||||
commit('ENABLE', { message, progress })
|
||||
},
|
||||
disable({ commit }) {
|
||||
commit('DISABLE')
|
||||
},
|
||||
showConfirmLoader({ dispatch, rootState }) {
|
||||
dispatch('changeText', {
|
||||
message: this.app.i18n.t('pleaseConfirmTransactionInWallet', {
|
||||
wallet: rootState.metamask.walletName
|
||||
}),
|
||||
type: 'approve'
|
||||
})
|
||||
export const actions = {
|
||||
enable({ commit }, { message = this.app.i18n.t('loading') }) {
|
||||
commit('ENABLE', { message })
|
||||
},
|
||||
changeText({ commit }, { message, type }) {
|
||||
commit('ENABLE', { message, type })
|
||||
},
|
||||
updateProgress({ commit }, { message, progress }) {
|
||||
commit('ENABLE', { message, progress })
|
||||
},
|
||||
disable({ commit }) {
|
||||
commit('DISABLE')
|
||||
},
|
||||
showConfirmLoader({ dispatch, rootState }) {
|
||||
dispatch('changeText', {
|
||||
message: this.app.i18n.t('pleaseConfirmTransactionInWallet', {
|
||||
wallet: rootState.metamask.walletName
|
||||
}),
|
||||
type: 'approve'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue