Skip to content

Commit

Permalink
highwallet works
Browse files Browse the repository at this point in the history
  • Loading branch information
neodix42 committed Nov 24, 2022
1 parent b3b2a7e commit 4149260
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,10 @@ public String getPublicKey(Tonlib tonlib) {

public void sendTonCoins(Tonlib tonlib, byte[] secretKey) {

long seqno = 1; // dummy

Cell signingMessageAll = createSigningMessageInternal();
signingMessageAll.refs.add(createDict());

ExternalMessage msg = createExternalMessage(signingMessageAll, secretKey, seqno, false);
ExternalMessage msg = createExternalMessage(signingMessageAll, secretKey, 1, false);

tonlib.sendRawMessage(msg.message.toBocBase64(false));
}
Expand All @@ -126,7 +124,7 @@ private Cell createDict() {
for (Destination destination : getOptions().getHighloadConfig().getDestinations()) {

Cell orderHeader = Contract.createInternalMessageHeader(destination.getAddress(), destination.getAmount());
Cell order = Contract.createCommonMsgInfo(orderHeader, null, null);
Cell order = Contract.createCommonMsgInfo(orderHeader);

CellBuilder p = CellBuilder.beginCell();
p.storeUint(destination.getMode(), 8); // mode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ public void testWalletV2Highload() throws InterruptedException {

contract.deploy(tonlib, keyPair.getSecretKey());

Utils.sleep(25, "deploying");
Utils.sleep(30, "deploying");

// transfer coins to multiple destination as specified in options
contract.sendTonCoins(tonlib, keyPair.getSecretKey());

Utils.sleep(30, "sending to multiple destinations");
Utils.sleep(60, "sending to multiple destinations");

balance = new BigInteger(tonlib.getAccountState(Address.of(bounceableAddress)).getBalance());
log.info("new wallet {} balance: {}", contract.getName(), Utils.formatNanoValue(balance));
Expand Down

0 comments on commit 4149260

Please sign in to comment.