Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: snapshot-labs/snapshot-strategies
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: 0xleez/snapshot-strategies
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 14 commits
  • 2 files changed
  • 3 contributors

Commits on Dec 10, 2022

  1. jpegd-boosts

    0xleez committed Dec 10, 2022
    Copy the full SHA
    4f972fb View commit details
  2. rename

    0xleez committed Dec 10, 2022
    Copy the full SHA
    7383237 View commit details
  3. readme

    0xleez committed Dec 10, 2022
    Copy the full SHA
    3dd9abd View commit details
  4. Copy the full SHA
    b4596d3 View commit details

Commits on Dec 11, 2022

  1. Copy the full SHA
    1c1d04e View commit details

Commits on Dec 12, 2022

  1. query subgraph at blockNumber

    0xleez committed Dec 12, 2022
    Copy the full SHA
    4bdd5ef View commit details
  2. Copy the full SHA
    28fbf09 View commit details

Commits on Feb 13, 2023

  1. ignore new collections

    0xleez committed Feb 13, 2023
    Copy the full SHA
    817fd91 View commit details
  2. merge

    0xleez committed Feb 13, 2023
    Copy the full SHA
    634078b View commit details

Commits on Mar 13, 2023

  1. Copy the full SHA
    6838a6d View commit details

Commits on Mar 27, 2023

  1. Merge remote-tracking branch 'upstream/master'

    # Conflicts:
    #	src/strategies/jpegd-locked-jpeg-of/examples.json
    0xleez committed Mar 27, 2023
    Copy the full SHA
    577b1a1 View commit details
  2. Copy the full SHA
    59a45a6 View commit details
  3. Copy the full SHA
    86e8334 View commit details
  4. Update index.ts

    ChaituVR authored Mar 27, 2023
    Copy the full SHA
    67e6a07 View commit details
Showing with 21 additions and 42 deletions.
  1. +14 −29 src/strategies/jpegd-locked-jpeg-of/examples.json
  2. +7 −13 src/strategies/jpegd-locked-jpeg-of/index.ts
43 changes: 14 additions & 29 deletions src/strategies/jpegd-locked-jpeg-of/examples.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,16 @@
[
{
"name": "Example query",
"strategy": {
"name": "jpegd-locked-jpeg-of",
"params": {
"collectionToProviderAddress": {
"CRYPTOPUNKS": "0xdf7806eaa13497efffdb1541d6b0fdd1a9566fd0",
"ETHERROCKS": "0x9921da2908cc59b13ddbcf45e64bfa91c78c4249",
"BAYC": "0x5b9cAA47A52e4BfbBce2f2A9f858c2A501B48C42",
"MAYC": "0xdEd112453BD8EA88CdaB214CFD92Ab06E232E9d7",
"DOODLES": "0xdd245B7823ee82D14419CE072Ef815868F0D1f1A",
"PUDGYPENGUINS": "0xd0bf9A40FebDfCA596fde589a343C6cDA37A7B90",
"AZUKI": "0xcaA0aa80637262fd3Ba6DD5b5598a2BAFAc27cE8",
"CLONEX": "0xb36B65400E13FF57dFDa29bBb7dC79eaA7ecA14C",
"AUTOGLYPHS": "0xa74AbB04486f6926802cF6c3719c41b9ea10E49b",
"FIDENZAS": "0x1a6fA849D5bF62F9b7B83D125E77e15292c54b4f",
"RINGERS": "0x927318B867f0939Ab501dFd7b1B8d60E52ea5B59"
{
"name": "Example query",
"strategy": {
"name": "jpegd-locked-jpeg-of",
"params": {}
},
"start": 15363080
}
},
"network": "1",
"addresses": [
"0x9c5083dd4838e120dbeac44c052179692aa5dac5",
"0xB0dAfc466871c29662E5cbf4227322C96A8Ccbe9",
"0x0017dfe08bcc0dc9a323ca5d4831e371534e9320"
],
"snapshot": 16119881
}
]
"network": "1",
"addresses": [
"0x9c5083dd4838e120dbeac44c052179692aa5dac5",
"0xB0dAfc466871c29662E5cbf4227322C96A8Ccbe9",
"0x0017dfe08bcc0dc9a323ca5d4831e371534e9320"
],
"snapshot": 16119881
}
]
20 changes: 7 additions & 13 deletions src/strategies/jpegd-locked-jpeg-of/index.ts
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ import { multicall } from '../../utils';
import { subgraphRequest } from '../../utils';

export const author = '0xleez';
export const version = '0.1.0';
export const version = '0.1.1';

const SUBGRAPH_URL = {
'1': 'https://api.thegraph.com/subgraphs/name/jpegd/jpegd-core-mainnet'
@@ -25,8 +25,6 @@ export async function strategy(
) {
const blockTag = typeof snapshot === 'number' ? snapshot : 'latest';

const { collectionToProviderAddress } = options;

const params = {
jpeglocks: {
__args: {
@@ -36,7 +34,7 @@ export async function strategy(
block: blockTag != 'latest' ? { number: blockTag } : null
},
owner: { id: true },
collection: { id: true },
collection: { id: true, nftValueProviderAddress: true },
type: true,
nftIndex: true,
amount: true,
@@ -51,15 +49,11 @@ export async function strategy(
network,
provider,
abi,
jpegLocks
.filter((jpegLock) =>
Boolean(collectionToProviderAddress[jpegLock.collection.id])
)
.map((jpegLock: any) => [
collectionToProviderAddress[jpegLock.collection.id],
jpegLock.type === 'LTV' ? 'ltvBoostPositions' : 'traitBoostPositions',
[jpegLock.nftIndex]
]),
jpegLocks.map((jpegLock: any) => [
getAddress(jpegLock.collection.nftValueProviderAddress),
jpegLock.type === 'LTV' ? 'ltvBoostPositions' : 'traitBoostPositions',
[jpegLock.nftIndex]
]),
{ blockTag }
);