Skip to content

Support custom score API URL for testing #402

@mktcode

Description

@mktcode

Analogous to: snapshot-labs/snapshot-v1#918
We could replace:

export const SNAPSHOT_SCORE_API = 'https://score.snapshot.org/api/scores';

...with an optional last parameter here:

snapshot.js/src/utils.ts

Lines 115 to 122 in 81f100e

export async function getScores(
space: string,
strategies: any[],
network: string,
provider: StaticJsonRpcProvider | string,
addresses: string[],
snapshot: number | string = 'latest'
) {

...defaulting to https://score.snapshot.org if not set of course.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions