Questions tagged [pact-lang]
Pact is a language for developing smart contracts to run on a fast deterministic blockchain.
11
questions
0
votes
2answers
48 views
How do you do a for-loop in pact?
I'd like to loop over an array of values. Something like
for each foo in bar[] do
{
foo.doSomething
}
How do I do this in pact?
I see in your todomvc example that you get a value back from the ...
2
votes
1answer
67 views
getting tx sender data in a pact-lang smartcontract
I’m trying to access the keyset of a sender of a transaction without explicitly passing the publicKey as a string function parameter.
I know that in the docs there is a (chain-data) function that ...
4
votes
1answer
68 views
Pre-Built Module bind
I am new with Pact (Kadena.io), Could you please give me an easy explanation about what the module bind does ? the explanation in the manual is not completely clear to understand.
Thank you.
pact-lang
2
votes
1answer
27 views
How do you turn on Pact linting on Emacs?
I want to be able to write Pact code on Emacs. Is Pact available on Emacs? If so, how can I enable it?
1
vote
1answer
18 views
Formal Verification slow down with Pact?
I was going to implement this piece of code in my smart contract:
(defun absBug:integer (num:integer)
;; This property fails
@model [(property (>= result 0))]
(if (= (- (* (- num 6) (+ num 11))...
1
vote
1answer
96 views
Format does not except Amount:Decimal
I was writing over a simple payment contract and noticed that I was receiving the warning:
We can only analyze calls to format formatting {string,integer,bool}
(not amount)
Below is my code, I ...
3
votes
1answer
36 views
Pact Formal Verification Properties
I see that Pact can automatically check certain properties of smart contracts using Microsoft's Z3 theorem prover. Are there relevant properties of smart contracts that can't be verified automatically?...
3
votes
1answer
50 views
Typing Variables in Functions
I was attempting a basic hello world smart contract in Pact.
While being able to complete the contract I received a warning. It didn't stop my contract from running but did concern me.
In future ...
3
votes
1answer
62 views
How to comment out chunk of code in Pact?
How do I comment out a chunk of code in Pact? Is there a shortcut in Atom for this?
I have tried command+? but it comments it out in HTML format.
This does however work in Pact Web (pact.kadena.io)
1
vote
0answers
14 views
Module gaurds in Pact
With module gaurds, is it possible to insert to a table but not add a read function within that defined module that sits on a public chain (chainweb)...then subsequently define a module on scalableBFT ...
1
vote
1answer
66 views
Pact ToDo MVC - No handler accepted “/” Message in Browser
After launching, https://github.com/kadena-io/pact-todomvc in the browser I get the error No handler accepted "/" . I've tried toggling the server.conf file to both localhost:9000 and 8080.
Is there ...