Heaven IDL
GgE4QoiM8VYoQNZkiNLHNbzXEkKyynzsApC8BvBY4b1VHeaven is a Solana DeFi protocol combining token swap AMM mechanics with liquid staking via Marinade (mSOL) and Kamino yield strategies. Features buy/sell trading, admin-controlled staking rewards, and trading fee sharing.
Instructions
Account Types
Events
Integration Examples
Use the Heaven IDL in your application with these code examples for TypeScript, Rust, and Python.
import { Connection, PublicKey } from "@solana/web3.js";
import { Program, AnchorProvider, Idl } from "@coral-xyz/anchor";
// Load the Heaven IDL
import idl from "./heaven.json";
const PROGRAM_ID = new PublicKey("GgE4QoiM8VYoQNZkiNLHNbzXEkKyynzsApC8BvBY4b1V");
// Set up the provider and program
const connection = new Connection("https://api.mainnet-beta.solana.com");
const provider = new AnchorProvider(connection, wallet, {
commitment: "confirmed",
});
const program = new Program(idl as Idl, provider);
// Fetch and decode an account
const accountData = await program.account.heaven
.fetch(accountPublicKey);
console.log("Account data:", accountData);
// Build and send an instruction
const tx = await program.methods
.initialize(/* ...args */)
.accounts({
/* ...required accounts */
})
.rpc();
console.log("Transaction signature:", tx);IDL JSON Preview
{
"address": "GgE4QoiM8VYoQNZkiNLHNbzXEkKyynzsApC8BvBY4b1V",
"metadata": {
"name": "Heaven",
"version": "0.2.0",
"spec": "0.1.0",
"description": "Created with Anchor"
},
"instructions": [
{
"name": "admin_borrow_sol",
"discriminator": [
204,
72,
95,
215,
172,
192,
137,
252
],
"accounts": [
{
"name": "token_program",
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
},
{
"name": "associated_token_program",
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
},
...Frequently Asked Questions
What is the Heaven IDL?
The Heaven IDL (Interface Definition Language) is a JSON schema that defines the on-chain program interface for the Heaven smart contract on Solana. It describes all available instructions, account structures, events, and custom types that developers need to interact with the Heaven program. This IDL contains 32 instructions, 5 account types, 5 events, and 34 type definitions.
How do I use the Heaven IDL in my project?
Download the JSON file and import it in your project. With TypeScript, use the @coral-xyz/anchor package to create a Program instance. In Rust, use anchor-client. For Python, use anchorpy. See the integration examples above for complete code snippets in all three languages.
What is the Heaven program address on Solana?
The Heaven program is deployed at address GgE4QoiM8VYoQNZkiNLHNbzXEkKyynzsApC8BvBY4b1V on Solana mainnet. You can verify this on any Solana block explorer.
What version of the Heaven IDL is this?
This is version 0.2.0 of the Heaven IDL. IDL versions correspond to specific program deployments and may be updated as the protocol evolves. Always verify compatibility with the on-chain program version before integrating.