Commit Graph

17 Commits

Author SHA1 Message Date
dafuga 8047c6df32 enhancement: making data param on readonly method optional 2024-01-16 17:11:39 -08:00
dafuga ef60a9405e chore: implementing return values codegen 2024-01-16 16:59:12 -08:00
Aaron Cox bd7e9b243c The changes we need added to code generation 2024-01-16 12:14:26 -08:00
Aaron Cox 477d753547 The updated test 2024-01-16 12:14:16 -08:00
Aaron Cox 797c7a1105 Fixed contract name 2024-01-16 12:12:38 -08:00
Aaron Cox d924693af6 Initial testing.gm for return values 2024-01-16 11:51:28 -08:00
Vance Chi fdb769fe1a Fix variant interface and update mock contracts (#28) 2024-01-12 12:25:23 -08:00
Vance Chi 32c5500876 Fix according to atomicassets usage (#26)
* Fix variant struct and variant interface

* Fix type alias lose array info

* Add command to generate all mock contracts

* Update mock contracts
2023-12-18 11:02:00 -08:00
Vance Chi 14b494fbea Fix variant extends typo (#24)
* Fix variant extends typo

* Remove boid test data
2023-12-12 16:10:28 -08:00
Daniel Fugere ee3952ece1 Contract & action param changes (#23)
* enhancement: generating constructor that lets you pass account name

* enhancement: using JS native types in params

* enhancement: no longer lowercasing field names

* enhancement: handling variants in action type interface generation

* fix: getting interfaces generated properly

* fix: importing correct core types

* style: linted

* fix: regenerated mock contracts with latest code

* fix: placing base structs before their dependents
2023-12-12 16:09:18 -08:00
Daniel Fugere c2e7433b61 fix: stop lowercasing struct field names (#21) 2023-12-08 18:43:36 -08:00
Vance Chi 6e2fcb91eb Fix variant type generation (#20)
* Fix variant type generation

* Fix format of generated contract code

* Add base eslint config

* Use optional eslintrc file
2023-12-06 15:25:02 -08:00
Daniel Fugere 5e7c787716 Fixing table return types and other issues (#18)
* fix: importing Asset when Symbol is needed

* fix: handling cases where two structs have same names with different casing

* fix: using casing when looking for struct dependencies

* enhancement: exporting TableMap

* enhancement: exporting actions and tables as types

* chore: added boid contract to tests

* debug: setup working generics for table method

* chore: added table names with . to interface to break ts typing

* Updating to wharfkit/contract RC1

* enhancement: optimized generated contracts

* style: linted

* cleanup: code cleanup

* chore: updated contract kit

* fix: renamed generated variables and fixed table typing

* cleanup: code cleanup

* chore: updated contract kit

---------

Co-authored-by: Aaron Cox <aaron@greymass.com>
2023-11-22 13:09:46 -08:00
Daniel Fugere 88f2265702 Determining type imports in script as opposed to using eslint (#10)
* fix: determining type imports in script as opposed to using eslint

* fix: preventing infinite loop

chore: adding hegemon unit test

* style: linted
2023-09-27 09:48:57 -07:00
Daniel Fugere e8691b9a1f Fixes for more complex contracts (#9)
* fix: checking aliases when generating list of core imports

closes #7

* chore: upped dep versions

* fix: got tests passing

* fix: looking up aliases when generating abi type

closes #8

* style: linted

* fix: handling variants properly

* fix: looking at aliases when ordering structs

* fix: getting tests passing

* fix: using the Variant core class when applicable

* chore: formatted atomicassets JSON abi
2023-09-25 13:22:59 -07:00
Daniel Fugere 00a182b6a1 Fixes and enhancements (#6)
* chore: added -j option

closes #2

* chore: added contract command tests

* fix: using proper bool field type

closes issue #5

* fix: handle binary extensions

closes issue #4

* enhancement: removed root namespace

* style: linted

* fix: using type imports when applicable

* fix: preventing infinite loop in findDependency function
2023-09-08 17:05:15 -07:00
Daniel Fugere d91ee1965f Adding contract command (#1)
* chore: added contract command

* chore: added make check and make format

* chore: getting the generate command to work

* chore: added the --file option to the generate command

* fix: got tests passing

* chore: got rid of deprecation warnings

* chore: added ci check

* Bumping requirement to v18

* Use stdout instead of stderr

* Reworked shebang to disable experimental warnings

* Made logging less verbose

* Removed v16 testing

* Inverted logging logic to debug by default

---------

Co-authored-by: Aaron Cox <aaron@greymass.com>
2023-08-28 16:59:18 -07:00