Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

View stack-overflow on webkit (chromium/brave) #41

Open
smondet opened this issue Mar 27, 2021 · 3 comments
Open

View stack-overflow on webkit (chromium/brave) #41

smondet opened this issue Mar 27, 2021 · 3 comments

Comments

@smondet
Copy link
Collaborator

smondet commented Mar 27, 2021

(works on firefox)

Try the view from below (github does not let me attach JSON files…) on the storage of KT1HrSsJ8ut8iNLLL1frS5H5KkewSvv3zALh

{
  "name": "Multi-sign Administrator",
  "version": "1",
  "description": "Multi-sign administrator for the price feed aggregator",
  "source": { "tools": [ "SmartPy" ] },
  "interfaces": [ "TZIP-016" ],
  "views": [
    {
      "name": "listActiveProposals",
      "pure": true,
      "description": "List active proposals",
      "implementations": [
        {
          "michelsonStorageView": {
            "returnType": {
              "prim": "list",
              "args": [
                {
                  "prim": "pair",
                  "args": [
                    {
                      "prim": "pair",
                      "args": [
                        {
                          "prim": "list",
                          "args": [
                            {
                              "prim": "or",
                              "args": [
                                {
                                  "prim": "list",
                                  "args": [
                                    {
                                      "prim": "or",
                                      "args": [
                                        { "prim": "or", "args": [ { "prim": "nat", "annots": [ "%changeQuorum" ] }, { "prim": "address", "annots": [ "%changeTarget" ] } ] },
                                        {
                                          "prim": "or",
                                          "args": [
                                            { "prim": "int", "annots": [ "%changeTimeout" ] },
                                            {
                                              "prim": "pair",
                                              "args": [
                                                {
                                                  "prim": "list",
                                                  "args": [
                                                    { "prim": "pair", "args": [ { "prim": "address", "annots": [ "%addr" ] }, { "prim": "key", "annots": [ "%publicKey" ] } ] }
                                                  ],
                                                  "annots": [ "%added" ]
                                                },
                                                { "prim": "set", "args": [ { "prim": "nat" } ], "annots": [ "%removed" ] }
                                              ],
                                              "annots": [ "%changeVoters" ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ],
                                  "annots": [ "%selfAdmin" ]
                                },
                                {
                                  "prim": "list",
                                  "args": [
                                    {
                                      "prim": "or",
                                      "args": [
                                        { "prim": "or", "args": [ { "prim": "bool", "annots": [ "%changeActive" ] }, { "prim": "address", "annots": [ "%changeAdmin" ] } ] },
                                        {
                                          "prim": "or",
                                          "args": [
                                            {
                                              "prim": "pair",
                                              "args": [
                                                {
                                                  "prim": "list",
                                                  "args": [
                                                    {
                                                      "prim": "pair",
                                                      "args": [
                                                        { "prim": "address" },
                                                        {
                                                          "prim": "pair",
                                                          "args": [
                                                            { "prim": "address", "annots": [ "%adminAddress" ] },
                                                            {
                                                              "prim": "pair",
                                                              "args": [
                                                                { "prim": "option", "args": [ { "prim": "nat" } ], "annots": [ "%endingRound" ] },
                                                                { "prim": "nat", "annots": [ "%startingRound" ] }
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ],
                                                  "annots": [ "%added" ]
                                                },
                                                { "prim": "list", "args": [ { "prim": "address" } ], "annots": [ "%removed" ] }
                                              ],
                                              "annots": [ "%changeOracles" ]
                                            },
                                            {
                                              "prim": "pair",
                                              "args": [
                                                {
                                                  "prim": "pair",
                                                  "args": [ { "prim": "nat", "annots": [ "%maxSubmissions" ] }, { "prim": "nat", "annots": [ "%minSubmissions" ] } ]
                                                },
                                                {
                                                  "prim": "pair",
                                                  "args": [
                                                    { "prim": "nat", "annots": [ "%oraclePayment" ] },
                                                    { "prim": "pair", "args": [ { "prim": "nat", "annots": [ "%restartDelay" ] }, { "prim": "nat", "annots": [ "%timeout" ] } ] }
                                                  ]
                                                }
                                              ],
                                              "annots": [ "%updateFutureRounds" ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ],
                                  "annots": [ "%targetAdmin" ]
                                }
                              ]
                            }
                          ],
                          "annots": [ "%batchs" ]
                        },
                        { "prim": "pair", "args": [ { "prim": "nat", "annots": [ "%initiatorId" ] }, { "prim": "nat", "annots": [ "%initiatorProposalId" ] } ] }
                      ]
                    },
                    {
                      "prim": "pair",
                      "args": [
                        { "prim": "set", "args": [ { "prim": "nat" } ], "annots": [ "%nay" ] },
                        { "prim": "pair", "args": [ { "prim": "timestamp", "annots": [ "%startedAt" ] }, { "prim": "set", "args": [ { "prim": "nat" } ], "annots": [ "%yay" ] } ] }
                      ]
                    }
                  ]
                }
              ]
            },
            "code": [
              { "prim": "DUP" },
              { "prim": "CDR" },
              { "prim": "CAR" },
              { "prim": "CDR" },
              { "prim": "CAR" },
              {
                "prim": "NIL",
                "args": [
                  {
                    "prim": "pair",
                    "args": [
                      {
                        "prim": "pair",
                        "args": [
                          {
                            "prim": "list",
                            "args": [
                              {
                                "prim": "or",
                                "args": [
                                  {
                                    "prim": "list",
                                    "args": [
                                      {
                                        "prim": "or",
                                        "args": [
                                          { "prim": "or", "args": [ { "prim": "nat", "annots": [ "%changeQuorum" ] }, { "prim": "address", "annots": [ "%changeTarget" ] } ] },
                                          {
                                            "prim": "or",
                                            "args": [
                                              { "prim": "int", "annots": [ "%changeTimeout" ] },
                                              {
                                                "prim": "pair",
                                                "args": [
                                                  {
                                                    "prim": "list",
                                                    "args": [
                                                      { "prim": "pair", "args": [ { "prim": "address", "annots": [ "%addr" ] }, { "prim": "key", "annots": [ "%publicKey" ] } ] }
                                                    ],
                                                    "annots": [ "%added" ]
                                                  },
                                                  { "prim": "set", "args": [ { "prim": "nat" } ], "annots": [ "%removed" ] }
                                                ],
                                                "annots": [ "%changeVoters" ]
                                              }
                                            ]
                                          }
                                        ]
                                      }
                                    ],
                                    "annots": [ "%selfAdmin" ]
                                  },
                                  {
                                    "prim": "list",
                                    "args": [
                                      {
                                        "prim": "or",
                                        "args": [
                                          { "prim": "or", "args": [ { "prim": "bool", "annots": [ "%changeActive" ] }, { "prim": "address", "annots": [ "%changeAdmin" ] } ] },
                                          {
                                            "prim": "or",
                                            "args": [
                                              {
                                                "prim": "pair",
                                                "args": [
                                                  {
                                                    "prim": "list",
                                                    "args": [
                                                      {
                                                        "prim": "pair",
                                                        "args": [
                                                          { "prim": "address" },
                                                          {
                                                            "prim": "pair",
                                                            "args": [
                                                              { "prim": "address", "annots": [ "%adminAddress" ] },
                                                              {
                                                                "prim": "pair",
                                                                "args": [
                                                                  { "prim": "option", "args": [ { "prim": "nat" } ], "annots": [ "%endingRound" ] },
                                                                  { "prim": "nat", "annots": [ "%startingRound" ] }
                                                                ]
                                                              }
                                                            ]
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "annots": [ "%added" ]
                                                  },
                                                  { "prim": "list", "args": [ { "prim": "address" } ], "annots": [ "%removed" ] }
                                                ],
                                                "annots": [ "%changeOracles" ]
                                              },
                                              {
                                                "prim": "pair",
                                                "args": [
                                                  {
                                                    "prim": "pair",
                                                    "args": [ { "prim": "nat", "annots": [ "%maxSubmissions" ] }, { "prim": "nat", "annots": [ "%minSubmissions" ] } ]
                                                  },
                                                  {
                                                    "prim": "pair",
                                                    "args": [
                                                      { "prim": "nat", "annots": [ "%oraclePayment" ] },
                                                      { "prim": "pair", "args": [ { "prim": "nat", "annots": [ "%restartDelay" ] }, { "prim": "nat", "annots": [ "%timeout" ] } ] }
                                                    ]
                                                  }
                                                ],
                                                "annots": [ "%updateFutureRounds" ]
                                              }
                                            ]
                                          }
                                        ]
                                      }
                                    ],
                                    "annots": [ "%targetAdmin" ]
                                  }
                                ]
                              }
                            ],
                            "annots": [ "%batchs" ]
                          },
                          { "prim": "pair", "args": [ { "prim": "nat", "annots": [ "%initiatorId" ] }, { "prim": "nat", "annots": [ "%initiatorProposalId" ] } ] }
                        ]
                      },
                      {
                        "prim": "pair",
                        "args": [
                          { "prim": "set", "args": [ { "prim": "nat" } ], "annots": [ "%nay" ] },
                          {
                            "prim": "pair",
                            "args": [ { "prim": "timestamp", "annots": [ "%startedAt" ] }, { "prim": "set", "args": [ { "prim": "nat" } ], "annots": [ "%yay" ] } ]
                          }
                        ]
                      }
                    ]
                  }
                ]
              },
              { "prim": "DUP", "args": [ { "int": "3" } ] },
              { "prim": "CDR" },
              { "prim": "CAR" },
              { "prim": "CAR" },
              { "prim": "PUSH", "args": [ { "prim": "nat" }, { "int": "0" } ] },
              { "prim": "DUP" },
              { "prim": "DUP", "args": [ { "int": "3" } ] },
              { "prim": "COMPARE" },
              { "prim": "GT" },
              {
                "prim": "LOOP",
                "args": [
                  [
                    { "prim": "DUP", "args": [ { "int": "4" } ] },
                    { "prim": "SWAP" },
                    { "prim": "DUP" },
                    { "prim": "DUG", "args": [ { "int": "2" } ] },
                    { "prim": "MEM" },
                    {
                      "prim": "IF",
                      "args": [
                        [
                          { "prim": "DUP", "args": [ { "int": "5" } ] },
                          { "prim": "CDR" },
                          { "prim": "CAR" },
                          { "prim": "CDR" },
                          { "prim": "CAR" },
                          { "prim": "SWAP" },
                          { "prim": "DUP" },
                          { "prim": "DUG", "args": [ { "int": "2" } ] },
                          { "prim": "GET" },
                          { "prim": "IF_NONE", "args": [ [ { "prim": "PUSH", "args": [ { "prim": "int" }, { "int": "264" } ] }, { "prim": "FAILWITH" } ], [] ] },
                          { "prim": "DUP" },
                          { "prim": "CAR" },
                          { "prim": "CDR" },
                          { "prim": "CAR" },
                          {
                            "prim": "IF",
                            "args": [
                              [ { "prim": "PUSH", "args": [ { "prim": "bool" }, { "prim": "False" } ] } ],
                              [
                                { "prim": "DUP", "args": [ { "int": "6" } ] },
                                { "prim": "CDR" },
                                { "prim": "CAR" },
                                { "prim": "CDR" },
                                { "prim": "CDR" },
                                { "prim": "SWAP" },
                                { "prim": "DUP" },
                                { "prim": "DUG", "args": [ { "int": "2" } ] },
                                { "prim": "GET", "args": [ { "int": "6" } ] },
                                { "prim": "SIZE" },
                                { "prim": "DUP", "args": [ { "int": "3" } ] },
                                { "prim": "GET", "args": [ { "int": "3" } ] },
                                { "prim": "SIZE" },
                                { "prim": "ADD" },
                                { "prim": "COMPARE" },
                                { "prim": "LT" }
                              ]
                            ]
                          },
                          {
                            "prim": "IF",
                            "args": [
                              [
                                { "prim": "DIG", "args": [ { "int": "3" } ] },
                                { "prim": "SWAP" },
                                { "prim": "DUP" },
                                { "prim": "GET", "args": [ { "int": "6" } ] },
                                { "prim": "SWAP" },
                                { "prim": "DUP" },
                                { "prim": "DUG", "args": [ { "int": "3" } ] },
                                { "prim": "GET", "args": [ { "int": "5" } ] },
                                { "prim": "PAIR", "annots": [ "%startedAt", "%yay" ] },
                                { "prim": "DUP", "args": [ { "int": "3" } ] },
                                { "prim": "GET", "args": [ { "int": "3" } ] },
                                { "prim": "PAIR", "annots": [ "%nay" ] },
                                { "prim": "DUP", "args": [ { "int": "3" } ] },
                                { "prim": "CAR" },
                                { "prim": "CDR" },
                                { "prim": "CDR" },
                                { "prim": "DUP", "args": [ { "int": "5" } ] },
                                { "prim": "PAIR", "annots": [ "%initiatorId", "%initiatorProposalId" ] },
                                { "prim": "DIG", "args": [ { "int": "3" } ] },
                                { "prim": "CAR" },
                                { "prim": "CAR" },
                                { "prim": "PAIR", "annots": [ "%batchs" ] },
                                { "prim": "PAIR" },
                                { "prim": "CONS" },
                                { "prim": "DUG", "args": [ { "int": "2" } ] }
                              ],
                              [ { "prim": "DROP" } ]
                            ]
                          }
                        ],
                        []
                      ]
                    },
                    { "prim": "PUSH", "args": [ { "prim": "nat" }, { "int": "1" } ] },
                    { "prim": "ADD" },
                    { "prim": "DUP" },
                    { "prim": "DUP", "args": [ { "int": "3" } ] },
                    { "prim": "COMPARE" },
                    { "prim": "GT" }
                  ]
                ]
              },
              { "prim": "DROP", "args": [ { "int": "2" } ] },
              { "prim": "SWAP" },
              { "prim": "DROP" },
              { "prim": "SWAP" },
              { "prim": "DROP" }
            ]
          }
        }
      ]
    }
  ]
}
@dinosaure
Copy link

Just to link this issue with a possible solution upstream (concerning ezjsonm): mirage/ezjsonm#45

@smondet
Copy link
Collaborator Author

smondet commented Mar 30, 2021

@dinosaure unless I made a mistake somewhere this code already uses a modified json_of_src : https://github.com/tqtezos/TZComet/blob/12970b5438ce1c50d4903252fd3856e6e79a0176/src/client/import.ml#L239

@dinosaure
Copy link

Yes 🙂 it's just to avoid to vendor ezjsonm, cut a release and use the latest version 👍 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants