Snippets

Browse an entire list of code examples for you to copy.

To add your own Snippet, make a Pull Request here.

Snippet

Bulk Transfer NFTs in Cadence

Learn how to bulk transfer NFTs to different addresses in Cadence using the example Avataaars contract.

Навыки, которые вы изучите
cadence
Snippet

Burn an NFT in Cadence

Learn how to burn an NFT in Cadence using the example Avataaars contract.

Навыки, которые вы изучите
cadence
Snippet

Create an Account in Cadence

Learn how to create an account directly in Cadence.

Навыки, которые вы изучите
cadence
Snippet

Deploy a Contract in Cadence

Learn how to deploy a smart contract directly in Cadence.

Навыки, которые вы изучите
cadence
Snippet

Mint an NFT in Cadence

Learn how to mint an NFT in Cadence using the example Avataaars contract.

Навыки, которые вы изучите
cadence
Snippet

Random Number in Cadence

Generate a random number bewteen min & max in Cadence using the built-in revertibleRandom function.

Навыки, которые вы изучите
cadence
Snippet

Time in Cadence

Learn how to get and calculate time in Cadence.

Навыки, которые вы изучите
cadence
Snippet

Transfer an NFT in Cadence

Learn how to transfer an NFT in Cadence using the example Avataaars contract.

Навыки, которые вы изучите
cadence
Snippet

Dynamically Import a Contract

Learn how to import a Cadence contract at run-time in a script or transaction.

Навыки, которые вы изучите
cadence
Snippet

Proving Authentication with FCL (Account Proof)

Learn how to verify a users authentication ("account proof") using FCL on testnet and mainnet.

Навыки, которые вы изучите
dapp
javascript
Snippet

Dapper Wallet-Only Authentication using FCL

Learn how to log in, log out, and access user data using only Dapper Wallet.

Навыки, которые вы изучите
dapp
javascript
Snippet

Authenticate using FCL

Learn how to log in, log out, and access user data.

Навыки, которые вы изучите
dapp
javascript
Snippet

Configure WalletConnect w/ FCL

Configure WalletConnect and mobile wallets with FCL.

Навыки, которые вы изучите
dapp
javascript
Snippet

Create an Account with FCL

Learn how to take a public key and create an account with it using FCL.

Навыки, которые вы изучите
dapp
javascript
Snippet

Execute a Transaction w/ FCL (Custodial Wallet)

Learn how to execute a basic transaction with FCL using a custodial wallet (Blocto, Lilico, etc).

Навыки, которые вы изучите
dapp
javascript
Snippet

Execute a Transaction w/ FCL (Non-Custodial Wallet)

Learn how to execute a basic transaction with FCL using a non-custodial wallet (aka with a private key).

Навыки, которые вы изучите
dapp
javascript
Snippet

Pass a Dictionary Arg to Cadence in FCL

Learn how to pass a dictionary argument to a Cadence script or transaction in FCL.

Навыки, которые вы изучите
javascript
Snippet

Pass a Storage/Public Path Arg to Cadence in FCL

Learn how to pass a storage/public path arg to a Cadence script or transaction in FCL.

Навыки, которые вы изучите
javascript
Snippet

Pass a Struct Arg to Cadence in FCL

Learn how to pass a struct argument to a Cadence script or transaction in FCL.

Навыки, которые вы изучите
javascript
Snippet

Execute a Script with FCL

Learn how to execute a basic script using FCL.

Навыки, которые вы изучите
dapp
javascript
Snippet

Sign a Message with FCL

Sign a user message with FCL on the frontend.

Навыки, которые вы изучите
dapp
javascript
Snippet

Fetch Historical Blocks

Learn how to fetch blocks with the Historical API.

Навыки, которые вы изучите
dapp
javascript
Snippet

Fetch Historical Events

Learn how to fetch events with the Historical API.

Навыки, которые вы изучите
dapp
javascript
Snippet

Fetch Historical Transaction Data

Learn how to fetch transaction data with the Historical API.

Навыки, которые вы изучите
dapp
javascript
Snippet

Cadence Setup using Unity SDK

Learn how to setup cadence using Flow Unity SDK.

Навыки, которые вы изучите
dapp
unity
Snippet

Execute Scripts using Unity SDK

Learn how to execute scripts using Flow Unity SDK.

Навыки, которые вы изучите
dapp
unity
Snippet

Setup and Authenticate using Unity SDK

Learn how to setup and authenticate using Flow Unity SDK.

Навыки, которые вы изучите
dapp
unity
Snippet

Send Transactions using Unity SDK

Learn how to send transactions using Flow Unity SDK.

Навыки, которые вы изучите
dapp
unity
Snippet

Listen for Events in FCL

Poll for events happening on chain using FCL.

Навыки, которые вы изучите
dapp
javascript
Snippet

Get all User NBATopShot Moments

Get all the moments a user has on NBATopShot.

Навыки, которые вы изучите
cadence
Snippet

Buy an NFT in Cadence

Buy an NFT listed on NFTStorefrontV2 via NFT Catalog.

Навыки, которые вы изучите
cadence
Snippet

Sign & Verify a User Message On Chain

Sign a user message with FCL and verify it on chain in Cadence.

Навыки, которые вы изучите
dapp
javascript
cadence