Skip to content

Commit 5f1a3c4

Browse files
committed
fix: additional post merge fixes
Signed-off-by: Tomás Migone <[email protected]>
1 parent dff1845 commit 5f1a3c4

File tree

5 files changed

+17
-6
lines changed

5 files changed

+17
-6
lines changed

cli/commands/contracts/disputeManager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { createAttestation, Attestation, Receipt } from '@graphprotocol/common-t
55
import { logger } from '../../logging'
66
import { sendTransaction, getProvider, toGRT, randomHexBytes } from '../../network'
77
import { loadEnv, CLIArgs, CLIEnvironment } from '../../env'
8-
import { getChainID } from '../../../test/lib/testHelpers'
8+
import { getChainID } from '../../network'
99

1010
const { HashZero } = constants
1111
const { defaultAbiCoder: abi, arrayify, concat, hexlify } = utils
@@ -19,7 +19,7 @@ interface ChannelKey {
1919
async function buildAttestation(receipt: Receipt, signer: string, disputeManagerAddress: string) {
2020
const attestation = await createAttestation(
2121
signer,
22-
await getChainID(),
22+
getChainID(),
2323
disputeManagerAddress,
2424
receipt,
2525
'0',

cli/network.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ export const toGRT = (value: string | number): BigNumber => {
2929
export const getProvider = (providerUrl: string, network?: number): providers.JsonRpcProvider =>
3030
new providers.JsonRpcProvider(providerUrl, network)
3131

32+
export const getChainID = (): number => {
33+
return 4 // Only works for rinkeby right now
34+
}
35+
3236
export const hashHexString = (input: string): string => keccak256(`0x${input.replace(/^0x/, '')}`)
3337

3438
type ContractParam = string | BigNumber | number

e2e/deployment/init/l1/bridgeEscrow.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { expect } from 'chai'
22
import hre from 'hardhat'
3-
import GraphChain from '../../../../gre/helpers/network'
3+
import GraphChain from '../../../../gre/helpers/chain'
44

55
describe('BridgeEscrow initialization', () => {
66
const graph = hre.graph()

scripts/e2e

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,15 @@ if [[ ! -f "$ADDRESS_BOOK" ]]; then
174174
echo '{}' > "$ADDRESS_BOOK"
175175
fi
176176

177-
# Create arbitrum address book if needed
178-
if [[ ! -f "$ARBITRUM_ADDRESS_BOOK" ]]; then
179-
echo '{}' > "$ARBITRUM_ADDRESS_BOOK"
177+
# Reset arbitrum address book (just in case the deployment changed)
178+
if [[ -f "$ARBITRUM_ADDRESS_BOOK" ]]; then
179+
rm "$ARBITRUM_ADDRESS_BOOK"
180+
fi
181+
echo '{}' > "$ARBITRUM_ADDRESS_BOOK"
182+
183+
# Reset arbitrum address book (just in case the deployment changed)
184+
if [[ -f "$ARBITRUM_DEPLOYMENT_FILE" ]]; then
185+
rm "$ARBITRUM_DEPLOYMENT_FILE"
180186
fi
181187

182188
## DEPLOY

tasks/deployment/unpause.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ task('migrate:unpause:protocol', 'Unpause protocol (except bridge)')
1919
})
2020

2121
task('migrate:unpause:bridge', 'Unpause bridge')
22+
.addFlag('disableSecureAccounts', 'Disable secure accounts on GRE')
2223
.addOptionalParam('addressBook', cliOpts.addressBook.description)
2324
.addOptionalParam('graphConfig', cliOpts.graphConfig.description)
2425
.setAction(async (taskArgs, hre) => {

0 commit comments

Comments
 (0)