Skip to content

Commit

Permalink
Merge pull request #808 from nounsDAO/upgrade-graph-cli-fix-build
Browse files Browse the repository at this point in the history
subgraph: bump graph-cli version to fix tests failing
  • Loading branch information
solimander authored Oct 23, 2023
2 parents 30bcff8 + 2ccb3ad commit 31b2a95
Show file tree
Hide file tree
Showing 4 changed files with 132 additions and 137 deletions.
2 changes: 1 addition & 1 deletion packages/nouns-subgraph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"mustache": "mustache"
},
"devDependencies": {
"@graphprotocol/graph-cli": "0.47.1",
"@graphprotocol/graph-cli": "0.51.0",
"@graphprotocol/graph-ts": "0.31.0",
"mustache": "4.2.0",
"matchstick-as": "0.5.0"
Expand Down
9 changes: 4 additions & 5 deletions packages/nouns-subgraph/tests/nouns-dao-data.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,13 @@ describe('nouns-dao-data', () => {
)!;

const version = ProposalCandidateVersion.load(candidate.latestVersion);
const content = ProposalCandidateContent.load(version!.content);
assert.i32Equals(content!.contentSignatures.length, 1);
const content = ProposalCandidateContent.load(version!.content)!;
assert.i32Equals(content.contentSignatures.load().length, 1);
assert.stringEquals(
content!.contentSignatures[0],
content.contentSignatures.load()[0].id,
signerWithDelegate.toHexString().concat('-').concat(sig.toHexString()),
);

const signature = ProposalCandidateSignature.load(content!.contentSignatures[0])!;
const signature = ProposalCandidateSignature.load(content.contentSignatures.load()[0].id)!;
assert.stringEquals(signature.signer, signerWithDelegate.toHexString());
assert.bytesEquals(signature.sig, sig);
assert.bigIntEquals(signature.expirationTimestamp, expiry);
Expand Down
8 changes: 6 additions & 2 deletions packages/nouns-subgraph/tests/nouns-dao.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ describe('nouns-dao', () => {
delegate.delegatedVotesRaw = BIGINT_ONE;
delegate.save();

createMockedFunction(newMockEvent().address, 'adjustedTotalSupply', 'adjustedTotalSupply():(uint256)').returns([ethereum.Value.fromI32(0)])
createMockedFunction(
newMockEvent().address,
'adjustedTotalSupply',
'adjustedTotalSupply():(uint256)',
).returns([ethereum.Value.fromI32(0)]);
});

afterAll(() => {
Expand Down Expand Up @@ -742,7 +746,7 @@ describe('forking', () => {

const fork = getOrCreateFork(forkId);
assert.i32Equals(fork.tokensInEscrowCount, 2);
assert.i32Equals(fork.escrowedNouns.length, 2);
assert.i32Equals(fork.escrowedNouns.load().length, 2);

let escrowedNoun = EscrowedNoun.load(forkId.toString().concat('-4'))!;
let escrowDespositId = txHash.toHexString().concat('-0');
Expand Down
Loading

0 comments on commit 31b2a95

Please sign in to comment.