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 ...
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 ...
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
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.
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
How do you submit a pair when calling an entrypoint on a contract with Taquito?
Your code is correct, but you have to use the methodsObject property instead of methods if you want to use a JavaScript object as the parameter of the contract call.
Alternatively, you can split the ...
1
vote
Accepted
How to prevent Taquito Tezos.estimate.transfer() from throwing a balance_too_low and cannot_pay_storage_fee error?
[Edit] As Simon has suggested, the fee has been reduced, and the only restriction is to have 1 mutez left on the account or undelegate the account if the account is used for delegation. Jev suggested ...
1
vote
Taquito + BeaconWallet = Signer?
I've come back here a few times so it's time I put the solution to my problem in case I make this mistake again:
Check that you've actually synced your wallet
Assuming the project is in active ...
1
vote
Is there a way to list the supported networks from Temple using Taquito?
wallet.connect seems to indicate you are using the @temple-wallet/dapp package. If you are using TypeScript, there is the TempleDAppNetwork enum that you can import from the package with all the ...
1
vote
Calling contract entrypoint having complex parameters
First of all, there is an error in your Javascript, you cannot name the array indices and assign them a value, instead of [from_ = sender ...], just write [sender ...].
Then, the argument for the ...
1
vote
Accepted
How do I get method arguments using Taquito?
Yes, you can get the function signature, not just the function names. This can be done like this.
const contract: ContractAbstraction<ContractProvider> = client.contract.at(this.state....
1
vote
Passing parameters in truffle tests
I believe the error is that you pass the 2 parameters (add and remove), but you should only pass the chosen one.
I suggest you try : { add: [account1, account2] }
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
taquito × 73smart-contracts × 21
operation × 9
smartpy × 8
storage × 7
transfer × 5
bigmap × 5
tezos-client × 4
rpc × 4
tezos-signer × 4
javascript × 4
dapps × 4
transactions × 3
michelson × 3
beacon × 3
node × 2
wallets × 2
error × 2
contract × 2
testing × 2
blockchain × 2
truffle × 2
inject × 2
signature × 2
mainnet × 2