7

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'; to be https const url = 'https://api6.tzscan.io/v3/supply'; fetch(url) .then(resp => resp.json()) .then(({dls}) => { let span = createNode('span')...


7

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 an implicit (tz) address, then: The second byte describes the curve and therefore the prefix. This is either 00 (ed25519/tz1), 01 (secp256k1/tz2) or 02 (p256/...


7

You can use the tezos-codec binary to decode this: tezos-codec decode 006-PsCARTHA.operation from ...


6

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: const { localForger } = require('@taquito/local-forging'); const sbytes = '...


4

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 need to provide not the readable key you stored, but a hash of that key as that is how it is represented internally. This answer describes how to call the RPC The ...


3

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: 66993, _storageLimit: 0, opSize: 216, baseFeeMutez: 100 } Full example: Tezos.contract.at('KT1KBhwoSeqJt26oK8yjubTfdSgDuaVC87xR')) .then(contract =>...


3

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 code is similarly the content of one of the corresponding tabs. Depending on the form you're using, you need to set Michelson or Micheline (the latter is quite ...


3

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 b58cencode: function (payload, prefix) { const n = new Uint8Array(prefix.length + payload.length); n.set(prefix); n.set(payload, prefix.length); ...


3

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 id="cycle"></div> <div id="rollCount"></div> <div id="rollTotal"></div> JavaScript const url = 'https://api6.tzscan.io/v3/...


2

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. So rename setup anything else and it will work. A second issue, entry points take two parameters self and params, not just one. A third issue, contract=...


2

Taquito has this functionality: the packData method in the RPC client package.


2

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 contract but to test a FA1.2 token contract with Truffle, I wrote a simple contract that would call the FA1.2 balance_of entrypoint and receive the balance on a ...


2

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`, parseOperationBytesData, { headers: { 'Content-Type': 'application/json' } } ...


2

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 can page through the result with limit and offset parameters (default is 100 entries, max is 500). See our bigmap docu for more details and examples. If you ...


1

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 parameter into conseiljs.TezosParameterFormat.Micheline.


1

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


1

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 with await op.confirmation(); Or op.then(() => { // post operation logic here })


1

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 able to interact with your newly deployed contract doing: const op = Tezos.contract.originate({...contractOptions}) const contract = await op.contract() This ...


1

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


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