Hot answers tagged

8

The key_hash is just the address, which is derived from hashing the key. So if you have the key, you can easily generate the key_hash/address. The reason you may want the key is because you need this to verify a signature signed by the private_key, which can be used in multiple ways within a dapp/smart contract (one example is a smart-contract based multi-...


8

So this is a huge question and I think there are many people more qualified than me, but I'll offer some initial guidance. In Software Foundations, a book on Coq, they talk about an implied language called Imp. Imp has a syntax like: Z ::= X;; Y ::= 1;; WHILE ~(Z = 0) DO Y ::= Y * Z;; Z ::= Z - 1 END Which should be somewhat easily understood as ...


7

If you plan to write Smart Contracts, using Liquidity is often simpler than Michelson: http://www.liquidity-lang.org/


6

If we agree that the purpose of analyses is to both prove properties and help users of smart contracts to understand them, I would say: Values: studying what values each element of the storage can take in the future. Effects: studying what effects can occur in the future: typically what transfers can occur and on what conditions. Ownership: who can trigger ...


5

There are several useful Tools/SDKs, this are some that come to my mind: https://github.com/TezTech/eztz https://github.com/maht0rz/tezos-environment-manager https://github.com/keefertaylor/tezoskit https://github.com/LMilfont/TezosJ https://github.com/mscappini/Tz.Net


5

As of Taquito release v6.1.0-beta.0 Taquito offers a new API for Maps which support pairs as keys in Maps and BigMaps. Here's a link to documentation & examples on Accessing Map values using Pairs


4

Here is a link to a guide from reddit on how to set up a development environment using a localhost instance of a Tezos network and emac. https://medium.com/tezsure/setting-up-a-development-environment-for-tezos-36f86c382484


4

The contract you point to takes a single parameter of type address. Thus, as you write, it only has the default entrypoint. In taquito, the main entry point can be call through contract.methods.main. So your call should be: contract.methods.main(contractAddress).send()


3

After working with @taquito/rpc for a little while and having success there I also discovered in the main @taquito/taquito package there's some useful things you can subscribe to on the stream. A simple example to listen for new block hashes: const tezos = new TezosToolkit("http://localhost:8732"); const blockSub = tezos.stream.subscribe("...


2

First, note that there is work in progress to implement on-chain events for Tezos: TZIP and MR. At the moment however, I don't think you have a choice other than using an indexer. In addition to tzindex that you mentioned, there is also Nomadic Labs Tezos indexer.


1

tzkt.io offers a websocket based listener that can be used for the scenario mentioned by you. Alternatively, you can run a cron job that checks for changes in the contract storage (tzkt's API can be used once again) and records the same in the DB.


1

I would like to clarify some of the beacon behavior. The main responsibility of beacon is establishing and maintaining a communication channel between a dApp and a wallet. Beacon itself does NOT do any type checking or error handling regarding the contents of the tezos operations. The operations are sent to the other side as is, without any changes or error ...


1

Did you try value: { "int" : "10000" }? It seems that: the field value in parameters should be micheline (seeing how Unit is expressed) the entrypoint %stake has type nat (the linked contract says (nat %stake) in the parameter type) the Micheline encoding of the nat 10000 is {"int": "10000"} (this can be verified by ...


1

I'll just pust @FFF answer from Twitter here for reference: You cannot trigger automatically the contract after 30 minutes. You need someone to do it (typically an oracle). What you can do is simply check inside your contract that at least 30 minutes have elapsed. You should avoid putting too small upper bounds as they can be gamed.


1

Taquito return an operation object for each operation you inject using it. For instance if you do: const op = Tezos.contract.transfer({to: address, amount: 1}) You can wait until the confirmation with await op.confirmation(); Or op.then(() => { // post operation logic here })


1

Apparently Galleon just added support for calling contracts 🎉 Seems like this is something most wallets has not gotten around to yet. I will encourage anyone who stumbled across one that support it to add a comment to this answer with a link 😬🙌 Thanks!


Only top voted, non community-wiki answers of a minimum length are eligible