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

Update to Anchor 0.30.0 and add Token Extensions examples #78

Merged
merged 47 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
85311a9
update version to anchor 0.30.0
ZYJLiu Apr 26, 2024
f116e38
update to @coral-xyz/spl-token 0.30.0
ZYJLiu Apr 26, 2024
70efc60
add idl-build to cargo.toml features
ZYJLiu Apr 26, 2024
f2d93ba
add resolver = "2" to fix compile warning
ZYJLiu Apr 26, 2024
905b445
anchor basics working
ZYJLiu Apr 26, 2024
56dafe4
add resolver = "2" to fix compile warning
ZYJLiu Apr 26, 2024
000f740
update to @coral-xyz/spl-token 0.30.0
ZYJLiu Apr 26, 2024
b9f3d40
anchor token basics working, excluding swap and token22
ZYJLiu Apr 28, 2024
f2bdbd4
token swap example test working
ZYJLiu Apr 29, 2024
b880f09
update token2022 basics example
ZYJLiu Apr 29, 2024
9fb957c
update transferhook examples
ZYJLiu Apr 29, 2024
d2ebd19
anchor mint-close-authority example
ZYJLiu Apr 30, 2024
bd9b2ba
anchor transfer-fee example
ZYJLiu Apr 30, 2024
a305d8f
anchor non-transferable example
ZYJLiu May 1, 2024
6e6fb35
anchor default-account-state example
ZYJLiu May 1, 2024
159244d
anchor token metadata extension example
ZYJLiu May 1, 2024
b2349a6
anchor permanent delegate example
ZYJLiu May 1, 2024
1ad8702
anchor group/member example placeholder, extensions not live
ZYJLiu May 1, 2024
a17e6fd
anchor interestbearing example
ZYJLiu May 1, 2024
69c2783
anchor immutable owner example, and minor misc update
ZYJLiu May 1, 2024
e8d8822
anchor memotransfer example
ZYJLiu May 1, 2024
665189a
anchor cpiguard example
ZYJLiu May 2, 2024
39eaf79
delete solang
ZYJLiu May 2, 2024
a7bf77e
delete solang
ZYJLiu May 2, 2024
7c17582
update cnft-burn
ZYJLiu May 2, 2024
3c45a40
cpi basics example with declare_program macro
ZYJLiu May 2, 2024
80aae87
revert pyth anchor ver, dependency issues
ZYJLiu May 2, 2024
f3f119f
add transferhook constraint to example
ZYJLiu May 3, 2024
2076954
remove cpi basics old example
ZYJLiu May 6, 2024
39a2518
revert cnft example cargo.toml
ZYJLiu May 6, 2024
b4618e8
Merge branch 'main' into anchor-update
ZYJLiu May 7, 2024
bc1198f
update github action to anchor 0.30.0
ZYJLiu May 7, 2024
c30325a
delete pnpm-lock.yaml files
ZYJLiu May 7, 2024
438aec8
remove --frozen-lockfile in anchor.yml
ZYJLiu May 7, 2024
89fb4f9
remove --frozen-lockfile in solana-native.yml
ZYJLiu May 7, 2024
735e5bb
fixed dependency versions
heyAyushh May 8, 2024
33539cd
updated workflows
heyAyushh May 8, 2024
dbadf9d
Merge pull request #79 from heyAyushh/fix-cargo-native
ZYJLiu May 8, 2024
30b94a7
delete trailing space
ZYJLiu May 8, 2024
cf3a9aa
test adding back pnpm-lock.yaml
ZYJLiu May 8, 2024
ae5241a
add anchor tokens examples to github actions, add pnpm-lock.yaml files
ZYJLiu May 8, 2024
f68cc6e
test run anchor build github action
ZYJLiu May 8, 2024
0f9c939
revert, github action stalls
ZYJLiu May 8, 2024
321b42a
remove token examples that require metaplex from github actions, loca…
ZYJLiu May 9, 2024
281281f
github action error, No space left on device
ZYJLiu May 9, 2024
f16399b
github action error, No space left on device
ZYJLiu May 9, 2024
1900a46
remove incorrect transfer hook example path
ZYJLiu May 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
46 changes: 40 additions & 6 deletions .github/workflows/anchor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: Anchor

on:
schedule:
- cron: '0 0 * * *'
- cron: "0 0 * * *"
push:
branches:
- main
pull_request:
types: [ opened, synchronize, reopened ]
types: [opened, synchronize, reopened]
branches:
- main

