Skip to content

Instantly share code, notes, and snippets.

@slavafomin
Created June 19, 2022 10:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slavafomin/2de1426ed2fca3b1304d43efadf9ca20 to your computer and use it in GitHub Desktop.
Save slavafomin/2de1426ed2fca3b1304d43efadf9ca20 to your computer and use it in GitHub Desktop.
const provider = new HttpProvider('https://toncenter.com/api/v2/jsonRPC', {
apiKey: '…',
});
const wallet = new WalletV3ContractR2(provider, {
publicKey,
});
(async () => {
const address = await wallet.getAddress();
console.log(
address.toString(true, true, false)
);
const estimation = (await wallet.deploy(secretKey)
.estimateFee()
);
console.log(JSON.stringify(estimation, null, 4));
const result = (await wallet.deploy(secretKey)
.send()
);
console.log(JSON.stringify(result, null, 4));
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment