Comments (7)
Hey @shaswatsaloni, could you please check out this repo for an explainer on how epoch transactions work and how to fetch them.
from celo-blockchain.
Hey @carterqw2 , that repo was really helpful, thanks.
One more query here, i want to get the epoch rewards for the address : 0x9efecf85d7e668c0c3c7a778a1164b064234f96d
So, here i can see it has epoch transactions in block: [5598720]
the explorer link : https://explorer.celo.org/mainnet/address/0x9efeCf85d7E668c0C3c7a778A1164b064234f96d/epoch-transactions
When i am calling the POST method for this particular block:
{
"method": "eth_getLogs",
"params": [
{
"fromBlock": "0x556E00",
"toBlock": "0x556E00"
}
],
"id": 1,
"jsonrpc": "2.0"
}
I am not able to find the particular address (0x9efecf85d7e668c0c3c7a778a1164b064234f96d) in the response JSON.
how would i calculate and get the epoch rewards here?
Thanks,
Saloni
from celo-blockchain.
Hi @shaswatsaloni! You're trying to get individual voter rewards, please refer to this section of the explainer for more details. Celo Explorer has to perform additional calculations to be able to display individual voter rewards that are not directly available through logs. I hope that helps.
from celo-blockchain.
Okay, understood.
So, there is no simple way that we an fetch epoch transactions/ voting rewards for a celo address.
And, is there any way we can get the epoch transactions for an address instead of a block.
Thanks,
Saloni
from celo-blockchain.
We provide an RPC API in Celo Explorer, if that works for you (search for getvoterrewards
).
curl -X GET "https://explorer.celo.org/mainnet/api?module=epoch&action=getvoterrewards&voterAddress=0x9efecf85d7e668c0c3c7a778a1164b064234f96d" -H "accept: application/json"
from celo-blockchain.
Yes, this i have. I just wanted to query my node if its at all possible?
from celo-blockchain.
Yeah, unfortunately, there is no easy way, you'd have to fetch epoch blocks and perform calculations described in the explainer manually.
from celo-blockchain.
Related Issues (20)
- Validator disconnects from proxy (possible timeout?) HOT 2
- Gingerbread hardfork on alfajores node encountered bad block at activation block HOT 6
- Feature request (ethapi): eth_getBlockReceipts
- prestateTracer TypeError exception
- Shanghai hardfork not supported, invalid opcodes in solidity 0.8.20+ generated code HOT 2
- Unable to re-create receipts root only for block 22982400 HOT 2
- Bad indexed data for block gas limit HOT 1
- Support eth_call, eth_gasEstimate state override set HOT 1
- Dependency Dashboard
- Celo rosetta node issue HOT 5
- Move gh pages publishing out of celo-blockchain
- miner.TestMiner is flakey
- Add tx type metrics to txpool
- Asymmetry in mechanisms to skip calling debitGasFees & creditGasFees
- Flaky/Flakey tests
- isBlockReceipt incorrectly called on non derived logs HOT 2
- eth_getBlockReceipts is broken, because it does not take into account the celo block receipt
- go: github.com/celo-org/celo-blockchain@latest (v1.13.0) requires github.com/celo-org/[email protected]: parsing go.mod: module declares its path as: github.com/ethereum/go-ethereum but was required as: github.com/celo-org/celo-blockchain HOT 1
- Ensure we deep copy the difficulty field in types.CopyHeader
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from celo-blockchain.