Skip to content

Commit

Permalink
feat(env): add brovider url to envs
Browse files Browse the repository at this point in the history
  • Loading branch information
Todmy committed Aug 25, 2023
1 parent de71f4b commit e4b1e80
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
DATABASE_URL=mysql://...
SEQUENCER_URL=https://seq.snapshot.org
HUB_URL=https://hub.snapshot.org/graphql
BROVIDER_URL=https://rpc.snapshot.org
7 changes: 7 additions & 0 deletions src/check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,15 @@ async function processSig(address, safeHash, network) {

async function checkSignedMessages(messages, network) {
if (messages.length > 0) {
<<<<<<< Updated upstream
const end = timeMessageProcess.startTimer({ network });
const provider = snapshot.utils.getProvider(network);
=======
const provider = snapshot.utils.getProvider(
network,
{ broviderUrl: process.env.BROVIDER_URL }
);
>>>>>>> Stashed changes
const abi = ['function signedMessages(bytes32) view returns (uint256)'];
try {
const response = await snapshot.utils.multicall(
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { hexValue } from '@ethersproject/bytes';
import snapshot from '@snapshot-labs/snapshot.js';

export async function getSafeVersion(safe, network) {
const provider = snapshot.utils.getProvider(network);
const provider = snapshot.utils.getProvider(network, { broviderUrl: process.env.BROVIDER_URL });

Check failure on line 6 in src/utils.ts

View workflow job for this annotation

GitHub Actions / test / Test

Expected 1 arguments, but got 2.
const storage = await provider.getStorageAt(safe, 0);
const abi = ['function VERSION() view returns (string)'];
const contract = new Contract(hexValue(storage), abi, provider);
Expand Down

0 comments on commit e4b1e80

Please sign in to comment.