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
"File Not Found" error when compiling core FunC contract storage-provider.fc

I'm trying to compile the storage-provider contract from the core repo:

storage/storage-daemon/smartcont/storage-provider.fc

To compile, I'm relying on https://github.com/ton-community/func-template

I'm getting a compilation error:

Error: main.fif:53:	file>B:error reading file `storage-contract-code.boc`: [Error : 0 : File not found]

The error seems to point to this line in the code: https://github.com/ton-blockchain/ton/blob/fc9542f5e223140fcca833c189f77b1a5ae2e184/storage/storage-daemon/smartcont/storage-provider.fc#L7

How can I compile this contract?

  
  
Posted 4 months ago
Edited 4 months ago
  
  

Can you please add the actual code of your compilation script so that it is inline inside the question?

Tal Kol   4 months ago Report
  
  

I noticed you're using func-template which is deprecated, take a look at https://github.com/ton-community/blueprint

Tal Kol   4 months ago Report
Votes Newest

Answers


The reason for the error is that compilation depends on the file storage-contract-code.boc. You can indeed see this file in the repo too. The file is injected in a somewhat non-standard way to the compiler in this line:

cell storage_contract_code() asm """ "storage-contract-code.boc" file>B B>boc PUSHREF """;

The project templates you mention rely on the func-js WASM compiler that unlike the cli compiler, doesn't support binary dependencies.

We alerted the core team about the non-standard binary injection and they fixed it so it's now inline in the source code and therefore textual and compatible with the WASM compiler:

https://github.com/ton-blockchain/ton/commit/063f4e6789637ef97056f16b2ab0e8a1f4ce19a1

cell storage_contract_code() asm " B{B5EE9C72010213010002FD000114FF00F4A413F4BCF2C80B0102016202030202CE04050201200D0E020120060700115D74CD0FA40D3FF30804E1007434C0C05C6C2497C0F83E900C0871C023A0D6F6CF380074C7C8700023A117C0F6CF3834CFC8A084391D237C6EA3AD4120829896802876CF3B51343C00E0842FDEF4305C20063232C1540133C5A0824C4B403E8084F2DA84B2C7D48832CFF2FFF25C3EC0244D388860841E8D85A22EA008080809006F35CE6CE4D7C11C3834C1C070C0E4D7C11C3834FFC12F64D7C0DC3800B50C1C25A010086B092E64693A0CC06AC140BD039BE84C645FF81C20002CED44D0D200FA0003A001C8CA0001FA0201CF16C9ED5403E68E4FED44D0D200FA00FA4003B3F2E3EF5350C705F2E1917FC8CA0058FA0201CF1621CF16C9ED54F003F8258210D4CAEDCD708018C8CB055005CF168209312D00FA0214CB6A13CB1F12CB3FCBFFC970FB00DE21821079F937EABAE30221821046ED2E94BA9130E30D8210419D5D4DBA915BE30D0A0B0C00EA10235F03ED44D0D200FA00FA40F0035352C7055162C70516B1F2E191F8258210B6236D63708018C8CB055004CF165005FA0212CB6A13CB1F12CB3F5230CBFFC902B39730318100A0FB00E0018040FB00F8258210B6236D63708018C8CB055004CF1623FA0213CB6A12CB1FCB3FCBFFC98100A0FB000092ED44D0D200FA00FA403002F2E3EB5341C705F2E19120C200998208989680A072FB029130E28210A91BAF56708018C8CB055003CF168209312D00FA0212CB6ACB1FCB3FC98100A0FB0000FA01D430ED44D0D200FA00FA40D3FFD33FD33FFA00D31FD31FD43009F2E3EB53A6C705F2E191544540525BF001F2E3EA22F811F8235003A128B6085331A8018102A3AA1AA984067007A116B609F8237FC8CA0058FA025005CF1613CBFFCB3FCB3F58FA0213CB1F12CB1FCCC9ED54708018C8CB0558CF16CB6EC98042FB000201200F100011BEE6576A2686B8500402012011120033B9241ED44D0D200FA00FA40D3FFD33FD33FFA00D31FD31FF00380017B6E4F0402A483DA87B0D9430001BB7CA50402A483DA87B0B664D8A70} B>boc PUSHREF ";

Please update to the latest version of storage-provider.fc and hopefully it will compile without issue.

  
  
Posted 4 months ago
Edited 4 months ago
Tal Kol
285 × 3 Administrator
265 Views
1 Answer
4 months ago
4 months ago
Tags