TON Дев Чат
/var/ton-work/keys/
tail -f /var/ton-work/db/log.thread*
время с начала эпохи - время последнего блока
Check `state_->get_block_id() == opts_->init_block_id() || state_->ancestor_is_valid(opts_->init_block_id())
failed`
LITE_SERVER_UNKNOWN: cannot apply external message to current state : External message was not accepted
Check `state_->get_block_id() == opts_->init_block_id() || state_->ancestor_is_valid(opts_->init_block_id())` failed
curl -u username:password -s https://anode2.ton.swisscops.com/dumps/latest.zfs.lz | pv | plzip -d -n8 | zfs recv mypool/ton-work
curl -u username:password -s https://anode2.ton.swisscops.com/dumps/latest.zfs.lz | pv | plzip -d -n8а потом указанный архив отдельно разархивирую командой
zfs recv mypool/ton-work
?
GetAccount
, затем ListTransactions
0QAOdI7x8DeKK-Wtzb554wWa3ftR3NCRs7_yuG7ncgGX_Aed
Парни накидайте пж тестовых TOn
ton-compiler
package should be cross-platform by default without all these post-installation steps
const param = beginCell().storeAddress(walletContract.address).endCell();
const call = await walletContract.client.callGetMethod(contractAddress, "get_user_data", [["cell", param.toBoc({ idx: false }).toString("base64")]]);
liteserver@srv9087:/root$ mytonctrl
The process is already running
https://cloudflare-ipfs.com/ipfs/...
org.ton.crypto.hmacSha512
и org.ton.crypto.pbkdf2Sha512
, которые используются в Mnemonic. Так и есть? 🙂
mytonctrl -> installer -> clcf
"nft-item-code.fif" include
2 boc+>B dup Bx. cr cr
await fromWalletA.deploy().send(toNano('0.05'));
Как запустить?
const provider = new TonWeb.HttpProvider(
'https://testnet.toncenter.com/api/v2/jsonRPC',
{ apiKey: '' }
);
const tonweb = new TonWeb(new TonWeb.
HttpProvider('https://testnet.toncenter.com/api/v2/jsonRPC',
{'apiKey': ''})); // Initialize TON SDK
const seed = await tonMnemonic.mnemonicToSeed(mnemonic);
.log('balanceA = ', data.balanceA.toString())
console.log('balanceB = ', data.balanceB.toString())
const tonweb = new TonWeb(
new TonWeb.HttpProvider(
'https://testnet.toncenter.com/api/v2/jsonRPC',
{apiKey: '0866525e38cf9e0f6a2f5172b13c0d71b8d2f2158322bbaca85b13adeec9dc7a'})
);
const seed = tonweb.utils.newSeed();
const keyPair = tonweb.utils.nacl.sign.keyPair.fromSeed(seed);
const wallet = tonweb.wallet.create({keyPair: keyPair, seed: seed, address: 'EQDJ79bphKpT_CPcbIMY_uo-KdGtbbpuzSaJKzWxTi-fBLUU'});
const address = await wallet.getAddress();
const nonBounceableAddress = address.toString(true, true, false);
const seqno = await wallet.methods.seqno().call();
await wallet.deploy(keyPair.secretKey).send(); // deploy wallet to blockchain
const fee = await wallet.methods.transfer({
secretKey: keyPair.secretKey,
toAddress: 'EQDjVXa_oltdBP64Nc__p397xLCvGm2IcZ1ba7anSW0NAkeP',
amount: TonWeb.utils.toNano(0.01), // 0.01 TON
seqno: seqno,
payload: 'Hello',
sendMode: 3,
}).estimateFee();
const Cell = TonWeb.boc.Cell;
const cell = new Cell();
cell.bits.writeUint(0, 32);
cell.bits.writeAddress(address);
cell.bits.writeGrams(1);
console.log(cell.print()); // print cell data like Fift
const bocBytes = cell.toBoc();
const history = await tonweb.getTransactions(address);
const balance = await tonweb.getBalance(address);
tonweb.sendBoc(bocBytes);
при вызове в консоли выдаёт ошибку "LITE_SERVER_UNKNOWN: cannot apply external message to current state : Failed to unpack account state
подскажите как поправить?F910 — CHKSIGNU (h s k – ?), checks the Ed25519-signature s of a
hash h (a 256-bit unsigned integer, usually computed as the hash of
some data) using public key k (also represented by a 256-bit unsigned
integer)....
clap,weird,leg,autumn,traffic,vanish,join,stairs,foil,trip,sponsor,state,shrug,palace,brother,yard,physical,item,position,click,brain,miracle,idea,salute
66c2d65058104e77f8ec3dcbd6518019a7546bf2bc71e0b1767acf1851458a2a
50665d85f96a09b8841be4783210b5e555ede2d24870ab8e17e4aed0b9c513d2
4946f0e459ec1715af7df5e0b990da51f41664652c1c500bf19fea576f2987f8
:
и есть ваш публичный ключ. Если он в friendly (base64/base64UrlSafe), то преобразовать байты, отрезать первые два и последние два
get_public_key
. Если делать это через lite-client, то он отдает их в decimal, которое нужно перевести в hex.EQD8m46b2HxlbIPFXJX8XDVam400BT_1JNARJUw3I-W7EGkZ
0:FC9B8E9BD87C656C83C55C95FC5C355A9B8D34053FF524D011254C3723E5BB10
36063bd4c37a68852dbfe807de4554b599ad004f9b0d497c60377d84bd442831
> runmethodfull 0:FC9B8E9BD87C656C83C55C95FC5C355A9B8D34053FF524D011254C3723E5BB10 get_public_key
arguments: [ 78748 ]
result: [ 24435907845014462079235959255021800205494918813216540303199761800885522671665 ]
v3R2
, а не v4R2
.
const codeCell = this.createCodeCell();
const dataCell = this.createDataCell();
const stateInit = Contract.createStateInit(codeCell, dataCell);
const stateInitHash = await stateInit.hash();
const address = new Address(this.options.wc + ":" + bytesToHex(stateInitHash));
Uncaught (in promise) TypeError: anyForm.search is not a function
at new Address (Address.js?d890:81:1)
at new Contract (index.js?65a8:12:1)
at new WalletContract (WalletContract.js?ca47:15:1)
at new WalletV3ContractBase (WalletContractV3.js?52ac:4:1)
at new WalletV3ContractR1 (WalletContractV3.js?52ac:50:1)
at Wallets.create (index.js?2f86:37:1)
at _callee$ (TonWebPayments.js?d629:76:33)
at tryCatch (runtime.js?ecd4:45:16)
at Generator.invoke [as _invoke] (runtime.js?ecd4:274:1)
at prototype.<computed> [as next] (runtime.js?ecd4:97:1)
at asyncGeneratorStep (_async_to_generator.mjs?4a9c:3:1)
at _next (_async_to_generator.mjs?4a9c:25:1)
const channelState3 = {
balanceA: toNano('1.8'),
balanceB: toNano('1.2'),
seqnoA: new BN(4),
seqnoB: new BN(2)
};
Address: EQD8m46b2HxlbIPFXJX8XDVam400BT_1JNARJUw3I-W7EGkZ
Raw address: 0:FC9B8E9BD87C656C83C55C95FC5C355A9B8D34053FF524D011254C3723E5BB10
Exception: VALIDATE_ACCOUNT_STATEshard block id (-2147483648,0000000000000000,0):F05EF801000000002301000000000000C2EC030000000000F0A1911ED57F0000:5095911ED57F00007B085700000000009AB60901000000000A010000D57F0000 in answer is invalid
?
client = TonlibClient(ls_index=2)
client._use_unaudited_binaries = True
await client.init_tonlib()
ton_wallet = await client.import_wallet(os.getenv("WALLET"))
await ton_wallet.transfer(
destination=wallet.address,
amount=1,
comment="test",
)
LITE_SERVER_UNKNOWN: cannot apply external message to current state : External message was not accepted
Cannot run message on account: inbound external message rejected by transaction A78E77B6CE75874F084C88B4C96E203123B2AAD5AC92EE0F62625D538C9B2B30:
exitcode=33, steps=33, gas_used=0
await wallet.deploy(secretKey).send(); // deploy wallet to blockchain
console.log((await wallet.getAddress()).toString(true, true, true));