CurriedOtter
6e776c5e7b
make constraint group fields public ( #2360 )
2023-01-16 20:24:35 -06:00
Christian Kamm
27bb695685
Idl: Limit account size to 60kb, allow closing idl accounts ( #2329 )
2023-01-05 13:25:21 +00:00
Jean Marchand (Exotic Markets)
38bbb21c33
lang: remove the state and interface attributes ( #2285 )
2022-12-22 16:33:44 +00:00
Henry-E
347c225a27
v0.26.0 ( #2315 )
...
* v0.26.0
* update packages
* typedocs
Co-authored-by: henrye <henry@notanemail>
2022-12-15 16:12:22 +00:00
Henry-E
f79f9dab74
Use less heap intensive error mapping ( #2313 )
...
* less heap intensive error mapping
* add changelog
* try returning the error
* dumb match statements instead
* missing commas
Co-authored-by: henrye <henry@notanemail>
2022-12-14 17:03:57 +00:00
Adithya Narayan
b662ff1460
cli: `anchor account` subcommand to read program account ( #1923 )
...
* Setup account subcommand skeleton
* Move IDL deserialization code to syn module
* Change HashMap to serde_json
* Add enum deserialization
* Add account subcommand to docs
* Fix lint
* Add validation for account type
* Fix solana-sdk dependency version
* Fix clippy warnings
* Move IDL deserialization code to cli module
* Remove debug print
* Add integration tests
* Update documentation with example
* Fix clippy warnings
* Fix leftover merge conflict
* run prettier
Co-authored-by: Henry-E <henry.elder@adaptcentre.ie>
Co-authored-by: henrye <henry@notanemail>
2022-12-12 16:11:26 +00:00
Henry-E
03eff348db
only add public enums to the IDL ( #2310 )
...
Co-authored-by: henrye <henry@notanemail>
2022-12-12 16:10:47 +00:00
Sammy Harris
484628070c
Feat: Optional Positional Accounts ( #2101 )
...
* optional accounts initial implementation
* cargo fmt
* panic if Account related traits are run on none
* Allow empty accounts to deserialize to None for optional accounts
* implement constraints for optional accounts
* optional accounts to idl gen
* accountstruct helper method
* implemented to_account_metas and infos
* add test program
* Rename optional to is_optional
* added more traits
* added TryKey error
* fix has_one
* update prelude
* is_optional
* add is_optional helper method
* Add TryAccountInfos trait
* improve constraint parser
* initial work on TryToAccountInfo
* Rename to TryToAccountInfo
* finished implementing tryToAccountInfo
* Using program method
* Formatting
* Fix program function call
* Remove function return borrow
* Fix access to program field
* finished implementing tryToAccountInfo
* add exit try_to_account_infos
* descriptive ID path
* try_to_account_info
* fix close constraint
* update test files
* completed typescript optional accounts implementation
* fix try accounts for init
* update tests
* fix to_account_metas
* update tests
* fix linting
* remove types/node
* update yarn.lock maybe?
* update optional test
* update optional test
* update optional rust cli test
* fix linting and tests
* fix tests
* update try_accounts to pass in accs during constraint gen
* Add default impl for TryToAccountInfos
* Removed TryToAccountInfos trait
* Formatting
* remove unneccesary traits and improve constraint gen drastically
* fix exit generation
* clippy
* improve cross check error message
* improve comments
* more comments
* update constraints hopefully good now?
* add new errors to ts client
* add new errors to ts client
* update optional test
* update anchor ts client
* update misc crate
* linting
* temporarily comment out optional rs tests
* update ts
* remove local test files
* linting
* optional client tests
* fix other lints to make the test pass
* remove comments
* remove misc-optional for now
* update optional program
* update optional program and client tests again
* update optional program and client tests again again
* added initialize tests that should pass
* undo unrelated anchor.toml change
* update close on optional program and improve tests
* update optional program again.
* update optional program and optional tests
* fix has one error message
* fix client example tests
* update lockfile
* update lockfile
* regenerate lockfile
* reset lockfile
* reset ts yarn lockfile
* update no caching tests
* update exit codegen to use generate_optional_check
* remove `try_to_account_infos`
* update parser to ignore method calls in constraints
* refactor and improve optional checks in constraints
* add misc-optional program and tests
* enable cpi for optional tests
* Revert "enable cpi for optional tests"
This reverts commit c864cd5d4f
.
* simplify misc tests
* update version
* fix rust version and resolve merge conflicts
* prevent Option on composite accounts
* hopefully fixed ts stuff?
* hopefully fixed ts stuff?
* testing
* hopefully done?
* update misc test
* fix optional tests
* fix ts
* fix ts again!
* linting urg
* allow-missing-optionals feature
* fix client tests
* add bnjs types to tests
Co-authored-by: febo <febo@kent.ac.uk>
Co-authored-by: Henry-E <henry.elder@adaptcentre.ie>
2022-12-12 15:32:59 +00:00
Lucas Steuernagel
0ba2195ec7
Add support for 256-bit integers in the IDL ( #2260 )
...
* Add support for 256-bit integers in the IDL
Signed-off-by: Lucas Steuernagel <lucas.tnagel@gmail.com>
* Fix lint warnings
Signed-off-by: Lucas Steuernagel <lucas.tnagel@gmail.com>
2022-12-05 15:45:07 +00:00
Henry-E
66e4295fe0
drop rust version to allow earlier CLIs to compile ( #2289 )
...
* drop back rust version to allow earlier cli to compile
* update solana program to 1.13.5 latest mainnet version
Co-authored-by: henrye <henry@notanemail>
2022-11-29 11:36:48 +00:00
Henry-E
19e00e5d8f
Don't allow the payer to be initialized as a program account ( #2284 )
...
* don't allow people to initialize the payer as a program account
* update changelog
* accidentally commented out part of another test
Co-authored-by: henrye <henry@notanemail>
2022-11-25 15:12:58 +00:00
cyphersnake
a73bd728fb
lang: Add `Owner` & `Discriminator` implementation for ix structures ( #2085 )
...
lang: Add into `Discriminator` trait constant `DISCRIMINATOR`
So that during match instructions or other entities there is no explicit instruction call of `discriminator()`
lang: Add `Owner` impl to instructions
Co-authored-by: Mikhail Gorbachev <m.gorbachev@joinsprouttherapy.com>
2022-11-24 16:19:39 +00:00
Jean Marchand (Exotic Markets)
ca52121a6b
clippy test if it is just a cache issue ( #2280 )
...
* test if it is just a cache issue
* fix lint
2022-11-24 14:14:19 +00:00
Henry-E
5291a7b6ff
Update rust to v1.62 ( #2272 )
...
* update rust from v1.56 to v1.65
* remove unnecessary borrows to appease clippy
* stop clippy complaining for now
* use 1.64 instead because of CI stuff
* update CHANGLEOG
* just seeing if the cli version is affecting the available rust version
* ok, back to 1.62
Co-authored-by: henrye <henry@notanemail>
2022-11-22 16:13:45 +00:00
Callum McIntyre
982799b7e6
Fix panic parsing seeds when account has qualified path ( #2268 )
...
* Fix panic parsing seeds when account has qualified path
* Add a test for seed derivation with account using type with path
2022-11-22 11:10:05 +00:00
Jean Marchand (Exotic Markets)
8ce18c36db
spl: Update instructions and remove rent from constraints ( #2265 )
...
* Update spl instructions and remove the rent sys_var from constraints
* Fix initialize mint
* Update changelog and fix examples
* Remove oversights
2022-11-19 12:59:14 +00:00
Jean Marchand
b107cbe94f
lang: Fix parsing for bytes literals in the IDL ( #2261 )
...
* lang: Fix parsing of some constants
* Fix lint + changelog
2022-11-16 15:59:09 +00:00
Henry-E
7a0a37e0f8
Update solana to version 1.13.3 ( #2239 )
...
* upgrade solana version to 1.13.3
* get everything to compile correctly
* update to using struct constructor to avoid deprecated field usage
* update deprecated functions
* more fixes to pass tests
* update auction-house submodule commit
* update the swap submodule
Co-authored-by: henrye <henry@notanemail>
2022-10-29 15:23:13 +01:00
Sammy Harris
fa1249836e
Feat: Update AccountsClose to be safe to call manually ( #2209 )
...
* fix other lints to make the test pass
(cherry picked from commit d6e43c1ed6
)
* update close to make it safe to call manually
* fix test script
* re-add safety warnings for deprecated account types
* update close checking logic
* readd logic for deprecated methods
* add additional checks to account_loader in exit
2022-10-21 17:06:54 +01:00
Sammy Harris
3da28dbc5f
fix: ignore non Accounts in safety checks ( #2201 )
2022-10-13 23:08:02 -04:00
Noah Prince
6f3877f36c
feat: Update seeds inference to allow nested user defined structs as part of the seeds ( #2198 )
2022-09-23 22:14:57 -04:00
Noah Prince
e69e50daaf
feat: Add has_one relations inference so you don't need to pass accounts that are referenced by a has_one ( #2160 )
2022-09-10 12:52:59 -04:00
Pierre
8ee4600785
feat: Use new canonical close account pattern ( #2169 )
2022-09-06 09:33:17 -04:00
Sammy Harris
c1c4f6c335
fix new clippy lints ( #2148 )
2022-08-23 18:57:32 -04:00
Sammy Harris
290b2aa43e
feat: constants declared in impl blocks in seeds ( #2128 )
2022-08-14 12:42:16 -04:00
Sammy Harris
3a0deba901
fix: IDL gen byte string lit parsing ( #2125 )
2022-08-13 22:57:59 -04:00
Matthew Callens
9d15c99e07
update doc links to new anchor website ( #2069 )
2022-07-19 12:53:20 -04:00
Matthew Callens
fc3789520e
fix new clippy warnings for cicd ( #2075 )
2022-07-19 12:07:20 -04:00
Armani Ferrante
6baed77eb5
v0.25.0 ( #2031 )
2022-07-05 16:32:55 -04:00
Matthew Callens
c47fb2877e
lang: adjust `realloc` implementation to safeguard max increase and idempotency ( #1986 )
2022-07-05 15:54:40 -04:00
Armani Ferrante
9b61bbc626
bump solana-program version ( #2027 )
2022-07-04 23:58:31 -04:00
Matthew Callens
f76112a41a
add account name to discriminator mismatch errors ( #2020 )
2022-07-01 18:25:18 -04:00
Jesse Eisses
df9627e952
update docs on format of method dispatch identifier ( #2017 )
2022-06-30 09:36:38 -04:00
Sohrab
55e0c5d9dd
fix: align links to coral-xyz/anchor github repo ( #1988 )
2022-06-19 22:16:16 -04:00
Armani Ferrante
1ec9af7e21
Revert "lang: add `realloc` constraint group ( #1943 )" ( #1984 )
...
This reverts commit 7fe39c61ad
.
2022-06-17 17:16:10 -04:00
Krešimir Klas
37c5ff4c6d
lang: strip Box when parsing idl types ( #1947 )
2022-06-04 20:34:47 -04:00
Matthew Callens
7fe39c61ad
lang: add `realloc` constraint group ( #1943 )
2022-06-04 20:25:28 -04:00
Krešimir Klas
3b0d73ed7a
syn: remove unused instruction_constraints field from Field ( #1946 )
2022-06-04 09:42:52 -04:00
ebrightfield
ed15922f1a
Add docs field to idl ( #1561 )
2022-04-21 16:37:41 -04:00
guibescos
0916361f5e
Feature/error equality ( #1544 )
2022-04-20 19:12:50 -04:00
Paul
d0a13e6535
lang: fix missing account name info when deser fails when using 'init' or 'zero' ( #1800 )
2022-04-20 16:59:00 -04:00
Paul
765fee0c6e
lang: Make parser fail if 'seeds' constraint is used with 'associated token' constraints ( #1803 )
2022-04-20 16:51:41 -04:00
Paul
b769e6038c
lang: forbid pubkey mint on token init ( #1804 )
2022-04-20 16:51:10 -04:00
Sohrab
55e55a2e2f
fix(lang): align to new book url convention ( #1813 )
2022-04-20 09:09:57 -04:00
Armani Ferrante
0b4c7b0c73
v0.24.2 ( #1788 )
2022-04-13 19:44:18 -04:00
Paul
1adb6a2c47
lang: fix missing skip serialize for idl instruction ( #1782 )
2022-04-12 19:35:57 -04:00
Armani Ferrante
d491f0ba1d
v0.24.1 ( #1779 )
2022-04-12 18:50:33 -04:00
Armani Ferrante
b0f263214d
v0.24.0 ( #1769 )
2022-04-12 10:52:06 -04:00
Paul
6bd9879dd6
lang: codegen improvements ( #1766 )
2022-04-11 21:28:21 -04:00
Paul
b28deb30c0
docs: link to space reference ( #1764 )
2022-04-11 17:34:13 -04:00