Compare commits
No commits in common. "c3bef6af3161874a580ee61f8c589f07e7499903" and "e4b7ced4d3d2436d1e173aad01b0458e381beda8" have entirely different histories.
c3bef6af31
...
e4b7ced4d3
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"tabWidth": 2,
|
|
||||||
"singleQuote": true,
|
|
||||||
"semi": false,
|
|
||||||
"printWidth": 140
|
|
||||||
}
|
|
@ -74,7 +74,7 @@ export const BRIDGE_FEE_MANAGER: { [chainId in ChainId]: string } = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const FOREIGN_OMNIBRIDGE = {
|
export const FOREIGN_OMNIBRIDGE = {
|
||||||
[ChainId.MAINNET]: '0x88ad09518695c6c3712AC10a214bE5109a655671',
|
[ChainId.MAINNET]: '0x88ad09518695c6c3712ac10a214be5109a655671',
|
||||||
}
|
}
|
||||||
|
|
||||||
export const OMNIBRIDGE = {
|
export const OMNIBRIDGE = {
|
||||||
|
@ -5,7 +5,11 @@
|
|||||||
<p :class="$style.confirm__text">Processing...</p>
|
<p :class="$style.confirm__text">Processing...</p>
|
||||||
|
|
||||||
<ul :class="$style.confirm__list">
|
<ul :class="$style.confirm__list">
|
||||||
<li v-for="{ name, text, progress } in stepsData" :key="name" :class="[$style.confirm__listItem, $style[processingStatuses[name]]]">
|
<li
|
||||||
|
v-for="{ name, text, progress } in stepsData"
|
||||||
|
:key="name"
|
||||||
|
:class="[$style.confirm__listItem, $style[processingStatuses[name]]]"
|
||||||
|
>
|
||||||
<span :class="$style.confirm__listItemStatus">
|
<span :class="$style.confirm__listItemStatus">
|
||||||
<base-icon v-if="processingStatuses[name] === 'success'" name="tick" size="medium" />
|
<base-icon v-if="processingStatuses[name] === 'success'" name="tick" size="medium" />
|
||||||
<base-icon v-if="processingStatuses[name] === 'fail'" name="cross" size="medium" />
|
<base-icon v-if="processingStatuses[name] === 'fail'" name="cross" size="medium" />
|
||||||
@ -23,7 +27,13 @@
|
|||||||
<span v-if="transactionOptions.from" :class="$style.confirm__linksItemTitle">
|
<span v-if="transactionOptions.from" :class="$style.confirm__linksItemTitle">
|
||||||
{{ transactionOptions.from }} transaction:
|
{{ transactionOptions.from }} transaction:
|
||||||
</span>
|
</span>
|
||||||
<a v-if="!!txHash" :class="$style.confirm__linksItemValue" :href="explorerLink" target="_blank" rel="noopener noreferrer">
|
<a
|
||||||
|
v-if="!!txHash"
|
||||||
|
:class="$style.confirm__linksItemValue"
|
||||||
|
:href="explorerLink"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
{{ shortenLink }}
|
{{ shortenLink }}
|
||||||
</a>
|
</a>
|
||||||
<span v-else :class="$style.confirm__linksItemValue_none">—</span>
|
<span v-else :class="$style.confirm__linksItemValue_none">—</span>
|
||||||
@ -48,9 +58,9 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters, mapMutations, mapState } from 'vuex'
|
import { mapGetters, mapMutations, mapState } from 'vuex'
|
||||||
|
|
||||||
import { ApplicationMutation, ChainId } from '@/types'
|
import { ApplicationMutation } from '@/types'
|
||||||
import { SuccessModal } from '@/modals'
|
import { SuccessModal } from '@/modals'
|
||||||
import { createModalArgs, getEtherscanLink, getAmbBridgeTxLink } from '@/utilities'
|
import { createModalArgs, getEtherscanLink } from '@/utilities'
|
||||||
import { numbers, confirmationStatus, confirmationStep, transactionMethods, CHAINS } from '@/constants'
|
import { numbers, confirmationStatus, confirmationStep, transactionMethods, CHAINS } from '@/constants'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -126,14 +136,14 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
l2Link() {
|
l2Link() {
|
||||||
return getAmbBridgeTxLink(this.modal.chainId, this.txHash)
|
return getEtherscanLink(this.modal.chainId, this.txHash, 'transaction')
|
||||||
},
|
},
|
||||||
explorerLink() {
|
explorerLink() {
|
||||||
return getEtherscanLink(this.modal.chainId, this.txHash, 'transaction')
|
return getEtherscanLink(this.modal.chainId, this.txHash, 'transaction')
|
||||||
},
|
},
|
||||||
shortenLink() {
|
shortenLink() {
|
||||||
return `${this.txHash.substring(numbers.ZERO, Number('8') + numbers.OX_LENGTH)}...${this.txHash.substring(
|
return `${this.txHash.substring(numbers.ZERO, Number('8') + numbers.OX_LENGTH)}...${this.txHash.substring(
|
||||||
Number('60') - Number('8')
|
Number('60') - Number('8'),
|
||||||
)}`
|
)}`
|
||||||
},
|
},
|
||||||
symbol() {
|
symbol() {
|
||||||
|
@ -70,16 +70,6 @@ const ETHERSCAN_PREFIXES: { [chainId in ChainId]: string } = {
|
|||||||
100: '',
|
100: '',
|
||||||
}
|
}
|
||||||
|
|
||||||
const AMB_EXPLORER_SUFFIXES: { [chainId in ChainId]: string } = {
|
|
||||||
1: 'xdai',
|
|
||||||
56: 'bsc',
|
|
||||||
100: 'xdai',
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getAmbBridgeTxLink(chainId: ChainId, data: string): string {
|
|
||||||
return `https://alm-${AMB_EXPLORER_SUFFIXES[chainId]}.tornado.ws/${chainId}/${data}`
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getEtherscanLink(chainId: ChainId, data: string, type: 'transaction' | 'token' | 'address' | 'block'): string {
|
export function getEtherscanLink(chainId: ChainId, data: string, type: 'transaction' | 'token' | 'address' | 'block'): string {
|
||||||
let prefix = `https://${ETHERSCAN_PREFIXES[chainId]}etherscan.io`
|
let prefix = `https://${ETHERSCAN_PREFIXES[chainId]}etherscan.io`
|
||||||
|
|
||||||
@ -225,7 +215,7 @@ export function encodeTransactData({ args, extData }: { args: ArgsProof; extData
|
|||||||
'tuple(bytes proof,bytes32 root,bytes32[] inputNullifiers,bytes32[2] outputCommitments,uint256 publicAmount,bytes32 extDataHash)',
|
'tuple(bytes proof,bytes32 root,bytes32[] inputNullifiers,bytes32[2] outputCommitments,uint256 publicAmount,bytes32 extDataHash)',
|
||||||
'tuple(address recipient,int256 extAmount,address relayer,uint256 fee,bytes encryptedOutput1,bytes encryptedOutput2,bool isL1Withdrawal,uint256 l1Fee)',
|
'tuple(address recipient,int256 extAmount,address relayer,uint256 fee,bytes encryptedOutput1,bytes encryptedOutput2,bool isL1Withdrawal,uint256 l1Fee)',
|
||||||
],
|
],
|
||||||
[args, extData]
|
[args, extData],
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -278,7 +268,7 @@ export const getMessageIdFromTransaction = (type: 'withdrawal' | 'deposit', rece
|
|||||||
// eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
export const onStaticMulticall = async <C extends BaseContract, A extends any[]>(
|
export const onStaticMulticall = async <C extends BaseContract, A extends any[]>(
|
||||||
chainId: ChainId,
|
chainId: ChainId,
|
||||||
calls: Array<{ contract: C; methodName: string; args: A }>
|
calls: Array<{ contract: C; methodName: string; args: A }>,
|
||||||
) => {
|
) => {
|
||||||
const multicall = getMulticall(chainId)
|
const multicall = getMulticall(chainId)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user