Hot answers tagged

7 votes
Accepted

How to decode raw transaction?

Taquito can parse forged bytes using the parse() method in the @taquito/local-forging package. TypeDocs are here. You can see the unit tests here. Implementation to decode a signed transaction: ...
Jev Björsell's user avatar
7 votes

How to decode raw transaction?

You can use the tezos-codec binary to decode this: tezos-codec decode 006-PsCARTHA.operation from ...
Tomáš Zemanovič's user avatar
5 votes
Accepted

How do I get the storage value of a bigmap using pair datatype as key with taquito library?

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
Jev Björsell's user avatar
4 votes
Accepted

Get number of entries in bigmap

This is not something you will be able to achieve with Taquito (at least not for now, that will change in the future) and you have to use an indexer API. I recommend Better Call Dev API, you can ...
Claude Barde's user avatar
4 votes
Accepted

Taquito default entrypoint not found

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. ...
arvidj's user avatar
  • 2,378
4 votes

Operation cost for invoking smart contract

There is no formula that will give you the full cost and gas usage of smart contract invocation. The best method is to simulate. Contract code size and storage directly affects costs through storage ...
arvidj's user avatar
  • 2,378
4 votes
Accepted

Listen for operations of a deployed contract

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 ...
jon's user avatar
  • 133
4 votes
Accepted

How to know an operation has definitely been included?

The change to a smart contract is definitely part of the blockchain when one block has been added on top of the contract call. See https://tezos.gitlab.io/active/consensus.html#transaction-and-block-...
Raphaël Cauderlier's user avatar
3 votes
Accepted

Taquito + BeaconWallet = Signer?

I suspect you are using Taquito's Contract API, but the Wallet API should be used to interact with a wallet. For example: const contract = await tezos.wallet.at(contractAddress); Instead of : const ...
Roxane Létourneau's user avatar
3 votes

Can I iterate over a big_map using Taquito?

It is not possible using Taquito alone. You must use an indexer to extract all the key/value pairs from a big map (Better Call Dev is developed by Baking Bad who also offers an indexer API). This will ...
Claude Barde's user avatar
3 votes

How to estimate Baker and Storage fee with @taquito for a contract?

You can call toTransferParams({amount: 5}) on the method you want to estimate, and pass that result to Tezos.estimate.transfer() The results of which will look something like: Estimate { _gasLimit:...
Jev Björsell's user avatar
3 votes
Accepted

Why aren't the offchain views appearing?

The issue is caused by an invalid IPFS link. Steps to FIX the issue: Update the metadata (including views, etc...) Copy the generated JSON Upload the metadata JSON to IPFS You can use Pinata for ...
Rodrigo Quelhas's user avatar
3 votes

How to convert hex string/bytes to ASCII characters

The bytes2Char function from the @taquito/utils package will convert these bytes to a string. The char2bytes is the counterpart that does the reverse.
Roxane Létourneau's user avatar
3 votes

InMemorySigner from node crypto key

I don't think you can do this with a node, but we have a tiny typescript library to do this: https://gitlab.com/functori/dev/funkey.ts
iguerNL's user avatar
  • 1,141
3 votes

InMemorySigner from node crypto key

So what I did in the end is something like this: // Signer factory example from the docs const signerFactory = async (rpcUrl, pk) => { const Tezos = new Taquito.TezosToolkit(rpcUrl); await ...
Ulrik Strid's user avatar
3 votes

How do you decode an event?

The answer was to use encodePubKey(bytes) from @taquito/utils
hlvntn's user avatar
  • 111
2 votes

Operation cost for invoking smart contract

You can estimate your operation before executing it using Taquitos estimate API. Taquito uses the run_operation to get an estimate from the RPC. You can find documentation with examples on how to ...
Jev Björsell's user avatar
2 votes

How to decode raw transaction?

You can use the RPC endpoint: /chains/main/blocks/head/helpers/parse/operations to do that. Example: await axios.post( `${nodeURL}/chains/main/blocks/head/helpers/parse/operations`, ...
Daly's user avatar
  • 442
2 votes
Accepted

Signing transaction with external hardware device and broadcasting on Babylonnet gives invalid signature

I ran your code, and found out that your payload hash is not correct; these lines of code: const payload: string = bufferToHexString(Buffer.from(bb)); await sodium.ready; const payloadHash = ...
Tjappo's user avatar
  • 61
2 votes

Signing transaction with external hardware device and broadcasting on Babylonnet gives invalid signature

Util Link: base58.ml The pre-apply RPC call validates the signature prefix, while the inject operation call doesn't. You should use the specific curve prefix. sig([4, 130, 43]) # sig(96) generic ...
Rodrigo Quelhas's user avatar
2 votes

bigmap.get(key, "") with default param in case of no entry for key in the map with Taquito

As of Taquito release v6.1.0-beta.0 Taquito offers a new API for Maps which provides you with get and set calls. The API does not offer an optional default value param, You will have to catch the ...
Jev Björsell's user avatar
2 votes

How to get Harbinger price feed from Taquito

From my experience with Harbinger I believe it's best practice to pull the data from the Normalizer contracts, as opposed to the Storage contracts. The Normalizer contract gives you a volume weighted ...
Sean Magin's user avatar
2 votes
Accepted

Passing parameters in truffle tests

The correct syntax for the parameter is the following: "remove", [account1, account2] (2 different parameters, no object). I built a simple contract to emulate your case, deployed it and ...
Claude Barde's user avatar
2 votes
Accepted

Interact with Tezos in xamarin

There is https://github.com/baking-bad/netezos, a .NET Standard 2.0 library for working with Tezos. You can easily use it to interact with Tezos node via RPC, manage keys (it also supports Ledger), ...
Groxan's user avatar
  • 2,691
2 votes

Listen for operations of a deployed contract

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 ...
arvidj's user avatar
  • 2,378
2 votes

Is it possible to retrieve only a single variable from contract storage?

Yes, that is possible with TzKT API (it's free and open-source), which allows you to specify a path to a particular part in the storage you want to receive. For example, if a contract has the ...
Groxan's user avatar
  • 2,691
2 votes
Accepted

How can I tell if a WalletOperation failed in Taquito?

After calling the confirmation method, the status method can be called on the WalletOperation object. For example: const operation = await Tezos.wallet.originate({...}).send(); await operation....
Roxane Létourneau's user avatar
2 votes
Accepted

Getting CORS errors on mainnet.smartpy.io with Taquito

There was a problem on SmartPy side. Is this working now?
Jordan_tez's user avatar
  • 1,041
2 votes
Accepted

General solution for getting fungible token balance off-chain

A better approach would be to use an Indexer. In general wallets only communicate with the chain directly to inject an operation or to do some sort of highly specific task with a single contract. ...
Simon McLoughlin's user avatar
  • 1,037
2 votes
Accepted

Taquito does not originate or interact with test net contracts

It works if you remove the gas limit and fee entries: console.log('originating...'); const result = await Tezos.wallet.originate({ code: SAMPLE_CONTRACT, init: SAMPLE_STORAGE, }).send(); ... ...
Michael Kernaghan's user avatar

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