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. ...
user avatar
  • 2,327
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=...
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.
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....
user avatar
  • 670
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 ...
user avatar
  • 146
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.
user avatar
  • 4,409
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 ...
user avatar
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 ...
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: ...
user avatar
  • 146
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 ...
user avatar
  • 4,409
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 ...
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 ...
user avatar

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