Skip to main content

Contract ABI

Smart contract ABIs and deployment addresses.

Deployed Addresses (Base)

ContractAddress
SongNFT0x...
SongVault0x...
SongRevenueHook0x...

Note: Addresses will be updated after deployment.

SongNFT ABI

[
{
"name": "mint",
"type": "function",
"inputs": [
{"name": "metadataURI", "type": "string"},
{"name": "audioHash", "type": "bytes32"},
{"name": "signature", "type": "bytes"}
],
"outputs": [{"name": "tokenId", "type": "uint256"}]
},
{
"name": "publish",
"type": "function",
"inputs": [{"name": "tokenId", "type": "uint256"}],
"outputs": []
},
{
"name": "isPublished",
"type": "function",
"inputs": [{"name": "tokenId", "type": "uint256"}],
"outputs": [{"type": "bool"}]
}
]

SongVault ABI

[
{
"name": "enableTrading",
"type": "function",
"inputs": [{"name": "tokenId", "type": "uint256"}],
"outputs": []
},
{
"name": "getSongToken",
"type": "function",
"inputs": [{"name": "tokenId", "type": "uint256"}],
"outputs": [{"type": "address"}]
}
]

SongToken ABI

Standard ERC-20 ABI plus:

[
{
"name": "songId",
"type": "function",
"inputs": [],
"outputs": [{"type": "uint256"}]
}
]

Using with wagmi

import { useReadContract } from 'wagmi';
import { songNFTAbi } from './abis';

const { data: isPublished } = useReadContract({
address: SONG_NFT_ADDRESS,
abi: songNFTAbi,
functionName: 'isPublished',
args: [tokenId]
});