Expand All @@ -17,8 +17,8 @@ jobs:
strategy:
matrix:
node-version: [20.x]
solana-version: [stable, 1.17.25]
anchor-version: [0.29.0]
solana-version: [1.18.8, beta]
anchor-version: [0.30.0]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
Expand Down Expand Up @@ -55,6 +55,22 @@ jobs:
"basics/rent/anchor"
"basics/repository-layout/anchor"
"basics/transfer-sol/anchor"
"tokens/token-2022/basics/anchor"
"tokens/token-2022/cpi-guard/anchor"
"tokens/token-2022/default-account-state/anchor"
"tokens/token-2022/group/anchor"
"tokens/token-2022/immutable-owner/anchor"
"tokens/token-2022/interest-bearing/anchor"
"tokens/token-2022/memo-transfer/anchor"
"tokens/token-2022/metadata/anchor"
"tokens/token-2022/mint-close-authority/anchor"
"tokens/token-2022/non-transferable/anchor"
"tokens/token-2022/permanent-delegate/anchor"
"tokens/token-2022/transfer-fee/anchor"
"tokens/token-2022/transfer-hook/anchor/TransferHookCounter"
"tokens/token-2022/transfer-hook/anchor/TransferHookHelloWorld"
"tokens/token-2022/transfer-hook/anchor/TransferHookTransferCost"
"tokens/token-2022/transfer-hook/anchor/TransferHookWhitelist"
)
for projectDir in "${ProjectDirs[@]}"; do
echo "
Expand All @@ -64,6 +80,7 @@ jobs:
cd $projectDir
if anchor build; then
echo "Build succeeded for $projectDir."
rm -rf target
else
failed=true
failed_builds+=($projectDir)
Expand All @@ -85,8 +102,8 @@ jobs:
strategy:
matrix:
node-version: [20.x]
solana-version: [1.18.4, stable]
anchor-version: [0.29.0]
solana-version: [1.18.8, beta]
anchor-version: [0.30.0]
steps:
- uses: actions/checkout@v4
- name: Setup Anchor
Expand Down Expand Up @@ -118,6 +135,22 @@ jobs:
"basics/rent/anchor"
"basics/repository-layout/anchor"
"basics/transfer-sol/anchor"
"tokens/token-2022/basics/anchor"
"tokens/token-2022/cpi-guard/anchor"
"tokens/token-2022/default-account-state/anchor"
"tokens/token-2022/group/anchor"
"tokens/token-2022/immutable-owner/anchor"
"tokens/token-2022/interest-bearing/anchor"
"tokens/token-2022/memo-transfer/anchor"
"tokens/token-2022/metadata/anchor"
"tokens/token-2022/mint-close-authority/anchor"
"tokens/token-2022/non-transferable/anchor"
"tokens/token-2022/permanent-delegate/anchor"
"tokens/token-2022/transfer-fee/anchor"
"tokens/token-2022/transfer-hook/anchor/TransferHookCounter"
"tokens/token-2022/transfer-hook/anchor/TransferHookHelloWorld"
"tokens/token-2022/transfer-hook/anchor/TransferHookTransferCost"
"tokens/token-2022/transfer-hook/anchor/TransferHookWhitelist"
)
for projectDir in "${ProjectDirs[@]}"; do
echo "
Expand All @@ -128,6 +161,7 @@ jobs:
pnpm install --frozen-lockfile
if anchor test; then
echo "Tests succeeded for $projectDir."
rm -rf target node_modules
else
failed=true
failed_tests+=($projectDir)
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/solana-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: Native

on:
schedule:
- cron: '0 0 * * *'
- cron: "0 0 * * *"
push:
branches:
- main
pull_request:
types: [ opened, synchronize, reopened ]
types: [opened, synchronize, reopened]
branches:
- main

Expand All @@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
node-version: [20.x]
solana-version: [stable, 1.18.4]
solana-version: [1.17.25, stable, beta]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
strategy:
matrix:
node-version: [20.x]
solana-version: [stable, 1.18.4]
solana-version: [1.17.25, stable, beta]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
echo "*****************************"
echo "Programs that failed testing:"
printf "%s\n" "${failed_tests[@]}"
# exit 1
exit 1
else
echo "All tests passed."
fi
Expand Down
Loading
Loading