Commit Graph

69 Commits

Author SHA1 Message Date
Michael Vines 5f4b735796 review feedback 2021-08-14 09:46:28 -07:00
Michael Vines 44ad2ff5b4 Add InitializeMint2/InitializeMultisig2/InitializeAccount3 instructions 2021-08-14 09:46:28 -07:00
Jon Cinque ea354ab358
token: Clear close authority for native accounts (#2115) 2021-07-20 19:51:46 +02:00
Jon Cinque aef1e239b3
token: Add SyncNative instruction (program, CLI, JS) (#2091)
* Add SyncNative to program

* Add CLI support

* Add JS bindings

* Fix syncNative test to not run for existing token program

* Combine checks
2021-07-19 21:50:42 +02:00
Jon Cinque 86f9e395ea
token: Drop delegate on ownership transfer (#2085)
* token: Drop delegate on ownership transfer

* Unconditionalize the block
2021-07-15 11:56:15 +02:00
Jon Cinque 21f8af34e7
Update all solana dependencies to 1.7.3, fix issues (#1958)
* Update all dependencies to 1.7.3, fix issues

* Remove esm from mocha

* Fix missed token test

* Also update rust version

* token-swap: update tolerance on sim test

* Run `cargo clippy --fix` for needless_borrow errors

* Rerun cargo fmt
2021-06-25 00:39:08 +02:00
Jonathan LEI 26560daae2
Fix #1739: ThawAccount incorrectly logged as FreezeAccount in token program (#1740) 2021-05-18 18:32:12 +02:00
Elliott Benisty 58221fc9ae
Fix potential vulnerabilities in programs using spl-token CPIs by adding program id checks (#1714)
* Add spl-token program id check helper function. Add program id to instruction bindings.

* Run cargo fmt

* Fixup tests

* Skip ATA tests when custom token program-id

Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-05-12 22:36:41 +00:00
Michael Vines 448be67cfa Update to Solana 1.6.2 2021-03-30 09:38:04 -07:00
Michael Vines 58807c5f8b Back out clippy::manual_map for now 2021-03-16 22:22:59 -07:00
Michael Vines af5fdb3146 Bump Rust version to 1.50.0 2021-03-16 22:22:59 -07:00
Trent Nelson 00f28eeb0c token: Add InitializeAccount2 instruction
Passes the owner as instruction data rather than on the accounts list,
improving CPI ergonomics where the owner's `AccountInfo` isn't otherwise
required
2021-02-01 14:47:29 -07:00
Trent Nelson 1c4753e9a3 token: Add a full suite of self-transfer tests 2021-01-28 18:45:38 +00:00
Trent Nelson c6f147ef07 token: Fully check self-transfers 2021-01-28 18:45:38 +00:00
Michael Vines 158fa1dea6 Upgrade to Solana v1.4.14 2020-12-03 05:39:55 +00:00
Michael Vines 341149d0e9 Back to no-entrypoint feature name 2020-11-03 10:34:43 -08:00
Michael Vines 2b5e9d1286 Drop lifetimes 2020-11-01 20:48:15 -08:00
Michael Vines 9f4e6d8beb Update to solana v1.4.4 2020-11-01 20:48:15 -08:00
Tyera Eulberg c312a0576a
Clippy suggestions (#765) 2020-10-31 19:10:33 -06:00
Jack May f21c71ed83
reformat token instruction comments (#732) 2020-10-27 01:04:39 +00:00
Jack May 18e8951c97 Refer to CreateAccount 2020-10-26 16:54:33 -07:00
Michael Vines 80e29ef6b9 Port SPL to solana-program and `cargo build-bpf` 2020-10-24 19:21:38 -07:00
Michael Vines 38c2f22734 Add additional transfer test coverage 2020-10-20 08:25:36 +00:00
Jack May e78e26597e Rename x2 instructions to xChecked 2020-09-22 02:51:27 -07:00
Tyera Eulberg 90b5ce6d65
Standardize failure case ordering (#509)
* Standardize processor failure-case ordering

* Fix token-swap test
2020-09-21 20:28:24 -06:00
Jack May 15aa02760a retain v2 error values 2020-09-21 17:08:37 -07:00
Jack May 08841b801e cargo fmt 2020-09-21 17:08:37 -07:00
Jack May aaa5adb0a6 backport #484 to v2 2020-09-21 17:08:37 -07:00
Jack May f68ff75ba0 backport #479 to v2 2020-09-21 17:08:37 -07:00
Jack May 51dc1ae267 backport #448 to v2 2020-09-21 17:08:37 -07:00
Jack May 4f5e70684a backport #443 to v2 2020-09-21 17:08:37 -07:00
Jack May 6f887baaed backport #434 to v2 2020-09-21 17:08:37 -07:00
Jack May 45cebaf754 backport #435 to v2 2020-09-21 17:08:37 -07:00
Jack May 2b1b9de4e7 backport #436 to v2 2020-09-21 17:08:37 -07:00
Jack May 308e027f49 backport #437 to v2 2020-09-21 17:08:37 -07:00
Jack May 36ec1b2689 backport #438 to v2 2020-09-21 17:08:37 -07:00
Jack May 449d74ba90 backport #433 to v2 2020-09-21 17:08:37 -07:00
Jack May 80ea6ff536
Fix multisign check (#479) 2020-09-18 15:53:26 -07:00
Michael Vines b89b0c81d2 Nit: add current 2020-09-16 08:55:03 -07:00
Trent Nelson 9eb10d9144 Unrelated clippy... 2020-09-04 01:18:44 -06:00
Michael Vines 1247e539a7 Fix up doc quotes 2020-08-29 21:59:35 -07:00
Tyera Eulberg 510d34198b
Bump token program id, version (#361) 2020-08-29 02:44:03 -06:00
Jack May 7b5eb2a2a5
Fix account size comparisons (#359) 2020-08-28 23:21:57 +00:00
Jack May 815cca3cb8
Don't repack if not needed (#355) 2020-08-28 12:03:10 -07:00
Jack May 64a9e151e0
Remove last unsafes (#354) 2020-08-28 12:12:12 -06:00
Tyera Eulberg b4a3674437
s/AccountHolder/AccountOwner (#356) 2020-08-28 12:11:57 -06:00
Greg Fitzgerald 6761f440ab
Token nits (#353) 2020-08-28 10:12:05 -06:00
Michael Vines 68660c8011 Fix various quotes in documentation 2020-08-27 22:41:34 -07:00
Jack May 2a5acff2d8
Safer pack/unpack (#349)
* Safer pack/unpack

* fix cli

* clippy

* fix swap

* nit

* clippy

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-08-27 21:19:15 -07:00
Tyera Eulberg 74bf8a1f58
New spl-token v1.1 program id (#348) 2020-08-27 19:41:14 -06:00