Skip to content

Commit

Permalink
handle sepolia contract, update address
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler17 committed May 2, 2024
1 parent 787e3f9 commit 464e5d2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion modules/contracts/eth-sdk.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const config: EthSdkConfig = {
vow: '0xA950524441892A31ebddF91d3cEEFa04Bf454466'
},
arbitrumSepolia: {
polling: ArbitrumPollingAddressMap['sepolia']
polling: ArbitrumPollingAddressMap['tenderly']
},
arbitrumOne: {
polling: ArbitrumPollingAddressMap['mainnet']
Expand Down
4 changes: 1 addition & 3 deletions modules/polling/api/getRelayerBalance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ import logger from 'lib/logger';

export const getRelayerBalance = async (network: SupportedNetworks): Promise<string> => {
try {
const sdkNetwork = network === SupportedNetworks.TENDERLY ? SupportedNetworks.ARBITRUMTESTNET : network;

const signer = getArbitrumRelaySigner(sdkNetwork);
const signer = getArbitrumRelaySigner(network);
const address = await signer.getAddress();
const balance = await signer.provider.getBalance(address);

Expand Down
4 changes: 2 additions & 2 deletions modules/web3/constants/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ SPDX-License-Identifier: AGPL-3.0-or-later
export const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000';

export enum ArbitrumPollingAddressMap {
mainnet = '0x4f4e551b4920a5417F8d4e7f8f099660dAdadcEC',
sepolia = '0xceaB5Bb248A9237128943BbC9d38fd02A4440B10'
mainnet = '0x4f4e551b4920a5417F8d4e7f8f099660dAdadcEC', //arbitrumOne
tenderly = '0x849637EabC4b87363717fb3bD7457358F64F925C' //arbitrumSepolia
}
3 changes: 1 addition & 2 deletions modules/web3/helpers/signTypedBallotData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ type BallotDataValues = {
export function getTypedBallotData(message: BallotDataValues, network: SupportedNetworks) {
// Chain ID must match the chain ID specified in the contract for the signature to be valid
// e.g. https://github.com/makerdao-dux/polling-contract/blob/main/contracts/Polling.sol#L31
const networkForSignature = network === SupportedNetworks.TENDERLY ? SupportedNetworks.MAINNET : network;
const chainId = networkNameToChainId(networkForSignature);
const chainId = networkNameToChainId(network);
return {
types: {
Vote: [
Expand Down

0 comments on commit 464e5d2

Please sign in to comment.