-
Notifications
You must be signed in to change notification settings - Fork 38
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
Provide embedded compiled NeoFS contracts #2391
Provide embedded compiled NeoFS contracts #2391
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2391 +/- ##
==========================================
+ Coverage 30.03% 30.14% +0.10%
==========================================
Files 398 399 +1
Lines 29806 29868 +62
==========================================
+ Hits 8953 9004 +51
- Misses 20128 20134 +6
- Partials 725 730 +5
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
1dd95ab
to
07f83f7
Compare
You can name them like |
The only reason for not doing so, btw, is storing contracts in |
b88112b
to
4918ecf
Compare
@roman-khimov moved to for now added NNS contract only just to prevent |
There is a need to embed Neo contracts' executables into NeoFS Inner Ring application. To do this, `contracts` directory is created. The dir contains compiled contracts (per-contract NEF and manifest). Create eponymous Go package that provides embedded `fs.FS` with the contracts. Add `Read` function which reads, decodes and validates all numerically-sored contracts from files and returns ready-to-go data for deployment. Refs nspcc-dev#2195. Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
4918ecf
to
54874e4
Compare
isolated changes from #2301. Starting from this, I'll try introduce changes partially to lighten review process
note that these changes do not yet present the script for compiling and copying contract files into
contracts
dir, suggestions are welcomein contrast to the proposed option for naming files in #2195, i decided not to name files with serial numbers because to me it's clearer to see what contract is represented by particular files. Anyway, this pattern can be changed at any time