Commit Graph

2556 Commits

Author SHA1 Message Date
samkim-crypto 0f316fb357
bump solana to v1.10.26 (#3274) 2022-06-20 09:55:49 +09:00
Jon Cinque e44d174f63
token-js: Clarify how to run tests (#3269) 2022-06-17 19:32:25 -04:00
Athar Mohammad 351cd60a5e
spl-token: Enums for Cli command names (#2598) (#3236)
* Added Enums which can be turned into strings
  for command names.
2022-06-17 16:56:03 -04:00
dependabot[bot] 9ae9deb09b
build(deps): bump openssl-src from 111.18.0+1.1.1n to 111.20.0+1.1.1o (#3268)
Bumps [openssl-src](https://github.com/alexcrichton/openssl-src-rs) from 111.18.0+1.1.1n to 111.20.0+1.1.1o.
- [Release notes](https://github.com/alexcrichton/openssl-src-rs/releases)
- [Commits](https://github.com/alexcrichton/openssl-src-rs/commits)

---
updated-dependencies:
- dependency-name: openssl-src
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-17 15:38:23 -04:00
Jon Cinque 056948bbd1
token-js: Add memo transfer support (#3257) 2022-06-16 11:32:28 -04:00
Jon Cinque 5c478568c6
token-js: Support non-transferable mint (#3256) 2022-06-16 09:40:29 -04:00
Jon Cinque b461406e97
token-js: Add default account state support (#3255) 2022-06-16 09:40:11 -04:00
Jon Cinque 79d2c606b8
CI: Add `--max-warnings 0` to eslint to abort on errors (#3254)
* CI: Add `--max-warnings 0` to eslint to abort on errors

* Fix lint issue
2022-06-16 09:39:55 -04:00
Yihau Chen a7055d556c
chore: update ci install dep script (#3244)
* chore: only install needed lib

* lint
2022-06-15 10:40:08 +08:00
Tyera Eulberg 11ef88a505
Add spl-memo typescript implementation (#2583)
* Memo ts implementation

Co-authored by: Bryan Ischo <bryan@ischo.com>

* Add building and CI

* Remove unneeded mocha file

* Update Node version

* Add chai dependency

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2022-06-15 00:13:45 +02:00
Sebastian Bor aaca5353bc
chore: add test to show flash loan attack is not possible (#3238) 2022-06-11 12:56:06 +01:00
Jon Cinque 27014732dd
token-2022: Bump version for next release (#3239) 2022-06-10 22:38:33 +02:00
Alisamar Husain 9b3122a06f
Documentation on environment setup (#3234)
* Documentation on environment setup

* Incorporated feedback
2022-06-10 18:40:17 +02:00
Ronald Hood Jr 5493842399
token-js: Bindings For Transfer Fee Extension IXs (#3102)
* JS Bindings For Transfer Fee Extensions IXs

* Add tests and actions

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2022-06-10 01:31:57 +02:00
Kunal Desai ad97543192
Support InitializeAccount3 in token js (#3233) 2022-06-09 13:57:01 +02:00
Kunal Desai 6096ac6f46
Support InitializeAccount2 instruction (#3229)
* Support InitializeAccount2 instruction

* Add unit test
2022-06-08 22:29:49 +02:00
dboures 3e9104736a
token-cli: produce error if invalid --config option (#3166)
* token-cli: produce error if invalid --config option

* token-cli: add test for invalid --config
2022-06-08 14:48:55 +02:00
Jon Cinque 5b1b87ed48
token-swap: Prepare v3.0.0 release for testnet and devnet (#3227) 2022-06-07 16:31:18 +02:00
samkim-crypto 677acf173d
token-2022: limit incoming transfers for confidential transfer extension (#3208)
* token-2022: limit incoming transfers for confidential transfer extension

* token-2022: add maximum pending counter for confidential extension in client

* token-2022: update tests for ct configure account

* token-2022: cargo fmt

* divide pending balance into lo and hi

* token-2022: update ct processor for lo and hi pending balances

* token-2022: limit confidential transfer deposit and transfer amount in token client

* token_2022: rename TokenError::IllegalAmount

* token-2022: compare max pending credit as u64

* token-2022: fmt

* token-2022: minor fix error from rebase

* Update token/program-2022/src/extension/confidential_transfer/processor.rs

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>

* token-2022: update configure account initialization comments

* token-2022: use strict comparison for max pending balance credit counter check

* token-2022: update deposit tests to check `pending_balance_hi` populated

* token-2022: update deposit tests to check that deposit and transfer fails when max pending exceeded

* token-2022: reset pending balance counter on `ApplyPendingBalance`

* token-2022: fix cargo test cases for credit counter

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2022-06-07 23:16:46 +09:00
samkim-crypto c2a3ecd970
token-2022: prevent an already configured confidential account to be configured again (#3216)
* token-2022: prevent an already configured confidential account to be configured again

* token-2022: add overwrite flag to init extension

* token-2022: clippy

* token-2022: update initialize mint for interest bearing mint

* token-2022: confidential transfer mint init allow overwrite
2022-06-07 09:42:23 +09:00
kootsZhin 08d0592bea
feat: fix `solana airdrop` amount (#3226)
* feat: fix `solana airdrop` amount

* feat: update solana wrap amount

* fix: revert formating table
2022-06-06 19:19:30 +02:00
Jon Cinque 38944088c0
name-service-js: Bump version and sort out dependencies for release (#3214) 2022-06-02 18:49:43 +02:00
Sebastian Bor 9b081abcbf
chore: Upgrade Anchor to v0.24.2 (#3212) 2022-06-02 01:10:53 +02:00
Sebastian Bor a6bd22fcd4
Governance: Do not allow relinquishing votes in Finalising state (#3210)
* fix: Do not allow relinquishing votes in Finalising state

* chore: rename voting to finalising state

* chore: update comments

* chore: revert Anchor version
2022-06-02 01:10:33 +02:00
Jon Cinque f7abf4a6bc
token-2022: Remove `reallocate` and `sibling-instruction` features (#3213) 2022-06-01 16:46:41 +02:00
Jon Cinque 773e2ee469
token-2022: Add interest-bearing extension (#3013)
* token-2022: Add interest-bearing extension

* Rename / comment feedback

* Rename interest-bearing -> interest-bearing mint
2022-06-01 16:46:30 +02:00
Todsaporn Banjerdkit 37265fc5c8
docs: add missing single quote (#3200) 2022-05-31 15:38:23 +02:00
samkim-crypto 424c900345
bump solana to v1.10.19 (#3195)
* bump solana to v1.10.19

* update solana-version.sh
2022-05-25 08:40:30 +09:00
samkim-crypto 2ad468f8b7
Fix confidential self transfer with fees (#3193)
* token-2022: fix confidential self-transfers with fee

* token-2022: update tests for confidential self-transfer with fees
2022-05-24 19:19:19 +09:00
beeman 3af176d6c4
token-js: move start-server-and-test dep to devDependencies (#3186) 2022-05-20 14:19:04 +02:00
S1nus 2aff441e48
Confusion with decimals (#3187)
If decimals for the mint are set to "9", then to mint 100 tokens, you'd need to enter 100000000000

unless I am mistaken?
2022-05-20 12:55:21 +02:00
Jon Cinque 93e2d1b7bf
token-swap-js: Bump package version for release (#3185) 2022-05-19 22:54:19 +02:00
Jon Cinque c4fdb29ff2
token-swap-js: Bump buffer-layout and web3.js (#3182) 2022-05-19 20:04:54 +02:00
Jon Cinque c324f6c431
stake-pool: Handle force destaked accounts (#3152) 2022-05-19 19:08:50 +02:00
samkim-crypto b2077609d9
token-2022: add tests for confidential transfer withdraw withheld tokens from mint (#3181) 2022-05-19 11:12:00 +09:00
Michael Vines f1c693d067
token-2022: Add support for Non-Transferable Tokens (NTTs) - NonTransferableMint extension (#3178)
Co-authored-by: Juan Oxoby <me@jmoxo.by>
2022-05-17 16:16:13 -07:00
Dmitri Makarov 791cc8a776
Use target_os instead of target_arch for Solana conditional compilation (#3148) 2022-05-17 12:25:24 -07:00
Dmitri Makarov c4523486c6
Update Cargo.lock (#3177) 2022-05-17 12:25:07 -07:00
Dmitri Makarov f1c1d440e9
Bump solana to v1.10.15 (#3176) 2022-05-17 11:27:30 -07:00
Sebastian Bor 3d3b32dcf6
Governance: Veto vote (#3156)
* chore: remove #[repr(C)]

* wip: resolve proposal governing token mint

* fix: remove optionality from veto vote

* feat: implement tipping for veto vote

* fix: move vote_threshold to the end of Proposal struct

* chore: remove use super

* chore: make clippy happy

* chore: add change log

* feat: add council_veto_vote_threshold

* fix: resolve vote threshold for voting token mint

* chore: revert old function name

* fix: calculate max veto in coerce_max_voter_weight

* chore: make clippy happy

* chore: make clippy happy

* feat: Implement RelinquishVote for Veto

* chore: update comments

* chore: rename with_cast_vote to with_cast_yes_no_vote

* chore: rename with_cast_multi_option_vote to with_cast_vote

* chore: create use_veto_vote test scenario

* chore: Add veto vote disabled tests

* chore: Add partial Veto vote tests

* chore: update comments

* chore: test_cast_veto_vote_with_no_council_error

* chore: test_relinquish_veto_vote

* chore: rename with_token_owner_record to with_community_token_owner_record

* chore: test_relinquish_veto_vote_with_vote_record_for_different_voting_mint_error

* chore: test_cast_veto_vote_with_invalid_voting_mint_error

* chore: fix chat build

* chore: test_cast_veto_vote_with_council_only_allowed_to_veto

* fix: Use VoteKind to distinguish between Veto and Electorate votes

* chore: make clippy happy

* Update change log

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

* chore: rename voting_token_mint to vote_governing_token_mint

* chore: test_cast_yes_and_veto_votes_with_yes_as_winning_vote

* fix: throw error for Community veto

* chore: Update comments

* chore: Update names and commnents

* chore: split try_get_tipped_vote_state into Electorate and Veto cases

* chore: Update comments

* chore: remove #[allow(clippy::float_cmp)]

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2022-05-17 16:37:43 +01:00
dboures 49c53ad653
token-js: Add sync version of getAssociatedTokenAddress (#3171)
* token-js: Bump web3.js dependency to 1.41.0

* token-js: Add sync version of getAssociatedTokenAddress

* token-js: add test for getAssociatedTokenAddressSync

* Update lockfile

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2022-05-17 00:30:31 +02:00
Jon Cinque 895747f29f
token-lending: Bump / set / pin versions for 0.2.0 crates (#3157) 2022-05-12 00:27:02 +02:00
Seth Girvan dc5684445f
Governance: fix instruction accounts comments (#3144) 2022-05-09 22:49:15 +02:00
samkim-crypto 9e029349fc
Rename encryption pubkey (#3147)
* token-2022: change elgamal pubkey to encryption pubkey

* token-2022: update client and tests for  elgamal pubkey to encryption pubkey
2022-05-08 12:51:18 +09:00
samkim-crypto b6eb64b0b4
token-2022: check pending and available balance on confidential token tests (#3145)
* token-2022: check pending and available balance on confidential token tests

* token-2022: cargo fmt
2022-05-07 15:00:58 +09:00
Sebastian Bor 219b6a1b78
Governance: Council Vote Threshold (#3135)
* wip: Replace proposal_cool_off_time with council_vote_threshold

* wip: serialise governance vec

* wip: cool off time

* chore: create test to deserialize legacy config

* wip: default council_vote_threshold from community_vote_threshold for legacy accounts

* chore: fix chat compilation

* feat: use community_vote_threshold for voting

* feat: assert all voting thresholds are not disabled

* chore: simplify tests without config mutation

* feat: assert proposal is created for valid vote threshold

* chore: update test name

* chore: test_finalize_council_vote

* chore: test_cast_council_vote

* chore: test for disabled voter threshold

* feat: Ensure GovernanceConfig reserved buffer is always empty

* chore: change error name to AtLeastOneVoteThresholdRequired

* chore: add comments

* chore: Add VoteThreshold.Any comments
2022-05-06 17:24:46 +01:00
samkim-crypto bcf7aa2d6e
token-2022: client for confidential withdraw withheld tokens (#3134) 2022-05-06 15:52:43 +09:00
Tyera Eulberg 731a1363b1
Token client improvements (#3139)
* Use-stmt cleanup

* Use nonblocking RpcClient

* Arc-wrap RpcClient

* Confirm tx when using RpcClient

* Bump version for releasing
2022-05-04 18:11:11 -06:00
Tyera Eulberg d087b574e6
Accommodate upstream web3.js changes in twotx patch (#3140) 2022-05-04 17:32:51 -06:00
Jon Cinque 9ef3fd819f
token-lending: Add version to spl-token dependency (#3137) 2022-05-04 13:03:34 +02:00