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

all: add constructors #409

Open
gangov opened this issue Dec 23, 2024 · 1 comment · Fixed by #412
Open

all: add constructors #409

gangov opened this issue Dec 23, 2024 · 1 comment · Fixed by #412

Comments

@gangov
Copy link
Collaborator

gangov commented Dec 23, 2024

as per Stellar's blogpost adding constructors gives a few benefits:

Efficiency:

  • Reduces contract size.
  • Lowers CPU usage during execution.
  • Minimizes storage requirements.

Security:

  • Harder to unintentionally expose contracts to front-running during initialization.
  • Front-running: Exploiting pending transactions for unfair advantage.

we should consider the option of using constructors instead of deploying and using initialize()

@gangov gangov linked a pull request Jan 7, 2025 that will close this issue
@gangov
Copy link
Collaborator Author

gangov commented Jan 16, 2025

reopening for tracking purposes

@gangov gangov reopened this Jan 16, 2025
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 a pull request may close this issue.

1 participant