Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: create an RPC that returns the historical rewards for an earner #269

Open
seanmcgary opened this issue Feb 26, 2025 · 0 comments · May be fixed by #286
Open

feat: create an RPC that returns the historical rewards for an earner #269

seanmcgary opened this issue Feb 26, 2025 · 0 comments · May be fixed by #286
Assignees
Labels

Comments

@seanmcgary
Copy link
Member

seanmcgary commented Feb 26, 2025

For a given earner, return the rewards earned for each "snapshot", for each token where the amount for each snapshot entry is the amount earned since the last applicable snapshot, rather than the cumulative earned.

// GET /earners/{earnerAddress}/historical-rewards
{
	"rewards": [
		{
			"token": string,
			"amounts": [
				{
					"amount": string (bigint),
					"snapshot": string
			]
	]
}

Similarly, provide a route that can filter for a specific token

// GET /earners/{earnerAddress}/tokens/{tokenAddress}/historical-rewards
{
	"rewards": [
		{
			"token": string,
			"amounts": [
				{
					"amount": string (bigint),
					"snapshot": string
			]
	]
}
@seanmcgary seanmcgary added the api label Feb 26, 2025
@seanmcgary seanmcgary self-assigned this Mar 3, 2025
@seanmcgary seanmcgary linked a pull request Mar 5, 2025 that will close this issue
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant