Commit Graph

2909 Commits

Author SHA1 Message Date
Alexandru Agache 668dcac11a
fix ConcurrentMerkleTreeHeader (de)serialization (#3572)
The `account_type` member of `ConcurrentMerkleTreeHeader` is currently
an `#[repr(u32)]` enum, but borsh only uses one byte to serialize or
deserialize an enum tag, which leads to issues with `try_from_slice`
calls that get passed slices computed based on applying `size_of` to
`ConcurrentMerkleTreeHeader`. This commit replaces the underlying
type of `account_type` with an integer type.

Signed-off-by: Alexandru Agache <alexandruag@gmail.com>

Signed-off-by: Alexandru Agache <alexandruag@gmail.com>
2022-09-06 18:28:50 -05:00
Dana aadf29e563
docs: Use new overload of confirm tx in token-2022 extension examples (#3567) 2022-09-06 19:07:46 +02:00
ngundotra 7c7507f4ec AC: downgrade solana program version in wrapper to reduce dependency burden 2022-09-01 19:48:43 -04:00
Jon Cinque 592960c2de Add documentation 2022-09-01 20:12:12 +02:00
Jon Cinque 3419482741 Update fuzz and JS clients for new interface 2022-09-01 20:12:12 +02:00
Jon Cinque deeb02deff Step 3: Change `transfer` to `transfer_checked` 2022-09-01 20:12:12 +02:00
Jon Cinque 1d27ca5ced Step 2: Add mints to instructions that use `transfer` 2022-09-01 20:12:12 +02:00
Jon Cinque 1b6173cb4e Step 1: Add transfer fee extension to Token-2022 tests 2022-09-01 20:12:12 +02:00
Jon Cinque 07d14e948a
fuzz: Update honggfuzz and rust version required (#3563) 2022-09-01 19:36:47 +02:00
samkim-crypto 7e2a048045
fix typo (#3559) 2022-09-01 09:06:57 +09:00
hanako mumei b9cab85d81 token-cli: final cleanups on client refactor
use mint for Token objects whenever possible, rework multisig_signers to be prettier
2022-08-31 13:57:41 -07:00
hanako mumei 5e494c63e0 token-cli: promote fee_payer to Arc<dyn Signer> 2022-08-31 13:57:41 -07:00
hanako mumei cf25381108 token-cli: use token client for approve 2022-08-31 13:57:41 -07:00
hanako mumei b91972debb token-cli: use token client for freeze/thaw/revoke 2022-08-31 13:57:41 -07:00
hanako mumei 46206fe64c token-cli: support memo on command_mint 2022-08-31 13:57:41 -07:00
hanako mumei db4a950ca8 token-client: convert freeze/thaw interface 2022-08-31 13:57:41 -07:00
hanako mumei 1fb05454e7 token-client: convert approve/revoke interface 2022-08-31 13:57:41 -07:00
hanako mumei b30aac80a6 token-client: convert transfer interface 2022-08-31 13:57:41 -07:00
hanako mumei 8e196e5e77 token-cli: use token client for command_burn 2022-08-31 13:57:41 -07:00
hanako mumei e540b172db token-cli: use token client for command_mint
* client: change mint_to to accept decimals and prefer mint_checked
* client: move multisig key winnowing into utility function
2022-08-31 13:57:41 -07:00
Jon Cinque 685e957ba9
token-swap: Remove stable swap (#3556) 2022-08-31 15:18:10 +02:00
Jon Cinque 180d80be7d
token-swap: Remove stable-swap simulation tests (#3555) 2022-08-31 14:34:25 +02:00
hanako mumei 8d1e57018a token-cli: finish interest bearing mint
minor cleanups, guards on set-interest-rate, impl set-authority for interest-bearing mints
2022-08-30 21:12:59 -07:00
Udbhav Muthakana fbae99fe2c token-cli: Support the InterestBearingMint extension 2022-08-30 21:12:59 -07:00
Jon Cinque 422544b906
ci: Re-enable twotx job (#3553)
* ci: Re-enable twotx job

* Remake patch file
2022-08-31 01:41:05 +02:00
Jon Cinque f0dd422f2a
stake-pool: Use stake program minimum delegation (#3547)
* stake-pool: Support dynamic minimum delegation amount

* Use minimum_delegation in CLI

* Address feedback

* Update minimum delegation in python test

* Address feedback

* Improve error message
2022-08-30 21:45:18 +02:00
Jon Cinque b4edc074a3
token-swap-js: Bump version for new release (#3552) 2022-08-30 21:23:56 +02:00
Jon Cinque b6259b3a51
token-2022: Add inverse fee calculation (#3524)
* token-2022: Add inverse fee calculation

* Rename functions
2022-08-30 17:56:34 +02:00
Jon Cinque ffbab71d49
token-2022: Use updated generic types for Token client in confidentials (#3546) 2022-08-29 23:27:29 +02:00
Andrii Tretyakov d65ab18fbd
token-cli: Removed usage of Account::LEN as a verificaton for token account (#3527)
replaced with Account::valid_account_data to support token2022
2022-08-29 12:42:33 -07:00
Jordan Sexton a578fc8159
add eslint-plugin-require-extensions (#3543) 2022-08-28 20:38:11 -05:00
Jon Cinque 90626fc4c9
ci: Update rust-nightly to 2022-04-01 (#3539)
* ci: Update rust-nightly to 2022-04-01

* Use rust_nightly parameter in fuzz script
2022-08-27 18:20:12 +02:00
Jon Cinque a04fa3ad08
ci: Bump lz4 for audit fix (#3541) 2022-08-27 17:04:00 +02:00
hanako mumei 84c566b13e bump token-cli to 2.0.17
release has already been made and lives in the `token-cli-v2.0.17-branch` branch
2022-08-25 17:54:38 -07:00
Noah Gundotra 3fe92ea05f
Add on-chain compression program that uses CMT (#3489) 2022-08-25 08:51:35 -10:00
hanako mumei 9382641da2 token-cli: remove #[allow(deprecated)] from toplevel
also remove ArcSigners temp code
2022-08-25 09:53:29 -07:00
Jordan Sexton d2b15ddc91 update spl-memo dependency 2022-08-24 19:04:27 -05:00
Jordan Sexton 65f5b102e8
spl-token: fix CJS imports (#3529)
* token-js: patch version bump

* add CJS package.json; fixes #3522

* alpha version bump

* remove alpha version

* add same postbuild step to memo js

* fix lockfiles
2022-08-24 19:01:19 -05:00
Athar Mohammad 2fe0ce60f8
[token-js] : Support for UiAmountToAmount and AmountToUiAmount instructions (#3345)
* suport for amountToUiAmount instruction

* support for uiamount to amount instruction

* upgrade @solana/web3.js to 1.47.4

* move amount.test from e2e-2022 to e2e

* fix and sort imports

Co-authored-by: Jordan Sexton <jordan@jordansexton.com>
2022-08-24 01:54:16 -05:00
hana e03a013184
token-cli: support `MintCloseAuthority` (#3487)
* cli: add --enable-close flag to create-token which sets its close authority to mint authority
* cli: add support to changing a mint close authority to authorize
* cli: add close-mint, a new command for closing a mint
* cli: update authorize and close-account to go through the token client
* client: change set_authority and close_account to support multisigners
2022-08-23 15:54:10 -07:00
Jordan Sexton 29d316e811
Fix Token program ESM exports (#3508)
* Fix Memo program ESM exports

* fix repository link

* Fix Token program ESM exports

* web3.js is a peer dependency

* memo/ts -> memo/js (same as token)

* add gh-pages dev dep

* add explicit js extensions

* use explicit js imports

* lint fixes for type imports

* fix version

* check in package-lock.json

* check in package-lock.json

* update spl-memo dep

* reorg imports

* move spl-memo to dev deps

* remove editorconfig

* update spl-memo

* update node version in CI

* memo and token use npm now

* use npm ci commands

* reorder imports
2022-08-22 19:07:03 -05:00
Sebastian Bor a179eba71e
Governance: Community Veto Vote (#3506)
* feat: Enable Community Veto Vote

* chore: test_veto_vote_with_community_voter_weight_addin

* chore: test_veto_vote_with_community_max_voter_weight_addin

* chore: assert valid community veto vote threshold

chore: Fix merge conflict
2022-08-23 02:03:29 +02:00
hanako mumei e06506b40b token-cli: dont push duplicates to bulk_signers 2022-08-22 16:28:43 -07:00
Jordan Sexton 48a859bbad
Fix Memo program ESM exports (#3507)
* Fix Memo program ESM exports

* fix repository link

* web3.js is a peer dependency

* memo/ts -> memo/js (same as token)

* add gh-pages dev dep

* fix version

* check in package-lock.json

* remove editorconfig
2022-08-22 17:57:25 -05:00
Sebastian Bor c5db9cec78
Governance: Explicit disabled weight thresholds (#3501)
* feat: enforce min_weight_to_create_governance Disabled value

* chore: test_create_proposal_with_community_disabled_error
2022-08-23 00:48:02 +02:00
Sebastian Bor 232406a9b4
Governance: Add council_vote_tipping (#3500)
* wip: Add council_vote_tipping

* feat: Use VoteTipping for relevant mint

* chore: test_cast_early_council_vote_with_disabled_community_vote_tipping

* chore: test_cast_community_vote_with_early_council_and_disabled_community_vote_tipping

* Update help text for `propose` (#3505)

* Governance: Use mint authority to revoke membership tokens (#3498)

* chore: fix process_revoke_governing_tokens feature

* feat: Use governing token mint authority to authorise token revocation

* chore: Fix authority spelling

* Governance: Do not tip on max vote weight when tipping Disabled (#3499)

* fix: Do not tip on max vote weight when tipping Disabled

* chore: test_cast_vote_with_strict_tipping_and_inflated_max_voter_weight_votes

* chore: fix test name


Co-authored-by: Jon Cinque <jon.cinque@gmail.com>

* wip: Add council_vote_tipping

* feat: Use VoteTipping for relevant mint

* chore: test_cast_early_council_vote_with_disabled_community_vote_tipping

* chore: test_cast_community_vote_with_early_council_and_disabled_community_vote_tipping

* chore: Fix merge conflicts

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2022-08-23 00:35:35 +02:00
Athar Mohammad 2198ee068b
Extends withdraw functionality in stake pool (#3445)
* extends withdraw to merge if stake account is provided

* check if account is stake account and delegated to same validator

* fixing tests and defining withdraw accounts for delegated stake reciever

* implementation improvements in cli

* fix js tests

* added test for uninitialized stake account
2022-08-22 23:36:13 +02:00
Sebastian Bor babf51941a
Governance: Do not tip on max vote weight when tipping Disabled (#3499)
* fix: Do not tip on max vote weight when tipping Disabled

* chore: test_cast_vote_with_strict_tipping_and_inflated_max_voter_weight_votes

* chore: fix test name


Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2022-08-22 21:58:05 +02:00
Sebastian Bor 10cf50ec2e
Governance: Use mint authority to revoke membership tokens (#3498)
* chore: fix process_revoke_governing_tokens feature

* feat: Use governing token mint authority to authorise token revocation

* chore: Fix authority spelling
2022-08-22 21:52:05 +02:00
Brooks Prumo 886d76016e
Update help text for `propose` (#3505) 2022-08-22 11:58:06 -04:00