Questions tagged [avalanche]

Avalanche is an open-source platform for launching decentralized applications and enterprise blockchain deployments in one interoperable, highly scalable ecosystem.

Avalanche is an open-source platform for launching decentralized applications and enterprise blockchain deployments in one interoperable, highly scalable ecosystem. Avalanche is the first decentralized smart contracts platform built for the scale of global finance, with near-instant transaction finality. Ethereum developers can quickly build on Avalanche as Solidity works out-of-the-box.

A key difference between Avalanche and other decentralized networks is the consensus protocol. Over time, people have come to a false understanding that blockchains have to be slow and not scalable. The Avalanche protocol employs a novel approach to consensus to achieve its strong safety guarantees, quick finality, and high-throughput without compromising decentralization.

Read more about Avalanche in its documentation.

31 questions
4
votes
1 answer

Get Avalanche block data by block hash with web3.py

How do I get block data by block hash? I'm interested in getting block timestamp for each new block. from web3 import Web3 avalanche_url = 'https://api.avax.network/ext/bc/C/rpc' provider = Web3(Web3.HTTPProvider(avalanche_url)) new_block_filter =…
MikkoP
  • 4,864
  • 16
  • 58
  • 106
3
votes
1 answer

How to verify avalanche block is accepted with web3.py

I am trying to build a bot that listens to events on AMMs for various chains and I am running into issues when trying to build out my algorithm for the avalanche network. When calling the getLogs function for a particular event, the program will…
Matg
  • 91
  • 6
2
votes
1 answer

How do I run avalanchego with a local version of coreth?

I forked coreth and added some custom functions. I want to compile and run avalanchego with this custom coreth but have been having issues. In the coreth documentation there are short instructions for running avalanchego with a local coreth here…
2
votes
1 answer

Interacting With Contract Web3.js

I have been trying to interact with a contract on the AVAX chain using web3js and it keeps throwing the error, "TypeError: Cannot read properties of undefined (reading 'send')". I cannot figure out why this is happening, as it should be a valid…
2
votes
1 answer

Trying to subscribe to a specific event on ETH using Web3, but not sure how to retrieve the returned data and use it

I'm trying to build a Javascript Bot subscribing to specific events on a contract, I have written some lines of code but I'm not sure how the EventEmitter returns data and how I can use it. Can anyone give me an example on how I can retrieve…
Devdatt N
  • 21
  • 5
1
vote
0 answers

Avalanche Cluster Nodes stops automatically with out any error

I tried to setup avalanche cluster nodes using avalanche-network-runner https://docs.avax.network/subnets/network-runner I was able to run the nodes, but then after a while the nodes stop like below [node1] INFO [11-24|17:23:12.281]
heypran
  • 126
  • 1
  • 11
1
vote
0 answers

Timeout when communicating with Web3 Provider

Background I am trying to investigate and solve problems with a containerized NodeJS web service app that communicates with Avalanche Test Network (https://api.avax-test.network/ext/bc/C/rpc) in order to Mint NFTs. //... provider = new…
raidensan
  • 1,099
  • 13
  • 31
1
vote
1 answer

Cannot deploy EVM subnet locally on Avalanche "Error: failed to query network health"

I'm trying to deploy EVM subnet locally using avalanche-cli. I'm running it on Ubuntu through WSL. Running avalanche subnet deploy somechain -l and waiting for 2 minutes returns: Error: failed to query network health: the health check failed to…
1
vote
1 answer

how to setup environment for avalanche's test network

I'm new to avalanche and have never used go before. I have been trying to deploy an Avalanche local test network according to the documentation in my ubuntu20.04 but it's not very clear what should exactly be done about the GOPATH. It is…
1
vote
1 answer

How to discover 'random' numbers in Avalanche blockchain solidity code

I am trying to help someone discover how their code was hacked. They use a random number generator in the blockchain like this: uint256 random = uint256( keccak256( abi.encodePacked( …
Pearl
  • 392
  • 2
  • 12
1
vote
0 answers

AvalancheJS get input/output id

I would like to get the input/output id that is shown in https://avascan.info: I could not find any way to get this. There is a getUTXOID function but it does not give the same id. (It would give xrwoWWtWPq4oEAVPRVAQWLCQrdhLeGV5ds4PciC5AnekC6A3r in…
httpete
  • 5,875
  • 4
  • 32
  • 41
1
vote
1 answer

AvalancheJS getUTXOS: couldn't unmarshal an argument

Hoping somone could explain what's going on here. I am getting this error Error: couldn't unmarshal an argument. Ensure arguments are valid and properly formatted. with this code, seems like something is wrong with xAddresses format? const…
1
vote
0 answers

get Avalanche C-Chain contract Abi's

Is there a way to get Avalanche C-Chain contract Abi's like etherscan API? I checked AvalancheGo API, but there was no Api's that gives me the data.
Alex Won
  • 177
  • 2
  • 11
1
vote
0 answers

Avalanche: Finding assetID values for a given address

Context The Avalanche documentation has a section on eth_getAssetBalance. Here's the example call shown: curl -X POST --data '{ "jsonrpc": "2.0", "method": "eth_getAssetBalance", "params": [ …
dharmatech
  • 8,979
  • 8
  • 42
  • 88
1
vote
2 answers

Avalanche - eth_getBalance - Converting the balance from hexadecimal to decimal

Context Using the Avalanche Explorer, I selected a random address that has some AVAX in it: https://cchain.explorer.avax.network/address/0xB9F79Fc4B7A2F5fB33493aB5D018dB811c9c2f02/transactions At the time that I looked that address up, the AVAX…
dharmatech
  • 8,979
  • 8
  • 42
  • 88
1
2 3