Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

program: Port from SPL #12

Open
wants to merge 248 commits into
base: main
Choose a base branch
from
Open

Conversation

joncinque
Copy link

Problem

It's time to move over the SPL Token program implementation to its specific repo, but it hasn't been done.

Summary of changes

Following the PR for the token-metadata program at solana-program/token-metadata#1, I ran:

# add the remote for the source repo
git remote add spl https://github.com/solana-labs/solana-program-library.git
# fetch the master from spl under a different local branch
git fetch spl master:fromspl
git switch fromspl
# be safe, remove the remote
git remote rm spl
# filter the stake related files
python3 ../../git-filter-repo \
  --path token/program \
  --path-rename token/program:program \
  --force
# re-add this repo
git remote add origin [email protected]:joncinque/token.git
git fetch origin main
git switch main
git switch fromspl
git rebase main

NOTE: CI is not included yet

mvines and others added 30 commits December 14, 2024 01:05
… amount reflects only amoutn over rent_exempt_reserve
* Reinstate Mint supply, and adjust with Minto & Burn

* C headers

* Patch token-cli

* Patch token-swap
dependabot bot and others added 29 commits December 14, 2024 01:05
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.14.1 to 1.14.2.
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](Lokathor/bytemuck@v1.14.1...v1.14.2)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.14.2 to 1.14.3.
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](Lokathor/bytemuck@v1.14.2...v1.14.3)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* upgrade to solana 1.18.2

* upgrade rust version to 1.76.0

* update borsh to 1.2.1

* replace deprecated `try_to_vec` with `borsh::to_vec`

* temporarily allow deprecated functions in cli that uses clap-v3

* use `repr(u32)` for enums in token lending
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.14.3 to 1.15.0.
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](Lokathor/bytemuck@v1.14.3...v1.15.0)

---
updated-dependencies:
- dependency-name: bytemuck
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [serial_test](https://github.com/palfrey/serial_test) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/palfrey/serial_test/releases)
- [Commits](palfrey/serial_test@v3.0.0...v3.1.0)

---
updated-dependencies:
- dependency-name: serial_test
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
upgrade solana version to 1.18.11
Bumps [serial_test](https://github.com/palfrey/serial_test) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/palfrey/serial_test/releases)
- [Commits](palfrey/serial_test@v3.1.0...v3.1.1)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.15.0 to 1.16.0.
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](Lokathor/bytemuck@v1.15.0...v1.16.0)

---
updated-dependencies:
- dependency-name: bytemuck
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.16.0 to 1.16.1.
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](Lokathor/bytemuck@v1.16.0...v1.16.1)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [proptest](https://github.com/proptest-rs/proptest) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/proptest-rs/proptest/releases)
- [Changelog](https://github.com/proptest-rs/proptest/blob/master/CHANGELOG.md)
- [Commits](proptest-rs/proptest@v1.4.0...v1.5.0)

---
updated-dependencies:
- dependency-name: proptest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [lazy_static](https://github.com/rust-lang-nursery/lazy-static.rs) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/rust-lang-nursery/lazy-static.rs/releases)
- [Commits](rust-lang-nursery/lazy-static.rs@1.4.0...1.5.0)

---
updated-dependencies:
- dependency-name: lazy_static
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Updating to allow for version <= 2.0 of the solana crates can appear as
a breaking change for new projects, since cargo pulls in the latest
version of all dependencies, and once there's an attempt to mix v1 and
v2, downstream users will see errors.

This is made worse that the patch versions will quietly pick up the v2
dependency, so if someone doesn't know how to manipulate a cargo
lockfile, they will get build errors and won't know how to resolve them.

All other SPL crates contain a new breaking version (new major for
crates on v1 or more, new minor for crates on v0.X), except for
spl-token.

Bump spl-token to v5.
* solana: Update deps to 2.0.0

* Update lockfile

* Update toolchain version

* Update nightly version

* Fix check issues

* Fix clippy

* Revert upgrade for account compression libs

* Install build deps for serde test

* Fixup versions

* Fixup twoxtx build

* Revert solana install version

* Actually, get version 2.0.0 from the correct place
Bumps [arrayref](https://github.com/droundy/arrayref) from 0.3.7 to 0.3.8.
- [Commits](https://github.com/droundy/arrayref/commits)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Run script

* Update lockfile

* Use "processed" instead of deprecated "recent"

* Fixup account compression tests

* account-compression: Remove `only` in test
Bumps [num_enum](https://github.com/illicitonion/num_enum) from 0.7.2 to 0.7.3.
- [Commits](illicitonion/num_enum@0.7.2...0.7.3)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.16.1 to 1.16.3.
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](Lokathor/bytemuck@v1.16.1...v1.16.3)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.16.3 to 1.17.0.
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](Lokathor/bytemuck@v1.16.3...v1.17.0)

---
updated-dependencies:
- dependency-name: bytemuck
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.17.0 to 1.17.1.
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](Lokathor/bytemuck@v1.17.0...v1.17.1)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.17.1 to 1.18.0.
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](Lokathor/bytemuck@v1.17.1...v1.18.0)

---
updated-dependencies:
- dependency-name: bytemuck
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [arrayref](https://github.com/droundy/arrayref) from 0.3.8 to 0.3.9.
- [Commits](https://github.com/droundy/arrayref/commits)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.18.0 to 1.19.0.
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](Lokathor/bytemuck@v1.18.0...v1.19.0)

---
updated-dependencies:
- dependency-name: bytemuck
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Run update script, update curve25519-dalek dep, rust

* Run clippy + fmt

* Add workspace lints, start fixing doc comments

* Update doc comments for clippy

* Re-run cargo fmt after doc comment update

* Update solana-version

* Update CI jobs
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.68 to 2.0.0.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](dtolnay/thiserror@1.0.68...2.0.0)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [serial_test](https://github.com/palfrey/serial_test) from 3.1.1 to 3.2.0.
- [Release notes](https://github.com/palfrey/serial_test/releases)
- [Commits](palfrey/serial_test@v3.1.1...v3.2.0)

---
updated-dependencies:
- dependency-name: serial_test
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* token: Fix typos

#### Problem

There are typos in the token code, and people sometimes fix them, but
mostly don't.

#### Summary of changes

Starting with the `token/*` directory, fix all typos or properly put
them between backticks if they're code.

These were all found using `cargo spellcheck` and a specialized
dictionary with programming / Solana / ZK terminology. Once all of the
typos are fixed, then we can add the spellchecking to CI.

* Update doctests
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.19.0 to 1.20.0.
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](Lokathor/bytemuck@v1.19.0...v1.20.0)

---
updated-dependencies:
- dependency-name: bytemuck
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@joncinque joncinque requested a review from febo December 14, 2024 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.