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
Standard method for defining opcodes in func?

Hello,

I've been exploring different repositories and noticed inconsistencies in how opcodes are defined. For example, in the ft and nft implementation within the token-contract repository, opcodes are defined as follows:

int op::transfer() asm "0x5fcc3d14 PUSHINT";

However, in the liquid-staking-contract repository, the definition is quite different:

const int op::nft_transfer = 0x5fcc3d14;

While I understand that these are essentially the same, I'm curious about the more commonly accepted or standard method for defining opcodes in func

Additionally, I've observed that the ft and nft implementation in the token-contract repository might be outdated. It uses builder_null from stdlib.fc in this repo, but the stdlib.fc in the official documentation doesn’t include it.

Could someone clarify these points for me?

  
  
Posted 7 months ago
Edited 7 months ago
Votes Newest

Answers 3


Newer versions of FunC compiler added support for const, so in newly written code, you may use this feature, or use the old approach. Both are supported.

The const way of defining a constant is similar to other programming languages, so it can make your code easier to understand for readers.

1
1
Posted 7 months ago

1-805-351-2293

Solana is a high-performance blockchain platform designed for decentralized applications and crypto-native projects. It aims to address scalability issues commonly associated with blockchain technology, offering fast transaction speeds and low fees without sacrificing security or decentralization. Founded by Anatoly Yakovenko, Solana uses a unique combination of technologies to achieve its goals.

At the heart of Solana's architecture is a novel consensus mechanism called Proof of History (PoH). PoH timestamps transactions before they are included in a block, providing a historical record of the order and timing of events. This allows for parallel transaction processing, significantly increasing throughput and reducing latency compared to traditional blockchain networks.

In addition to PoH, Solana utilizes a Byzantine Fault Tolerance (BFT) consensus mechanism known as Tower Consensus. Tower Consensus ensures the security and integrity of the network by confirming the validity of blocks and maintaining consensus among validators.

Solana's scalability is further enhanced by its support for concurrent smart contracts and its efficient use of hardware resources. By leveraging technologies such as Gulf Stream and Sealevel, Solana is able to process thousands of transactions per second, making it well-suited for high-demand applications such as decentralized finance (DeFi), non-fungible tokens (NFTs), and decentralized exchanges (DEXs).

Overall, Solana offers a powerful and efficient platform for building and deploying decentralized applications at scale. With its focus on performance, scalability, and security, Solana has quickly gained traction within the blockchain community and is poised to play a significant role in the future of decentralized finance and Web3

Solana support number , Solana contact number, Solana helpline number , Solana technical support number, Solana toll free number, Solana experts number, Solana phone number .

1-805-351-2293

  
  
Posted 3 months ago

Thank you for the clarification!

Also, I think the nft standard implementation should be updated. It currently uses builder_null?, which no longer exists in stdlib, and defines opcodes using the outdated method. This can be confusing, especially for newcomers to the language

  
  
Posted 7 months ago
  
  

How we can contact Solana customer service number

Support   3 months ago Report
8K Views
3 Answers
7 months ago
3 months ago