-
Notifications
You must be signed in to change notification settings - Fork 3
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
Service contracts #74
Conversation
See [./development] | ||
|
||
Make sure you increment the `specVersion` before you compile and run tfchain. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add this before the See development...
``` | ||
|
||
Notice the [104, null] definition, this means this type if valid from specVersion 104 until some to define perdiod (null if you don't know). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*this means this type is valid
|
||
- src/typesLocal/events.js | ||
- src/typesLocal/$SPECVERSION.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ts
instead of js
*- src/typesLocal/events.ts
*- src/typesLocal/$SPECVERSION.ts
|
||
Once you have done this, it's time to generate the types. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move cd typegenLocal
here ?
yarn build | ||
yarn db:create-migration | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
those instructions generate something?
the file in db/migrations
I guess
Do we need to copy it from somewhere or it is already generated in the right dir ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I indeed generates a new database migration file, it's already placed in the right directory.
### 6: Create / extend mappers | ||
|
||
Make the corresponding changes in `src/processor.ts` and mappers `src/mappings/..` for the type changes that were made |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see changes on those files in this PR but I guess this is because we don't modify existing types, we create new ones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok, I ll do it ;)
|
||
Make the corresponding changes in `src/processor.ts` and mappers `src/mappings/..` for the type changes that were made | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see some added files in src/model/generated
But I don't see how/when they are generated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yarn codegen
Steps: | ||
|
||
- move new $specVersion.ts file to `src/types` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems that all the file is nor copied... only the some part of it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, only the changed types need to be copied over
Related to: