v0.4 to v0.5
Migration guide from SDK v0.4 to v0.5 - update your integration with breaking changes
Introduction
import TonWeb from 'tonweb';
import { Router, ROUTER_REVISION, ROUTER_REVISION_ADDRESS } from '@ston-fi/sdk';
const WALLET_ADDRESS = ''; // ! replace with your address
const JETTON0 = 'EQA2kCVNwVsil2EM2mB0SkXytxCqQjS4mttjDpnXmwG9T6bO'; // STON
const PROXY_TON = 'EQCM3B12QK1e4yZSf8GtBRT0aLMNyEsBc_DhVfRRtOEffLez'; // ProxyTON
const provider = new TonWeb.HttpProvider();
const router = new Router(provider, {
revision: ROUTER_REVISION.V1,
address: ROUTER_REVISION_ADDRESS.V1,
});
const tonToJettonTxParams = await router.buildSwapJettonTxParams({
userWalletAddress: WALLET_ADDRESS,
offerJettonAddress: JETTON0,
offerAmount: new TonWeb.utils.BN('1000000000'),
askJettonAddress: PROXY_TON,
minAskAmount: new TonWeb.utils.BN('1'),
queryId: 12345,
});Contracts export change
Contract revision drop
Contract version
Contract address constant drop
Contract constructor parameters
Contracts method renaming
pTON contract
Conclusion
Last updated