Commit Graph

1094 Commits

Author SHA1 Message Date
Christian Kamm a97d04ab06
Cli: Don't regenerate idl in read_all_programs() (#2332) 2022-12-23 13:28:35 +00:00
Henry-E e910d44b67
update cli version and add retry cli download on error (#2335) 2022-12-23 10:53:05 +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 7236c8bb69
Add headings to changelog (#2333) 2022-12-21 11:24:33 +00:00
riordanp 8856aee7df
Allow passing env vars to verifiable build container (#2325) 2022-12-21 11:22:34 +00:00
Henry-E 4bef8c40ef
Switch to using @coral-xyz/anchor packages (#2318) 2022-12-16 13:21:50 +00:00
acheron ba5b55d7f0
Fix 0.26.0 CHANGELOG PR links (#2316) 2022-12-15 18:59:33 +00:00
Henry-E 9f3d66ff8c
post release clean up (#2317)
Co-authored-by: henrye <henry@notanemail>
2022-12-15 18:44:12 +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 b00fe70d1b
add optional accounts to changelog (#2314)
* add optional accounts to changelog

* Update CHANGELOG.md
2022-12-14 20:15:57 +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
Jean Marchand (Exotic Markets) fad05805d8
spl: change serum-dex to openbook-dex (#2308)
* Change serum-dex by openbook-dex

* Change serum-dex by openbook-dex in tests

* Fix swap

* Fix cfo

* Downgrade openbook

* Disable cfo and update changelog

* Revert lock file

* minor grammar

* update the pubkey to open dex

* Remove @solana/web3.js from ts package.json

Co-authored-by: Henry-E <henry.elder@adaptcentre.ie>
Co-authored-by: henrye <henry@notanemail>
2022-12-12 16:12:33 +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
Petr Kozorezov 7527033c7b
Add 'ticks-per-slot' option passing to test validator (#1875)
* add 'ticks-per-slot' option passing to test validator

* add 'ticks-per-slot' option passing to test validator

* add 'ticks-per-slot' option passing to test validator

* cargo fmt and changelog

Co-authored-by: henrye <henry@notanemail>
2022-12-12 16:10:14 +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 c864cd5d4f019e6bd5f93641e01bd82fc74041d4.

* 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 d88a09dbb7
missing tests for cli subsuites (#2307)
Co-authored-by: henrye <henry@notanemail>
2022-12-08 11:08:51 +00:00
Henry-E 09b829d1a3
Identity com bugfix/robust fetch nullable (#2301)
* ts: Fixed `.fetchNullable()` to be robust towards accounts only holding a balance

* update changelog to new PR id

* prettier

Co-authored-by: Martin Riedel <web@riedel-it.de>
Co-authored-by: henrye <henry@notanemail>
2022-12-07 10:54:45 +00:00
Henry-E 7d7747cc90
Build borsh package first, then build anchor package (#2306)
* Add build borsh package to yarn build anchor package

* update changelog with rsh stuff; clean up full stops

* make it even clearer in the changelog

* missing full stop

Co-authored-by: henrye <henry@notanemail>
2022-12-07 10:46:29 +00:00
skrrb 6814ce646e
cli: run a subset of the test suites (#1864)
* cli: run subset of tests with --run

* changelog

* test

* fix run test path

* test: added missing package.json

* cli: run subset of tests with --run

* changelog

* test

* fix run test path

* test: added missing package.json

Co-authored-by: Armani Ferrante <armaniferrante@gmail.com>
Co-authored-by: henrye <henry@notanemail>
2022-12-06 21:42:10 +00:00
Tommy Johnson c798821947
add geyser_plugin_config support for anchor localnet (#2016)
* add geyser_plugin_config support for anchor localnet

* run cargo fmt

* remove duplicate code that came from #2150

Co-authored-by: Tommy Johnson <tommy@psyoptions.io>
2022-12-06 21:15:48 +00:00
metta0714 04b988299a
cli: fix windows yarn error (#1965)
* fix windows yarn error

* add install_node_modules function
2022-12-06 12:20:19 +00:00
Nicolas Bayle 57434279fd
Don't use wallet object for account.createInstruction function 2112 (#2116)
* Don't use wallet object for account.createInstruction function 2112

* added publicKey type check

* yarn test pass

* Don't use wallet object for account.createInstruction function 2112

* added publicKey type check

* yarn test pass

Co-authored-by: henrye <henry@notanemail>
2022-12-06 12:14:01 +00:00
Henry-E b6ad53f628
provider.sendAll fetches transaction error logs (#2302)
Just like provider.sendAndConfirm

Co-authored-by: Tristyn <tristynstimpson@gmail.com>
Co-authored-by: henrye <henry@notanemail>
2022-12-06 12:05:38 +00:00
Henry-E 1bb1969d60
fix breaking change on null or undefined wallet (#2303)
Co-authored-by: henrye <henry@notanemail>
2022-12-06 12:05:12 +00:00
Italo Casas 11af9a6624
Adding support for idl.json (#2114) 2022-12-05 17:41:02 +00:00
Pierre 98f26ce8cf
feat: ata create idempotent and drop rent (#2153)
* feat: ata create idempotent and drop rent

* add the token program id

* cargo fmt

Co-authored-by: Arrowana <8245419+Arrowana@users.noreply.github.com>
Co-authored-by: henrye <henry@notanemail>
2022-12-05 17:11:42 +00:00
Nicholas Clarke 66e45327b9
Add optional flag to parseLogs to throw an error on decoding failure (#2043)
* Add optional flag to parseLogs to throw an error on decoding failure

* update changelog

Co-authored-by: henrye <henry@notanemail>
2022-12-05 15:50:46 +00:00
skrrb fb714b9343
fix anchor keys list command (#2063)
* fix anchor keys list command

* changelog

Co-authored-by: henrye <henry@notanemail>
2022-12-05 15:50:31 +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
Kyle Gilliam 23c9717af1
Add option for jest test scaffolding (#2200)
* Add in option for jest scaffolding

* Add tests for Jest in both JS/TS

* Clone moved value; use new function name

* Remove invalid tests
2022-12-05 15:11:56 +00:00
surfertas 50724df110
allow ability to pass in feePayer to Provider methods [WIP] (#2186)
* allow ability to pass in feePayer to Provider methods

* align comments

* prettier

* check if feePayer set, handle if not

* remove unnecessary spaces in comments

* update changelog

* strict equality check

* use null check

* use logical or

* use logical or

Co-authored-by: Henry-E <henry.elder@adaptcentre.ie>
2022-12-05 12:45:27 +00:00
acheron bbeffd58f7
Use @coral-xyz/borsh package (#2299) 2022-12-05 10:47:36 +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
Matthew Callens 2768112cef
update borsh package scripts (#2292) 2022-11-28 13:00:54 -05:00
Matthew Callens fa2f18a2c0
update borsh package builds and config (#2291) 2022-11-28 12:54:49 -05:00
Henry-E 35f4e26ef8
add borsh + u256 changes + update to v0.2.6 (#2290)
Co-authored-by: henrye <henry@notanemail>
2022-11-28 12:20:13 -05:00
Darren 704fdce0cd
Fixed compile time issue on p1 wallet (#2066) (#2067) 2022-11-28 16:50:42 +00:00
Jean Marchand (Exotic Markets) ca7c3f0aca
Bump actions version (#2283) 2022-11-25 15:14:53 +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
Henry-E 686c97e45b
Revert "client: allow execution stack to have multiple program ids (#1954)" (#2282)
This reverts commit 52b32d2459.
2022-11-24 15:16:37 +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
Arjun 52b32d2459
client: allow execution stack to have multiple program ids (#1954)
* allow execution stack to have multiple program ids

* implement clippy recommendations
2022-11-23 11:30:02 +00:00
Jean Marchand (Exotic Markets) c0d3ff2d77
tests: Fix multiple suites example (#2279) 2022-11-23 10:48:46 +00:00
Matthew Callens be67192f2b
add vercel script for determining deployment skipping (#2277) 2022-11-22 11:49:12 -05:00
Jean Marchand (Exotic Markets) b8cda8a717
cli: Allow custom cluster config (#2271)
* cli: Allow custom cluster config

* Update changelog

* Downgrade the code

* Fix rust fmt

Co-authored-by: Henry-E <henry.elder@adaptcentre.ie>
2022-11-22 16:33:44 +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
Henry-E afbbbb0330
Trying to stop `zero-copy` test failing (#2274)
* trying out different solutions to zero copy issue (none work yet)

* using a newer version of the CLI should fix the issue

* re update solana client version

* add cargo.lock for some reason

* comment out broken test, get help later

* clippy doesn't like the new option

Co-authored-by: henrye <henry@notanemail>
2022-11-22 15:40:07 +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