Semi Fungible token Example
;; Simple SIP-013 Semi-Fungible Token Implementation ;; Clarity Version 3 (impl-trait 'ST1ZK4MRVTQQJMVAAJQWBV2WPQ87QV2851YCTHD7X.sip-013-trait-sft-standard...
;; Simple SIP-013 Semi-Fungible Token Implementation ;; Clarity Version 3 (impl-trait 'ST1ZK4MRVTQQJMVAAJQWBV2WPQ87QV2851YCTHD7X.sip-013-trait-sft-standard...
1. Introduction NFTs—short for non-fungible tokens—are digital assets with unique identifiers. Non-fungible means that the tokens are not equivalent to one ...
Semi-Fungible Tokens, or SFTs, are digital assets that sit between fungible and non-fungible tokens. Fungible tokens are directly interchangeable, can be rec...
Non-fungible tokens or NFTs are digital assets registered on blockchain with unique identifiers and properties that distinguish them from each other. It shou...
Fungible tokens are digital assets that can be sent, received, combined, and divided. Most forms of cryptocurrencies are fungible tokens. They have become a ...
;; title: token ;; version:2 ;; summary:This is the fungible token for the code4stx project ;; traits (impl-trait 'ST1NXBK3K5YYMD6FD41MVNP3JS1GABZ8TRVX023P...
;; Time-Locked STX Vault - A contract that allows users to deposit STX and lock them for a specified period ;; Users can only withdraw once the specified bl...
(define-map votes { candidate: (string-utf8 20) } uint) ;; #[allow(unchecked_data)] (define-public (vote (candidate (string-utf8 20))) (let ((count (defa...
(define-map messages { user: principal } {message: (string-utf8 100)}) (define-public (write-message (msg (string-utf8 100))) (begin (map-set message...
(define-map balances { account: principal } uint) ;; #[allow(unchecked_data)] (define-public (deposit (amount uint)) (let ((current (default-to u0 (map-ge...
;; Multiplayer Counter contract (define-map counters principal uint) (define-read-only (get-count (who principal)) (default-to u0 (map-get? counters w...
Bitcoin is the most secure and decentralized blockchain in existence. But for years, it’s had one major limitation: it isn’t programmable. You can hold it, t...
Introduction Stacking is a fundamental mechanism in the Stacks blockchain that allows STX holders to participate in the Proof of Transfer (PoX) consensus mo...
🔗 Proof of Transfer (PoX): The Engine Behind Stacks’ Bitcoin Security Stacks is designed to bring smart contracts and dApps to Bitcoin without modifying its...
🔢 Arithmetic & Math 1. add Adds two numbers. Example: (add 2 3) → 5 2. subtract Subtracts the second number from the first. Example: (subtract 5 2)...
Clarity Basics An interactive introduction to the Clarity language. Clarity features LISP-like syntax. That means that you will see a lot of parentheses. I...
In the evolving world of blockchain, Stacks stands out by offering smart contracts, decentralized applications (dApps), and DeFi capabilities directly anchor...
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.20; contract TimeTransactions { struct Transaction { address creator; addres...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; contract supply { struct product { uint id; string name; uint manufactur...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract RealEstateMarketplace { address public owner; struct Property { uint25...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import "lib/openzeppelin-contracts/contracts/access/Ownable.sol"; import "lib/openzeppelin-contract...
```// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract ChildProtection { enum ReportType { MISSING, CHILD_LABOR } struct BasicInfo { u...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import "./PrenuptialAgreement.sol"; contract MarriageRegistry { struct Spouse { string...
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.13; contract Lottery{ address public owner; uint256 public ticketPrice; uint256 publ...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract Insurance { // State variables for the insurance company string public insuranceCo...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract MultiUnitHouseRental { struct Property { uint256 totalFloors; uint256 ...
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.19; /** * @title FreelancePlatform * @dev Smart contract for a decentralized freelance platfor...
/ SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract Crowdfunding { struct Campaign { address payable creator; string title; string description; ...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract Cafe { address public owner; struct MenuItem { string name; string description; ...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract EmployeeManagement { // Contract owner address public owner; // Employee structure struct...
🧠 What is a Proxy Contract? A proxy contract is a smart contract that delegates or forwards function calls and data to another contract — called the impleme...
✅ Proxy: Delegates calls to another logic contract (upgradeable). 🏦 Bank: The original logic contract with deposit/withdraw. 🔁 Bank2: The upgraded ver...
Task Create a smart contract of folowing points included User can create timebound transactions List all the transaction in one pool with reverted, ex...
1. ERC-20: Fungible Tokens Overview ERC-20 is a standard for fungible tokens, where all tokens are identical and can be exchanged at a 1:1 ratio. These are...
Create ERC-20 token with 10,000 total supply and send 5000 tokens to other address. Contract // SPDX-License-Identifier: MIT // Compatible with OpenZeppeli...
1. Core DeFi Protocols and Platforms Understanding these platforms provides insight into the functionality and innovation within the DeFi ecosystem. A. M...
What is DeFi (Decentralized Finance)? DeFi stands for Decentralized Finance, which refers to a movement in the cryptocurrency and blockchain space that aims...
A simple contract between a landlord and tenant for renting property. It could handle rent payments, security deposits, and lease termination terms. // SPD...
// SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.7.0 <0.9.0; import "remix_tests.sol"; // this import is automatically injected by Remix. impor...
The distribution of an inheritance after the owner of the contract has passed away. // SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.8.2 <0.9....
1. Introduction to Blockchain Definition: Blockchain is a decentralized, distributed ledger technology that records transactions across many computers. T...
Solidity is a high-level, statically-typed programming language designed specifically for writing smart contracts on the Ethereum blockchain and other blockc...
Create the contract that recieve the data and retrive the data. - Be able to do following 1. Receive the information, 2. Store the inforamt...
;; Simple SIP-013 Semi-Fungible Token Implementation ;; Clarity Version 3 (impl-trait 'ST1ZK4MRVTQQJMVAAJQWBV2WPQ87QV2851YCTHD7X.sip-013-trait-sft-standard...
1. Introduction NFTs—short for non-fungible tokens—are digital assets with unique identifiers. Non-fungible means that the tokens are not equivalent to one ...
Semi-Fungible Tokens, or SFTs, are digital assets that sit between fungible and non-fungible tokens. Fungible tokens are directly interchangeable, can be rec...
Non-fungible tokens or NFTs are digital assets registered on blockchain with unique identifiers and properties that distinguish them from each other. It shou...
Fungible tokens are digital assets that can be sent, received, combined, and divided. Most forms of cryptocurrencies are fungible tokens. They have become a ...
;; title: token ;; version:2 ;; summary:This is the fungible token for the code4stx project ;; traits (impl-trait 'ST1NXBK3K5YYMD6FD41MVNP3JS1GABZ8TRVX023P...
;; Time-Locked STX Vault - A contract that allows users to deposit STX and lock them for a specified period ;; Users can only withdraw once the specified bl...
(define-map votes { candidate: (string-utf8 20) } uint) ;; #[allow(unchecked_data)] (define-public (vote (candidate (string-utf8 20))) (let ((count (defa...
(define-map messages { user: principal } {message: (string-utf8 100)}) (define-public (write-message (msg (string-utf8 100))) (begin (map-set message...
(define-map balances { account: principal } uint) ;; #[allow(unchecked_data)] (define-public (deposit (amount uint)) (let ((current (default-to u0 (map-ge...
;; Multiplayer Counter contract (define-map counters principal uint) (define-read-only (get-count (who principal)) (default-to u0 (map-get? counters w...
Bitcoin is the most secure and decentralized blockchain in existence. But for years, it’s had one major limitation: it isn’t programmable. You can hold it, t...
Introduction Stacking is a fundamental mechanism in the Stacks blockchain that allows STX holders to participate in the Proof of Transfer (PoX) consensus mo...
🔗 Proof of Transfer (PoX): The Engine Behind Stacks’ Bitcoin Security Stacks is designed to bring smart contracts and dApps to Bitcoin without modifying its...
🔢 Arithmetic & Math 1. add Adds two numbers. Example: (add 2 3) → 5 2. subtract Subtracts the second number from the first. Example: (subtract 5 2)...
Clarity Basics An interactive introduction to the Clarity language. Clarity features LISP-like syntax. That means that you will see a lot of parentheses. I...
In the evolving world of blockchain, Stacks stands out by offering smart contracts, decentralized applications (dApps), and DeFi capabilities directly anchor...
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.20; contract TimeTransactions { struct Transaction { address creator; addres...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; contract supply { struct product { uint id; string name; uint manufactur...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract RealEstateMarketplace { address public owner; struct Property { uint25...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import "lib/openzeppelin-contracts/contracts/access/Ownable.sol"; import "lib/openzeppelin-contract...
```// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract ChildProtection { enum ReportType { MISSING, CHILD_LABOR } struct BasicInfo { u...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import "./PrenuptialAgreement.sol"; contract MarriageRegistry { struct Spouse { string...
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.13; contract Lottery{ address public owner; uint256 public ticketPrice; uint256 publ...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract Insurance { // State variables for the insurance company string public insuranceCo...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract MultiUnitHouseRental { struct Property { uint256 totalFloors; uint256 ...
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.19; /** * @title FreelancePlatform * @dev Smart contract for a decentralized freelance platfor...
/ SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract Crowdfunding { struct Campaign { address payable creator; string title; string description; ...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract Cafe { address public owner; struct MenuItem { string name; string description; ...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract EmployeeManagement { // Contract owner address public owner; // Employee structure struct...
🧠 What is a Proxy Contract? A proxy contract is a smart contract that delegates or forwards function calls and data to another contract — called the impleme...
✅ Proxy: Delegates calls to another logic contract (upgradeable). 🏦 Bank: The original logic contract with deposit/withdraw. 🔁 Bank2: The upgraded ver...
Task Create a smart contract of folowing points included User can create timebound transactions List all the transaction in one pool with reverted, ex...
1. ERC-20: Fungible Tokens Overview ERC-20 is a standard for fungible tokens, where all tokens are identical and can be exchanged at a 1:1 ratio. These are...
Create ERC-20 token with 10,000 total supply and send 5000 tokens to other address. Contract // SPDX-License-Identifier: MIT // Compatible with OpenZeppeli...
1. Core DeFi Protocols and Platforms Understanding these platforms provides insight into the functionality and innovation within the DeFi ecosystem. A. M...
What is DeFi (Decentralized Finance)? DeFi stands for Decentralized Finance, which refers to a movement in the cryptocurrency and blockchain space that aims...
A simple contract between a landlord and tenant for renting property. It could handle rent payments, security deposits, and lease termination terms. // SPD...
// SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.7.0 <0.9.0; import "remix_tests.sol"; // this import is automatically injected by Remix. impor...
The distribution of an inheritance after the owner of the contract has passed away. // SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.8.2 <0.9....
1. Introduction to Blockchain Definition: Blockchain is a decentralized, distributed ledger technology that records transactions across many computers. T...
Solidity is a high-level, statically-typed programming language designed specifically for writing smart contracts on the Ethereum blockchain and other blockc...
Create the contract that recieve the data and retrive the data. - Be able to do following 1. Receive the information, 2. Store the inforamt...
;; Simple SIP-013 Semi-Fungible Token Implementation ;; Clarity Version 3 (impl-trait 'ST1ZK4MRVTQQJMVAAJQWBV2WPQ87QV2851YCTHD7X.sip-013-trait-sft-standard...
1. Introduction NFTs—short for non-fungible tokens—are digital assets with unique identifiers. Non-fungible means that the tokens are not equivalent to one ...
Semi-Fungible Tokens, or SFTs, are digital assets that sit between fungible and non-fungible tokens. Fungible tokens are directly interchangeable, can be rec...
Non-fungible tokens or NFTs are digital assets registered on blockchain with unique identifiers and properties that distinguish them from each other. It shou...
Fungible tokens are digital assets that can be sent, received, combined, and divided. Most forms of cryptocurrencies are fungible tokens. They have become a ...
;; title: token ;; version:2 ;; summary:This is the fungible token for the code4stx project ;; traits (impl-trait 'ST1NXBK3K5YYMD6FD41MVNP3JS1GABZ8TRVX023P...
;; Time-Locked STX Vault - A contract that allows users to deposit STX and lock them for a specified period ;; Users can only withdraw once the specified bl...
(define-map votes { candidate: (string-utf8 20) } uint) ;; #[allow(unchecked_data)] (define-public (vote (candidate (string-utf8 20))) (let ((count (defa...
(define-map messages { user: principal } {message: (string-utf8 100)}) (define-public (write-message (msg (string-utf8 100))) (begin (map-set message...
(define-map balances { account: principal } uint) ;; #[allow(unchecked_data)] (define-public (deposit (amount uint)) (let ((current (default-to u0 (map-ge...
;; Multiplayer Counter contract (define-map counters principal uint) (define-read-only (get-count (who principal)) (default-to u0 (map-get? counters w...
Bitcoin is the most secure and decentralized blockchain in existence. But for years, it’s had one major limitation: it isn’t programmable. You can hold it, t...
Introduction Stacking is a fundamental mechanism in the Stacks blockchain that allows STX holders to participate in the Proof of Transfer (PoX) consensus mo...
🔗 Proof of Transfer (PoX): The Engine Behind Stacks’ Bitcoin Security Stacks is designed to bring smart contracts and dApps to Bitcoin without modifying its...
🔢 Arithmetic & Math 1. add Adds two numbers. Example: (add 2 3) → 5 2. subtract Subtracts the second number from the first. Example: (subtract 5 2)...
Clarity Basics An interactive introduction to the Clarity language. Clarity features LISP-like syntax. That means that you will see a lot of parentheses. I...
In the evolving world of blockchain, Stacks stands out by offering smart contracts, decentralized applications (dApps), and DeFi capabilities directly anchor...
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.20; contract TimeTransactions { struct Transaction { address creator; addres...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; contract supply { struct product { uint id; string name; uint manufactur...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract RealEstateMarketplace { address public owner; struct Property { uint25...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import "lib/openzeppelin-contracts/contracts/access/Ownable.sol"; import "lib/openzeppelin-contract...
```// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract ChildProtection { enum ReportType { MISSING, CHILD_LABOR } struct BasicInfo { u...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import "./PrenuptialAgreement.sol"; contract MarriageRegistry { struct Spouse { string...
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.13; contract Lottery{ address public owner; uint256 public ticketPrice; uint256 publ...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract Insurance { // State variables for the insurance company string public insuranceCo...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract MultiUnitHouseRental { struct Property { uint256 totalFloors; uint256 ...
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.19; /** * @title FreelancePlatform * @dev Smart contract for a decentralized freelance platfor...
/ SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract Crowdfunding { struct Campaign { address payable creator; string title; string description; ...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract Cafe { address public owner; struct MenuItem { string name; string description; ...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract EmployeeManagement { // Contract owner address public owner; // Employee structure struct...
🧠 What is a Proxy Contract? A proxy contract is a smart contract that delegates or forwards function calls and data to another contract — called the impleme...
✅ Proxy: Delegates calls to another logic contract (upgradeable). 🏦 Bank: The original logic contract with deposit/withdraw. 🔁 Bank2: The upgraded ver...
Task Create a smart contract of folowing points included User can create timebound transactions List all the transaction in one pool with reverted, ex...
1. ERC-20: Fungible Tokens Overview ERC-20 is a standard for fungible tokens, where all tokens are identical and can be exchanged at a 1:1 ratio. These are...
Create ERC-20 token with 10,000 total supply and send 5000 tokens to other address. Contract // SPDX-License-Identifier: MIT // Compatible with OpenZeppeli...
1. Core DeFi Protocols and Platforms Understanding these platforms provides insight into the functionality and innovation within the DeFi ecosystem. A. M...
What is DeFi (Decentralized Finance)? DeFi stands for Decentralized Finance, which refers to a movement in the cryptocurrency and blockchain space that aims...
1. Introduction to Blockchain Definition: Blockchain is a decentralized, distributed ledger technology that records transactions across many computers. T...