Add ALM new styles (#373)

This commit is contained in:
Gerardo Nardelli 2020-06-26 12:47:45 -03:00 committed by GitHub
parent 2ca07e998a
commit 4a727dc159
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 1991 additions and 207 deletions

@ -3,3 +3,4 @@ submodules
coverage coverage
lib lib
dist dist
build

@ -25,6 +25,7 @@
work correctly both with client-side routing and a non-root public URL. work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`. Learn how to configure a non-root public URL by running `npm run build`.
--> -->
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,700" rel="stylesheet">
<title>AMB Live Monitoring</title> <title>AMB Live Monitoring</title>
</head> </head>
<body> <body>

@ -1,11 +1,14 @@
import React from 'react' import React from 'react'
import { BrowserRouter } from 'react-router-dom' import { BrowserRouter } from 'react-router-dom'
import { MainPage } from './components/MainPage' import { MainPage } from './components/MainPage'
import { StateProvider } from './state/StateProvider'
function App() { function App() {
return ( return (
<BrowserRouter> <BrowserRouter>
<MainPage /> <StateProvider>
<MainPage />
</StateProvider>
</BrowserRouter> </BrowserRouter>
) )
} }

@ -0,0 +1,319 @@
import { AbiItem } from 'web3-utils'
const abi: AbiItem[] = [
{
constant: true,
inputs: [],
name: 'validatorCount',
outputs: [
{
name: '',
type: 'uint256'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'getBridgeValidatorsInterfacesVersion',
outputs: [
{
name: 'major',
type: 'uint64'
},
{
name: 'minor',
type: 'uint64'
},
{
name: 'patch',
type: 'uint64'
}
],
payable: false,
stateMutability: 'pure',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'isInitialized',
outputs: [
{
name: '',
type: 'bool'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'validatorList',
outputs: [
{
name: '',
type: 'address[]'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: false,
inputs: [
{
name: '_requiredSignatures',
type: 'uint256'
}
],
name: 'setRequiredSignatures',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'requiredSignatures',
outputs: [
{
name: '',
type: 'uint256'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [
{
name: '_address',
type: 'address'
}
],
name: 'getNextValidator',
outputs: [
{
name: '',
type: 'address'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'owner',
outputs: [
{
name: '',
type: 'address'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [
{
name: '_validator',
type: 'address'
}
],
name: 'isValidatorDuty',
outputs: [
{
name: '',
type: 'bool'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'deployedAtBlock',
outputs: [
{
name: '',
type: 'uint256'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'F_ADDR',
outputs: [
{
name: '',
type: 'address'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: false,
inputs: [
{
name: 'newOwner',
type: 'address'
}
],
name: 'transferOwnership',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function'
},
{
constant: true,
inputs: [
{
name: '_validator',
type: 'address'
}
],
name: 'isValidator',
outputs: [
{
name: '',
type: 'bool'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
anonymous: false,
inputs: [
{
indexed: true,
name: 'validator',
type: 'address'
}
],
name: 'ValidatorAdded',
type: 'event'
},
{
anonymous: false,
inputs: [
{
indexed: true,
name: 'validator',
type: 'address'
}
],
name: 'ValidatorRemoved',
type: 'event'
},
{
anonymous: false,
inputs: [
{
indexed: false,
name: 'requiredSignatures',
type: 'uint256'
}
],
name: 'RequiredSignaturesChanged',
type: 'event'
},
{
anonymous: false,
inputs: [
{
indexed: false,
name: 'previousOwner',
type: 'address'
},
{
indexed: false,
name: 'newOwner',
type: 'address'
}
],
name: 'OwnershipTransferred',
type: 'event'
},
{
constant: false,
inputs: [
{
name: '_requiredSignatures',
type: 'uint256'
},
{
name: '_initialValidators',
type: 'address[]'
},
{
name: '_owner',
type: 'address'
}
],
name: 'initialize',
outputs: [
{
name: '',
type: 'bool'
}
],
payable: false,
stateMutability: 'nonpayable',
type: 'function'
},
{
constant: false,
inputs: [
{
name: '_validator',
type: 'address'
}
],
name: 'addValidator',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function'
},
{
constant: false,
inputs: [
{
name: '_validator',
type: 'address'
}
],
name: 'removeValidator',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function'
}
]
export default abi

589
alm/src/abis/ForeignAMB.ts Normal file

@ -0,0 +1,589 @@
import { AbiItem } from 'web3-utils'
const abi: AbiItem[] = [
{
constant: true,
inputs: [],
name: 'transactionHash',
outputs: [
{
name: '',
type: 'bytes32'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [
{
name: '_txHash',
type: 'bytes32'
}
],
name: 'relayedMessages',
outputs: [
{
name: '',
type: 'bool'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: false,
inputs: [
{
name: '_sourceChainId',
type: 'uint256'
},
{
name: '_destinationChainId',
type: 'uint256'
},
{
name: '_validatorContract',
type: 'address'
},
{
name: '_maxGasPerTx',
type: 'uint256'
},
{
name: '_gasPrice',
type: 'uint256'
},
{
name: '_requiredBlockConfirmations',
type: 'uint256'
},
{
name: '_owner',
type: 'address'
}
],
name: 'initialize',
outputs: [
{
name: '',
type: 'bool'
}
],
payable: false,
stateMutability: 'nonpayable',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'isInitialized',
outputs: [
{
name: '',
type: 'bool'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'requiredBlockConfirmations',
outputs: [
{
name: '',
type: 'uint256'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: false,
inputs: [
{
name: '_data',
type: 'bytes'
},
{
name: '_signatures',
type: 'bytes'
}
],
name: 'executeSignatures',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function'
},
{
constant: true,
inputs: [
{
name: '_data',
type: 'bytes'
}
],
name: 'getMinimumGasUsage',
outputs: [
{
name: 'gas',
type: 'uint256'
}
],
payable: false,
stateMutability: 'pure',
type: 'function'
},
{
constant: true,
inputs: [
{
name: '_messageId',
type: 'bytes32'
}
],
name: 'failedMessageReceiver',
outputs: [
{
name: '',
type: 'address'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'getBridgeMode',
outputs: [
{
name: '_data',
type: 'bytes4'
}
],
payable: false,
stateMutability: 'pure',
type: 'function'
},
{
constant: false,
inputs: [
{
name: '_sourceChainId',
type: 'uint256'
},
{
name: '_destinationChainId',
type: 'uint256'
}
],
name: 'setChainIds',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function'
},
{
constant: true,
inputs: [
{
name: '_messageId',
type: 'bytes32'
}
],
name: 'failedMessageSender',
outputs: [
{
name: '',
type: 'address'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'messageId',
outputs: [
{
name: '',
type: 'bytes32'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: false,
inputs: [
{
name: '_token',
type: 'address'
},
{
name: '_to',
type: 'address'
}
],
name: 'claimTokens',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function'
},
{
constant: false,
inputs: [
{
name: '_maxGasPerTx',
type: 'uint256'
}
],
name: 'setMaxGasPerTx',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'requiredSignatures',
outputs: [
{
name: '',
type: 'uint256'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'owner',
outputs: [
{
name: '',
type: 'address'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'validatorContract',
outputs: [
{
name: '',
type: 'address'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'deployedAtBlock',
outputs: [
{
name: '',
type: 'uint256'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'getBridgeInterfacesVersion',
outputs: [
{
name: 'major',
type: 'uint64'
},
{
name: 'minor',
type: 'uint64'
},
{
name: 'patch',
type: 'uint64'
}
],
payable: false,
stateMutability: 'pure',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'messageSourceChainId',
outputs: [
{
name: '',
type: 'uint256'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: false,
inputs: [
{
name: '_blockConfirmations',
type: 'uint256'
}
],
name: 'setRequiredBlockConfirmations',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function'
},
{
constant: false,
inputs: [
{
name: '_gasPrice',
type: 'uint256'
}
],
name: 'setGasPrice',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function'
},
{
constant: true,
inputs: [
{
name: '_messageId',
type: 'bytes32'
}
],
name: 'messageCallStatus',
outputs: [
{
name: '',
type: 'bool'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'messageSender',
outputs: [
{
name: '',
type: 'address'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: false,
inputs: [
{
name: '_contract',
type: 'address'
},
{
name: '_data',
type: 'bytes'
},
{
name: '_gas',
type: 'uint256'
}
],
name: 'requireToPassMessage',
outputs: [
{
name: '',
type: 'bytes32'
}
],
payable: false,
stateMutability: 'nonpayable',
type: 'function'
},
{
constant: true,
inputs: [
{
name: '_messageId',
type: 'bytes32'
}
],
name: 'failedMessageDataHash',
outputs: [
{
name: '',
type: 'bytes32'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'maxGasPerTx',
outputs: [
{
name: '',
type: 'uint256'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: false,
inputs: [
{
name: 'newOwner',
type: 'address'
}
],
name: 'transferOwnership',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'gasPrice',
outputs: [
{
name: '',
type: 'uint256'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
anonymous: false,
inputs: [
{
indexed: true,
name: 'messageId',
type: 'bytes32'
},
{
indexed: false,
name: 'encodedData',
type: 'bytes'
}
],
name: 'UserRequestForAffirmation',
type: 'event'
},
{
anonymous: false,
inputs: [
{
indexed: true,
name: 'sender',
type: 'address'
},
{
indexed: true,
name: 'executor',
type: 'address'
},
{
indexed: true,
name: 'messageId',
type: 'bytes32'
},
{
indexed: false,
name: 'status',
type: 'bool'
}
],
name: 'RelayedMessage',
type: 'event'
},
{
anonymous: false,
inputs: [
{
indexed: false,
name: 'gasPrice',
type: 'uint256'
}
],
name: 'GasPriceChanged',
type: 'event'
},
{
anonymous: false,
inputs: [
{
indexed: false,
name: 'requiredBlockConfirmations',
type: 'uint256'
}
],
name: 'RequiredBlockConfirmationChanged',
type: 'event'
},
{
anonymous: false,
inputs: [
{
indexed: false,
name: 'previousOwner',
type: 'address'
},
{
indexed: false,
name: 'newOwner',
type: 'address'
}
],
name: 'OwnershipTransferred',
type: 'event'
}
]
export default abi

777
alm/src/abis/HomeAMB.ts Normal file

@ -0,0 +1,777 @@
import { AbiItem } from 'web3-utils'
const abi: AbiItem[] = [
{
constant: true,
inputs: [],
name: 'transactionHash',
outputs: [
{
name: '',
type: 'bytes32'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [
{
name: '_message',
type: 'bytes32'
}
],
name: 'numMessagesSigned',
outputs: [
{
name: '',
type: 'uint256'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [
{
name: '_hash',
type: 'bytes32'
},
{
name: '_index',
type: 'uint256'
}
],
name: 'signature',
outputs: [
{
name: '',
type: 'bytes'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: false,
inputs: [
{
name: '_sourceChainId',
type: 'uint256'
},
{
name: '_destinationChainId',
type: 'uint256'
},
{
name: '_validatorContract',
type: 'address'
},
{
name: '_maxGasPerTx',
type: 'uint256'
},
{
name: '_gasPrice',
type: 'uint256'
},
{
name: '_requiredBlockConfirmations',
type: 'uint256'
},
{
name: '_owner',
type: 'address'
}
],
name: 'initialize',
outputs: [
{
name: '',
type: 'bool'
}
],
payable: false,
stateMutability: 'nonpayable',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'isInitialized',
outputs: [
{
name: '',
type: 'bool'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'requiredBlockConfirmations',
outputs: [
{
name: '',
type: 'uint256'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [
{
name: '_data',
type: 'bytes'
}
],
name: 'getMinimumGasUsage',
outputs: [
{
name: 'gas',
type: 'uint256'
}
],
payable: false,
stateMutability: 'pure',
type: 'function'
},
{
constant: true,
inputs: [
{
name: '_messageId',
type: 'bytes32'
}
],
name: 'failedMessageReceiver',
outputs: [
{
name: '',
type: 'address'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'getBridgeMode',
outputs: [
{
name: '_data',
type: 'bytes4'
}
],
payable: false,
stateMutability: 'pure',
type: 'function'
},
{
constant: false,
inputs: [
{
name: '_sourceChainId',
type: 'uint256'
},
{
name: '_destinationChainId',
type: 'uint256'
}
],
name: 'setChainIds',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function'
},
{
constant: true,
inputs: [
{
name: '_hash',
type: 'bytes32'
}
],
name: 'message',
outputs: [
{
name: '',
type: 'bytes'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [
{
name: '_messageId',
type: 'bytes32'
}
],
name: 'failedMessageSender',
outputs: [
{
name: '',
type: 'address'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: false,
inputs: [
{
name: 'signature',
type: 'bytes'
},
{
name: 'message',
type: 'bytes'
}
],
name: 'submitSignature',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'messageId',
outputs: [
{
name: '',
type: 'bytes32'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: false,
inputs: [
{
name: '_token',
type: 'address'
},
{
name: '_to',
type: 'address'
}
],
name: 'claimTokens',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function'
},
{
constant: true,
inputs: [
{
name: '_hash',
type: 'bytes32'
}
],
name: 'numAffirmationsSigned',
outputs: [
{
name: '',
type: 'uint256'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [
{
name: '_hash',
type: 'bytes32'
}
],
name: 'affirmationsSigned',
outputs: [
{
name: '',
type: 'bool'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: false,
inputs: [
{
name: '_maxGasPerTx',
type: 'uint256'
}
],
name: 'setMaxGasPerTx',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'requiredSignatures',
outputs: [
{
name: '',
type: 'uint256'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'owner',
outputs: [
{
name: '',
type: 'address'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [
{
name: '_message',
type: 'bytes32'
}
],
name: 'messagesSigned',
outputs: [
{
name: '',
type: 'bool'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'validatorContract',
outputs: [
{
name: '',
type: 'address'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'deployedAtBlock',
outputs: [
{
name: '',
type: 'uint256'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'getBridgeInterfacesVersion',
outputs: [
{
name: 'major',
type: 'uint64'
},
{
name: 'minor',
type: 'uint64'
},
{
name: 'patch',
type: 'uint64'
}
],
payable: false,
stateMutability: 'pure',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'messageSourceChainId',
outputs: [
{
name: '',
type: 'uint256'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: false,
inputs: [
{
name: '_blockConfirmations',
type: 'uint256'
}
],
name: 'setRequiredBlockConfirmations',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function'
},
{
constant: false,
inputs: [
{
name: '_gasPrice',
type: 'uint256'
}
],
name: 'setGasPrice',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function'
},
{
constant: true,
inputs: [
{
name: '_messageId',
type: 'bytes32'
}
],
name: 'messageCallStatus',
outputs: [
{
name: '',
type: 'bool'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'messageSender',
outputs: [
{
name: '',
type: 'address'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: false,
inputs: [
{
name: '_contract',
type: 'address'
},
{
name: '_data',
type: 'bytes'
},
{
name: '_gas',
type: 'uint256'
}
],
name: 'requireToPassMessage',
outputs: [
{
name: '',
type: 'bytes32'
}
],
payable: false,
stateMutability: 'nonpayable',
type: 'function'
},
{
constant: true,
inputs: [
{
name: '_messageId',
type: 'bytes32'
}
],
name: 'failedMessageDataHash',
outputs: [
{
name: '',
type: 'bytes32'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'maxGasPerTx',
outputs: [
{
name: '',
type: 'uint256'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: false,
inputs: [
{
name: 'message',
type: 'bytes'
}
],
name: 'executeAffirmation',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function'
},
{
constant: false,
inputs: [
{
name: 'newOwner',
type: 'address'
}
],
name: 'transferOwnership',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'gasPrice',
outputs: [
{
name: '',
type: 'uint256'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [
{
name: '_number',
type: 'uint256'
}
],
name: 'isAlreadyProcessed',
outputs: [
{
name: '',
type: 'bool'
}
],
payable: false,
stateMutability: 'pure',
type: 'function'
},
{
anonymous: false,
inputs: [
{
indexed: true,
name: 'messageId',
type: 'bytes32'
},
{
indexed: false,
name: 'encodedData',
type: 'bytes'
}
],
name: 'UserRequestForSignature',
type: 'event'
},
{
anonymous: false,
inputs: [
{
indexed: true,
name: 'sender',
type: 'address'
},
{
indexed: true,
name: 'executor',
type: 'address'
},
{
indexed: true,
name: 'messageId',
type: 'bytes32'
},
{
indexed: false,
name: 'status',
type: 'bool'
}
],
name: 'AffirmationCompleted',
type: 'event'
},
{
anonymous: false,
inputs: [
{
indexed: true,
name: 'signer',
type: 'address'
},
{
indexed: false,
name: 'messageHash',
type: 'bytes32'
}
],
name: 'SignedForUserRequest',
type: 'event'
},
{
anonymous: false,
inputs: [
{
indexed: true,
name: 'signer',
type: 'address'
},
{
indexed: false,
name: 'messageHash',
type: 'bytes32'
}
],
name: 'SignedForAffirmation',
type: 'event'
},
{
anonymous: false,
inputs: [
{
indexed: false,
name: 'authorityResponsibleForRelay',
type: 'address'
},
{
indexed: false,
name: 'messageHash',
type: 'bytes32'
},
{
indexed: false,
name: 'NumberOfCollectedSignatures',
type: 'uint256'
}
],
name: 'CollectedSignatures',
type: 'event'
},
{
anonymous: false,
inputs: [
{
indexed: false,
name: 'gasPrice',
type: 'uint256'
}
],
name: 'GasPriceChanged',
type: 'event'
},
{
anonymous: false,
inputs: [
{
indexed: false,
name: 'requiredBlockConfirmations',
type: 'uint256'
}
],
name: 'RequiredBlockConfirmationChanged',
type: 'event'
},
{
anonymous: false,
inputs: [
{
indexed: false,
name: 'previousOwner',
type: 'address'
},
{
indexed: false,
name: 'newOwner',
type: 'address'
}
],
name: 'OwnershipTransferred',
type: 'event'
}
]
export default abi

3
alm/src/abis/index.ts Normal file

@ -0,0 +1,3 @@
export { default as HOME_AMB_ABI } from './HomeAMB'
export { default as FOREIGN_AMB_ABI } from './ForeignAMB'
export { default as BRIDGE_VALIDATORS_ABI } from './BridgeValidators'

@ -23,7 +23,7 @@ const StatusResultLabel = styled.label`
` `
const StyledConfirmationContainer = styled.div` const StyledConfirmationContainer = styled.div`
background-color: var(--color-primary); background-color: var(--bg-color);
padding: 10px; padding: 10px;
border-radius: 4px; border-radius: 4px;
` `

@ -12,27 +12,39 @@ const LabelText = styled.label`
` `
const Input = styled.input` const Input = styled.input`
background-color: var(--color-primary); background-color: var(--bg-color);
color: var(--font-color); color: var(--font-color);
max-width: 100%; max-width: 100%;
border-color: var(--color-primary) !important;
&:hover,
&:active,
&:focus {
border-color: var(--button-color) !important;
}
` `
export const Form = ({ onSubmit }: { onSubmit: ({ chainId, txHash }: FormSubmitParams) => void }) => { export const Form = ({
onSubmit,
lastUsedChain
}: {
onSubmit: ({ chainId, txHash }: FormSubmitParams) => void
lastUsedChain: number
}) => {
const { home, foreign, loading } = useStateProvider() const { home, foreign, loading } = useStateProvider()
const { chainId: paramChainId, txHash: paramTxHash } = useParams() const { chainId: paramChainId, txHash: paramTxHash } = useParams()
const [chainId, setChainId] = useState(0) const [chainId, setChainId] = useState(lastUsedChain)
const [txHash, setTxHash] = useState('') const [txHash, setTxHash] = useState('')
useEffect( useEffect(
() => { () => {
if (!paramChainId) { if (!paramChainId) {
setChainId(foreign.chainId) setChainId(lastUsedChain > 0 ? lastUsedChain : foreign.chainId)
} else { } else {
setChainId(parseInt(paramChainId)) setChainId(parseInt(paramChainId))
setTxHash(paramTxHash) setTxHash(paramTxHash)
} }
}, },
[foreign.chainId, paramChainId, paramTxHash] [foreign.chainId, paramChainId, paramTxHash, lastUsedChain]
) )
const formSubmit = (e: FormEvent) => { const formSubmit = (e: FormEvent) => {
@ -55,7 +67,7 @@ export const Form = ({ onSubmit }: { onSubmit: ({ chainId, txHash }: FormSubmitP
/> />
</div> </div>
<div className="col-1"> <div className="col-1">
<Button className="button dark" type="submit"> <Button className="button outline" type="submit">
Check Check
</Button> </Button>
</div> </div>

@ -1,9 +1,9 @@
import React from 'react' import React, { useState } from 'react'
import styled from 'styled-components' import styled from 'styled-components'
import { Route, useHistory, Link } from 'react-router-dom' import { Route, useHistory } from 'react-router-dom'
import { Form } from './Form' import { Form } from './Form'
import { StatusContainer } from './StatusContainer' import { StatusContainer } from './StatusContainer'
import { StateProvider } from '../state/StateProvider' import { useStateProvider } from '../state/StateProvider'
const StyledMainPage = styled.div` const StyledMainPage = styled.div`
text-align: center; text-align: center;
@ -11,15 +11,24 @@ const StyledMainPage = styled.div`
` `
const Header = styled.header` const Header = styled.header`
display: flex; background-color: #001529;
flex-direction: column; color: #ffffff;
align-items: center; margin-bottom: 50px;
justify-content: center;
font-size: calc(10px + 2vmin);
` `
const Title = styled.p` const HeaderContainer = styled.header`
color: var(--font-color); display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
font-size: 16px;
height: 64px;
line-height: 64px;
padding: 0 50px;
@media (max-width: 600px) {
padding: 0 20px;
}
` `
export interface FormSubmitParams { export interface FormSubmitParams {
@ -29,23 +38,46 @@ export interface FormSubmitParams {
export const MainPage = () => { export const MainPage = () => {
const history = useHistory() const history = useHistory()
const { home, foreign } = useStateProvider()
const [selectedChainId, setSelectedChainId] = useState(0)
const [networkName, setNetworkName] = useState('')
const setNetworkData = (chainId: number) => {
const network = chainId === home.chainId ? home.name : foreign.name
setNetworkName(network)
setSelectedChainId(chainId)
}
const onFormSubmit = ({ chainId, txHash }: FormSubmitParams) => { const onFormSubmit = ({ chainId, txHash }: FormSubmitParams) => {
setNetworkData(chainId)
history.push(`/${chainId}/${txHash}`) history.push(`/${chainId}/${txHash}`)
} }
const resetNetworkHeader = () => {
setNetworkName('')
}
const setNetworkFromParams = (chainId: number) => {
setNetworkData(chainId)
}
return ( return (
<StateProvider> <StyledMainPage>
<StyledMainPage> <Header>
<Header> <HeaderContainer>
<Link to="/"> <span>AMB Live Monitoring</span>
<Title>AMB Live Monitoring</Title> <span>{networkName}</span>
</Link> </HeaderContainer>
</Header> </Header>
<div className="container"> <div className="container">
<Route exact path={['/']} children={<Form onSubmit={onFormSubmit} />} /> <Route exact path={['/']} children={<Form onSubmit={onFormSubmit} lastUsedChain={selectedChainId} />} />
<Route path={['/:chainId/:txHash/:messageIdParam', '/:chainId/:txHash']} children={<StatusContainer />} /> <Route
</div> path={['/:chainId/:txHash/:messageIdParam', '/:chainId/:txHash']}
</StyledMainPage> children={<StatusContainer onBackToMain={resetNetworkHeader} setNetworkFromParams={setNetworkFromParams} />}
</StateProvider> />
</div>
</StyledMainPage>
) )
} }

@ -38,7 +38,7 @@ export const MessageSelector = ({ messages, onMessageSelected }: MessageSelector
))} ))}
</div> </div>
<div className="col-1-lg col-12 is-marginless"> <div className="col-1-lg col-12 is-marginless">
<Button className="button dark" onClick={onSelect}> <Button className="button outline" onClick={onSelect}>
Select Select
</Button> </Button>
</div> </div>

