Questions tagged [javascript]
The javascript tag has no usage guidance.
22
questions
0
votes
1answer
32 views
Manipulation of Tezos.amount and test cleanup storage
I am about to write some tests to verify some method functionality.
The method functionality is quite simple:
function checkAmount(const store : storage) : storage is
block{
if Tezos.amount <= ...
0
votes
1answer
19 views
Call method taking timestamp as parameter from JavaScript
I have a Truffle instance of the contract and I call the method like this
contract_instance.test(1);
Where test in a function that takes a timestamp as parameter.
This gives me this error message:
...
1
vote
1answer
46 views
How to call PACK in JavaScript
In my smart contract in LIGO I serialize some data using Bytes.pack which calls the underlying PACK Michelson instruction. In my case, the function signature is (nat, address, nat) -> bytes. Does ...
3
votes
1answer
85 views
How do I call the FA2 balance_of endpoint through Truffle?
I have written a contract to implement FA2 and I have a Truffle/JavaScript setup to test this contract while running against a sandboxed node. I can test the transfer endpoint and the update_operators ...
5
votes
3answers
282 views
How to decode raw transaction?
I am using @taquito to build and sign a transaction. But before I send it I want to decode it to check my destination address, amount etc like you would normally do for other blockchains.
Not sure ...
1
vote
1answer
68 views
How to increase the counter of a transaction
I am using @taquito/taquito.
To transfer tezos tokens from one address to another is am using below function.
Tezos.contract.transfer({
to: toAddress,
amount: amountToSend,
...
4
votes
1answer
138 views
How to estimate Baker and Storage fee with @taquito for a contract?
I have a simple smart-contract that holds user funds and that can be withdrawn by sending a signed message.
However, I would like to offer the possibility for users to anticipate the fees they have ...
1
vote
2answers
184 views
How to retrieve data from smart-contract using javascript?
I have stored data that I would like to retrieve from a deployed smart-contract.
The storage structure was defined using SmartPy:
def __init__(self):
self.init(bmap=sp.big_map(tkey=sp....
1
vote
1answer
18 views
How to fix 'paused before out-of-memory crash' contract deployment error in browser? [ConseilJS]
I wish to deploy a contract using ConseilJS that I am able to originate successfully using smartpy.io
However, when I copy the generated Michelson and initial storage into the following function:
...
1
vote
1answer
66 views
How to interact with SmartPy BigMap in contract?
I would like to setup a smart contract that contains (as defined by smartpy) a BigMap storage.
I have the following code:
import smartpy as sp
class contract(sp.Contract):
def __init__(self):
...
2
votes
1answer
42 views
ConseilJS TezosContractIntrospector.generateEntryPointsFromAddress `Uncaught (in promise) TypeError: Cannot read property '0' of undefined`
Trying to retrieve contract entry points using the TezosContractIntrospector
The following code:
async function entry_points(){
const server={
url:'https://conseil-dev.cryptonomic-infra.tech:...
2
votes
1answer
177 views
How to deploy a smart contract influenced by UI inputs using ConseilJS and SmartPy generated Michelson?
I wish to be able to create a smart contract taking input from a UI to supply parameters pubKey,prvKey,pubHash for the deployment and minAmount and maxTime to influence the Michelson.
I have the ...
1
vote
1answer
64 views
Transfer operation using ConseilJS
I'm trying to use ConseilJS to make a transfer to a contract from a webpage.
I'm using a keystore object based on my tezos-client wallet.
const keystore = {
publicKey: '...
1
vote
1answer
49 views
How to ensure that operation was included in a block with taquito
When I inject an operation using the taquito library, how can I have my program wait for a specific number of blocks after my operation is included in the network.
1
vote
1answer
92 views
How to originate a smart contract with Taquito
How can I access my contract after originating it using taquito? If I use taquito like this.
Tezos.contract.originate({...contractOptions})
How can I access my new originated address and start using ...
1
vote
1answer
89 views
3
votes
0answers
14 views
API Ballots not working
The API : https://api6.tzscan.io/v3/ballots/11 is not working, I don't understand why.
Tzscan API instructions :
https://tzscan.io/api#operation/405
2
votes
1answer
42 views
Is there a TzScan API to find the number of Tezos Node?
I'm looking for an API to get the number of Tezos Node or the number of Bakers.
3
votes
0answers
37 views
Is there a TzScan API to find the total number of delegated Tezos?
I'm looking for an API to get the total number of delegated Tezos.
I already found an API to get the number of rolls delegated:
https://api6.tzscan.io/v3/rolls_history/...
4
votes
2answers
85 views
Issue with API Request Cycle
I have an issue to request the Cycle Number from this API. I don't understand how to use the map to get the data from the last cycle only.
const ul2 = document.getElementById('Cycle');
const url2 =...
4
votes
1answer
174 views
API Access HTML/Javascript problem
I have an issue trying to use javascript to get the circulating supply by requesting data from Tzscan API:
HTML code to request the circulating supply:
<!DOCTYPE html>
<html>
<head>...
7
votes
2answers
260 views
Base58 encoding/decoding of addresses in Micheline
who know some javascript library for decoding optimized Micheline representation of an address value?
011cd5f135e80fd8ebb6e43335b24ca6116edeba6900 => KT1BDEn6wobs7tDReKkGheXAhoq278TGaNn5