forked from ton-core/ton
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add extra currency support * EC Sending tests * Increase test timeout * Toncenter API getContractState/getState EC support * TonAPI-v4 getAccount/getAccountLite/getState EC support * Tonhub client extra currency getAccount test * TonClient getContractState unit test * Make ec extracurrency object --------- Co-authored-by: Trinketer22 <trinketer22@localhost>
- Loading branch information
1 parent
417ff34
commit d9ccfa0
Showing
25 changed files
with
361 additions
and
11 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { OpenedContract } from '@ton/core'; | ||
import { WalletContractV5R1 } from '../wallets/v5r1/WalletContractV5R1'; | ||
import { WalletContractV5Beta } from '../wallets/v5beta/WalletContractV5Beta'; | ||
import { WalletContractV4 } from '../wallets/WalletContractV4'; | ||
import { WalletContractV3R2 } from '../wallets/WalletContractV3R2'; | ||
import { WalletContractV3R1 } from '../wallets/WalletContractV3R1'; | ||
import { WalletContractV2R2 } from '../wallets/WalletContractV2R2'; | ||
import { WalletContractV2R1 } from '../wallets/WalletContractV2R1'; | ||
import { WalletContractV1R2 } from '../wallets/WalletContractV1R2'; | ||
import { WalletContractV1R1 } from '../wallets/WalletContractV1R1'; | ||
|
||
|
||
type WalletContract = WalletContractV5R1 | WalletContractV5Beta | WalletContractV4 | WalletContractV3R2 | WalletContractV3R1 | WalletContractV2R2 | WalletContractV2R1 | WalletContractV1R2 | WalletContractV1R1; | ||
|
||
export const tillNextSeqno = async(wallet: OpenedContract<WalletContract>, oldSeqno: number, maxTries: number = 10) => { | ||
let seqNoAfter = oldSeqno; | ||
let tried = 0; | ||
|
||
do { | ||
await new Promise((resolve, reject) => { | ||
setTimeout(resolve, 2000); | ||
}); | ||
seqNoAfter = await wallet.getSeqno(); | ||
if(tried++ > maxTries) { | ||
throw Error("To many retries, transaction likely failed!"); | ||
} | ||
} while(seqNoAfter == oldSeqno); | ||
} |
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
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
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
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
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
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
Oops, something went wrong.