Program addresses are the same on devnet, and mainnet-beta.
Installing the package using yarn:
yarn add @blockassetlabs/project
You can also use npm instead, if you'd like:
npm install @blockassetlabs/project
🔥 Pro Tip: Check out our implementations on "BlockassetLabs UI" repository.
This is a public transaction, so anybody can create a new project
import { withInitProject } from "@blockassetlabs/project";
const [transaction, projectId] = await withInitProject(
new Transaction(),
connection,
wallet as Wallet,
{
authorities: [wallet.publicKey],
name: formValues.name,
},
);
await executeTransaction(connection, wallet as Wallet, transaction);
This transaction can only be called by one of the project authorities
import { withUpdateProject } from "@blockassetlabs/project";
const transaction = await withUpdateProject(
new Transaction(),
connection,
wallet as Wallet,
{
projectId: projectId,
authorities: [wallet.publicKey],
name: formValues.name,
},
);
await executeTransaction(connection, wallet as Wallet, transaction);
It's possible to recover the funds used to pay rent for the data stored on-chain by closing the Project.
- Although closing a project will not affect any of its raffles, it's highly recommended to close its raffles first because once the project closed, you will no longer have access to its raffles to modify or close.
- This action is not recoverable and permanently remove the access to the project.
This transaction can only be called by one of the project authorities
import { withUpdateProject } from "@blockassetlabs/project";
const transaction = await withCloseProject(
new Transaction(),
connection,
wallet as Wallet,
{
projectId: projectId,
},
);
await executeTransaction(connection, wallet as Wallet, transaction);
If you are developing using Blockasset contracts and libraries, feel free to reach out for support on Discord. We will work with you or your team to answer questions, provide development support and discuss new feature requests.
For issues please, file a GitHub issue.