Skip to content

Commit

Permalink
Merge pull request #2 from manboy-eth/delegate-registry-v2_add-option…
Browse files Browse the repository at this point in the history
…al-v1-support

Delegate registry v2 add optional v1 support
  • Loading branch information
asgeir-s authored Nov 19, 2023
2 parents 5c8be90 + 948dcff commit 4da87d6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/strategies/delegate-registry-v2/examples.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"name": "delegate-registry-v2",
"params": {
"backendUrl": "https://delegate-registry-backend.vercel.app",
"delegationV1VChainIds": [1, 100],
"strategies": [
{
"name": "erc20-balance-of",
Expand Down
8 changes: 6 additions & 2 deletions src/strategies/delegate-registry-v2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const DEFAULT_BACKEND_URL = 'https://delegate-registry-backend.vercel.app';
type Params = {
backendUrl: string;
strategies: Strategy[];
delegationV1VChainIds?: number[]; // add this to include v1 delegations
};

/*
Expand Down Expand Up @@ -42,8 +43,11 @@ export async function strategy(
'Content-Type': 'application/json'
},
body: JSON.stringify({
addresses: addresses,
strategies: options.strategies
spaceParams: {
...options,
mainChainId: Number(network)
},
addresses
})
}
);
Expand Down

0 comments on commit 4da87d6

Please sign in to comment.