Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Storage provider. Error: 1009

Hello everyone!
I'm trying to send file to storage provider

First I generated file, using storage-daemon-cli. Command like this:

new-contract-message <BagID> <file> --query-id 0 --provider <address>

Then trying to send file, using ton-core JS SDK

const tempFilePath = './storage/tempFile' // tempFile - file generated by daemon-cli

const payload = await fsPromise.readFile(tempFilePath, {encoding: 'base64'});

const payloadBase64 = Cell.fromBase64(payload)

const messageBody = beginCell()
		.storeUint(0x107c49ef, 32)
		.storeUint(0, 1 + 4 + 4 + 64 + 32 + 1 + 1)
		.storeSlice(payloadBase64.beginParse())
		.endCell();

await provider.internal(via, {
		value: "0.5",
		body: messageBody
});

But then execution smart contract crashes with 1009 error

const error::provider_params_changed = 1009;

Smart contract code on GitHub

Can anybody explain how to make right message body?

Thank you all in advance!

1
1
Posted one year ago
Votes Newest

Answers


I found solution. Maybe it will be helpful for somebody:

const tempFilePath = './storage/saved2' // tempFile - file generated by daemon-cli

const payload = await fsPromise.readFile(tempFilePath, {encoding: 'base64'});
        
const payloadBase64 = Cell.fromBase64(payload)

await provider.internal(via, {
    value: "0.5",
    body: payloadBase64
});
  
  
Posted one year ago
7K Views
1 Answer
one year ago
one year ago
Tags