Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    evesnow91
    @evesnow91
    Btw you need to download scilla binary
    J. SK
    @JSSS
    guys, how do you like working with Scilla so far??
    kishankumar258
    @kishankumar258
    I am able to deploy "HelloWorld.scilla" contract on the testnet and its reflected on the "viewblock.io" site but on deploying others such as "auction.scilla" or "crowdfunding.sh" I get an "Assertion Error" and on the "viewblock.io" site its reflected as "errored transaction". What could be the cause of this?
    kishankumar258
    @kishankumar258
    Also, even after enabling the smart contract in constants_local.xml and installing scilla binary, I get the assertion error on deploying any contract on Local Network. Is anything else also needs to be done. To deploy I am using the method given on the pyzil github repo. Thanks.
    Ricky
    @ntatgss
    Hi, how can I deploy the contract using my testnet wallet?
    Ricky
    @ntatgss
    Does Savant work as same as Remix in ETH?
    Edison Lim
    @edisonljh
    Similar
    But can't deploy a contract to testnet through savant
    Ricky
    @ntatgss
    Yes that's a big problem to me now
    First link: Good for getting started
    Second link: Useful if you have some prior development experience
    winor
    @winor30
    Hello
    Is it possible to make type function to convert List (Pair (’A) (’B)) to Map (’A) (’B) in Scilla ?
    It seems imposible because key of Map has limitation that type should be String, IntX, UintX, ByStrX or ByStr.
    the following example code. (it has type error at let init_map = Emp ('A) ('B) in in Savant.)
    let list_to_map =
      tfun 'A =>
      tfun 'B =>
      fun (pairs_list : List (Pair ('A) ('B))) =>
        let init_map = Emp ('A) ('B) in
        let iter =
          fun (acc : Map ('A) ('B)) =>
          fun (cur : Pair ('A) ('B)) =>
            let fst_impl = @fst ('A) ('B) in
            let snd_impl = @snd ('A) ('B) in
            let k = fst_impl cur in
            let v = snd_impl cur in
            builtin put acc k v in
        let folder = @list_foldl (Pair ('A) ('B)) (Map ('A) ('B)) in
        folder iter init_map pairs_list
    Anton Trunov
    @anton-trunov
    @winor30 Hello, you are right, this is something not possible to write. Scilla prevents this already at the level of syntax, because the Map type constructor cannot be applied to a type variable. Maps require their key types to have some structure as we need to be able to hash the values of the key type. And just a generic ’A type does not provide this ability.
    winor
    @winor30
    @anton-trunov I understand it.
    Thank you so much!
    Anton Trunov
    @anton-trunov
    @winor30 You are very welcome! It’s very motivating to see questions like yours :)
    winor
    @winor30
    Hello everyone
    I posted about contract design pattern in Zilliqa forum.
    If you are interested, I hope you will see it.
    https://forum.zilliqa.com/t/best-way-about-data-segregation-pattern-contract/750
    DaoChemist
    @DaoChemist_twitter
    Hey everybody, we're considering starting bi-weekly calls for the Zilliqa dev community. We created a quick survey to gage the community's interest and the topics we should bring up during the call. So, please take a couple of minutes to fill out the survey, I'll be collecting the results all week and looking to set the first call next week:
    Cameron Sajedi
    @csajedi
    @AmritKumar can I request a medium post about the new procedures addition?
    https://scilla.readthedocs.io/en/latest/scilla-in-depth.html
    (For those that don't know, it was tweeted https://twitter.com/maqstik/status/1141505663102623744 about and is about 2/3 down the above doc page)
    In particular I want to understand any design patterns it should enable. Can it return a value, or should it rely on mutable state/ only contract-level constants like _sender? I'm going to try to build the scilla interpreter locally so I can run the checker.
    DaoChemist
    @DaoChemist_twitter
    @csajedi sounds like a great idea for a medium article.
    DaoChemist
    @DaoChemist_twitter
    @csajedi we'll get this started and get an article out shortly.
    DaoChemist
    @DaoChemist_twitter
    Hey everybody, we're having our first dev call this Friday 9 am Singapore time ( 9pm EST), here is the invite:
    https://calendar.google.com/event?action=TEMPLATE&tmeid=M2VvODdxMTEybzdpM2w5cWk4cmgwY2xxOG8gZ2FyZXRoQHppbGxpcWEuY29t&tmsrc=gareth%40zilliqa.com
    Hypercruz
    @Hypercruz
    Hey Guys, Just having a play around with the Scilla IDE. I can deploy the HelloWorld.scilla contract successfully which triggers the event message setHello, all good. Where is the message actually displayed to show either the true transition code : set_hello_code, or the false transition code : not_owner_code? Many Thanks
    evesnow91
    @evesnow91
    That message is a transaction. A chain call. So it’s not external facing.
    Hypercruz
    @Hypercruz
    transition setHello (msg : String)
    is_owner = builtin eq owner _sender;
    match is_owner with
    | False =>
    e = {_eventname : "setHello()"; code : not_owner_code};
    event e
    | True =>
    welcome_msg := msg;
    e = {_eventname : "setHello()"; code : set_hello_code};
    event e
    end
    when match is_owner is false it should send a message not_owner_code?
    where can I view this message in scilla IDE
    Hypercruz
    @Hypercruz

    let one_msg =
    fun (msg : Message) =>
    let nil_msg = Nil {Message} in
    Cons {Message} msg nil_msg

    let not_owner_code = Int32 1
    let set_hello_code = Int32 2

    Cameron Sajedi
    @csajedi
    @Hypercruz events are displayed in the "events" button which is at the top of the pane with the editor in Savant. it should have a badge if you've triggered one
    BTW, is there a way to know in advance/internally to the smart contract what its own address is? it seems cumbersome to have a mutable field that the contract invoker must then immediately call to update. My intuition leads me to think that there should be a _contract or _self reserved constant that is set at intialization.
    Hypercruz
    @Hypercruz
    @csajedi yes the event display works fine. What I am trying to find is when calling the set_hello transition you are prompted to enter a message string. I would like to see where this message string is displayed.
    image.png
    This is the only information diplayed in the event message.
    image.png
    evesnow91
    @evesnow91
    @csajedi There is a variable called _this_address that refers to the contract’s own address
    Amrit Kumar
    @AmritKumar
    @Hypercruz Transition params are not displayed. If you want to see the impact of a transition call on the state of the contract, you will have to look for the state tab.
    Hypercruz
    @Hypercruz
    @AmritKumar Thats great, exactly what I was looking for.....Much appreciated.
    Cameron Sajedi
    @csajedi
    @evesnow91 thanks for that
    Lili0820
    @Lili0820
    When I call the builtin verification function ecdsa_verify, the scilla IDE always reports an error that 'cannot apply ecdsa_verify built-in to arguments of types [ByStr33; ByStr52; ByStr64]'. However, the scilla-doc shows that 'builtin ecdsa_verify pubk data sig : Verify a signature sig of type ByStr64 against a byte string data of type ByStr with the ecdsa public key pubk of type ByStr33.'
    evesnow91
    @evesnow91
    @Lili0820 You cannot specify type ByStr for data in the Scilla web IDE unfortunately. That can only be done natively on the Scilla binary by specifying ByStr as the type. A workaround is to use the function builtin to_bystr hto convert the argument you input from ByStr52 -> ByStr.
    Lili0820
    @Lili0820
    @evesnow91 OK. It takes effect. Thank you very much.
    winor
    @winor30

    Hello all
    Could I use Run-time Errors expression for scilla in savant ide or test-net ?
    I tried it, but it seemed unusable.

    refs: https://scilla.readthedocs.io/en/latest/scilla-in-depth.html#run-time-errors

    evesnow91
    @evesnow91
    @winor30 It doesn’t like Zilliqa/scilla#582 is included in scilla v0.3.0 which is the version running on mainnet and testnet. Let me check with the scilla team on the savant ide binary version.
    winor
    @winor30
    @evesnow91 Thank you for your help!
    Cameron Sajedi
    @csajedi
    Hello! I'm trying to deploy a contract, which I've checked with a local installation of scilla checker and savant IDE. However, whenever I try with the python sdk it just hangs till timeout then replies with an array [9,1]. Golang SDK lacks the functionality, official JS SDK, zilpay deployer don't seem to function either. If anyone here has successfully deployed a complicated contract, how did you do it?
    DaoChemist
    @DaoChemist_twitter

    Hey everybody, we'll be having our second dev community call this Thursday! Join in if you can (we'll have a recording as well):
    Gary Mensah is inviting you to a scheduled Zoom meeting.

    Topic: Zilliqa Dev Community Call #2
    Time: Sep 5, 2019 09:30 PM Singapore

    Join Zoom Meeting
    https://zoom.us/j/311147972

    One tap mobile
    +16465588656,,311147972# US (New York)
    +17207072699,,311147972# US (Denver)

    Dial by your location
    +1 646 558 8656 US (New York)
    +1 720 707 2699 US (Denver)
    Meeting ID: 311 147 972
    Find your local number: https://zoom.us/u/aduFNnTYoL

    DaoChemist
    @DaoChemist_twitter
    Hey everybody, we are moving to Discord! The Zilliqa Official server is live:
    https://discord.gg/8tpGXrB
    we will keep Gitter around for a while, but our attention and support will be mostly happening on Discord from now on.