@ -1,4 +1,4 @@
import React from 'react' import React, { useEffect } from 'react'
import { Link, useHistory, useParams } from 'react-router-dom' import { Link, useHistory, useParams } from 'react-router-dom'
import { useTransactionStatus } from '../hooks/useTransactionStatus' import { useTransactionStatus } from '../hooks/useTransactionStatus'
import { formatTxHash, getExplorerTxUrl, getTransactionStatusDescription, validTxHash } from '../utils/networks' import { formatTxHash, getExplorerTxUrl, getTransactionStatusDescription, validTxHash } from '../utils/networks'
@ -12,9 +12,12 @@ import { LeftArrow } from './commons/LeftArrow'
import styled from 'styled-components' import styled from 'styled-components'
const BackButton = styled.button` const BackButton = styled.button`
color: var(--font-color); color: var(--button-color);
border-color: var(--font-color); border-color: var(--font-color);
margin-top: 10px; margin-top: 10px;
&:focus {
outline: var(--button-color);
}
` `
const BackLabel = styled.label` const BackLabel = styled.label`
@ -22,7 +25,12 @@ const BackLabel = styled.label`
cursor: pointer; cursor: pointer;
` `
export const StatusContainer = () => { export interface StatusContainerParam {
onBackToMain: () => void
setNetworkFromParams: (chainId: number) => void
}
export const StatusContainer = ({ onBackToMain, setNetworkFromParams }: StatusContainerParam) => {
const { home, foreign } = useStateProvider() const { home, foreign } = useStateProvider()
const history = useHistory() const history = useHistory()
const { chainId, txHash, messageIdParam } = useParams() const { chainId, txHash, messageIdParam } = useParams()
@ -36,6 +44,15 @@ export const StatusContainer = () => {
const selectedMessageId = messageIdParam === undefined || messages[messageIdParam] === undefined ? -1 : messageIdParam const selectedMessageId = messageIdParam === undefined || messages[messageIdParam] === undefined ? -1 : messageIdParam
useEffect(
() => {
if (validChainId) {
setNetworkFromParams(parseInt(chainId))
}
},
[validChainId, chainId, setNetworkFromParams]
)
if (!validParameters && home.chainId && foreign.chainId) { if (!validParameters && home.chainId && foreign.chainId) {
return ( return (
<div> <div>
@ -75,15 +92,12 @@ export const StatusContainer = () => {
{status && ( {status && (
<p> <p>
The request{' '} The request{' '}
<i> {displayExplorerLink && (
{displayExplorerLink && ( <ExplorerTxLink href={txExplorerLink} target="blank">
<ExplorerTxLink href={txExplorerLink} target="blank"> {formattedMessageId}
{formattedMessageId} </ExplorerTxLink>
</ExplorerTxLink> )}
)} {!displayExplorerLink && <label>{formattedMessageId}</label>} {displayedDescription}
{!displayExplorerLink && <label>{formattedMessageId}</label>}
</i>{' '}
{displayedDescription}
</p> </p>
)} )}
{displayMessageSelector && <MessageSelector messages={messages} onMessageSelected={onMessageSelected} />} {displayMessageSelector && <MessageSelector messages={messages} onMessageSelected={onMessageSelected} />}
@ -92,7 +106,7 @@ export const StatusContainer = () => {
)} )}
<div className="row is-center"> <div className="row is-center">
<div className="col-9"> <div className="col-9">
<Link to="/"> <Link to="/" onClick={onBackToMain}>
<BackButton className="button outline is-left"> <BackButton className="button outline is-left">
<LeftArrow /> <LeftArrow />
<BackLabel>Search another transaction</BackLabel> <BackLabel>Search another transaction</BackLabel>

@ -2,4 +2,9 @@ import styled from 'styled-components'
export const Button = styled.button` export const Button = styled.button`
height: 36px; height: 36px;
color: var(--button-color);
border-color: var(--button-color);
&:focus {
outline: var(--button-color);
}
` `

@ -3,4 +3,5 @@ import styled from 'styled-components'
export const ExplorerTxLink = styled.a` export const ExplorerTxLink = styled.a`
color: var(--link-color); color: var(--link-color);
text-decoration: underline; text-decoration: underline;
font-weight: bold;
` `

@ -12,7 +12,7 @@ export const LeftArrow = () => {
width="24" width="24"
height="24" height="24"
viewBox="0 0 24 24" viewBox="0 0 24 24"
fill={themeContext.fontColor} fill={themeContext.buttonColor}
> >
<path d="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z" /> <path d="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z" />
</svg> </svg>

@ -1,4 +1,5 @@
import React from 'react' import React, { useContext } from 'react'
import { ThemeContext } from 'styled-components'
export interface LoadingParams { export interface LoadingParams {
width?: string width?: string
@ -6,156 +7,159 @@ export interface LoadingParams {
displayMessage?: boolean displayMessage?: boolean
} }
export const Loading = ({ width = '50px', height = '50px', displayMessage = true }: LoadingParams) => ( export const Loading = ({ width = '50px', height = '50px', displayMessage = true }: LoadingParams) => {
<div className="row is-center"> const themeContext = useContext(ThemeContext)
<svg return (
xmlns="http://www.w3.org/2000/svg" <div className="row is-center">
style={{ background: 'none', display: 'block', shapeRendering: 'auto' }} <svg
width={width} xmlns="http://www.w3.org/2000/svg"
height={height} style={{ background: 'none', display: 'block', shapeRendering: 'auto' }}
viewBox="0 0 100 100" width={width}
preserveAspectRatio="xMidYMid" height={height}
> viewBox="0 0 100 100"
<g transform="rotate(0 50 50)"> preserveAspectRatio="xMidYMid"
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#f5f5f5"> >
<animate <g transform="rotate(0 50 50)">
attributeName="opacity" <rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill={themeContext.buttonColor}>
values="1;0" <animate
keyTimes="0;1" attributeName="opacity"
dur="1s" values="1;0"
begin="-0.9166666666666666s" keyTimes="0;1"
repeatCount="indefinite" dur="1s"
/> begin="-0.9166666666666666s"
</rect> repeatCount="indefinite"
</g> />
<g transform="rotate(30 50 50)"> </rect>
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#f5f5f5"> </g>
<animate <g transform="rotate(30 50 50)">
attributeName="opacity" <rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill={themeContext.buttonColor}>
values="1;0" <animate
keyTimes="0;1" attributeName="opacity"
dur="1s" values="1;0"
begin="-0.8333333333333334s" keyTimes="0;1"
repeatCount="indefinite" dur="1s"
/> begin="-0.8333333333333334s"
</rect> repeatCount="indefinite"
</g> />
<g transform="rotate(60 50 50)"> </rect>
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#f5f5f5"> </g>
<animate <g transform="rotate(60 50 50)">
attributeName="opacity" <rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill={themeContext.buttonColor}>
values="1;0" <animate
keyTimes="0;1" attributeName="opacity"
dur="1s" values="1;0"
begin="-0.75s" keyTimes="0;1"
repeatCount="indefinite" dur="1s"
/> begin="-0.75s"
</rect> repeatCount="indefinite"
</g> />
<g transform="rotate(90 50 50)"> </rect>
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#f5f5f5"> </g>
<animate <g transform="rotate(90 50 50)">
attributeName="opacity" <rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill={themeContext.buttonColor}>
values="1;0" <animate
keyTimes="0;1" attributeName="opacity"
dur="1s" values="1;0"
begin="-0.6666666666666666s" keyTimes="0;1"
repeatCount="indefinite" dur="1s"
/> begin="-0.6666666666666666s"
</rect> repeatCount="indefinite"
</g> />
<g transform="rotate(120 50 50)"> </rect>
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#f5f5f5"> </g>
<animate <g transform="rotate(120 50 50)">
attributeName="opacity" <rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill={themeContext.buttonColor}>
values="1;0" <animate
keyTimes="0;1" attributeName="opacity"
dur="1s" values="1;0"
begin="-0.5833333333333334s" keyTimes="0;1"
repeatCount="indefinite" dur="1s"
/> begin="-0.5833333333333334s"
</rect> repeatCount="indefinite"
</g> />
<g transform="rotate(150 50 50)"> </rect>
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#f5f5f5"> </g>
<animate <g transform="rotate(150 50 50)">
attributeName="opacity" <rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill={themeContext.buttonColor}>
values="1;0" <animate
keyTimes="0;1" attributeName="opacity"
dur="1s" values="1;0"
begin="-0.5s" keyTimes="0;1"
repeatCount="indefinite" dur="1s"
/> begin="-0.5s"
</rect> repeatCount="indefinite"
</g> />
<g transform="rotate(180 50 50)"> </rect>
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#f5f5f5"> </g>
<animate <g transform="rotate(180 50 50)">
attributeName="opacity" <rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill={themeContext.buttonColor}>
values="1;0" <animate
keyTimes="0;1" attributeName="opacity"
dur="1s" values="1;0"
begin="-0.4166666666666667s" keyTimes="0;1"
repeatCount="indefinite" dur="1s"
/> begin="-0.4166666666666667s"
</rect> repeatCount="indefinite"
</g> />
<g transform="rotate(210 50 50)"> </rect>
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#f5f5f5"> </g>
<animate <g transform="rotate(210 50 50)">
attributeName="opacity" <rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill={themeContext.buttonColor}>
values="1;0" <animate
keyTimes="0;1" attributeName="opacity"
dur="1s" values="1;0"
begin="-0.3333333333333333s" keyTimes="0;1"
repeatCount="indefinite" dur="1s"
/> begin="-0.3333333333333333s"
</rect> repeatCount="indefinite"
</g> />
<g transform="rotate(240 50 50)"> </rect>
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#f5f5f5"> </g>
<animate <g transform="rotate(240 50 50)">
attributeName="opacity" <rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill={themeContext.buttonColor}>
values="1;0" <animate
keyTimes="0;1" attributeName="opacity"
dur="1s" values="1;0"
begin="-0.25s" keyTimes="0;1"
repeatCount="indefinite" dur="1s"
/> begin="-0.25s"
</rect> repeatCount="indefinite"
</g> />
<g transform="rotate(270 50 50)"> </rect>
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#f5f5f5"> </g>
<animate <g transform="rotate(270 50 50)">
attributeName="opacity" <rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill={themeContext.buttonColor}>
values="1;0" <animate
keyTimes="0;1" attributeName="opacity"
dur="1s" values="1;0"
begin="-0.16666666666666666s" keyTimes="0;1"
repeatCount="indefinite" dur="1s"
/> begin="-0.16666666666666666s"
</rect> repeatCount="indefinite"
</g> />
<g transform="rotate(300 50 50)"> </rect>
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#f5f5f5"> </g>
<animate <g transform="rotate(300 50 50)">
attributeName="opacity" <rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill={themeContext.buttonColor}>
values="1;0" <animate
keyTimes="0;1" attributeName="opacity"
dur="1s" values="1;0"
begin="-0.08333333333333333s" keyTimes="0;1"
repeatCount="indefinite" dur="1s"
/> begin="-0.08333333333333333s"
</rect> repeatCount="indefinite"
</g> />
<g transform="rotate(330 50 50)"> </rect>
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#f5f5f5"> </g>
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="0s" repeatCount="indefinite" /> <g transform="rotate(330 50 50)">
</rect> <rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill={themeContext.buttonColor}>
</g> <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="0s" repeatCount="indefinite" />
</svg> </rect>
{displayMessage && <label>Loading...</label>} </g>
</div> </svg>
) {displayMessage && <label style={{ color: themeContext.buttonColor }}>Loading...</label>}
</div>
)
}
export const SimpleLoading = () => <Loading width="30px" height="30px" displayMessage={false} /> export const SimpleLoading = () => <Loading width="30px" height="30px" displayMessage={false} />

@ -1,5 +1,5 @@
import { useEffect, useState } from 'react' import { useEffect, useState } from 'react'
import { HOME_AMB_ABI, FOREIGN_AMB_ABI } from '../../../commons' import { HOME_AMB_ABI, FOREIGN_AMB_ABI } from '../abis'
import { FOREIGN_BRIDGE_ADDRESS, HOME_BRIDGE_ADDRESS } from '../config/constants' import { FOREIGN_BRIDGE_ADDRESS, HOME_BRIDGE_ADDRESS } from '../config/constants'
import { Contract } from 'web3-eth-contract' import { Contract } from 'web3-eth-contract'
import Web3 from 'web3' import Web3 from 'web3'

@ -200,7 +200,7 @@ export const useMessageConfirmations = ({
// To avoid making extra requests, this is only executed when validators finished waiting for blocks confirmations // To avoid making extra requests, this is only executed when validators finished waiting for blocks confirmations
useEffect( useEffect(
() => { () => {
if (!waitingBlocksResolved || !timestamp) return if (!waitingBlocksResolved || !timestamp || !requiredSignatures) return
const subscriptions: Array<number> = [] const subscriptions: Array<number> = []

@ -2,7 +2,7 @@ import { useEffect, useState } from 'react'
import { Contract } from 'web3-eth-contract' import { Contract } from 'web3-eth-contract'
import Web3 from 'web3' import Web3 from 'web3'
import { getRequiredSignatures, getValidatorAddress, getValidatorList } from '../utils/contract' import { getRequiredSignatures, getValidatorAddress, getValidatorList } from '../utils/contract'
import { BRIDGE_VALIDATORS_ABI } from '../../../commons' import { BRIDGE_VALIDATORS_ABI } from '../abis'
import { useStateProvider } from '../state/StateProvider' import { useStateProvider } from '../state/StateProvider'
import { TransactionReceipt } from 'web3-eth' import { TransactionReceipt } from 'web3-eth'

@ -3,11 +3,11 @@ import ReactDOM from 'react-dom'
import { ThemeProvider } from 'styled-components' import { ThemeProvider } from 'styled-components'
import { GlobalStyle } from './themes/GlobalStyle' import { GlobalStyle } from './themes/GlobalStyle'
import App from './App' import App from './App'
import Dark from './themes/Dark' import Light from './themes/Light'
ReactDOM.render( ReactDOM.render(
<React.StrictMode> <React.StrictMode>
<ThemeProvider theme={Dark}> <ThemeProvider theme={Light}>
<GlobalStyle /> <GlobalStyle />
<App /> <App />
</ThemeProvider> </ThemeProvider>

@ -1,6 +1,7 @@
const theme = { const theme = {
backgroundColor: '#121212', backgroundColor: '#121212',
fontColor: '#f5f5f5', fontColor: '#f5f5f5',
buttonColor: '#f5f5f5',
colorPrimary: '#272727', colorPrimary: '#272727',
colorGrey: '#272727', colorGrey: '#272727',
colorLightGrey: '#272727', colorLightGrey: '#272727',

@ -1,6 +1,6 @@
import { createGlobalStyle } from 'styled-components' import { createGlobalStyle } from 'styled-components'
import theme from './Dark' import theme from './Light'
type ThemeType = typeof theme type ThemeType = typeof theme
@ -17,6 +17,7 @@ export const GlobalStyle = createGlobalStyle<{ theme: ThemeType }>`
:root { :root {
--bg-color: ${props => props.theme.backgroundColor}; --bg-color: ${props => props.theme.backgroundColor};
--font-color: ${props => props.theme.fontColor}; --font-color: ${props => props.theme.fontColor};
--button-color: ${props => props.theme.buttonColor};
--color-primary: ${props => props.theme.colorPrimary}; --color-primary: ${props => props.theme.colorPrimary};
--color-grey: ${props => props.theme.colorGrey}; --color-grey: ${props => props.theme.colorGrey};
--color-lightGrey: ${props => props.theme.colorLightGrey}; --color-lightGrey: ${props => props.theme.colorLightGrey};

22
alm/src/themes/Light.ts Normal file

@ -0,0 +1,22 @@
const theme = {
backgroundColor: '#FFFFFF',
fontColor: 'rgba(0, 0, 0, 0.65)',
buttonColor: '#1890ff',
colorPrimary: '#BDBDBD',
colorGrey: '#1890ff',
colorLightGrey: '#1890ff',
linkColor: '#1890ff',
success: {
textColor: '#388E3C',
backgroundColor: 'rgba(0,201,167,.1)'
},
notRequired: {
textColor: '#77838f',
backgroundColor: 'rgba(119,131,143,.1)'
},
failed: {
textColor: '#de4437',
backgroundColor: 'rgba(222,68,55,.1)'
}
}
export default theme

@ -190,11 +190,10 @@ export const getConfirmationsForTx = async (
setPendingConfirmations: Function, setPendingConfirmations: Function,
getSuccessTransactions: (args: GetFailedTransactionParams) => Promise<APITransaction[]> getSuccessTransactions: (args: GetFailedTransactionParams) => Promise<APITransaction[]>
) => { ) => {
if (!web3 || !validatorList || !bridgeContract || !waitingBlocksResolved) return if (!web3 || !validatorList || !validatorList.length || !bridgeContract || !waitingBlocksResolved) return
// If all the information was not collected, then it should retry // If all the information was not collected, then it should retry
let shouldRetry = false let shouldRetry = false
const hashMsg = web3.utils.soliditySha3Raw(messageData) const hashMsg = web3.utils.soliditySha3Raw(messageData)
let validatorConfirmations = await Promise.all( let validatorConfirmations = await Promise.all(
validatorList.map(getValidatorConfirmation(web3, hashMsg, bridgeContract, confirmationContractMethod)) validatorList.map(getValidatorConfirmation(web3, hashMsg, bridgeContract, confirmationContractMethod))

@ -4,7 +4,7 @@ import { TransactionReceipt } from 'web3-eth'
import { AbiItem } from 'web3-utils' import { AbiItem } from 'web3-utils'
import memoize from 'fast-memoize' import memoize from 'fast-memoize'
import promiseRetry from 'promise-retry' import promiseRetry from 'promise-retry'
import { HOME_AMB_ABI, FOREIGN_AMB_ABI } from '../../../commons' import { HOME_AMB_ABI, FOREIGN_AMB_ABI } from '../abis'
export interface MessageObject { export interface MessageObject {
id: string id: string