Questions tagged [async]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
39 views

How to use AsyncHTTPProvider in web3py?

I am trying to use the AsyncHTTPProvider in a project, and here is my test code: import asyncio from web3 import Web3 import asyncio async def main(): w3 = Web3(Web3.AsyncHTTPProvider("http://...
0
votes
0answers
190 views

How to program an NFT with multiple layers?

NFTs with multiple layers are being made now. e.g. an NFT made of different images sometimes owned by different artists. These NFTs are referred to as programmable NFTs, async NFTs and or dynamic NFTs....
0
votes
0answers
38 views

"Undefined" when trying to use async/await/promise

I'm currently trying to put in the function: truffle console truffle (development) > const token = await Token.deployed() And the result is coming up as undefined. I've started over my DAPP project ...
1
vote
1answer
36 views

Web3 returning Promise instead of value? [closed]

I have a simple async/await function get the total supply of my contract. It returns a promise, however. async function supply() { const supply = await contract.methods.totalSupply().call() ...
0
votes
0answers
18 views

Oracle Price Feed Event-Based mechanism

As you know chainlink oracles work like callback functions. I have only one function is that payable one and I need to know the correct eth value in token parity. I cannot request data when the ...
1
vote
0answers
127 views

In Python, how do I use subscriptions, or otherwise perform asynchronous operations?

I have the following code that polls for transactions every second. I want to make it more responsive, and not use polling, but instead something quicker. tx_all_pending = w3.eth.filter('pending') ...
0
votes
2answers
480 views

How to get transaction hash without waiting for await call?

for my demo I need the transaction hash instantly without waiting for callback of sync call. Here my code: aggiungiAllaBlockChain: async(u,n,c,e) => { try { const web3 = new Web3(App....
0
votes
1answer
215 views

Test.js Function Event Logs Return Empty Array - Async/Await/Promise/Tronweb Issue

I'm working on a Tron smart contract and am providing a function in my tests file which emits to an event. When trying to console.log the logs I get an empty array. Is this because of lag for the ...
0
votes
1answer
86 views

Cannot read property in event object

I am attempting to collect event information from a contract. When I call the event, I am attempting to collect a specific return value event.returnValue.pubkey. When I run the code below, I get the ...
0
votes
1answer
249 views

Truffle Contract sendTransaction not immediately returning transaction hash

I am using Truffle Contract to call a Smart Contract method that writes to the ethereum blockchain. My web3 client is connected to my own Open Ethereum node. Below is the code (nodejs) that I am using ...
0
votes
1answer
48 views

Is using oraclize to schedule using execution of a function asynchronous?

I am looking for ways to automatically execute a function call every 24 hours in my smart contract and came across this answer. Is the solution here asynchronous, i.e. can the contract execute other ...
1
vote
1answer
64 views

Exit process after sending multiple tx asynchronously

I have written a function that allows me to send an arbitrary amount of transactions, asynchronously, to my smart contract. However the process stays open even after the last transaction has finished. ...