Henry-E
45fa9bd3ba
Update Solana-program and rust-version ( #2420 )
2023-03-02 17:23:16 +00:00
Jon Cinque
777f2eace1
interface: Support multiple programs with the same interface via token-2022 ( #2386 )
2023-02-27 10:55:08 +00:00
Jean Marchand (Exotic Markets)
c76641f861
lang: remove deprecated accounts ( #2375 )
2023-02-06 16:46:09 +00:00
nojob1
872d084e00
--fix clippy ( #2388 )
2023-02-06 11:16:23 +00:00
Henry-E
2a05075760
Update IDL program ( #2365 )
2023-01-26 11:32:30 +00:00
Jean Marchand (Exotic Markets)
a0ef4ed7a4
lang: add the InitSpace macro ( #2346 )
2023-01-26 11:22:48 +00: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
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
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
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
Pierre
8ee4600785
feat: Use new canonical close account pattern ( #2169 )
2022-09-06 09:33:17 -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
Matthew Callens
c47fb2877e
lang: adjust `realloc` implementation to safeguard max increase and idempotency ( #1986 )
2022-07-05 15:54:40 -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
guibescos
0916361f5e
Feature/error equality ( #1544 )
2022-04-20 19:12:50 -04:00
Paul
778e328753
lang: deserialize programdata address on demand/lazily ( #1723 )
2022-04-08 13:48:40 -04:00
Kevin Aud
e056cca519
Minor clean up in IDL accounts ( #1144 )
2022-04-04 18:37:24 -04:00
Paul
5194de04b1
add docs for emit! macro ( #1692 )
2022-03-27 13:22:17 -04:00
Kirill Fomichev
40ea715beb
lang, cli, spl: Update solana toolchain to v1.9.13 ( #1653 )
...
Co-authored-by: Paul Schaaf <paulsimonschaaf@gmail.com>
2022-03-26 20:28:55 -04:00
Samuel Moelius
0f7675c31c
Add discriminator length checks instead of panicking in `(Account)Loader` ( #1678 )
2022-03-24 12:05:39 -04:00
Paul
d871f39793
lang: add system program cpi wrapper functions ( #1629 )
2022-03-16 16:09:58 -04:00
Paul
170a763625
lang: adjust error code so `#[error_code]` works with just importing `anchor_lang::error_code` ( #1610 )
2022-03-16 14:53:43 -04:00
Matthew Callens
b376fd4615
lang: add additional `require_x` comparison macros ( #1622 )
2022-03-16 14:45:09 -04:00
Paul
721fe6693c
lang: add support for logging expected and actual values and pubkeys ( #1572 )
2022-03-15 11:42:17 -04:00
Matthew Callens
041414f52a
docs: update doc comments for `Program` and `#[account]` ( #1606 )
2022-03-14 12:01:04 -04:00
Paul
54c07be511
lang: impl Key for Pubkey ( #1601 )
2022-03-12 15:59:30 -05:00
Matthew Callens
ad8aec247b
lang: new internal writer to use bpf mem syscalls ( #1589 )
2022-03-12 15:58:41 -05:00
Matthew Callens
a78c9c0341
lang: add sysvar custom error and failing test case ( #1535 )
2022-03-01 11:33:18 -05:00
Paul
48138894b1
docs: add warning about manually closing accounts ( #1490 )
2022-02-21 10:47:19 -05:00
Paul
40596824bf
error redesign ( #1462 )
2022-02-20 17:28:24 -05:00
Armani Ferrante
f39ea73a65
lang: cargo fmt ( #1459 )
2022-02-16 22:07:56 -05:00
Paul
2d9209ba33
improve error code reference ( #1454 )
2022-02-16 16:11:12 +01:00
Paul
1f56a62bab
lang: add check that declared id == program id ( #1451 )
2022-02-15 18:16:06 -05:00
Paul
2390a4f167
lang: fix error mod exports ( #1426 )
2022-02-10 15:54:12 -05:00
Blas Rodriguez Irizar
33c5dab909
lang: hide __private module from docs ( #1386 )
2022-02-03 13:09:54 -05:00
Armani Ferrante
16a7dc5dc1
lang: store calculated bump seeds in context ( #1367 )
2022-01-27 16:55:13 -05:00
Paul
0dfed11eaa
lang: rename loader_account.rs to account_loader.rs ( #1279 )
2022-01-10 14:39:24 -05:00
Blaž Hrastnik
787527fdff
lang: Allow zero_size accounts to be larger than account schema ( #1158 )
2022-01-10 12:30:34 -05:00
Paul
8739db4e58
lang: mut types using blanket implementations ( #1127 )
2022-01-09 22:48:21 -05:00
Paul
e3d733c996
docs: fix require macro ( #1269 )
2022-01-08 16:29:00 -05:00
Paul
49ad086edc
docs: more require macro docs ( #1268 )
2022-01-08 15:24:58 -05:00
Paul
3ddad6cbb6
lang: rest of accounts docs reference ( #1231 )
2022-01-06 16:30:44 -05:00
Paul
a830644203
lang: export accounts module, re-export its types in the prelude ( #1208 )
2022-01-06 15:26:43 -05:00
Paul
bb20eee8f6
lang/docs: Context and CpiContext docs ( #1247 )
2022-01-06 10:05:11 -05:00
Paul
b3720a0b84
lang, ts: fix init_if_needed missing ATA address check ( #1221 )
2022-01-01 21:47:13 -05:00