What is the best way to implement some « team allocation » in Candy Machine v3 (sugar)?
Maybe a « group » with 0 sol mint price? How do I specify allowed addresses in such a group though?
By "Team Allocation" I am assuming you are suggesting some amount of mints are allocated to your the team. To do this, you'd probably want a Guard Group and a combination of multiple Candy Guards:
You could alternatively do something like Token Burn but this would require distributing WL tokens and could be transferable.
Here's a list of All Guards.
Using JS/Umi--that'd be something like:
import { some, sol, dateTime } from "@metaplex-foundation/umi";
import { getMerkleRoot } from "@metaplex-foundation/mpl-candy-machine";
const allowList = [
"Ur1CbWSGsXCdedknRbJsEk7urwAvu1uddmQv51nAnXB",
"GjwcWFQYzemBtpUoN5fMAP2FZviTtMRWCmrppGuTthJS",
"AT8nPwujHAD14cLojTcB1qdBzA1VXnT6LVGuUd6Y73Cy",
];
const candyGuard = await fetchCandyGuard(umi, candyMachine.mintAuthority);
await updateCandyGuard(umi, {
candyGuard: candyGuard.publicKey,
guards: candyGuard.guards,
groups: [
{
label: "early",
guards: {
//add other guards here
mintLimit: some({ id: 1, limit: 5 }),
allowList: some({ merkleRoot: getMerkleRoot(allowList) }),
solPayment: some({ lamports: sol(1), destination: treasury }),
startDate: some({ date: dateTime("2022-10-18T16:00:00Z") }),
endDate: some({ date: dateTime("2022-10-18T17:00:00Z") }),
},
},
{
label: "late",
guards: {
solPayment: some({ lamports: sol(3), destination: treasury }),
startDate: some({ date: dateTime("2022-10-18T17:00:00Z") }),
botTax: some({ lamports: sol(0.001), lastInstruction: true }),
},
},
],
}).sendAndConfirm(umi);
Source: https://docs.metaplex.com/programs/candy-machine/guard-groups