Skip to content

Commit

Permalink
Merge pull request solana-labs#100 from jarry-xiao/gummyshop
Browse files Browse the repository at this point in the history
Sugar Shack Contract, Test + SDK
  • Loading branch information
samwise2 authored Jun 27, 2022
2 parents 01725af + 452111a commit 1d02d76
Show file tree
Hide file tree
Showing 42 changed files with 2,564 additions and 231 deletions.
3 changes: 2 additions & 1 deletion contracts/Anchor.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ gummyroll = "GRoLLMza82AiYN7W9S9KCCtCyyPRAQP2ifBy4v4D5RMD"
gummyroll_crud = "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS"
bubblegum = "BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY"
gumball_machine = "GBALLoMcmimUutWvtNdFFGH5oguS7ghUUV6toQPppuTW"
sugar_shack = "9T5Xv2cJRydUBqvdK7rLGuNGqhkA8sU8Yq1rGN7hExNK"

[[test.genesis]]
address = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
Expand All @@ -28,4 +29,4 @@ cluster = "localnet"
wallet = "~/.config/solana/id.json"

[scripts]
test = "yarn run ts-mocha -t 1000000 tests/**/gumball-machine-test.ts"
test = "yarn run ts-mocha -t 1000000 tests/**/*-test.ts"
23 changes: 23 additions & 0 deletions contracts/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion contracts/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ members = [
"programs/gummyroll",
"programs/gummyroll_crud",
"programs/bubblegum",
"programs/gumball-machine"
"programs/gumball-machine",
"programs/sugar-shack"
]
9 changes: 9 additions & 0 deletions contracts/programs/gumball-machine/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,15 @@ pub fn get_metadata_args(
},
uses,
token_program_version: TokenProgramVersion::Token2022,
// TODO: change this placeholder to be more clear. Creators are akin to permanent secondary sale royalty recipients and are to be stored in the gumball header.
// We want something more like:
/*
Creator {
address: project_drop_pubkey,
verified: true,
share: 5,
}
*/
creators: vec![Creator {
address: creator,
verified: true,
Expand Down
25 changes: 25 additions & 0 deletions contracts/programs/sugar-shack/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[package]
name = "sugar-shack"
version = "0.1.0"
description = "Created with Anchor"
edition = "2021"

[lib]
crate-type = ["cdylib", "lib"]
name = "sugar_shack"

[features]
no-entrypoint = []
no-idl = []
no-log-ix-name = []
cpi = ["no-entrypoint"]
default = []

[dependencies]
anchor-lang = { path="../../../deps/anchor/lang" }
anchor-spl = { path="../../../deps/anchor/spl" }
solana-safe-math = "0.1.0"
mpl-token-metadata = { git = "https://github.com/jarry-xiao/metaplex-program-library", rev="7e2810a", features = [ "no-entrypoint" ] }
bubblegum = { path = "../bubblegum", features = ["cpi"] }
gummyroll = { path = "../gummyroll", features = ["cpi"] }
bytemuck = "1.8.0"
2 changes: 2 additions & 0 deletions contracts/programs/sugar-shack/Xargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[target.bpfel-unknown-unknown.dependencies.std]
features = []
Loading

0 comments on commit 1d02d76

Please sign in to comment.