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:
...
7
votes
How to decode raw transaction?
You can use the tezos-codec binary to decode this:
tezos-codec decode 006-PsCARTHA.operation from ...
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
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 ...
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. ...
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 ...
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 ...
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-...
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 ...
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 ...
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:...
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 ...
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.
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
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 ...
3
votes
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 ...
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`,
...
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 = ...
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 ...
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 ...
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 ...
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 ...
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), ...
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 ...
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 ...
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....
2
votes
Accepted
Getting CORS errors on mainnet.smartpy.io with Taquito
There was a problem on SmartPy side.
Is this working now?
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. ...
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();
...
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
taquito × 111smart-contracts × 24
smartpy × 11
operation × 10
beacon × 10
storage × 8
dapps × 8
wallets × 7
transfer × 6
node × 5
michelson × 5
tezos-signer × 5
javascript × 5
bigmap × 5
tezos-client × 4
transactions × 3
rpc × 3
api × 3
inject × 3
counters × 3
temple × 3
error × 2
contract × 2
ligo × 2
account × 2