Code Monkey home page Code Monkey logo

pancake-subgraph's People

Contributors

chef-cannoli avatar chef-huan avatar chef-jojo avatar chef-yogi avatar chefjackson avatar chefkai avatar chefnyan avatar chefrabbid avatar dependabot[bot] avatar eltociear avatar schmidsi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pancake-subgraph's Issues

Bug Report: pairBase return data loss

hey,

I query the next subgraph command in your subgraph platform :

https://bsc.streamingfast.io/subgraphs/name/pancakeswap/exchange-v2

but
I got empty result :
{
"data": {
"token": {
"decimals": "9",
"id": "0xfb5b838b6cfeedc2873ab27866079ac55363d37e",
"name": "FLOKI",
"pairBase": [],
"symbol": "FLOKI"
}
}
}
and I am sure that my command works on other tokens .

the next is my query command :

{
  
   token (id: "0xfb5b838b6cfeedc2873ab27866079ac55363d37e" )   {
    id
    name
    symbol
    decimals
    
    pairBase{
      id
      name
      reserve0
      reserve1
      totalSupply
      token0 {
        id
        symbol
        decimals
      }
      token1 {
        id
        symbol
        decimals
      }
    }
         
      }
}

so whats happened ? its a bug ?

Timestamp problem

const epochSecond = Math.round(new Date().getTime() / 1000);
const firstBlock = await getBlockFromTimestamp(epochSecond - 86400);

image

