rainlanguage / rain.orderbook

Rain orderbook libraries, subgraph and contract implementation.
10 stars 5 forks source link

Empty 2d orderbook context for eval for running simulations in Raindex app binary. #665

Closed Siddharth2207 closed 3 months ago

Siddharth2207 commented 4 months ago

Raindex app binary has an empty 2d orderbook context for eval when running simulations. This increasing the number of bindings and verbosity of the rainlang expression. For eg : Cannot use orderbook context words, so this

_: uniswap-v2-spot-output-ratio(input-token() input-token-decimals() output-token() output-token-decimals());

needs to be rainlang verbose :

bindings:
  input-token: 0x0eD7e52944161450477ee417DE9Cd3a859b14fD0
  input-token-decimals: 12
  output-token: 0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56
  output-token-decimals: 18
---
#input-token !Input token 
#input-token-decimals !Input token decimals
#output-token !Output token 
#output-token-decimals !Output token decimals

_: uniswap-v2-spot-output-ratio(input-token input-token-decimals output-token output-token-decimals);
hardyjosh commented 3 months ago

fixed in https://github.com/rainlanguage/rain.orderbook/pull/666