DeFi Llama
Search…
BSC projects and other chains

SDK methods

All the methods on the SDK support the optional argument chain, which can be set to bsc to make that method operate using binance chain nodes instead of ethereum ones:
1
sdk.api.abi.multiCall({
2
calls: [...]
3
abi: 'erc20:balanceOf',
4
block: 12116271,
5
chain: 'bsc'
6
});
Copied!

Token balances

When returning the balances of Binance Chain tokens, the token addresses should be prefixed by bsc:, as that allows us to determine the chain where each token is from:
1
{
2
// Binance Smart Chain addresses
3
'bsc:0xF8A0BF9cF54Bb92F17374d9e9A321E6a111a51bD': '6534470774016144468787',
4
'bsc:0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56': '19281233295933226615043458',
5
'bsc:0x2170Ed0880ac9A755fd29B2688956BD959F933F8': '12373186859845702202214',
6
7
// Ethereum addresses
8
'0xAD6cAEb32CD2c308980a548bD0Bc5AA4306c6c18': '152991840161436725823207',
9
'0xBf5140A22578168FD562DCcF235E5D43A02ce9B1': '8314540194529016809181'
10
}
Copied!

Chains supported

The full list of chains is on https://github.com/DefiLlama/defillama-sdk/blob/master/src/general.ts#L34, along with the slugs we use for them.
If you'd like us to add support for any other chain just let us know on discord!
Last modified 5d ago