ref-finance / ref-contracts

Smart contracts for Ref Finance
MIT License
96 stars 54 forks source link

get_number_of_pools misbehaving #69

Open mikedotexe opened 2 years ago

mikedotexe commented 2 years ago

Looking at Eugene's token factory:

https://github.com/evgenykuzyakov/token-factory/blob/15aae092a4cae928f119140632af0512448071ae/frontend/src/Tokens.js#L343

we run into an issue

Error: Querying call/ref-finance.near/get_number_of_pools,AQ4 failed: wasm execution failed with error: FunctionCallError(CompilationError(PrepareError(Deserialization))).
{
  "error": "wasm execution failed with error: FunctionCallError(CompilationError(PrepareError(Deserialization)))",
  "logs": [],
  "block_height": 59982114,
  "block_hash": "5D6urqUnTgcAxuHAqTe54qhRsffE1YS9ZUHsrvD9VuCe"
}
    at JsonRpcProvider.query (json-rpc-provider.js:80:1)
    at async ConnectedWalletAccount.viewFunction (account.js:271:1)
    at async Tokens.refreshRefPools (Tokens.js:346:1)
    at async Promise.all (:3000/index 0)
    at async Tokens.refreshRef (Tokens.js:335:1)

Running this command on NEAR CLI also throws the same error:

NEAR_ENV=mainnet near view ref-finance.near get_number_of_pools
chluff commented 2 years ago

ser the address is v2.ref-finance.near