Commit Graph

2945 Commits

Author SHA1 Message Date
Alexander Ray 6ab15b340e
stake-pool: add redelegate js bindings (#3960)
* - add ts/js binding for redelegate functionality

* - add redelegate instructions

* - refactor

* - force rebuild

* - refactor

* - force rebuild

* - force rebuild
2023-01-12 19:56:06 +01:00
Noah Gundotra b33bcc055e
bump versions (#3973) 2023-01-11 10:45:00 -06:00
Noah Gundotra bf14dc39f6
Add more depth size pairs (#3972) 2023-01-11 10:08:46 -06:00
dependabot[bot] 9853e0a4f0
build(deps): bump bzip2 from 0.4.3 to 0.4.4 (#3970)
Bumps [bzip2](https://github.com/alexcrichton/bzip2-rs) from 0.4.3 to 0.4.4.
- [Release notes](https://github.com/alexcrichton/bzip2-rs/releases)
- [Commits](https://github.com/alexcrichton/bzip2-rs/commits/0.4.4)

---
updated-dependencies:
- dependency-name: bzip2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-11 14:36:39 +01:00
Jon Cinque f825f1d106
examples: Use txs instead of set_account in token test (#3969) 2023-01-10 23:46:07 +01:00
Jon Cinque 9fd9805345
token-js: Bump version for release (#3968) 2023-01-10 22:38:34 +01:00
mPaella befea2c0a8
token-js: Allow (Signer | PublicKey)[] instead of Signer[] when possible (#3967)
* Allow PublicKey[] | Signer[] instead of Signer[] when possible

* Change Signer[] | PublicKey[] to (Signer | PublicKey)[]
2023-01-10 20:59:44 +01:00
Jon Cinque 6793256b9e
example: Token transfer with PDA (#3965) 2023-01-10 13:41:41 +01:00
Jon Cinque 64b844ace2
ci: Add exception for tokio (#3966) 2023-01-10 00:05:27 +01:00
hana 56b1a95230
token-js: sanity check header space in tlv data (#3936) 2023-01-05 17:00:53 -08:00
hanako mumei 8dde48e63e token-cli: display permanent delegate warning 2023-01-05 17:00:20 -08:00
hanako mumei f5133d6847 token-cli: display CpiGuard and PermanentDelegate
also dont display MintCloseAuthority line if revoked
2023-01-05 17:00:20 -08:00
hanako mumei 0e530fa080 twotx: allow git to merge the twotx ci patch 2023-01-05 09:37:50 -08:00
Yihau Chen bef10795e1
chore: get solana version from different cargo files (#3962)
* chore: get solana version from different cargo files

* Update patch.crates-io.sh

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

* Update patch.crates-io.sh

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

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2023-01-05 21:02:37 +08:00
Michael Vines 8caa54349c
Rework method for reporting security problems (#3959) 2023-01-04 12:22:58 -08:00
dependabot[bot] d2cac80ef2
build(deps-dev): bump eslint from 7.32.0 to 8.31.0 in /token-swap/js (#3950)
Bumps [eslint](https://github.com/eslint/eslint) from 7.32.0 to 8.31.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.32.0...v8.31.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-04 01:00:59 +01:00
dependabot[bot] 3f6b5e4836
build(deps): bump json5 from 2.2.0 to 2.2.3 in /stake-pool/js (#3952)
Bumps [json5](https://github.com/json5/json5) from 2.2.0 to 2.2.3.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.2.0...v2.2.3)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-04 00:11:27 +01:00
dependabot[bot] 280a589907
build(deps): bump json5 from 2.2.1 to 2.2.3 in /memo/js (#3954)
Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.2.1...v2.2.3)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-03 18:23:30 +01:00
dependabot[bot] e0548c1e06
build(deps): bump json5 from 2.2.1 to 2.2.3 in /token/js (#3953)
Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.2.1...v2.2.3)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-03 18:22:47 +01:00
dependabot[bot] d36fd08674
build(deps): bump json5 and babel-loader in /docs (#3951)
Bumps [json5](https://github.com/json5/json5) and [babel-loader](https://github.com/babel/babel-loader). These dependencies needed to be updated together.

Updates `json5` from 2.2.0 to 2.2.3
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.2.0...v2.2.3)

Updates `babel-loader` from 8.2.3 to 8.3.0
- [Release notes](https://github.com/babel/babel-loader/releases)
- [Changelog](https://github.com/babel/babel-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel-loader/compare/v8.2.3...v8.3.0)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
- dependency-name: babel-loader
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-03 00:10:30 +01:00
Jon Cinque eba709b931
stake-pool: Support stake redelegation (#3856)
* stake-pool: Add redelegate implementation

* Remove rent account from instruction

* Update validator searching due to rebase

* Use new blockhash in test to avoid timeout in CI

* Clarify error message

* Fix instruction comment

* Refresh blockhash in failing test more often
2022-12-24 15:45:39 +01:00
Jon Cinque 4a8e7a0034
docs: Add second stake pool audit by Neodyme (#3945) 2022-12-23 18:03:15 +01:00
Jon Cinque ef17887914
stake-pool: Add `DecreaseAdditionalValidatorStake` instruction (#3925)
* stake-pool: Add `DecreaseAdditionalValidatorStake` instruction

* Update checks for deduping
2022-12-23 17:27:16 +01:00
Jon Cinque 9aac29c250
stake-pool: Add "IncreaseAdditionalValidatorStake" instruction (#3924)
* stake-pool: Add "IncreaseAdditionalValidatorStake" instruction

* Address feedback

* Always check transient stake account address
2022-12-23 13:31:41 +01:00
samkim-crypto e0b70a9749
rename ops to syscall for better readability (#3944) 2022-12-23 16:17:57 +09:00
samkim-crypto b9aba3fb8d
[confidential-extension] Use `OptionalNonZeroPubkey` and `OptionalNonZeroEncryptionPubkey` for confidential extension (#3943)
* use OptionalNonZeroPubkey for the confidential mint authority pubkey

* add OptionalNonZeroEncryptionPubkey

* update tests

* Update token/program-2022/src/pod.rs

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

* remove unnecessary COption convertion for OptionalNonZeroEncryptionPubkey

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2022-12-23 11:06:18 +09:00
chalda 19b8fae56c
Governance: adding error labels (#3845) 2022-12-22 15:40:05 +00:00
samkim-crypto 6386f24253
[confidential-extension] Restrict `InitializeMint` and `UpdateMint` instructions (#3938)
* restrict `UpdateMint` instruction

* update tests and token client for `UpdateMint`

* restrict `InitializeAccount` instruction

* update client and tests for `InitializeMint` instruction
2022-12-20 14:24:31 +09:00
samkim-crypto ac02e0afde
change ceil div variable name (#3935) 2022-12-20 09:04:00 +09:00
Noah Gundotra 4ffbc72519
compression: bump version to 0.1.6 for release (#3934) 2022-12-19 08:29:42 -05:00
Noah Prince 49883fba9f
Upgrade compression to anchor 26 (#3926) 2022-12-19 08:12:16 -05:00
samkim-crypto a083ce4f17
fix parenthesis error in fee calculation doc (#3928) 2022-12-19 13:03:08 +09:00
samkim-crypto ba2b7951fc
remove ElGamal pubkey from confidential transfer `ConfigureAccount` data (#3927) 2022-12-19 11:58:46 +09:00
hanako mumei 9a0ecb3814 token-js: rename ExtensionType.InterestBearingMint
change name to InterestBearingConfig, in line with Token-2022
2022-12-16 16:40:47 -08:00
Jon Cinque 9f050c7c49
docs: Add token-2022 extension usage examples in CLI (#3919)
* docs: Add extension usage in CLI

* Update docs/src/token-2022/extensions.mdx

Co-authored-by: hana <81144685+2501babe@users.noreply.github.com>

Co-authored-by: hana <81144685+2501babe@users.noreply.github.com>
2022-12-16 18:36:02 +01:00
samkim-crypto c51ccf05c2
[confidential-extension] Refactor and add comments for readability (#3921)
* pass over `InitializeAccount` to `Withdraw` instructions

* add `valid_as_source` and `valid_as_destination` functions

* pass over `Transfer` instruction

* pass over `ApplyPendingBalance` to `HarvestWithheldTokensToMint` instructions

* refactor pending balance credit counter increment
2022-12-16 12:42:55 +09:00
hanako mumei 72a41d4a22 token-js: minor memo transfer fixes 2022-12-15 17:27:46 -08:00
hanako mumei d1dfa2d233 token-js: CPI Guard tests 2022-12-15 17:27:46 -08:00
hanako mumei 980065ec6c token-js: implement CPI Guard 2022-12-15 17:27:46 -08:00
dependabot[bot] d3e4ca7a6c
build(deps): bump test-case from 2.2.1 to 2.2.2 (#3917)
Bumps [test-case](https://github.com/frondeus/test-case) from 2.2.1 to 2.2.2.
- [Release notes](https://github.com/frondeus/test-case/releases)
- [Changelog](https://github.com/frondeus/test-case/blob/master/CHANGELOG.md)
- [Commits](https://github.com/frondeus/test-case/compare/v2.2.1...v2.2.2)

---
updated-dependencies:
- dependency-name: test-case
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-16 01:00:11 +01:00
Sebastian Bor c750e03f50
Governance: v3.1 (#3915)
* Governance: Remove proposal counter (#127)

* feat: Use proposal seed instead of index

* chore: Rename and reset legacy1 to reserved1

* chore: Make Clippy happy

* chore: Fix Chat tests compilation

* Governance: Remove Realm voting proposal count (#128)

* feat: Remove Realm.voting_proposal_count

* chore: Update comments

* chore: Add tests and explicit assertions for non existing accounts

* Governance: Remove TokenOwnerRecord total_votes_count (#130)

* feat: Extend unrelinquished_votes_count to u64

* chore: Update comments and names

* chore: Update asserts

* chore: Update comments

* chore: Use u32:MAX to trim unrelinquished_votes_count

* chore: Make Clippy happy

* chore: Update versioning cleanup comments

* Governance: Active proposal count (#131)

* feat: Add active_proposal_count to Governance

* feat: Reallocate GovernanceV1 to GovernanceV2

* chore: test_create_proposal_and_migrate_v1_governance_to_v2

* chore: Cleanup code

* chore: Update comments

* chore: Use assert_is_valid_realm instead of deserializing the account

* chore: Update comments

* chore: Update comments

* chore: Check for empty account first

* chore: Update comments

* fix: Assert new account size is greater than the existing one

* Governance: Proposal deposit (#135)

* feat: Add active_proposal_count to Governance

* feat: Reallocate GovernanceV1 to GovernanceV2

* chore: test_create_proposal_and_migrate_v1_governance_to_v2

* chore: Cleanup code

* chore: Update comments

* chore: Use assert_is_valid_realm instead of deserializing the account

* chore: Update comments

* chore: Update comments

* chore: Check for empty account first

* feat: Add extra_lamports to create_and_serialize_account

* chore: Make Clippy happy

* feat: Implement Proposal security deposit

* chore: Make Clippy happy

* chore: Add proposal deposit amount tests

* feat: Implement RefundProposalDeposit

* chore: test_refund_proposal_deposit

* chore: Make Clippy happy

* chore: test_refund_proposal_deposit_with_cannot_refund_draft_proposal_error

* chore: test_refund_proposal_deposit_with_invalid_proposal_owner_record_error

* chore: test_refund_proposal_deposit_with_invalid_proposal_owner_error

* fix: Return deposit to deposit payer

* chore: Cleanup

* chore: test_refund_proposal_deposit_with_invalid_proposal_deposit_account_error

* fix: Remove unnecessary max(1) for account lamports

* Governance: Review feedback (#139)

* chore: Update active_proposal_count comment

* chore: Update account indices in process_create_proposal

* fix: Disallow u8::MAX for deposit_exempt_proposal_count

* chore: Use u64 without option for extra_lamports

* fix: Use explicit version 1 for TokenOwnerRecord migration

* chore: Update math for RealmConfigAccount::get_max_size

* fix: Flag ProposalCoolOffTimeNotSupported as legacy instead of reusing it

* Governance: Add proposal and payer to ProposalDeposit account (#141)

* feat: Add proposal and payer to ProposalDeposit account

* chore: Update tests

* feat: Use referential fields to check ProposalDeposit

* chore: Make Clippy happy

* chore: Update Proposal deposit amount comments

* chore: Update deposit amount comment

* chore: Update versions (#142)
2022-12-15 12:01:37 +00:00
Jordan Sexton 1f58b759d8
fix: stake-pool-js: add browser CJS build (#3910)
* fix: stake-pool-js: add browser CJS build

* update package-lock.json

* run prettier

* only emit ts declaration files
2022-12-14 19:25:46 -06:00
Jon Cinque 26aed39c54
docs: Add stake pool fees page to the sidebar (#3911) 2022-12-15 00:42:45 +01:00
Dmitri Makarov 27da0acfbe
Decrease MAX_POOL_SIZE in huge_pool test to make it work with rust 1.65 (#3909) 2022-12-14 11:53:33 -08:00
dependabot[bot] 1d6902db34
build(deps): bump bn.js from 5.2.0 to 5.2.1 in /token-swap/js (#3197)
Bumps [bn.js](https://github.com/indutny/bn.js) from 5.2.0 to 5.2.1.
- [Release notes](https://github.com/indutny/bn.js/releases)
- [Changelog](https://github.com/indutny/bn.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/indutny/bn.js/compare/v5.2.0...v5.2.1)

---
updated-dependencies:
- dependency-name: bn.js
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-14 20:42:43 +01:00
dependabot[bot] ac96df0745
build(deps-dev): bump mocha and @types/mocha in /token/js (#3717)
Bumps [mocha](https://github.com/mochajs/mocha) and [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha). These dependencies needed to be updated together.

Updates `mocha` from 9.2.2 to 10.1.0
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v9.2.2...v10.1.0)

Updates `@types/mocha` from 9.1.1 to 10.0.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha)

---
updated-dependencies:
- dependency-name: mocha
  dependency-type: direct:development
  update-type: version-update:semver-major
- dependency-name: "@types/mocha"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-14 20:26:22 +01:00
dependabot[bot] 9572d6162f
build(deps): bump certifi in /binary-option/client (#3885)
Bumps [certifi](https://github.com/certifi/python-certifi) from 2021.5.30 to 2022.12.7.
- [Release notes](https://github.com/certifi/python-certifi/releases)
- [Commits](https://github.com/certifi/python-certifi/compare/2021.05.30...2022.12.07)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-14 19:55:49 +01:00
dependabot[bot] e5b0ed8cf5
build(deps): bump num-traits from 0.2.14 to 0.2.15 (#3908)
Bumps [num-traits](https://github.com/rust-num/num-traits) from 0.2.14 to 0.2.15.
- [Release notes](https://github.com/rust-num/num-traits/releases)
- [Changelog](https://github.com/rust-num/num-traits/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-num/num-traits/compare/num-traits-0.2.14...num-traits-0.2.15)

---
updated-dependencies:
- dependency-name: num-traits
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-14 19:54:46 +01:00
dependabot[bot] 56cdef9ee8
build(deps): bump certifi from 2022.6.15 to 2022.12.7 in /stake-pool/py (#3886)
Bumps [certifi](https://github.com/certifi/python-certifi) from 2022.6.15 to 2022.12.7.
- [Release notes](https://github.com/certifi/python-certifi/releases)
- [Commits](https://github.com/certifi/python-certifi/compare/2022.06.15...2022.12.07)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-14 02:42:47 +01:00
Jon Cinque 804204f505
deps: Revert uint (#3902) 2022-12-14 01:10:20 +01:00