Code Monkey home page Code Monkey logo

Comments (2)

owen9825 avatar owen9825 commented on June 23, 2024

I noticed that the path issue can be resolved by replacing ligo_cmd in smart_contracts/shared/python/ligo.py with ligo (the locally installed program) instead of the Docker version.

I've installed it from source, so ligo --version prints a SHA hash of the commit, rather than the semantic version. I can implement a version consistency check by running ligo changelog and searching for the strings like *** 0.7.1 ***.

This might not be to everyone's tastes:

ligo_cmd = "ligo"
with Popen(f"{ligo_cmd} changelog", stdout=PIPE, stderr=PIPE, shell=True) as changelog_command:
    changelog = changelog_command.stdout.read().decode()
    assert " 0.7.1 " in changelog

I haven't imposed a maximum version.

Anyway, after that, I see there are failures in the tests, eg:

FAILED [ 25%]loading ligo contracts...
originating contracts...

tezos_fa2_nft_tests/test_fa2.py:164 (TestMintBurn.test_mint_burn_implicit)
args = ({},), kwargs = {'lazy_diff': False, 'try_unpack': False}

    @wraps(func)
    def wrapper(*args, **kwargs):
        try:
>           return func(*args, **kwargs)

venv/lib/python3.8/site-packages/pytezos/michelson/micheline.py:27: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = {}, try_unpack = False, lazy_diff = False, comparable = False

    def to_python_object(self, try_unpack=False, lazy_diff=False, comparable=False):
        if lazy_diff:
            assert not comparable, f'big_map is not comparable'
            res = super(BigMapType, self).to_python_object(try_unpack=try_unpack)
            removals = {key.to_python_object(try_unpack=try_unpack, comparable=True): None
                        for key in self.removed_keys}
            return {**res, **removals}
        else:
>           assert self.ptr is not None, f'Big_map id is not defined'
E           AssertionError: ('big_map', 'Big_map id is not defined')

from smart-contracts.

emishur avatar emishur commented on June 23, 2024

This repo uses symlinks to bring reusable files into example projects. When running Ligo as a docker container, its PWD should be a parent directory not only for the example code directory, but for all linked directories as well.

from smart-contracts.

Related Issues (20)

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.