Created
June 19, 2022 10:37
-
-
Save slavafomin/2de1426ed2fca3b1304d43efadf9ca20 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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