feat: shielded rewards intergration #1378
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #1371
This integrates the shielded rewards.
The downside is that is seems that the endpoint in namada rpc returns some weird values, so testing might be a bit tricky.How it works for me atm is that if I shield a lot of nam and wait one masp epoch I will see some rewards for one masp epoch, but then it will go back to 0.
You can shield more and repeat the process
Not sure if campfire has nam rewards enabled :/
![image](https://private-user-images.githubusercontent.com/11858303/407694995-10ae7e8b-84f5-43fe-811b-8d7e8a5797ad.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NzI1OTAsIm5iZiI6MTczOTU3MjI5MCwicGF0aCI6Ii8xMTg1ODMwMy80MDc2OTQ5OTUtMTBhZTdlOGItODRmNS00M2ZlLTgxMWItOGQ3ZThhNTc5N2FkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDIyMzEzMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE5Zjg3ZTc1NjU0OTIwMzMzZmUzOThhYjVlNDUzOGZjMzQxMWVhYzI2YzlhMDFkZDZhODIxZmNlMDY0OTE2M2ImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.wh1sFjGej6JHEqWkvtu4Lzqj-Fy7FQzg_DU4vmisRRo)
Also added a function which can simulate rewards for this: