File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
integration-tests/subgraph-data-sources Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1- type Block @entity {
1+ type MirrorBlock @entity {
22 id : Bytes !
33 number : BigInt !
44 hash : Bytes !
Original file line number Diff line number Diff line change 11import { Entity , log } from '@graphprotocol/graph-ts' ;
2- import { Block } from '../generated/schema' ;
2+ import { MirrorBlock } from '../generated/schema' ;
33
44export function handleEntity ( blockEntity : Entity ) : void {
55 let blockNumber = blockEntity . getBigInt ( 'number' ) ;
66 let blockHash = blockEntity . getBytes ( 'hash' ) ;
77
88 log . info ( 'Block number: {}' , [ blockNumber . toString ( ) ] ) ;
99
10- let block = new Block ( blockHash ) ;
10+ let block = new MirrorBlock ( blockHash ) ;
1111 block . number = blockNumber ;
1212 block . hash = blockHash ;
1313 block . save ( ) ;
Original file line number Diff line number Diff line change @@ -521,7 +521,7 @@ async fn subgraph_data_sources(ctx: TestContext) -> anyhow::Result<()> {
521521 let subgraph = ctx. subgraph ;
522522 assert ! ( subgraph. healthy) ;
523523 let expected_response = json ! ( {
524- "blocks " : [
524+ "mirrorBlocks " : [
525525 { "number" : "0" } ,
526526 { "number" : "1" } ,
527527 { "number" : "2" } ,
@@ -538,7 +538,7 @@ async fn subgraph_data_sources(ctx: TestContext) -> anyhow::Result<()> {
538538 query_succeeds (
539539 "Blocks should be right" ,
540540 & subgraph,
541- "{ blocks (where: {number_lt: 10}, orderBy: number) { number } }" ,
541+ "{ mirrorBlocks (where: {number_lt: 10}, orderBy: number) { number } }" ,
542542 expected_response,
543543 )
544544 . await ?;
You can’t perform that action at this time.
0 commit comments