* Fixed issue with `scope` not being applied to queries
Fixes#56
* Updating dependencies
* Adding `index_position` as a fallback since `index` doesn't work most of the time
* Version 0.4.3
* Rewrote tests to remove recursion and throw
* removed try/catch
* Fixed issue with Symbol typing
* Switching imports to wharfkit/antelope
* catching `Bool` type
* Dynamically import all core types related to ABIs
* Adding missing types
* Fixing TableNames key stringify
* Updating tests to support many contracts
* Changing imports over to wharfkit/antelope instead of session
* Removed notes
* Only override `action` and `table` call if data for those exist
* Scopes should accept generic numbers and cast to strings
Fixes#53
* Fixed scope logic
It was casting undefined to a string and never using `this.account`
* Allow passing `scope` as 2nd param to `contract.table`
This matches the syntax used in the CDT, as discussed here:
https://github.com/orgs/wharfkit/discussions/5#discussioncomment-6515701
* Version 0.4.1
* chore: renamed EOSIO_CORE variables
* refactor: added helper folder
* enhancement: making sure that Name is always in contract imports
* fix: removing $ from field name when applicable
* chore: added full eosio abi
* cleanup: removed contracts folder
* fix: parsing data types properly
* fix: using proper eosio abi
* fix: handling variant and alias types
* fix: handling booleans properly
* fix: handling variants in external and internal types
* cleanup: removed redundant Types namespace from Struct field type
* style: linted
---------
Co-authored-by: dafuga <danielfugere28@gmail.com>
* Altering action calls to be able to support typed inputs
* Delete example-contract.ts
* Renamed ActionData to ActionDataType
* Use prettier on generated code, and fixed tests
* Adding prettier plugin to cleanup imports
* Reverting back to old action syntax + new table syntax
* Implementing scope calls and cursors (#48)
* Moved `TableCursor` to `TableRowCursor` and extended abstract
* Version 0.4.0-beta1
* Implemented scope cursors
* Moved ABI data to root of namespace
* Removed underscore in front of namespace
* Added new test setup to test mock and generated at the same time
* Add test to ensure the generated and mock contracts are equal
* Added note
* Linting + Ignore mock file
* Removed unused parameter
* Implemented `PartialBy` generic on generated contract
Fixes#44
* Re-enabled some tests
* Renamed `types` to `Types` in namespace
This matches the other camel casing we're doing
* Started migrating some contract tests to a generic function
This will allow us to run the same tests are run in the Contract tests against the generated tests
* Removing unused test data
* Updated ABICache
* Version 0.3.2
* Updating dependencies for ESR + Session
* Version 0.3.3
* Updating mock-data
* Removed export of codegen
Resolves#40
* Version 0.3.4
* Prevent serialization if `rowType` is defined.
* Adding failing test
* Removing generics to serve as a reset to re-add
* Potential fix?
* Test showing it working
* TableCursor2 test
* Additional test data
* Merge
* Generics testing
* Moved new TableCursor as default cursor
* Altered Table to use new Cursor
* Removed secondary Cursor export
* Updated tests for new Cursor
* Reapplied mock data
* Reworked Table to no longer require a Contract
* Update src/contract/table-cursor.ts
Co-authored-by: Daniel Fugere <danielfugere28@gmail.com>
* Comments and splitting logic a bit
* Removing old test for now
See: https://github.com/wharfkit/contract/pull/34#discussion_r1272800905
* Split out limit/bounds logic, and added comments.
Same logic as before, just different syntax.
* Defaulting to MAX_SAFE_INTEGER
Resulting logic is the same, just simplified the Math.min() call
* Documentation pass
* Remove timeout from ci-test build
* Moved structs into better location
---------
Co-authored-by: Daniel Fugere <danielfugere28@gmail.com>
* chore: added cursor#query test
* chore: merging query and queryOptions params
* fix: getting tests passing
* revert: put example-contract back in
* enhancement: adding ability to pass rowsPerAPICall number on next() call
* style: linted
* Format should also run eslint against tests
* Include tests in check as well
* Fixing lint issues
* cleanup: removed empty test
* More cleanup failing test (#26)
* Adding check to make sure `next` after exhausting returns no rows
* Added test to highlight expected behavior
* enhancement: adding the rowsPerAPIRequest param to query() and next()
* style: linted
* cleanup: code cleanup
---------
Co-authored-by: Aaron Cox <aaron@greymass.com>
* All rows are not loaded when querying
* Typed rows by default
* Adding more coverage where we'd expect typed responses
* Force deserialization since get_table_rows doesn't support it?
* Fixed tests now that typed responses are returning
* Added singular default row limit
* Allow `scope` on `table.first()`
* Added `maxRows` for `table.first` to separate from `limit`
* Ensure cursors return static amounts
* The `limit` on a cursor should be per-query, not total.
* Ensure a `first` query doesn't return more on `next`
* Bulk updating test data
* Update README.md
* Changed to no longer depend on session kit
* Added eosio-signing-request
* Removed call method and local Session instance
* Reworked imports to use greymass/eosio instead of session kit
* Adding @wharfkit/abicache
* enhancement: using internal types when applicable
* chore: added unit tests for generated rewards.gm contract
* chore: added missing cursor and all methods to codegen contract classes
* chore: implementing new table API
* chore: got base tests passing
* chore: adapting codegen to new API
* chore: got all tests passing again
* cleanup: code cleanup
* enhancement: added errors when wrong params are passed to find and where
* chore: added a where method on cursor
* enhancement: renamed where to query and find to get
* chore: commenting out codegen tests for now
* enhancement: passing lower and upper_bound without data wrapping
* chore: passing lower and upper_bound without data wrapping in cursor
* chore: wrapping all index values in core classes
* chore: updated dependencies
* fix: got tests passing
* cleanup: code cleanup
* Adding instance check
* Combining "cursor" test suites
* Removed unneeded check
* Corrected row result numbers
* Removed unused Errors
* Simplified table ABI retrieval
* Throws immediately on invalid table name
* Use local table ABI definition
* Removing async from getFieldToIndex
* More test coverage
---------
Co-authored-by: Aaron Cox <aaron@greymass.com>
* Initial kit implementation
* Upgrading to next session/mock-data again
* Disabling some codegen stuff for now
* Start of modified Contract class
The `Contract` now requires an ABI, Account, and Client
The `call` method is currently not implemented.
* Setting Session on Contract when exists
* Uncommented call method