Code Monkey home page Code Monkey logo

tezos-contract-metadata's People

Contributors

novalis avatar smondet avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

novalis

tezos-contract-metadata's Issues

find_metadata_big_maps can't handle contracts declaring storage type using shortened pair syntax

The culprit:

| Prim (_, "Pair", [l; r], _), Prim (_, "pair", [lt; rt], _) ->

Case in point: KT1VvnQFn9v3oHA7JLTdDZD6hdAx3T4TnUA2 on Hangzhou-net fails with Contract has no valid %metadata big-map! despite containing (big_map %metadata string bytes) within the top-level tree of nested pairs (as per spec). storage is declared as

  storage
   (pair (pair <...>)
          (pair <...>)
          (big_map <...>)
          (big_map %metadata string bytes)) ;

the corresponding Micheline representation is

{
  "code": [
    {...}
    {
      "prim": "storage",
      "args": [
        {
          "prim": "pair",
          "args": [
            {...},
            {...},
            {...},
            {
              "prim": "big_map",
              "args": [
                {
                  "prim": "string"
                },
                {
                  "prim": "bytes"
                }
              ],
              "annots": [
                "%metadata"
              ]
            }
          ]
        }
      ]
    },
    {...}
  ]
}

Notice the pair constructor here has 4 arguments in the Micheline representation, while the code only looks for cases where there are exactly 2.

Switch to let*

Instead of using >>=, we should use let* to be consistent with tezos/tezos, which is doing the same.

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.