compound-protocol
compound-protocol copied to clipboard
Cannot check token balances in Saddle scripts
While trying to write sanity checking scripts for basic Comptroller testing, I was not able to check balances on cTokens for some reason. When I run the original deploy script for the COMP patch it failed too:
https://github.com/compound-finance/compound-protocol/blob/master/spec/sim/0001-comp-distribution-patch/hypothetical_upgrade.scen
It says it is failing to find the indices for cBAT and cUSDC:
EventProcessingError: Failed to find string value by index (got undefined): [["Tokens","cUSDC","address"]], index contains:
<redacted>
Any thoughts on what may have caused this? It seems like a json error perhaps when a market is missing?
Any updates on this issue..?
Got similar error while trying to deploy contracts to a local Neon node
Running script: ./script/scen/deploy.scen...
Command: Gate (PriceOracle Address) (PriceOracle Deploy Simple)
Command: Gate (Comptroller Address) (Comptroller Deploy YesNo)
Action: Added Comptroller (Standard Comptroller Impl) at address 0x1D9af6e77650FFc67C15a50fB9d8f0D2BA345c52
Command: Gate (InterestRateModel InterestRateModel Address) (InterestRateModel Deploy Fixed InterestRateModel 0.0004)
Command: Gate (Erc20 ZRX Address) (Erc20 Deploy Standard ZRX "0x")
Command: Gate (Erc20 BAT Address) (Erc20 Deploy NonStandard BAT "Basic Attention Token")
Command: Gate (Erc20 DAI Address) (Erc20 Deploy Standard DAI "Dai")
Command: Gate (Erc20 REP Address) (Erc20 Deploy Standard REP "Augur")
Command: Gate (Erc20 USDC Address) (Erc20 Deploy Standard USDC "USD Coin" 6)
Command: Gate (CToken cZRX Address) (CToken Deploy CErc20 cZRX "Test 0x 📈" (Erc20 ZRX Address) (Comptroller Address) (InterestRateModel InterestRateModel Address) 0.2e9 8)
EventProcessingError: Failed to find string value by index (got undefined): [["Contracts","Comptroller"]], index contains: {"PriceOracle":{"description":"Simple Price Oracle","address":"0x1D9af6e77650FFc67C15a50fB9d8f0D2BA345c52"},"Contracts":{"PriceOracle":"0x1D9af6e77650FFc67C15a50fB9d8f0D2BA345c52","YesNo":"0x1D9af6e77650FFc67C15a50fB9d8f0D2BA345c52","InterestRateModel":"0x1A5A01A2ADbE256E994c0F3a894CEB70a78A191C","ZRX":"0xD231961AeaD5804bF0D4eF2c219a8181EEDdfCD3","BAT":"0x9C1b5617f8588b0371f291f371699d7B283AE9Ad","DAI":"0x07E9221975A424e39fa87e57590b7720432e729e","REP":"0xEd510F9B47eAA996A25D03847460691F3D64eCe7","USDC":"0x11a636Cf921a317645b39bD298F1Fc70F19E8392"},"Constructors":{"PriceOracle":"0x","YesNo":"0x","InterestRateModel":"0x00000000000000000000000000000000000000000000000000016bcc41e90000","ZRX":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000002307800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035a52580000000000000000000000000000000000000000000000000000000000","BAT":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000015426173696320417474656e74696f6e20546f6b656e000000000000000000000000000000000000000000000000000000000000000000000000000000000000034241540000000000000000000000000000000000000000000000000000000000","DAI":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000003446169000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034441490000000000000000000000000000000000000000000000000000000000","REP":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000005417567757200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035245500000000000000000000000000000000000000000000000000000000000","USDC":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000855534420436f696e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045553444300000000000000000000000000000000000000000000000000000000"},"Blocks":{"PriceOracle":932,"YesNo":247,"InterestRateModel":946,"ZRX":953,"BAT":960,"DAI":967,"REP":974,"USDC":982},"Comptroller":{"YesNo":{"address":"0x1D9af6e77650FFc67C15a50fB9d8f0D2BA345c52","contract":"Comptroller","description":"Standard Comptroller Impl"}},"InterestRateModel":{"InterestRateModel":{"name":"InterestRateModel","contract":"InterestRateModelHarness","description":"Fixed rate 0.04% per block","address":"0x1A5A01A2ADbE256E994c0F3a894CEB70a78A191C"}},"Tokens":{"ZRX":{"description":"Standard","name":"0x","symbol":"ZRX","decimals":18,"contract":"FaucetToken","address":"0xD231961AeaD5804bF0D4eF2c219a8181EEDdfCD3"},"BAT":{"description":"NonStandard","name":"Basic Attention Token","symbol":"BAT","decimals":18,"contract":"FaucetNonStandardToken","address":"0x9C1b5617f8588b0371f291f371699d7B283AE9Ad"},"DAI":{"description":"Standard","name":"Dai","symbol":"DAI","decimals":18,"contract":"FaucetToken","address":"0x07E9221975A424e39fa87e57590b7720432e729e"},"REP":{"description":"Standard","name":"Augur","symbol":"REP","decimals":18,"contract":"FaucetToken","address":"0xEd510F9B47eAA996A25D03847460691F3D64eCe7"},"USDC":{"description":"Standard","name":"USD Coin","symbol":"USDC","decimals":6,"contract":"FaucetToken","address":"0x11a636Cf921a317645b39bD298F1Fc70F19E8392"}}}