9 votes
Accepted

Base58 encoding/decoding of addresses in Micheline

Optimized addresses are 22 bytes, which follows the following format: The first byte is a tag, either 00 for implicit (tz) or 01 for originated (KT) If the first byte is 00 and we are working with ...
user avatar
7 votes
Accepted

API Access HTML/Javascript problem

You've encountered a mixed content error. Requests can't be a mixture of http and https, they need to be all of the same, preferably https. Just change the const url = 'http://api6.tzscan.io/v3/supply'...
user avatar
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: ...
user avatar
7 votes

How to decode raw transaction?

You can use the tezos-codec binary to decode this: tezos-codec decode 006-PsCARTHA.operation from ...
user avatar
7 votes
Accepted

How to retrieve data from smart-contract using javascript?

As of the current Babylon protocol and the upcoming Carthage, the RPC only provides you the ability to retrieve the value for a known key that you provide to the RPC. But even in this scenario you ...
user avatar
  • 1,979
4 votes

How to retrieve data from smart-contract using javascript?

We maintain an index of all historic bigmap data at TzStats. To fetch all current keys and values in a bigmap call https://api.tzstats.com/explorer/bigmap/:id/values If your bigmap is very large you ...
user avatar
3 votes
Accepted

Issue with API Request Cycle

The first element returned from https://api6.tzscan.io/v3/rolls_history/tz1NortRftucvAkD1J58L32EhSVrQEWJCEnB?number=1 is the data from the latest cycle. HTML <h1>Last Cycle</h1> <div ...
user avatar
3 votes

Base58 encoding/decoding of addresses in Micheline

I believe you should be able to make use of Stephen Andrews eztz library to access various tools from a js environment I would speculate the function is this one where you use the KT prefix ...
user avatar
  • 6,006
3 votes
Accepted

How to deploy a smart contract influenced by UI inputs using ConseilJS and SmartPy generated Michelson?

I cannot answer all your questions but at least, I can say that, in SmartPy.io, the storage sent to ConseilJS is the content of the tab "Storage" (in either Michelson or Micheline formats) and the ...
user avatar
  • 3,185
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:...
user avatar
2 votes

How to call PACK in JavaScript

Taquito has this functionality: the packData method in the RPC client package.
user avatar
2 votes
Accepted

How do I call the FA2 balance_of endpoint through Truffle?

As far as I know, you cannot check if the entrypoint returns the balance with JavaScript, because the entrypoint doesn't return a value but emits a transaction. I didn't try it for a FA2 token ...
user avatar
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`, ...
user avatar
  • 444
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. ...
user avatar
2 votes
Accepted

How to interact with SmartPy BigMap in contract?

The first and main issue you have is that setup is a method of class sp.Contract that is broken when you redefine it in your contract. This should not be the case and must be fixed on the SmartPy side....
user avatar
  • 3,185
2 votes
Accepted

How to get encrypted Tezos private key from decrypted private key and password?

You are not required to have an encrypted key edesk, you can just provide the edsk without password and encrypt your wallet storage the way you prefer. Answering your exact question: Python solution: ...
user avatar
1 vote
Accepted

Chest keys generated by @smartpy/timelock are not functional

The javascript primitives seem to be weak for creating the chest. You can use the CLI: ./timelock.exe create-chest-and-chest-key --payload "05010000000b48454c4c4f20574f524c44" --time 3456 ...
user avatar
1 vote
Accepted

Call method taking timestamp as parameter from JavaScript

For some reason you need to represent the timestamp as a string. So contract_instance.test("1"); will work.
user avatar
1 vote
Accepted

How to fix 'paused before out-of-memory crash' contract deployment error in browser? [ConseilJS]

You should probably use the Micheline / JSON version created by SmartPy.io. This is what is actually sent from SmartPy.io. You also need to change the conseiljs.TezosParameterFormat.Michelson ...
user avatar
  • 3,185
1 vote

Transfer operation using ConseilJS

Please retry creating the keys from the faucet mnemonic, it sounds like you missed a few characters when copying the secret key.
user avatar
1 vote
Accepted

How to ensure that operation was included in a block with taquito

Taquito return an operation object for each operation you inject using it. For instance if you do: const op = Tezos.contract.transfer({to: address, amount: 1}) You can wait until the confirmation ...
user avatar
1 vote
Accepted

How to originate a smart contract with Taquito

When you inject any kind of operation using taquito you will get an Operation object back which can allow you to interact with the result of your operation. In the case of Origination you will be ...
user avatar
1 vote

Is there a TzScan API to find the number of Tezos Node?

It's on the site. Just go tzscan and click API, or here you go https://tzscan.io/api
user avatar

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