jton-contracts
Version:
Free TON contracts wrapped in jTON
41 lines (40 loc) • 1.29 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DeployWithGiverV2 = void 0;
const jton_1 = require("jton");
const __1 = require("../");
class DeployWithGiverV2 extends jton_1.DeployWithGiver {
/**
* Creates and returns Giver.
* @param keys
* Example:
* {
* public: '0x0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff',
* secret: '0x0000000011111111222222223333333344444444555555556666666677777777'
* }
* @param timeout Time in milliseconds. How much time need wait a collection from graphql.
* Examples:
* 3000
* 5000
*/
_getGiver(keys, timeout) {
return new __1.GiverV2(this._client, keys, timeout);
}
/**
* Sends money from giver to target address before deploying.
* @param giver
* @param address
* Example:
* '0:0000000000000000000000000000000000000000000000000000000000000000'
* @param needSendToTarget
* Example:
* 1_000_000_000
*/
async _send(giver, address, needSendToTarget) {
return await giver.sendTransaction({
dest: address,
value: needSendToTarget
});
}
}
exports.DeployWithGiverV2 = DeployWithGiverV2;