Giter Club home page Giter Club logo

Comments (6)

localhuman avatar localhuman commented on July 24, 2024

which branch is this from?

from neo-python.

raza-basit avatar raza-basit commented on July 24, 2024

Master branch.
Did you required any other information?

from neo-python.

localhuman avatar localhuman commented on July 24, 2024

How did you compile this contract? If I call a deploy method on a different NEP5 contract, I do not get this error.

invoking contract - LOCALTOKEN PYNEP5
[neo.SmartContract.StateReader] -> RUNTIME.Log: b'doing application!'  
[neo.SmartContract.StateReader] -> RUNTIME.Log: b'deploying!'  
[neo.SmartContract.StateReader] -> RUNTIME.Log: b'only owner can deploy'  
[neo.SmartContract.StateReader] -> RUNTIME.Log: b'deployed!'  

-------------------------------------------------------------------------------------------------------------------------------------
Test invoke successful
Total operations: 301 
Results ["ByteArray: bytearray(b'\\x00')"] 
Invoke TX gas cost: 0.0 
Invoke TX Fee: 0.001 
-------------------------------------------------------------------------------------------------------------------------------------

You may now invoke this on the blockchain by using the 'invoke' command with no arguments or type 'cancel' to cancel invoke

neo> 

from neo-python.

raza-basit avatar raza-basit commented on July 24, 2024

I have compiled it on Visual Studio with neo-csharp compiler.
I am using the ICO_Template contract from csharp-example. My deploy function has following lines of code.

        public static bool Deploy()
        {
            byte[] total_supply = Storage.Get(Storage.CurrentContext, "totalSupply");
            if (total_supply.Length != 0) return false;
            Storage.Put(Storage.CurrentContext, Owner, pre_ico_cap);
            Storage.Put(Storage.CurrentContext, "totalSupply", pre_ico_cap);
            Transferred(null, Owner, pre_ico_cap);
            return true;
        }

from neo-python.

localhuman avatar localhuman commented on July 24, 2024

This is a problem with the current neon compiler, which has been fixed in recent changes. See issues https://github.com/neo-project/neo-compiler/pull/49 and related https://github.com/neo-project/neo-compiler/pull/50

You can build a new version of neon compiler, then re-compile. Or, you could wait for a new release.

from neo-python.

raza-basit avatar raza-basit commented on July 24, 2024

Thanks for the explanation. I will try with the updated compiler.

from neo-python.

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.