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

[v17] feat!: FeeShare allow DAODAO to register contracts #758

Merged
merged 7 commits into from
Aug 9, 2023

Conversation

Reecepbcups
Copy link
Contributor

@Reecepbcups Reecepbcups commented Jul 18, 2023

Closes #593

  • Allows for a DAODAO dao to register a contract it is the admin of. Before the contracts could only be registered to themselves.
  • On any execute, emits a JSON event for the feeshare payouts. Useful for indexing in the future
- attributes:
  - index: true
    key: payouts
    value: '[{"withdraw_address":"juno1v75wlkccpv7le3560zw32v2zjes5n0e7csr4qh","fees_paid":[{"denom":"ujuno","amount":"5000"}]}]'
  type: payout_feeshare

Cleanups up some logic + adds test.

@Reecepbcups Reecepbcups changed the title feat!: FeeShare allow DAODAO to register contracts [v17] feat!: FeeShare allow DAODAO to register contracts Aug 1, 2023
@Reecepbcups Reecepbcups marked this pull request as ready for review August 8, 2023 02:11
Copy link
Member

@dimiandre dimiandre left a comment

Choose a reason for hiding this comment

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

How disk space will be affected?

I can imagine majority of the contracts calls transactions will be with feeshare payout event attached

@Reecepbcups
Copy link
Contributor Author

@dimiandre for the event emit? basically nothing relative to the size/compute of CW executes

I will benchmark the gas cost difference tomorrow, but I expect it to be <500 gas if even

@Reecepbcups
Copy link
Contributor Author

@dimiandre
# Execeuted X times on a fresh chain, same specs, with feeshare events
# gas_used: "138041"
# gas_used: "138048" * 10
# Executed X times on a contract WITHOUT Feeshare event (feeshare still registered)
# gas_used: "138_041"
# gas_used: "138_048" * 10

So no gas changes. The string is ~200bytes, so cost <5MB every 25mil contract calls WITH feeshare enabled + any CosmosSDK indexing overhead, but small in comparison

@Reecepbcups Reecepbcups merged commit c1678a1 into main Aug 9, 2023
7 checks passed
@Reecepbcups Reecepbcups deleted the reece/feeshare-version2 branch August 9, 2023 12:57
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.

FeeShare allow DAODAO to register contracts
2 participants