This request return empty blocks, when i try to change timestamp to lower 1610541147 got 1 block.
Then what wrong with timestamp, how do i fix it? (I'm in GMT+7) Thank!


I was try getBlockFromTimestamp(epochSecond - 3* 86400); still empty response. Then what exactly for timestamp value?

Bug (Yarn Build)

Environment (Windows 10)

  • Apply migrations
    Skip migration: Bump mapping apiVersion from 0.0.1 to 0.0.2

  • Apply migrations
    Skip migration: Bump mapping apiVersion from 0.0.2 to 0.0.3

  • Apply migrations
    Skip migration: Bump mapping apiVersion from 0.0.3 to 0.0.4

  • Apply migrations
    Skip migration: Bump mapping apiVersion from 0.0.4 to 0.0.5

  • Apply migrations
    Skip migration: Bump mapping specVersion from 0.0.1 to 0.0.2

  • Apply migrations
    √ Apply migrations

  • Load subgraph from subgraph.yaml
    √ Load subgraph from subgraph.yaml

  • Compile subgraph
    Compile data source: Factory => build\Factory\Factory.wasm

  • Compile subgraph
    WARNING AS226: Expression resolves to unusual type 'usize'.

    let decimalValue = null;
    ~~~~
    in mappings/utils/index.ts(78,22)

    Compile data source template: Pair => build\templates\Pair\Pair.wasm

  • Compile subgraph
    ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

    pair.totalSupply = pair.totalSupply.plus(value);
    ~~~~
    in mappings/core.ts(49,24)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

 pair.totalSupply = pair.totalSupply.plus(value);
 ~~~~

in mappings/core.ts(49,5)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

 pair.save();
 ~~~~

in mappings/core.ts(50,5)

ERROR TS2322: Type '~lib/array/Array<~lib/string/String> | null' is not assignable to type '~lib/array/Array<~lib/string/String>'.

 if (mints.length === 0 || isCompleteMint(mints[mints.length - 1])) {
     ~~~~~

in mappings/core.ts(53,9)

ERROR TS2322: Type '~lib/array/Array<~lib/string/String> | null' is not assignable to type '~lib/array/Array<~lib/string/String>'.

 if (mints.length === 0 || isCompleteMint(mints[mints.length - 1])) {
                                          ~~~~~

in mappings/core.ts(53,46)

ERROR TS2322: Type '~lib/array/Array<~lib/string/String> | null' is not assignable to type '~lib/array/Array<~lib/string/String>'.

 if (mints.length === 0 || isCompleteMint(mints[mints.length - 1])) {
                                                ~~~~~

in mappings/core.ts(53,52)

ERROR TS2322: Type 'generated/schema/Mint | null' is not assignable to type 'generated/schema/Mint'.

return MintEvent.load(mintId).sender !== null; // sufficient checks
~~~~~~~~~~~~~~~~~~~~~~
in mappings/core.ts(19,10)

ERROR TS2322: Type '~lib/array/Array<~lib/string/String> | null' is not assignable to type '~lib/array/Array<~lib/string/String>'.

     event.transaction.hash.toHex().concat("-").concat(BigInt.fromI32(mints.length).toString())
                                                                      ~~~~~

in mappings/core.ts(55,74)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

   mint.pair = pair.id;
               ~~~~

in mappings/core.ts(58,19)

ERROR TS2322: Type '~lib/array/Array<~lib/string/String> | null' is not assignable to type '~lib/array/Array<~lib/string/String>'.

   transaction.mints = mints.concat([mint.id]);
                       ~~~~~

in mappings/core.ts(66,27)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

if (event.params.to.toHex() == pair.id) {
~~~~
in mappings/core.ts(74,34)

ERROR TS2322: Type '~lib/array/Array<~lib/string/String> | null' is not assignable to type '~lib/array/Array<~lib/string/String>'.

   event.transaction.hash.toHex().concat("-").concat(BigInt.fromI32(burns.length).toString())
                                                                    ~~~~~

in mappings/core.ts(77,72)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

 burn.pair = pair.id;
             ~~~~

in mappings/core.ts(80,17)

ERROR TS2322: Type '~lib/array/Array<~lib/string/String> | null' is not assignable to type '~lib/array/Array<~lib/string/String>'.

 burns.push(burn.id);
 ~~~~~

in mappings/core.ts(91,5)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

if (event.params.to.toHex() == ADDRESS_ZERO && event.params.from.toHex() == pair.id) {
~~~~
in mappings/core.ts(97,79)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

 pair.totalSupply = pair.totalSupply.minus(value);
                    ~~~~

in mappings/core.ts(98,24)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

 pair.totalSupply = pair.totalSupply.minus(value);
 ~~~~

in mappings/core.ts(98,5)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

 pair.save();
 ~~~~

in mappings/core.ts(99,5)

ERROR TS2322: Type '~lib/array/Array<~lib/string/String> | null' is not assignable to type '~lib/array/Array<~lib/string/String>'.

 if (burns.length > 0) {
     ~~~~~

in mappings/core.ts(104,9)

ERROR TS2322: Type '~lib/array/Array<~lib/string/String> | null' is not assignable to type '~lib/array/Array<~lib/string/String>'.

   let currentBurn = BurnEvent.load(burns[burns.length - 1]);
                                    ~~~~~

in mappings/core.ts(105,40)

ERROR TS2322: Type '~lib/array/Array<~lib/string/String> | null' is not assignable to type '~lib/array/Array<~lib/string/String>'.

   let currentBurn = BurnEvent.load(burns[burns.length - 1]);
                                          ~~~~~

in mappings/core.ts(105,46)

ERROR TS2322: Type 'generated/schema/Burn | null' is not assignable to type 'generated/schema/Burn'.

   if (currentBurn.needsComplete) {
       ~~~~~~~~~~~

in mappings/core.ts(106,11)

ERROR TS2322: Type '~lib/array/Array<~lib/string/String> | null' is not assignable to type '~lib/array/Array<~lib/string/String>'.

       event.transaction.hash.toHex().concat("-").concat(BigInt.fromI32(burns.length).toString())
                                                                        ~~~~~

in mappings/core.ts(110,76)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

     burn.pair = pair.id;
                 ~~~~

in mappings/core.ts(114,21)

ERROR TS2322: Type '~lib/array/Array<~lib/string/String> | null' is not assignable to type '~lib/array/Array<~lib/string/String>'.

   burn = new BurnEvent(event.transaction.hash.toHex().concat("-").concat(BigInt.fromI32(burns.length).toString()));
                                                                                         ~~~~~

in mappings/core.ts(120,93)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

   burn.pair = pair.id;
               ~~~~

in mappings/core.ts(123,19)

ERROR TS2322: Type '~lib/array/Array<~lib/string/String> | null' is not assignable to type '~lib/array/Array<~lib/string/String>'.

 if (mints.length !== 0 && !isCompleteMint(mints[mints.length - 1])) {
     ~~~~~

in mappings/core.ts(130,9)

ERROR TS2322: Type '~lib/array/Array<~lib/string/String> | null' is not assignable to type '~lib/array/Array<~lib/string/String>'.

 if (mints.length !== 0 && !isCompleteMint(mints[mints.length - 1])) {
                                           ~~~~~

in mappings/core.ts(130,47)

ERROR TS2322: Type '~lib/array/Array<~lib/string/String> | null' is not assignable to type '~lib/array/Array<~lib/string/String>'.

 if (mints.length !== 0 && !isCompleteMint(mints[mints.length - 1])) {
                                                 ~~~~~

in mappings/core.ts(130,53)

ERROR TS2322: Type '~lib/array/Array<~lib/string/String> | null' is not assignable to type '~lib/array/Array<~lib/string/String>'.

   let mint = MintEvent.load(mints[mints.length - 1]);
                             ~~~~~

in mappings/core.ts(131,33)

ERROR TS2322: Type '~lib/array/Array<~lib/string/String> | null' is not assignable to type '~lib/array/Array<~lib/string/String>'.

   let mint = MintEvent.load(mints[mints.length - 1]);
                                   ~~~~~

in mappings/core.ts(131,39)

ERROR TS2322: Type 'generated/schema/Mint | null' is not assignable to type 'generated/schema/Mint'.

   burn.feeTo = mint.to;
                ~~~~

in mappings/core.ts(132,20)

ERROR TS2322: Type 'generated/schema/Mint | null' is not assignable to type 'generated/schema/Mint'.

   burn.feeLiquidity = mint.liquidity;
                       ~~~~

in mappings/core.ts(133,27)

ERROR TS2322: Type '~lib/array/Array<~lib/string/String> | null' is not assignable to type '~lib/array/Array<~lib/string/String>'.

   store.remove("Mint", mints[mints.length - 1]);
                        ~~~~~

in mappings/core.ts(135,28)

ERROR TS2322: Type '~lib/array/Array<~lib/string/String> | null' is not assignable to type '~lib/array/Array<~lib/string/String>'.

   store.remove("Mint", mints[mints.length - 1]);
                              ~~~~~

in mappings/core.ts(135,34)

ERROR TS2322: Type '~lib/array/Array<~lib/string/String> | null' is not assignable to type '~lib/array/Array<~lib/string/String>'.

   mints.pop();
   ~~~~~

in mappings/core.ts(140,7)

ERROR TS2322: Type '~lib/array/Array<~lib/string/String> | null' is not assignable to type '~lib/array/Array<~lib/string/String>'.

   burns[burns.length - 1] = burn.id;
   ~~~~~

in mappings/core.ts(149,7)

ERROR TS2322: Type '~lib/array/Array<~lib/string/String> | null' is not assignable to type '~lib/array/Array<~lib/string/String>'.

   burns[burns.length - 1] = burn.id;
         ~~~~~

in mappings/core.ts(149,13)

ERROR TS2322: Type '~lib/array/Array<~lib/string/String> | null' is not assignable to type '~lib/array/Array<~lib/string/String>'.

   burns.push(burn.id);
   ~~~~~

in mappings/core.ts(155,7)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

let token0 = Token.load(pair.token0);
~~~~
in mappings/core.ts(166,27)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

let token1 = Token.load(pair.token1);
~~~~
in mappings/core.ts(167,27)

ERROR TS2322: Type 'generated/schema/PancakeFactory | null' is not assignable to type 'generated/schema/PancakeFactory'.

pancake.totalLiquidityBNB = pancake.totalLiquidityBNB.minus(pair.trackedReserveBNB as BigDecimal);
~~~~~~~
in mappings/core.ts(171,31)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pancake.totalLiquidityBNB = pancake.totalLiquidityBNB.minus(pair.trackedReserveBNB as BigDecimal);
~~~~
in mappings/core.ts(171,63)

ERROR TS2322: Type 'generated/schema/PancakeFactory | null' is not assignable to type 'generated/schema/PancakeFactory'.

pancake.totalLiquidityBNB = pancake.totalLiquidityBNB.minus(pair.trackedReserveBNB as BigDecimal);

in mappings/core.ts(171,3)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token0.totalLiquidity = token0.totalLiquidity.minus(pair.reserve0);
                        ~~~~~~
in mappings/core.ts(174,27)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

token0.totalLiquidity = token0.totalLiquidity.minus(pair.reserve0);
                                                    ~~~~
in mappings/core.ts(174,55)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token0.totalLiquidity = token0.totalLiquidity.minus(pair.reserve0);
~~~~~~
in mappings/core.ts(174,3)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token1.totalLiquidity = token1.totalLiquidity.minus(pair.reserve1);
                        ~~~~~~
in mappings/core.ts(175,27)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

token1.totalLiquidity = token1.totalLiquidity.minus(pair.reserve1);
                                                    ~~~~
in mappings/core.ts(175,55)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token1.totalLiquidity = token1.totalLiquidity.minus(pair.reserve1);
~~~~~~
in mappings/core.ts(175,3)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

pair.reserve0 = convertTokenToDecimal(event.params.reserve0, token0.decimals);
                                                             ~~~~~~
in mappings/core.ts(177,64)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pair.reserve0 = convertTokenToDecimal(event.params.reserve0, token0.decimals);
~~~~
in mappings/core.ts(177,3)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

pair.reserve1 = convertTokenToDecimal(event.params.reserve1, token1.decimals);
                                                             ~~~~~~
in mappings/core.ts(178,64)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pair.reserve1 = convertTokenToDecimal(event.params.reserve1, token1.decimals);
~~~~
in mappings/core.ts(178,3)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

if (pair.reserve1.notEqual(ZERO_BD)) pair.token0Price = pair.reserve0.div(pair.reserve1);
    ~~~~
in mappings/core.ts(180,7)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

if (pair.reserve1.notEqual(ZERO_BD)) pair.token0Price = pair.reserve0.div(pair.reserve1);
                                                        ~~~~
in mappings/core.ts(180,59)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

if (pair.reserve1.notEqual(ZERO_BD)) pair.token0Price = pair.reserve0.div(pair.reserve1);
                                                                          ~~~~
in mappings/core.ts(180,77)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

if (pair.reserve1.notEqual(ZERO_BD)) pair.token0Price = pair.reserve0.div(pair.reserve1);
                                     ~~~~
in mappings/core.ts(180,40)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

else pair.token0Price = ZERO_BD;
     ~~~~
in mappings/core.ts(181,8)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

if (pair.reserve0.notEqual(ZERO_BD)) pair.token1Price = pair.reserve1.div(pair.reserve0);
    ~~~~
in mappings/core.ts(182,7)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

if (pair.reserve0.notEqual(ZERO_BD)) pair.token1Price = pair.reserve1.div(pair.reserve0);
                                                        ~~~~
in mappings/core.ts(182,59)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

if (pair.reserve0.notEqual(ZERO_BD)) pair.token1Price = pair.reserve1.div(pair.reserve0);
                                                                          ~~~~
in mappings/core.ts(182,77)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

if (pair.reserve0.notEqual(ZERO_BD)) pair.token1Price = pair.reserve1.div(pair.reserve0);
                                     ~~~~
in mappings/core.ts(182,40)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

else pair.token1Price = ZERO_BD;
     ~~~~
in mappings/core.ts(183,8)

ERROR TS2322: Type 'generated/schema/Bundle | null' is not assignable to type 'generated/schema/Bundle'.

bundle.bnbPrice = getBnbPriceInUSD();
~~~~~~
in mappings/core.ts(186,3)

ERROR TS2322: Type 'generated/schema/Bundle | null' is not assignable to type 'generated/schema/Bundle'.

bundle.save();
~~~~~~
in mappings/core.ts(187,3)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

    if (pair.token0 == token.id && pair.reserveBNB.gt(MINIMUM_LIQUIDITY_THRESHOLD_BNB)) {
        ~~~~
in mappings/pricing.ts(60,11)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

    if (pair.token0 == token.id && pair.reserveBNB.gt(MINIMUM_LIQUIDITY_THRESHOLD_BNB)) {
                                   ~~~~
in mappings/pricing.ts(60,38)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

      let token1 = Token.load(pair.token1);
                              ~~~~
in mappings/pricing.ts(61,33)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

      return pair.token1Price.times(token1.derivedBNB as BigDecimal); // return token1 per our token * BNB per token 1
             ~~~~
in mappings/pricing.ts(62,16)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

      return pair.token1Price.times(token1.derivedBNB as BigDecimal); // return token1 per our token * BNB per token 1
                                    ~~~~~~
in mappings/pricing.ts(62,39)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

    if (pair.token1 == token.id && pair.reserveBNB.gt(MINIMUM_LIQUIDITY_THRESHOLD_BNB)) {
        ~~~~
in mappings/pricing.ts(64,11)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

    if (pair.token1 == token.id && pair.reserveBNB.gt(MINIMUM_LIQUIDITY_THRESHOLD_BNB)) {
                                   ~~~~
in mappings/pricing.ts(64,38)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

      let token0 = Token.load(pair.token0);
                              ~~~~
in mappings/pricing.ts(65,33)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

      return pair.token0Price.times(token0.derivedBNB as BigDecimal); // return token0 per our token * BNB per token 0
             ~~~~
in mappings/pricing.ts(66,16)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

      return pair.token0Price.times(token0.derivedBNB as BigDecimal); // return token0 per our token * BNB per token 0
                                    ~~~~~~
in mappings/pricing.ts(66,39)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token0.derivedBNB = t0DerivedBNB;
~~~~~~
in mappings/core.ts(190,3)

ERROR TS2322: Type 'generated/schema/Bundle | null' is not assignable to type 'generated/schema/Bundle'.

token0.derivedUSD = t0DerivedBNB.times(bundle.bnbPrice);
                                       ~~~~~~
in mappings/core.ts(191,42)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token0.derivedUSD = t0DerivedBNB.times(bundle.bnbPrice);
~~~~~~
in mappings/core.ts(191,3)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token0.save();
~~~~~~
in mappings/core.ts(192,3)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token1.derivedBNB = t1DerivedBNB;
~~~~~~
in mappings/core.ts(195,3)

ERROR TS2322: Type 'generated/schema/Bundle | null' is not assignable to type 'generated/schema/Bundle'.

token1.derivedUSD = t1DerivedBNB.times(bundle.bnbPrice);
                                       ~~~~~~
in mappings/core.ts(196,42)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token1.derivedUSD = t1DerivedBNB.times(bundle.bnbPrice);
~~~~~~
in mappings/core.ts(196,3)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token1.save();
~~~~~~
in mappings/core.ts(197,3)

ERROR TS2322: Type 'generated/schema/Bundle | null' is not assignable to type 'generated/schema/Bundle'.

if (bundle.bnbPrice.notEqual(ZERO_BD)) {
    ~~~~~~
in mappings/core.ts(201,7)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

    pair.reserve0,
    ~~~~
in mappings/core.ts(204,7)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

    pair.reserve1,
    ~~~~
in mappings/core.ts(206,7)

ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigDecimal | null' is not assignable to type '~lib/@graphprotocol/graph-ts/common/numbers/BigDecimal'.

let price0 = token0.derivedBNB.times(bundle.bnbPrice);
             ~~~~~~~~~~~~~~~~~
in mappings/pricing.ts(121,16)

ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigDecimal | null' is not assignable to type '~lib/@graphprotocol/graph-ts/common/numbers/BigDecimal'.

let price1 = token1.derivedBNB.times(bundle.bnbPrice);
             ~~~~~~~~~~~~~~~~~
in mappings/pricing.ts(122,16)

ERROR TS2322: Type 'generated/schema/Bundle | null' is not assignable to type 'generated/schema/Bundle'.

  ).div(bundle.bnbPrice);
        ~~~~~~
in mappings/core.ts(208,11)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pair.trackedReserveBNB = trackedLiquidityBNB;
~~~~
in mappings/core.ts(214,3)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pair.reserveBNB = pair.reserve0
                  ~~~~
in mappings/core.ts(215,21)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

  .times(token0.derivedBNB as BigDecimal)
         ~~~~~~
in mappings/core.ts(216,12)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

  .plus(pair.reserve1.times(token1.derivedBNB as BigDecimal));
        ~~~~
in mappings/core.ts(217,11)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

  .plus(pair.reserve1.times(token1.derivedBNB as BigDecimal));
                            ~~~~~~
in mappings/core.ts(217,31)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pair.reserveBNB = pair.reserve0
~~~~
in mappings/core.ts(215,3)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pair.reserveUSD = pair.reserveBNB.times(bundle.bnbPrice);
                  ~~~~
in mappings/core.ts(218,21)

ERROR TS2322: Type 'generated/schema/Bundle | null' is not assignable to type 'generated/schema/Bundle'.

pair.reserveUSD = pair.reserveBNB.times(bundle.bnbPrice);
                                        ~~~~~~
in mappings/core.ts(218,43)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pair.reserveUSD = pair.reserveBNB.times(bundle.bnbPrice);
~~~~
in mappings/core.ts(218,3)

ERROR TS2322: Type 'generated/schema/PancakeFactory | null' is not assignable to type 'generated/schema/PancakeFactory'.

pancake.totalLiquidityBNB = pancake.totalLiquidityBNB.plus(trackedLiquidityBNB);
                            ~~~~~~~
in mappings/core.ts(221,31)

ERROR TS2322: Type 'generated/schema/PancakeFactory | null' is not assignable to type 'generated/schema/PancakeFactory'.

pancake.totalLiquidityBNB = pancake.totalLiquidityBNB.plus(trackedLiquidityBNB);

in mappings/core.ts(221,3)

ERROR TS2322: Type 'generated/schema/PancakeFactory | null' is not assignable to type 'generated/schema/PancakeFactory'.

pancake.totalLiquidityUSD = pancake.totalLiquidityBNB.times(bundle.bnbPrice);
~~~~~~~
in mappings/core.ts(222,31)

ERROR TS2322: Type 'generated/schema/Bundle | null' is not assignable to type 'generated/schema/Bundle'.

pancake.totalLiquidityUSD = pancake.totalLiquidityBNB.times(bundle.bnbPrice);
~~~~~~
in mappings/core.ts(222,63)

ERROR TS2322: Type 'generated/schema/PancakeFactory | null' is not assignable to type 'generated/schema/PancakeFactory'.

pancake.totalLiquidityUSD = pancake.totalLiquidityBNB.times(bundle.bnbPrice);

in mappings/core.ts(222,3)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token0.totalLiquidity = token0.totalLiquidity.plus(pair.reserve0);
                        ~~~~~~
in mappings/core.ts(225,27)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

token0.totalLiquidity = token0.totalLiquidity.plus(pair.reserve0);
                                                   ~~~~
in mappings/core.ts(225,54)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token0.totalLiquidity = token0.totalLiquidity.plus(pair.reserve0);
~~~~~~
in mappings/core.ts(225,3)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token1.totalLiquidity = token1.totalLiquidity.plus(pair.reserve1);
                        ~~~~~~
in mappings/core.ts(226,27)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

token1.totalLiquidity = token1.totalLiquidity.plus(pair.reserve1);
                                                   ~~~~
in mappings/core.ts(226,54)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token1.totalLiquidity = token1.totalLiquidity.plus(pair.reserve1);
~~~~~~
in mappings/core.ts(226,3)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pair.save();
~~~~
in mappings/core.ts(229,3)

ERROR TS2322: Type 'generated/schema/PancakeFactory | null' is not assignable to type 'generated/schema/PancakeFactory'.

pancake.save();

in mappings/core.ts(230,3)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token0.save();

in mappings/core.ts(231,3)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token1.save();

in mappings/core.ts(232,3)

ERROR TS2322: Type 'generated/schema/Transaction | null' is not assignable to type 'generated/schema/Transaction'.

let mints = transaction.mints;
~~~~~~~~~~~
in mappings/core.ts(237,15)

ERROR TS2322: Type '~lib/array/Array<~lib/string/String> | null' is not assignable to type '~lib/array/Array<~lib/string/String>'.

let mint = MintEvent.load(mints[mints.length - 1]);
~~~~~
in mappings/core.ts(238,29)

ERROR TS2322: Type '~lib/array/Array<~lib/string/String> | null' is not assignable to type '~lib/array/Array<~lib/string/String>'.

let mint = MintEvent.load(mints[mints.length - 1]);
~~~~~
in mappings/core.ts(238,35)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

let token0 = Token.load(pair.token0);
~~~~
in mappings/core.ts(243,27)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

let token1 = Token.load(pair.token1);
~~~~
in mappings/core.ts(244,27)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

let token0Amount = convertTokenToDecimal(event.params.amount0, token0.decimals);
~~~~~~
in mappings/core.ts(247,66)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

let token1Amount = convertTokenToDecimal(event.params.amount1, token1.decimals);
~~~~~~
in mappings/core.ts(248,66)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token0.totalTransactions = token0.totalTransactions.plus(ONE_BI);
~~~~~~
in mappings/core.ts(251,30)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token0.totalTransactions = token0.totalTransactions.plus(ONE_BI);

in mappings/core.ts(251,3)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token1.totalTransactions = token1.totalTransactions.plus(ONE_BI);
                           ~~~~~~
in mappings/core.ts(252,30)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token1.totalTransactions = token1.totalTransactions.plus(ONE_BI);

in mappings/core.ts(252,3)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

let amountTotalUSD = token1.derivedBNB
~~~~~~
in mappings/core.ts(256,24)

ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigDecimal | null' is not assignable to type '~lib/@graphprotocol/graph-ts/common/numbers/BigDecimal'.

let amountTotalUSD = token1.derivedBNB
~~~~~~~~~~~~~~~~~
in mappings/core.ts(256,24)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

 .plus(token0.derivedBNB.times(token0Amount))
       ~~~~~~

in mappings/core.ts(258,11)

ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigDecimal | null' is not assignable to type '~lib/@graphprotocol/graph-ts/common/numbers/BigDecimal'.

 .plus(token0.derivedBNB.times(token0Amount))
       ~~~~~~~~~~~~~~~~~

in mappings/core.ts(258,11)

ERROR TS2322: Type 'generated/schema/Bundle | null' is not assignable to type 'generated/schema/Bundle'.

 .times(bundle.bnbPrice);
        ~~~~~~

in mappings/core.ts(259,12)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pair.totalTransactions = pair.totalTransactions.plus(ONE_BI);
~~~~
in mappings/core.ts(262,28)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pair.totalTransactions = pair.totalTransactions.plus(ONE_BI);

in mappings/core.ts(262,3)

ERROR TS2322: Type 'generated/schema/PancakeFactory | null' is not assignable to type 'generated/schema/PancakeFactory'.

pancake.totalTransactions = pancake.totalTransactions.plus(ONE_BI);
                            ~~~~~~~
in mappings/core.ts(263,31)

ERROR TS2322: Type 'generated/schema/PancakeFactory | null' is not assignable to type 'generated/schema/PancakeFactory'.

pancake.totalTransactions = pancake.totalTransactions.plus(ONE_BI);

in mappings/core.ts(263,3)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token0.save();

in mappings/core.ts(266,3)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token1.save();

in mappings/core.ts(267,3)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pair.save();

in mappings/core.ts(268,3)

ERROR TS2322: Type 'generated/schema/PancakeFactory | null' is not assignable to type 'generated/schema/PancakeFactory'.

pancake.save();

in mappings/core.ts(269,3)

ERROR TS2322: Type 'generated/schema/Mint | null' is not assignable to type 'generated/schema/Mint'.

mint.sender = event.params.sender;

in mappings/core.ts(271,3)

ERROR TS2322: Type 'generated/schema/Mint | null' is not assignable to type 'generated/schema/Mint'.

mint.amount0 = token0Amount as BigDecimal;

in mappings/core.ts(272,3)

ERROR TS2322: Type 'generated/schema/Mint | null' is not assignable to type 'generated/schema/Mint'.

mint.amount1 = token1Amount as BigDecimal;

in mappings/core.ts(273,3)

ERROR TS2322: Type 'generated/schema/Mint | null' is not assignable to type 'generated/schema/Mint'.

mint.logIndex = event.logIndex;

in mappings/core.ts(274,3)

ERROR TS2322: Type 'generated/schema/Mint | null' is not assignable to type 'generated/schema/Mint'.

mint.amountUSD = amountTotalUSD as BigDecimal;

in mappings/core.ts(275,3)

ERROR TS2322: Type 'generated/schema/Mint | null' is not assignable to type 'generated/schema/Mint'.

mint.save();

in mappings/core.ts(276,3)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

 pairDayData.token0 = pair.token0;
                      ~~~~

in mappings/dayUpdates.ts(41,26)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

 pairDayData.token1 = pair.token1;
                      ~~~~

in mappings/dayUpdates.ts(42,26)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pairDayData.totalSupply = pair.totalSupply;
~~~~
in mappings/dayUpdates.ts(49,29)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pairDayData.reserve0 = pair.reserve0;
~~~~
in mappings/dayUpdates.ts(50,26)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pairDayData.reserve1 = pair.reserve1;
~~~~
in mappings/dayUpdates.ts(51,26)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pairDayData.reserveUSD = pair.reserveUSD;
~~~~
in mappings/dayUpdates.ts(52,28)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pairHourData.totalSupply = pair.totalSupply;
~~~~
in mappings/dayUpdates.ts(75,30)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pairHourData.reserve0 = pair.reserve0;
~~~~
in mappings/dayUpdates.ts(76,27)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pairHourData.reserve1 = pair.reserve1;
~~~~
in mappings/dayUpdates.ts(77,27)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pairHourData.reserveUSD = pair.reserveUSD;
~~~~
in mappings/dayUpdates.ts(78,29)

ERROR TS2322: Type 'generated/schema/PancakeFactory | null' is not assignable to type 'generated/schema/PancakeFactory'.

pancakeDayData.totalLiquidityUSD = pancake.totalLiquidityUSD;
~~~~~~~
in mappings/dayUpdates.ts(23,38)

ERROR TS2322: Type 'generated/schema/PancakeFactory | null' is not assignable to type 'generated/schema/PancakeFactory'.

pancakeDayData.totalLiquidityBNB = pancake.totalLiquidityBNB;
~~~~~~~
in mappings/dayUpdates.ts(24,38)

ERROR TS2322: Type 'generated/schema/PancakeFactory | null' is not assignable to type 'generated/schema/PancakeFactory'.

pancakeDayData.totalTransactions = pancake.totalTransactions;
~~~~~~~
in mappings/dayUpdates.ts(25,38)

ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigDecimal | null' is not assignable to type '~lib/@graphprotocol/graph-ts/common/numbers/BigDecimal'.

 tokenDayData.priceUSD = token.derivedBNB.times(bundle.bnbPrice);
                         ~~~~~~~~~~~~~~~~

in mappings/dayUpdates.ts(97,29)

ERROR TS2322: Type 'generated/schema/Bundle | null' is not assignable to type 'generated/schema/Bundle'.

 tokenDayData.priceUSD = token.derivedBNB.times(bundle.bnbPrice);
                                                ~~~~~~

in mappings/dayUpdates.ts(97,52)

ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigDecimal | null' is not assignable to type '~lib/@graphprotocol/graph-ts/common/numbers/BigDecimal'.

tokenDayData.priceUSD = token.derivedBNB.times(bundle.bnbPrice);
~~~~~~~~~~~~~~~~
in mappings/dayUpdates.ts(104,27)

ERROR TS2322: Type 'generated/schema/Bundle | null' is not assignable to type 'generated/schema/Bundle'.

tokenDayData.priceUSD = token.derivedBNB.times(bundle.bnbPrice);
~~~~~~
in mappings/dayUpdates.ts(104,50)

ERROR TS2322: Type 'generated/schema/Bundle | null' is not assignable to type 'generated/schema/Bundle'.

tokenDayData.totalLiquidityUSD = tokenDayData.totalLiquidityBNB.times(bundle.bnbPrice);
~~~~~~
in mappings/dayUpdates.ts(107,73)

ERROR TS2322: Type '~lib/array/Array<~lib/string/String> | null' is not assignable to type '~lib/array/Array<~lib/string/String>'.

let burn = BurnEvent.load(burns[burns.length - 1]);
~~~~~
in mappings/core.ts(292,29)

ERROR TS2322: Type '~lib/array/Array<~lib/string/String> | null' is not assignable to type '~lib/array/Array<~lib/string/String>'.

let burn = BurnEvent.load(burns[burns.length - 1]);
~~~~~
in mappings/core.ts(292,35)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

let token0 = Token.load(pair.token0);
~~~~
in mappings/core.ts(298,27)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

let token1 = Token.load(pair.token1);
~~~~
in mappings/core.ts(299,27)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

let token0Amount = convertTokenToDecimal(event.params.amount0, token0.decimals);
~~~~~~
in mappings/core.ts(300,66)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

let token1Amount = convertTokenToDecimal(event.params.amount1, token1.decimals);
~~~~~~
in mappings/core.ts(301,66)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token0.totalTransactions = token0.totalTransactions.plus(ONE_BI);
~~~~~~
in mappings/core.ts(304,30)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token0.totalTransactions = token0.totalTransactions.plus(ONE_BI);

in mappings/core.ts(304,3)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token1.totalTransactions = token1.totalTransactions.plus(ONE_BI);
                           ~~~~~~
in mappings/core.ts(305,30)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token1.totalTransactions = token1.totalTransactions.plus(ONE_BI);

in mappings/core.ts(305,3)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

let amountTotalUSD = token1.derivedBNB
~~~~~~
in mappings/core.ts(309,24)

ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigDecimal | null' is not assignable to type '~lib/@graphprotocol/graph-ts/common/numbers/BigDecimal'.

let amountTotalUSD = token1.derivedBNB
~~~~~~~~~~~~~~~~~
in mappings/core.ts(309,24)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

 .plus(token0.derivedBNB.times(token0Amount))
       ~~~~~~

in mappings/core.ts(311,11)

ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigDecimal | null' is not assignable to type '~lib/@graphprotocol/graph-ts/common/numbers/BigDecimal'.

 .plus(token0.derivedBNB.times(token0Amount))
       ~~~~~~~~~~~~~~~~~

in mappings/core.ts(311,11)

ERROR TS2322: Type 'generated/schema/Bundle | null' is not assignable to type 'generated/schema/Bundle'.

 .times(bundle.bnbPrice);
        ~~~~~~

in mappings/core.ts(312,12)

ERROR TS2322: Type 'generated/schema/PancakeFactory | null' is not assignable to type 'generated/schema/PancakeFactory'.

pancake.totalTransactions = pancake.totalTransactions.plus(ONE_BI);
~~~~~~~
in mappings/core.ts(315,31)

ERROR TS2322: Type 'generated/schema/PancakeFactory | null' is not assignable to type 'generated/schema/PancakeFactory'.

pancake.totalTransactions = pancake.totalTransactions.plus(ONE_BI);

in mappings/core.ts(315,3)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pair.totalTransactions = pair.totalTransactions.plus(ONE_BI);
                         ~~~~
in mappings/core.ts(316,28)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pair.totalTransactions = pair.totalTransactions.plus(ONE_BI);
~~~~
in mappings/core.ts(316,3)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token0.save();
~~~~~~
in mappings/core.ts(319,3)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token1.save();
~~~~~~
in mappings/core.ts(320,3)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pair.save();
~~~~
in mappings/core.ts(321,3)

ERROR TS2322: Type 'generated/schema/PancakeFactory | null' is not assignable to type 'generated/schema/PancakeFactory'.

pancake.save();

in mappings/core.ts(322,3)

ERROR TS2322: Type 'generated/schema/Burn | null' is not assignable to type 'generated/schema/Burn'.

burn.amount0 = token0Amount as BigDecimal;

in mappings/core.ts(326,3)

ERROR TS2322: Type 'generated/schema/Burn | null' is not assignable to type 'generated/schema/Burn'.

burn.amount1 = token1Amount as BigDecimal;

in mappings/core.ts(327,3)

ERROR TS2322: Type 'generated/schema/Burn | null' is not assignable to type 'generated/schema/Burn'.

burn.logIndex = event.logIndex;

in mappings/core.ts(329,3)

ERROR TS2322: Type 'generated/schema/Burn | null' is not assignable to type 'generated/schema/Burn'.

burn.amountUSD = amountTotalUSD as BigDecimal;

in mappings/core.ts(330,3)

ERROR TS2322: Type 'generated/schema/Burn | null' is not assignable to type 'generated/schema/Burn'.

burn.save();

in mappings/core.ts(331,3)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

let token0 = Token.load(pair.token0);
                        ~~~~
in mappings/core.ts(342,27)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

let token1 = Token.load(pair.token1);
                        ~~~~
in mappings/core.ts(343,27)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

let amount0In = convertTokenToDecimal(event.params.amount0In, token0.decimals);
                                                              ~~~~~~
in mappings/core.ts(344,65)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

let amount1In = convertTokenToDecimal(event.params.amount1In, token1.decimals);
                                                              ~~~~~~
in mappings/core.ts(345,65)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

let amount0Out = convertTokenToDecimal(event.params.amount0Out, token0.decimals);
                                                                ~~~~~~
in mappings/core.ts(346,67)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

let amount1Out = convertTokenToDecimal(event.params.amount1Out, token1.decimals);
                                                                ~~~~~~
in mappings/core.ts(347,67)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

let derivedAmountBNB = token1.derivedBNB
                       ~~~~~~
in mappings/core.ts(357,26)

ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigDecimal | null' is not assignable to type '~lib/@graphprotocol/graph-ts/common/numbers/BigDecimal'.

let derivedAmountBNB = token1.derivedBNB
                       ~~~~~~~~~~~~~~~~~
in mappings/core.ts(357,26)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

  .plus(token0.derivedBNB.times(amount0Total))
        ~~~~~~
in mappings/core.ts(359,11)

ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigDecimal | null' is not assignable to type '~lib/@graphprotocol/graph-ts/common/numbers/BigDecimal'.

  .plus(token0.derivedBNB.times(amount0Total))
        ~~~~~~~~~~~~~~~~~
in mappings/core.ts(359,11)

ERROR TS2322: Type 'generated/schema/Bundle | null' is not assignable to type 'generated/schema/Bundle'.

let derivedAmountUSD = derivedAmountBNB.times(bundle.bnbPrice);
                                              ~~~~~~
in mappings/core.ts(361,49)

ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigDecimal | null' is not assignable to type '~lib/@graphprotocol/graph-ts/common/numbers/BigDecimal'.

let price0 = token0.derivedBNB.times(bundle.bnbPrice);
             ~~~~~~~~~~~~~~~~~
in mappings/pricing.ts(86,16)

ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigDecimal | null' is not assignable to type '~lib/@graphprotocol/graph-ts/common/numbers/BigDecimal'.

let price1 = token1.derivedBNB.times(bundle.bnbPrice);
             ~~~~~~~~~~~~~~~~~
in mappings/pricing.ts(87,16)

ERROR TS2322: Type 'generated/schema/Bundle | null' is not assignable to type 'generated/schema/Bundle'.

if (bundle.bnbPrice.equals(ZERO_BD)) {
    ~~~~~~
in mappings/core.ts(373,7)

ERROR TS2322: Type 'generated/schema/Bundle | null' is not assignable to type 'generated/schema/Bundle'.

  trackedAmountBNB = trackedAmountUSD.div(bundle.bnbPrice);
                                          ~~~~~~
in mappings/core.ts(376,45)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token0.tradeVolume = token0.tradeVolume.plus(amount0In.plus(amount0Out));
                     ~~~~~~
in mappings/core.ts(380,24)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token0.tradeVolume = token0.tradeVolume.plus(amount0In.plus(amount0Out));

in mappings/core.ts(380,3)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token0.tradeVolumeUSD = token0.tradeVolumeUSD.plus(trackedAmountUSD);
~~~~~~
in mappings/core.ts(381,27)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token0.tradeVolumeUSD = token0.tradeVolumeUSD.plus(trackedAmountUSD);

in mappings/core.ts(381,3)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token0.untrackedVolumeUSD = token0.untrackedVolumeUSD.plus(derivedAmountUSD);
                            ~~~~~~
in mappings/core.ts(382,31)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token0.untrackedVolumeUSD = token0.untrackedVolumeUSD.plus(derivedAmountUSD);

in mappings/core.ts(382,3)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token1.tradeVolume = token1.tradeVolume.plus(amount1In.plus(amount1Out));
~~~~~~
in mappings/core.ts(385,24)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token1.tradeVolume = token1.tradeVolume.plus(amount1In.plus(amount1Out));

in mappings/core.ts(385,3)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token1.tradeVolumeUSD = token1.tradeVolumeUSD.plus(trackedAmountUSD);
                        ~~~~~~
in mappings/core.ts(386,27)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token1.tradeVolumeUSD = token1.tradeVolumeUSD.plus(trackedAmountUSD);

in mappings/core.ts(386,3)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token1.untrackedVolumeUSD = token1.untrackedVolumeUSD.plus(derivedAmountUSD);
~~~~~~
in mappings/core.ts(387,31)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token1.untrackedVolumeUSD = token1.untrackedVolumeUSD.plus(derivedAmountUSD);

in mappings/core.ts(387,3)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token0.totalTransactions = token0.totalTransactions.plus(ONE_BI);
                           ~~~~~~
in mappings/core.ts(390,30)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token0.totalTransactions = token0.totalTransactions.plus(ONE_BI);

in mappings/core.ts(390,3)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token1.totalTransactions = token1.totalTransactions.plus(ONE_BI);
~~~~~~
in mappings/core.ts(391,30)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token1.totalTransactions = token1.totalTransactions.plus(ONE_BI);

in mappings/core.ts(391,3)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pair.volumeUSD = pair.volumeUSD.plus(trackedAmountUSD);
                 ~~~~
in mappings/core.ts(394,20)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pair.volumeUSD = pair.volumeUSD.plus(trackedAmountUSD);
~~~~
in mappings/core.ts(394,3)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pair.volumeToken0 = pair.volumeToken0.plus(amount0Total);
                    ~~~~
in mappings/core.ts(395,23)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pair.volumeToken0 = pair.volumeToken0.plus(amount0Total);
~~~~
in mappings/core.ts(395,3)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pair.volumeToken1 = pair.volumeToken1.plus(amount1Total);
                    ~~~~
in mappings/core.ts(396,23)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pair.volumeToken1 = pair.volumeToken1.plus(amount1Total);
~~~~
in mappings/core.ts(396,3)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pair.untrackedVolumeUSD = pair.untrackedVolumeUSD.plus(derivedAmountUSD);
                          ~~~~
in mappings/core.ts(397,29)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pair.untrackedVolumeUSD = pair.untrackedVolumeUSD.plus(derivedAmountUSD);
~~~~
in mappings/core.ts(397,3)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pair.totalTransactions = pair.totalTransactions.plus(ONE_BI);
                         ~~~~
in mappings/core.ts(398,28)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pair.totalTransactions = pair.totalTransactions.plus(ONE_BI);
~~~~
in mappings/core.ts(398,3)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pair.save();
~~~~
in mappings/core.ts(399,3)

ERROR TS2322: Type 'generated/schema/PancakeFactory | null' is not assignable to type 'generated/schema/PancakeFactory'.

pancake.totalVolumeUSD = pancake.totalVolumeUSD.plus(trackedAmountUSD);
                         ~~~~~~~
in mappings/core.ts(403,28)

ERROR TS2322: Type 'generated/schema/PancakeFactory | null' is not assignable to type 'generated/schema/PancakeFactory'.

pancake.totalVolumeUSD = pancake.totalVolumeUSD.plus(trackedAmountUSD);

in mappings/core.ts(403,3)

ERROR TS2322: Type 'generated/schema/PancakeFactory | null' is not assignable to type 'generated/schema/PancakeFactory'.

pancake.totalVolumeBNB = pancake.totalVolumeBNB.plus(trackedAmountBNB);
~~~~~~~
in mappings/core.ts(404,28)

ERROR TS2322: Type 'generated/schema/PancakeFactory | null' is not assignable to type 'generated/schema/PancakeFactory'.

pancake.totalVolumeBNB = pancake.totalVolumeBNB.plus(trackedAmountBNB);

in mappings/core.ts(404,3)

ERROR TS2322: Type 'generated/schema/PancakeFactory | null' is not assignable to type 'generated/schema/PancakeFactory'.

pancake.untrackedVolumeUSD = pancake.untrackedVolumeUSD.plus(derivedAmountUSD);
                             ~~~~~~~
in mappings/core.ts(405,32)

ERROR TS2322: Type 'generated/schema/PancakeFactory | null' is not assignable to type 'generated/schema/PancakeFactory'.

pancake.untrackedVolumeUSD = pancake.untrackedVolumeUSD.plus(derivedAmountUSD);

in mappings/core.ts(405,3)

ERROR TS2322: Type 'generated/schema/PancakeFactory | null' is not assignable to type 'generated/schema/PancakeFactory'.

pancake.totalTransactions = pancake.totalTransactions.plus(ONE_BI);
~~~~~~~
in mappings/core.ts(406,31)

ERROR TS2322: Type 'generated/schema/PancakeFactory | null' is not assignable to type 'generated/schema/PancakeFactory'.

pancake.totalTransactions = pancake.totalTransactions.plus(ONE_BI);

in mappings/core.ts(406,3)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

pair.save();
~~~~
in mappings/core.ts(409,3)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token0.save();
~~~~~~
in mappings/core.ts(410,3)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token1.save();
~~~~~~
in mappings/core.ts(411,3)

ERROR TS2322: Type 'generated/schema/PancakeFactory | null' is not assignable to type 'generated/schema/PancakeFactory'.

pancake.save();

in mappings/core.ts(412,3)

ERROR TS2322: Type '~lib/array/Array<~lib/string/String> | null' is not assignable to type '~lib/array/Array<~lib/string/String>'.

let swap = new SwapEvent(event.transaction.hash.toHex().concat("-").concat(BigInt.fromI32(swaps.length).toString()));
~~~~~
in mappings/core.ts(424,93)

ERROR TS2322: Type 'generated/schema/Pair | null' is not assignable to type 'generated/schema/Pair'.

swap.pair = pair.id;
~~~~
in mappings/core.ts(428,15)

ERROR TS2322: Type '~lib/array/Array<~lib/string/String> | null' is not assignable to type '~lib/array/Array<~lib/string/String>'.

swaps.push(swap.id);

in mappings/core.ts(447,3)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token0DayData.dailyVolumeBNB = token0DayData.dailyVolumeBNB.plus(amount0Total.times(token0.derivedBNB as BigDecimal));
                                                                                    ~~~~~~
in mappings/core.ts(478,87)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

  amount0Total.times(token0.derivedBNB as BigDecimal).times(bundle.bnbPrice)
                     ~~~~~~
in mappings/core.ts(480,24)

ERROR TS2322: Type 'generated/schema/Bundle | null' is not assignable to type 'generated/schema/Bundle'.

  amount0Total.times(token0.derivedBNB as BigDecimal).times(bundle.bnbPrice)
                                                            ~~~~~~
in mappings/core.ts(480,63)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

token1DayData.dailyVolumeBNB = token1DayData.dailyVolumeBNB.plus(amount1Total.times(token1.derivedBNB as BigDecimal));
                                                                                    ~~~~~~
in mappings/core.ts(486,87)

ERROR TS2322: Type 'generated/schema/Token | null' is not assignable to type 'generated/schema/Token'.

  amount1Total.times(token1.derivedBNB as BigDecimal).times(bundle.bnbPrice)
                     ~~~~~~
in mappings/core.ts(488,24)

ERROR TS2322: Type 'generated/schema/Bundle | null' is not assignable to type 'generated/schema/Bundle'.

  amount1Total.times(token1.derivedBNB as BigDecimal).times(bundle.bnbPrice)
                                                            ~~~~~~
in mappings/core.ts(488,63)

× Failed to compile subgraph: Failed to compile data source template: 253 compile error(s)
Error: Failed to compile data source template: 253 compile error(s)
 at Compiler._compileTemplateMapping (C:\Users\US\AppData\Roaming\npm\node_modules\@graphprotocol\graph-cli\src\compiler\index.js:374:13)
 at C:\Users\US\AppData\Roaming\npm\node_modules\@graphprotocol\graph-cli\src\compiler\index.js:231:24
 at updateInDeepMap (C:\Users\US\AppData\Roaming\npm\node_modules\@graphprotocol\graph-cli\node_modules\immutable\dist\immutable.js:1971:22)
 at updateInDeepMap (C:\Users\US\AppData\Roaming\npm\node_modules\@graphprotocol\graph-cli\node_modules\immutable\dist\immutable.js:1980:23)
 at updateInDeepMap (C:\Users\US\AppData\Roaming\npm\node_modules\@graphprotocol\graph-cli\node_modules\immutable\dist\immutable.js:1980:23)
 at Map.updateIn (C:\Users\US\AppData\Roaming\npm\node_modules\@graphprotocol\graph-cli\node_modules\immutable\dist\immutable.js:1278:26)
 at C:\Users\US\AppData\Roaming\npm\node_modules\@graphprotocol\graph-cli\src\compiler\index.js:230:26
 at C:\Users\US\AppData\Roaming\npm\node_modules\@graphprotocol\graph-cli\node_modules\immutable\dist\immutable.js:3016:46
 at List.__iterate (C:\Users\US\AppData\Roaming\npm\node_modules\@graphprotocol\graph-cli\node_modules\immutable\dist\immutable.js:2206:13)
 at IndexedIterable.mappedSequence.__iterateUncached (C:\Users\US\AppData\Roaming\npm\node_modules\@graphprotocol\graph-cli\node_modules\immutable\dist\immutable.js:3015:23)
UNCAUGHT EXCEPTION: Error: The AssemblyScript compiler crashed when compiling this file: 'mappings\core.ts'
Suggestion: try to comment the whole file and uncomment it little by little while re-running the graph-cli until you isolate the line where the problem happens.
Also, please contact us so we can make the CLI better by handling errors like this. You can reach out in any of these links:
- Discord channel: https://discord.gg/eM8CA6WA9r
- Github issues: https://github.com/graphprotocol/graph-cli/issues


TopPairs query not working

When trying to fetch information regarding token0 or token1 in the TopPairs query, the request fails with the error: panic processing query: only derived fields can lead to multiple children here.

Example query to produce the error:

query TopPairs { pairs(first: 5, orderBy: volumeUSD, orderDirection: desc) { id name volumeUSD token0 { id } } }

Please upgrade @graphprotocol/graph-cli to the latest

I am trying to deploy the subgraph to the Blast Sepolia test net. But due to @graphprotocol/graph-cli and @graphprotocol/graph-ts version is too low. graph-cli doesn't support this blast-testnet network.

Please upgrade @graphprotocol packages to the latest version.

Thanks in advance.

Subgraph for pancakev3 is not working.

I deployed subgraph in exchange-v3/template on my local node.

http://96.126.117.206:8000/subgraphs/name/pulsetestnet/exchange-v3

But it's not working.

I got following error on console.

Oct 02 18:24:01.306 ERRO Subgraph failed with non-deterministic error: failed to process trigger: block #17590692 (0xf5dc…6a02), transaction 97d4996ff673b5e180034e9ea634150232fc126b8cd6ade84d7e2b26d2a1f9e2: Subgraph panicked with message: calledResult::unwrap()on anErrvalue:allocate function not found, retry_delay_s: 1728, attempt: 4, sgd: 1, subgraph_id: QmdwwqifaYCULt2riciSnjH4MzFsf94osZWLw3dhd1i2uA, component: SubgraphInstanceManager

What is problem?

Network is pulsechain testnet v4.

Cannot get pancakeData from streamingfast api

Hey guys, need you help again.
I want use streamingfast to get my liquidity, price, volume, liquidity data.
I still always get null response.
Can you help me to check out this?
GraphQL:

{
  token (id: "0x765b85839717ebfc84378b83381a4814897a0506") {
    id
    name
  }
  pair (id: "0x8c83e7aef5116be215223d3688a2f5dc4c7f241b") {
    id
    name
  }
  pancakeDayData (id:"0x8c83e7aef5116be215223d3688a2f5dc4c7f241b") {
    id
    date
    dailyVolumeUSD
  }
  pairDayData (id: "0x8c83e7aef5116be215223d3688a2f5dc4c7f241b") {
    id
    dailyVolumeUSD
  }
}

Response

{
  "data": {
    "pair": {
      "id": "0x8c83e7aef5116be215223d3688a2f5dc4c7f241b",
      "name": "REI-BUSD"
    },
    "pairDayData": null,
    "pancakeDayData": null,
    "token": {
      "id": "0x765b85839717ebfc84378b83381a4814897a0506",
      "name": "Zerogoki Token"
    }
  }
}

Thx

Blocks Subgraph error

why query blocks subgraph error? on pancakeswap info, i see cannot retrieve numbers from blocks Subgraph

Please can someone assist

Hi hopefully you can help me. I just tried in your telegram for tech support but got swamped with scam admins.
Our token is not displaying price on your platform.
Issue for tech is api subgraph index.
I tried github but no answer

ERROR
Failed to decode block.number value: `subgraph Qmc3Q7LkXbwfDpTVAoiFbaMCjGqqS6bmMQdP7MZisdWMBg has only indexed up to block number 18083597 and data for block number 18083824 is therefore not yet available.
Please can you help with this. its not displaying price for our token on pancake.

Token contract address
0x558ad2b02cE979Ca54F88206ED8597c8c740774E

Subgraph for Exchange V3 only has data for recent 30 minutes

Hi we've been using Subgraph Exchange V3 BSC for a while and recently noticed that it only stores data for recent 30 minutes for some pools likes 0x36696169c63e42cd08ce11f5deebbcebae652050, 0x4f31fa980a675570939b737ebdde0471a4be40eb,...
We need volumeUsd and feeUSD data from a specific block in the last 24h. Can you help with that?

How can I obtain token's APR?

How can I extract APR from Pools? Is there's a way I need to follow some specific formulae based on info provided?

BUG

root@ip-172-31-21-170:/www/pancake-subgraph/subgraphs/exchange# yarn build
yarn run v1.22.17
$ graph build subgraph.yaml
Skip migration: Bump mapping apiVersion from 0.0.1 to 0.0.2 (graph-ts dependency not installed yet)
Skip migration: Bump mapping apiVersion from 0.0.2 to 0.0.3 (graph-ts dependency not installed yet)
Skip migration: Bump mapping apiVersion from 0.0.3 to 0.0.4 (graph-ts dependency not installed yet)
Skip migration: Bump mapping specVersion from 0.0.1 to 0.0.2
✔ Apply migrations
✔ Load subgraph from subgraph.yaml
Compile data source: Factory => build/Factory/Factory.wasm
Compile data source template: Pair => build/templates/Pair/Pair.wasm
✔ Compile subgraph
Copy schema file build/schema.graphql
Write subgraph file build/Factory/abis/Factory.json
Write subgraph file build/Factory/abis/ERC20.json
Write subgraph file build/Factory/abis/ERC20NameBytes.json
Write subgraph file build/Factory/abis/ERC20SymbolBytes.json
Write subgraph file build/Pair/abis/Factory.json
Write subgraph file build/Pair/abis/Pair.json
Write subgraph manifest build/subgraph.yaml
✔ Write compiled subgraph to build/

Build completed: /www/pancake-subgraph/subgraphs/exchange/build/subgraph.yaml

Done in 6.04s.
root@ip-172-31-21-170:/www/pancake-subgraph/subgraphs/exchange# graph auth --product hosted-service '10a7eb—12e722'
Deploy key set for https://api.thegraph.com/deploy/
root@ip-172-31-21-170:/www/pancake-subgraph/subgraphs/exchange# yarn deploy
yarn run v1.22.17
$ graph deploy --product hosted-service --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ pancakeswap/exchange subgraph.yaml
Skip migration: Bump mapping apiVersion from 0.0.1 to 0.0.2 (graph-ts dependency not installed yet)
Skip migration: Bump mapping apiVersion from 0.0.2 to 0.0.3 (graph-ts dependency not installed yet)
Skip migration: Bump mapping apiVersion from 0.0.3 to 0.0.4 (graph-ts dependency not installed yet)
Skip migration: Bump mapping specVersion from 0.0.1 to 0.0.2
✔ Apply migrations
✔ Load subgraph from subgraph.yaml
Compile data source: Factory => build/Factory/Factory.wasm
Compile data source template: Pair => build/templates/Pair/Pair.wasm
✔ Compile subgraph
Copy schema file build/schema.graphql
Write subgraph file build/Factory/abis/Factory.json
Write subgraph file build/Factory/abis/ERC20.json
Write subgraph file build/Factory/abis/ERC20NameBytes.json
Write subgraph file build/Factory/abis/ERC20SymbolBytes.json
Write subgraph file build/Pair/abis/Factory.json
Write subgraph file build/Pair/abis/Pair.json
Write subgraph manifest build/subgraph.yaml
✔ Write compiled subgraph to build/
Add file to IPFS build/schema.graphql
.. QmUTT8XtXyy6JkJN9h8aJmTdzu2HSZf9ZCGWJYj9B5ejAK
Add file to IPFS build/Factory/abis/Factory.json
.. QmQ28FujgvGMvHrVucaaGtmZqmHBim7iNGQvgccaDyNK84
Add file to IPFS build/Factory/abis/ERC20.json
.. QmXuTbDkNrN27VydxbS2huvKRk62PMgUTdPDWkxcr2w7j2
Add file to IPFS build/Factory/abis/ERC20NameBytes.json
.. QmQCP6Pdp1MqpwRv2qoPHuUTwZGy7Q3eDHg4w5kzwE9mBj
Add file to IPFS build/Factory/abis/ERC20SymbolBytes.json
.. QmbHnhUFZa6qqqRyubUYhXntox1TCBxqryaBM1iNGqVJzT
Add file to IPFS build/Factory/Factory.wasm
.. QmQgiqkUtWam4dSbKDN282LiQzqdatx2RbbFSGr8zoU9yT
Add file to IPFS build/Pair/abis/Factory.json
.. QmQ28FujgvGMvHrVucaaGtmZqmHBim7iNGQvgccaDyNK84 (already uploaded)
Add file to IPFS build/Pair/abis/Pair.json
.. QmbPLMADBP8L6LBVP3ZBQ8RgG7ghamD8DvbdUxHAjZrLgm
Add file to IPFS build/templates/Pair/Pair.wasm
.. QmU2nwjPUgnKSvuQ7LZn2oD28KBHG2EKD19qcfB4Q4sz8u
✔ Upload subgraph to IPFS

Build completed: QmfGuiGdHVCbSf8TsVBcjTSn93udHVuwy1EFGyLKEfJ6ty

⠋ Deploying to Graph node https://api.thegraph.com/deploy//www/pancake-subgraph/node_modules/binaryen/index.js:7
if(n){p=__dirname+"/";var ea,fa;a.read=function(c,e){var b=q(c);b||(ea||(ea=require("fs")),fa||(fa=require("path")),c=fa.normalize(c),b=ea.readFileSync(c));return e?b:b.toString()};a.readBinary=function(c){c=a.read(c,!0);c.buffer||(c=new Uint8Array(c));assert(c.buffer);return c};1<process.argv.length&&(a.thisProgram=process.argv[1].replace(/\/g,"/"));a.arguments=process.argv.slice(2);process.on("uncaughtException",function(c){if(!(c instanceof ha))throw c;});process.on("unhandledRejection",u);a.quit=
^

TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["Authorization"]
at ClientRequest.setHeader (_http_outgoing.js:564:3)
at new ClientRequest (_http_client.js:262:14)
at Object.request (https.js:374:10)
at ClientHttps._getRequestStream (/www/pancake-subgraph/node_modules/jayson/lib/client/https.js:33:16)
at /www/pancake-subgraph/node_modules/jayson/lib/client/http.js:61:22
at Object.Utils.JSON.stringify (/www/pancake-subgraph/node_modules/jayson/lib/utils.js:290:3)
at ClientHttps.ClientHttp._request (/www/pancake-subgraph/node_modules/jayson/lib/client/http.js:44:14)
at ClientHttps.Client.request (/www/pancake-subgraph/node_modules/jayson/lib/client/index.js:148:8)
at deploySubgraph (/www/pancake-subgraph/node_modules/@graphprotocol/graph-cli/src/commands/deploy.js:225:14)
at Command.run (/www/pancake-subgraph/node_modules/@graphprotocol/graph-cli/src/commands/deploy.js:299:13) {
code: 'ERR_INVALID_CHAR'
}
error Command failed with exit code 7.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Status on Binance Smart Chain nodes issue

Hello everyone 👋

Recently, Binance Smart Chain has been impacted with multiple issues related to nodes (full and archive); as a result, most of our subgraphs, on both self-hosting and TheGraph, have stopped syncing or have a significant delay in processing new data (blocks/transactions). We are sorry for the inconvenience, and are working to bring back our subgraphs up to the latest block.

In order to keep track with the PancakeSwap ecosystem, you can access tokens/pairs data using:

Both of them support v1, and v2 ecosystem.

If you wish to follow the status for the Binance Smart Chain network on TheGraph, please refer to status.thegraph.com (incident 1 / incident 2).

If you are hosting a BSC node, please refer to binance-chain/bsc repository.

Thank you for your support; keep building!

Stake CAKE (CakePool.sol) does not output in the queries using GraphQL

When you query SmartChefs, there are no results in output where earnedToken and stakedToken are both "PancakeSwap Token" as it is in the contract. I believe this is because the single asset staking Cake Pool is its own contract, which is (CakePool.sol) and is not implemented to pull data from that contract

Can't get exchange data using local graph-node

I am running a local graph-node for testing using the latest version of the Docker container. It's pointed at a BSC mainnet full node.

I've followed the steps in the README to deploy the subgraphs in this repo. Since I'm using a local graph-node and not the production one, I've modified it so it looks more like:

yarn run codegen:[subgraph]
yarn run build:[subgraph]
npx graph create --node http://graph-node.internal:8020/ pancakeswap/[subgraph]
npx graph deploy --debug --ipfs http://ipfs-host.internal:5001 --node http://graph-node.internal:8020/ pancakeswap/[subgraph] subgraphs/[subgraph].yaml

When deploying blocks and dexcandles, I can see the data come through in the GraphiQL explorer after it's indexed by the graph node. However, after deploying exchange and waiting some time, no pairs show up at all, e.g.

{
  pairs(first:500){
    id
    token0 {
      id
    }
    token1 {
      id
    }
  } 
}

gives the response

{
  "data": {
    "pairs": []
  }
}

I did notice that there is a PR for a new version of the exchange subgraph, so is it possible that the current one from the master branch doesn't work anymore? I'm new to using The Graph and I don't know how to debug it well, but let me know if there's any relevant information I should include, or any pointers on getting started inspecting the internal state from the graph-node. It would be very useful. Thanks!

Is the subgraph currently working?

I'm trying to find this subgraph within the community subgraphs but can't find it, is it working currently? If so, how can I find it?

Report gql error

i'm getting error after review pancake gql,Error Messages: Failed to decode block.number value: Qmc3Q7LkXbwfDpTVAoiFbaMCjGqqS6bmMQdP7MZisdWMBg has only indexed up to block number 11839729 and data for block number 11843533 is therefore not yet available, after use gql to retrieve price data, please fixed it, thanks

Can't find a token

Hi,
I work on a application that need to get the current price of the CateCoin on Pancakeswap.

I can't find this token in the Subgraph datas.

The data provided by the subgraph is that of PancakeSwap V1 and not of V2?

Thank you in advance :)

Yarn error.

Following the instructions, when I get to this step, I have an error:

╭─arthur at aquarelle in ~/dev/btc/pancake-subgraph/subgraphs/prediction/v2 on v2✔ 22-09-30 - 23:56:40
╰─⠠⠵ yarn codegen                                                                                                                        on v2|✔
yarn run v1.22.19
$ graph codegen subgraph.yaml
The current version of graph-cli can't be used with mappings on apiVersion less than '0.0.5'
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

yarn codegen - /bin/sh: graph: command not found

I'm following the setup instructions and receiving an error.

exchange % yarn codegen        
yarn run v1.22.10
$ graph codegen subgraph.yaml
/bin/sh: graph: command not found
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I can't seem to find anything online to help resolve this. I tried "npm i -g graph" but that didn't help.

Any ideas? I'm using macOS Big Slur Version 11.5.2

prediction v2 subgraph data

Data in subgraph is not real time. it's very slow. When current round epoch is 46655 it returns data for previous 3- 4 rounds back like till 466652.
whats use then?

Pancakeswap prediction Bet subgraph method

Been trying to understand how the subgraph method works for triggering a bet on the pancakeswap predictions.

Currently I'm sending the following query:

bet(id: 6062) {
id
hash
block
amount
claimedAt
position:Bear
}

but it outputs the following

"message": "Type Bet has no field Bear"

which is a bit weird as it's one of the accepted names for position.

What am I doing wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.