Hot answers tagged

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("...


3

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 however be possible in the near future as Taquito will soon be able to plug into any indexer and extract all the values from a big map.


2

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 average so you know the numbers won't be skewed. Here's how I pulled the price feed with async/await syntax: // Ping Oracle contract const contract = ...


2

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 wrote a little script to test it. After calling the entrypoint of your choice, you must provide 2 parameters: 1- the field you want to set the union value with 2- ...


2

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), forge and send operations, etc. This library is actively developing (by the way, mscappini, author of Tz.Net, is also working with us on Netezos v2) and soon we ...


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.


2

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 this. Update the metadata link in the code Replace all occurences of sp.metadata_of_url("https://example.com") with sp.metadata_of_url("<...


2

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 following storage: { "vesting": { "vesting_schedule": { "next_payout": "2019-09-29T08:30:00Z", ...


1

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 different network names. With the right settings on your editor, you should get a list of the network names when you type the parameter of wallet.connect :)


1

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.confirmation(); const status = await operation.status(); The status can have the following value: 'applied' | 'failed' | 'skipped' | 'backtracked'


1

This functionality is not available in Taquito, however, if you need that kind of information in your dapp, you can use an indexer, for example, with the TzKT API, you can retrieve a list of smart contracts.


1

The bytes2Char function from the @taquito/utils package will convert these bytes to a string. The char2bytes is the counterpart that does the reverse.


1

You have 2 solutions for this problem: Use an indexer to get the values contained in the big map; Use an off-chain view to paginate the values if they can be accessed sequentially Off-chain example: Code with tests: https://smartpy.io/ide?cid=QmNeBqAbS4yotpDpdv7SPb7G3a3aHZpEoeKyzHnGuMHtcT&k=cb7d23e3d4856e707cba Explorer: https://tzcomet.io/#/explorer%...


1

I think this is related to this issue: https://github.com/ecadlabs/taquito/issues/730 You first need to create an instance of TezosToolkit using the RPC URL of your choice. example: import { TezosToolkit } from '@taquito/taquito'; const Tezos = new TezosToolkit('https://api.tez.ie/rpc/edonet'); const balance = await Tezos.tz.getBalance('...


1

Tezos Taquito has docs on how to drain an account which you can find here: https://tezostaquito.io/docs/drain_account It covers how to drain implicit and originated accounts.


1

[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 a link to the newly provided documentation. Tezos does not allow for sending the whole address balance, some dust left on the account is required to be able to ...


1

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 contract = await tezos.contract.at(contractAddress); More details on the wallet API here: https://tezostaquito.io/docs/wallet_API#calling-a-smart-contract


1

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 creation of an FA2 token through Taquito is formatted in this way: [{ from_: sender, txs: [{to_: recipient, token_id: token_id, amount: amountOfTokens}]}]. This is ...


1

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.contractAddress); const signatures: string[][] = contract.parameterSchema.ExtractSignatures(); signatures will then contain an array of an array of strings, where ...


1

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] }


1

The syntax is correct for Taquito, you declare a set as a JavaScript array. The error seems to be coming from the fact that sets can only hold comparable values and you try to use it with cryptographic signatures, which is not a comparable type.


1

If you want to do it with Taquito, the confirmation method on the operation object returns a promise with different information like the block, the status, etc. You can also use confirmationObservable to get the same information with an observable. For more detailed information, you will have to use an indexer like Better Call Dev (although Taquito is ...


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