TON Дев Чат
"можно конечно больше, но с учетом всяких проверок и т.д. примерно так выйдет"
body = NFTItem().create_transfer_body(
Address("New Owner Address")
)
query = wallet.create_transfer_message(
"NFT Item Address",
to_nano(0.05, "ton"),
0, # owner wallet seqno
payload=body
)
nft_boc = bytes_to_b64str(query["message"].to_boc(False))
fift -s wallet.fif mywaller <address> 12 10 -nполучаю ошибку:
lite-client -C ../global-config.json -v9
> sendfile wallet-query.boc
liteserver error: [Error : 0 : cannot apply external message to current state : Failed to unpack account state]
int equal_slices(slice a, slice b) asm "SDEQ";
if (s~load_uint(1)) {
s~load_msg_addr();
s~skip_bits(96);
}
1 LDU // __code _106 _105
DROP // __code _71
IF:<{ // __code
}> // __code
_
.1 PLDU // __code children _72
NIP // __code _72
IF:<{ // __code
}> // __code
EQAVvjwxcZEQCbvMRz0H2PwrzAxxkv7SI3cZ2iVuB_p5SIoe
slice sender = begin_cell()
.store_uint(1, 2) ;; 0x01 - constructor's tag
.store_uint(256, 9) ;; addres len
.store_uint(1000010110111111111111011000111010101011000101110101010110011011100000100000010100111010100110110011111001011100001010010001011011101011000101111010111010000011100011110101101111110100010101001111001010010011110001111101101100100011111001110000100010111010, 256) ;;address
.end_cell()
.begin_parse();
slice sender = begin_cell()
.store_uint(1, 2) ;; 0x01 - constructor's tag
.store_uint(256, 9) ;; addres len
.store_uint(60496826639103266901032093380204045742618655513577142652151559222857883388090, 256) ;;address
.end_cell()
.begin_parse();
toncli run_transaction --net testnet 5497063000003 e71e3a83668f090df1b701cab1768a0b64720c9e5dfe14c9c7838dbd140db5f2 EQDnr6klynGIDLJ77dGriPSl0THg0ZVOp8Y0XU8HSnGss_o5
TonWeb.mnemonic.mnemonicToKeyPair('слово1 слово2 ...'.split(' '))
D:\>toncli fift
INFO: Run interactive fift for you ( Ctrl+c to exit)
INFO: A simple Fift interpreter. Type `bye` to quit, or `words` to get a list of all commands
DEBUG: Command (C:\Users\***\ton-win64-binaries\fift.exe -I C:\Users\***\AppData\Loc al\toncli\toncli\fift-libs -i)
[ 1][t 0][2022-10-30 14:52:38.1914037][fift-main.cpp:180] Error interpreting standard preamble file `Fift.fif`: cannot locate file `Fift.fif`
Check that correct include path is set by -I or by FIFTPATH environment variable, or disable standard preamble by -n.
D:\>C:
C:\>toncli fift
INFO: Run interactive fift for you ( Ctrl+c to exit)
INFO: A simple Fift interpreter. Type `bye` to quit, or `words` to get a list of all commands
DEBUG: Command (C:\Users\***\ton-win64-binaries\fift.exe -I C:\Users\***\AppData\Loc al\toncli\toncli\fift-libs -i)
bye
pip install --upgrade toncli
показывает, что версия свежая, 0.0.43.
address
. Метод не может генерировать каждый раз новый адрес.
698983191 + workchainId
Indirect leak of 16 byte(s) in 1 object(s) allocated from:
#0 0xaaaae01c7580 in operator new(unsigned long) (/code/ton/build/test-vm+0xa17580) (BuildId: b0d8f7fcee601c40)
#1 0xaaaae0510bb4 in void std::_Function_base::_Base_manager<std::_Bind<void (* (std::_Placeholder<1>, int))(vm::Stack&, int)> >::_M_create<std::_Bind<void (* (std::_Placeholder<1>, int))(vm::Stack&, int)> >(std::_Any_data&, std::_Bind<void (* (std::_Placeholder<1>, int))(vm::Stack&, int)>&&, std::integral_constant<bool, false>) (/code/ton/build/test-vm+0xd60bb4) (BuildId: b0d8f7fcee601c40)
#2 0xaaaae0500230 in std::function<void (vm::Stack&)>::function<std::_Bind<void (* (std::_Placeholder<1>, int))(vm::Stack&, int)>, void>(std::_Bind<void (* (std::_Placeholder<1>, int))(vm::Stack&, int)>&&) (/code/ton/build/test-vm+0xd50230) (BuildId: b0d8f7fcee601c40)
#3 0xaaaae04f05b8 in fift::init_words_common(fift::Dictionary&) (/code/ton/build/test-vm+0xd405b8) (BuildId: b0d8f7fcee601c40)
[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "API key does not exist.".] {
code: 'ERR_UNHANDLED_REJECTION'
stake
равен null
set stake null
; // Signed body of external message that was sent to the network
""te6cckECAwEAARQAAZx0icY9DYffZlCnQPBgWZe531J/QzW/BTLwLAhsk02dVVwGnSNOP23+EeMoaMQC5eZp4apFszvNp5nh+gbVmnULKamjF2NifggAAAAEAAMBAc1iABROzGm51PmIt7opuWJmE0PhVJBiM8nYvb81g6py4r62IR4aMAAAAAAAAAAAAAAAAAAAX8w9FAAAAAAAAAAAgB7ixOeW0Iy6JEGWYW0eYTZcj8ahBsqDAEZEFe8gS8ggoQflyiAQAgCuBwAqMHg0N0JmMGRhZTZlOTJlNDlhM2M5NWU1YjBjNzE0MjI4OTFENWNkNEZFMHgyZDY5MDdkZjMxNkQ1OTYwZTkwNjQ0MTJhNzE4MTBBN2M5RDhmNGM3+HtIPw==",
стоку такого типа получаю
walletId
.
Me_neALJ6006gU6_SlLzQaeqs3CvP7tElqr1UHkX17k=
Logical time of transaction to start with, must be sent with hash.
не говорит ни о чем
:block=>
{:shards=>
[{:workchain=>-1,
:seqno=>24777871,
:shard=>"-9223372036854775808",
:rootHash=>"4QmxMwmeJpuxBAURU6Ku5Di0F7D2ywrOqymushs60Zc=",
:fileHash=>"7/xU95tOKgnkmfJBYRaSyCuhYm/xAW/lwEYYMH7fwGQ=",
:transactions=>
[{:account=>"Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF",
:hash=>"oI2YI4QjywxxDcQQEc/c1S2u+seNjaAJbS0qcj+501c=",
:lt=>"32556181000001"},
{:account=>"Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF",
:hash=>"hK0jAFFfc/85u0swbZc+Nrw3QjXMKkPFegHXzmEc5gE=",
:lt=>"32556181000002"},
{:account=>"Ef80UXx731GHxVr0-LYf3DIViMerdo3uJLAG3ykQZFjXz2kW",
:hash=>"Ml8nkiXW7Mw/3aU/63E9sTIZxQ71dIacYXZpk6iMS/g=",
:lt=>"32556181000001"},
{:account=>"Ef80UXx731GHxVr0-LYf3DIViMerdo3uJLAG3ykQZFjXz2kW",
:hash=>"ezp7l2H2ulvukAz6b3p1ZXQx2XA7GgGPmXLvBGw8HRk=",
:lt=>"32556181000003"},
{:account=>"Ef9VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVbxn",
:hash=>"hhSWw0iBwwk59CQs+Jhe5deZikPugeqUy2znZh2wS6c=",
:lt=>"32556181000003"}]},
var_uint$_ {n:#} len:(#< n) value:(uint (len * 8))
= VarUInteger n;
nanograms$_ amount:(VarUInteger 16) = Grams;
udict_get_next
;; before this point compiler do not know true type of x
;; force it to be int
forall X -> int force_cast_to_int(X x) asm "NOP";
if (op == 4) {
throw_unless(401, equal_slices(sender_address, owner_address));
var msg = begin_cell()
.store_uint(0x10, 6)
.store_slice(owner_address)
.store_grams(0)
.store_uint(0, 1 + 4 + 4 + 64 + 32 + 1 + 1)
.store_slice(sender_address)
.end_cell();
send_raw_message(msg, 128 + 32);
return ();
}