-
-
Notifications
You must be signed in to change notification settings - Fork 1
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 system contract compatibility and better tests #52
Merged
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
909fc68
Rewrote tests to remove recursion and throw
aaroncox 7ea64c6
removed try/catch
aaroncox 3441ddd
Fixed issue with Symbol typing
aaroncox 4d23ec2
Switching imports to wharfkit/antelope
aaroncox 2f749a3
catching `Bool` type
aaroncox 45059e9
Dynamically import all core types related to ABIs
aaroncox c9aa1a0
Adding missing types
aaroncox f6cfcaf
Fixing TableNames key stringify
aaroncox 9a1a062
Updating tests to support many contracts
aaroncox 6de4f4c
Changing imports over to wharfkit/antelope instead of session
aaroncox dce942a
Removed notes
aaroncox 561a515
Only override `action` and `table` call if data for those exist
aaroncox 1d1b64f
Scopes should accept generic numbers and cast to strings
aaroncox 69a3295
Fixed scope logic
aaroncox 3b2e81c
Allow passing `scope` as 2nd param to `contract.table`
aaroncox aa0af60
Version 0.4.1
aaroncox 7c0c642
chore: renamed EOSIO_CORE variables
dafuga 382a8d3
refactor: added helper folder
dafuga ec25a8b
enhancement: making sure that Name is always in contract imports
dafuga 2eff3da
fix: removing $ from field name when applicable
dafuga 127e602
chore: added full eosio abi
dafuga fcfadeb
cleanup: removed contracts folder
dafuga 12b04b8
fix: parsing data types properly
dafuga 1b42c88
fix: using proper eosio abi
dafuga 09aa3f1
fix: handling variant and alias types
dafuga e4f1f3e
fix: handling booleans properly
dafuga eb802a7
fix: handling variants in external and internal types
dafuga 97675bc
cleanup: removed redundant Types namespace from Struct field type
dafuga e1fe51f
style: linted
dafuga 5d0ca65
Merge pull request #54 from wharfkit/codegen-touchups
aaroncox File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import {ABI} from '@wharfkit/session' | ||
import {ABI} from '@wharfkit/antelope' | ||
import * as ts from 'typescript' | ||
import {findAbiType} from './helpers' | ||
|
||
export function generateTableMap(abi: ABI.Def): ts.VariableStatement { | ||
// Map over tables to create the object properties | ||
const tableProperties = abi.tables.map((table) => | ||
ts.factory.createPropertyAssignment( | ||
String(table.name), | ||
JSON.stringify(table.name), | ||
ts.factory.createIdentifier(findAbiType(table.type, abi, 'Types.') || table.type) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TIL 🤷 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right? lol.... |
||
) | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is this method specific to interfaces? If not, I would put it in the
helper.ts
file.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 think it is exclusive to the interfaces, since it's only used for
ActionParams
as it finds the loose types likeNameType
orIntType
.