Hot answers tagged

3 votes
Accepted

Can't get tzBTC out of the tzBTC Granadanet contract

Only admin can call mintOrBurn in that particular contract. As you can see in the contract storage, tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx is the admin, so you need a private key from this address. ...
Groxan's user avatar
  • 2,691
2 votes
Accepted

Best way to create FA1.2 token with TZIP016

The FA1.2 template was updated this week by Keefer Taylor. It will be updated in https://smartpy.io templates this weekend. Template link: https://smartpy.io/ide?cid=...
Rodrigo Quelhas's user avatar
2 votes
Accepted

How to attach data to an error

Currently, LIGO does not support failing with an arbitrary type like a tuple or record. However you can embed Michelson to fail with the tuple.
Eugene Mishura's user avatar
2 votes

How to correctly implement an interface to an FA1.2 contract, from a programming language?

You are correct. There is not a way to get the value directly. You would have to originate a contract like this. Let's call it getnat.tz. We will use it to create an error message after a dry run call....
MCH's user avatar
  • 680
2 votes
Accepted

Contract does not exist

I thought that it was a copy of the previous main net + the new changes to be applied (Granada in this case). It isn't, testnets share no history with mainnet, or each-other. From the Test Networks ...
pasqu4le's user avatar
  • 186
2 votes

how to calculate current storage values for liquidity baking CPMM

tzBTC uses 8 decimals like Bitcoin, so you should divide tokenPool by 100000000 to get the number of tzBTC held by the contract.
Arthur B's user avatar
  • 4,599
2 votes
Accepted

how to send a nat value other than a whole number

Its not possible to send lower than 1 mutez. nat is also required to be a whole number. Tezos/XTZ has 6 decimal places. When a user sees "1 XTZ" in an app, that is represented as 1000000 on ...
Simon McLoughlin's user avatar
  • 1,037
2 votes
Accepted

how to calculate the value of a single LQT token for Liquidity Baking?

When you add tezAmount liquidity you deposit tezAmount * tokenPool / xtzPool tokens (with division rounding up) and receive tezAmount * lqtTotal / xtzPool LQT (with division rounding down). When you ...
Sophia Gold's user avatar
2 votes
Accepted

call to 'approve' entrypoint of tzBTC contract failing with 'UnsafeAllowanceChange'

the allowance is only 10 and when I try to chance it I get an UnsafeAllowanceChange error. This error is raised because the allowance is already 10, from the UnsafeAllowanceChange documentation: ...
pasqu4le's user avatar
  • 186
1 vote
Accepted

TzKt not recognising the tokens of my contract

In short: in your particular case the tokens will be recognized after the first transfer call. Why? Your contract doesn't fully implement the FA standard (in particular, according to the standard, you ...
Groxan's user avatar
  • 2,691
1 vote
Accepted

what's a sensible minLqtMinted to send to the Liquidity Baking CPMM when calling addLiquidity?

One way to think about it is to think about how many lqt would be minted if the transaction hit the contract in its current state and allow for some slippage. For example, with 10% slippage, you would ...
Arthur B's user avatar
  • 4,599
1 vote
Accepted

what is the Liquidity Baking subsidy used for and how do liquidity providers benefit?

When liquidity providers deposit tez and tzBTC they receive a liquidity token in return and when they redeem liquidity tokens they receive back tez and tzBTC. The subsidy means they will receive more ...
Sophia Gold's user avatar
1 vote
Accepted

Tweaking FA1.2 to add level based balance snapshots to assist token voting in a DAO

We've implemented a version of this for Murmuration DAO, and I think it's a pretty valid and cool idea. Our code is here: https://github.com/Hover-Labs/murmuration/blob/main/smart_contracts/token.py ...
keefertaylor's user avatar

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