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

En 6420/rewards for smart contracts #1739

Merged
merged 4 commits into from
May 14, 2020

Conversation

sasurobert
Copy link
Contributor

Save accumulated rewards to ELRONDrewards key in the smart contract trie.

@sasurobert sasurobert changed the base branch from master to development May 13, 2020 15:42
}

existingReward := big.NewInt(0)
fullRewardKey := core.ElrondProtectedKeyPrefix + rewardKey
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't expose this fullRewardKey through blockchain hook interface so a developer won't bother searching through our source code for constants?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be enough to explain this in a tutorial and to have it in the docs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is also easy to expose in the Rust API, no need for additional hook

Copy link
Contributor

@LucianMincu LucianMincu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

System tests passed.

@LucianMincu LucianMincu merged commit 4a07377 into development May 14, 2020
@LucianMincu LucianMincu deleted the EN-6420/Rewards-for-smart-contracts branch May 14, 2020 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants