metapro
  • 🤝Welcome!
  • 💻metapro market
    • Set your account
    • Connect wallet + web3 login
    • Side panel
      • Transfer NFT
        • Multiple transfer (Airdrop NFT)
          • Import CSV List
      • Sell NFT
        • Initial NFT Selling (INS)
          • How to setup INS auction
          • How to buy on INS auction
        • Buy Now
          • How to setup Buy Now auction
          • How to buy on Buy Now auction
        • Auction (Bidding)
          • How to setup Auction
          • How to buy on Auction
      • All NFT assets
    • Buy Crypto
    • Top Menu
      • Profile
        • Profile Marketplace
        • My games
        • My assets
          • Royalty
        • Activities
      • Referral Panel
        • Register your downline
        • Downline wallets
        • My referral link
      • Profile Settings
      • Developer Portal
      • Logout
    • Assets
      • Marketplace
        • Auction Card
      • Most favorite
      • Newest assets
        • Asset Card
    • Games
      • Show all games
    • Leaderboard
    • Create asset (minter)
      • Gaming asset specification
      • How to create (mint) asset
        • 1. Setup NFT token
        • 2. Setup metadata
        • 3. Add meta asset
        • 4. Mint meta asset
        • 5. Meta asset created
    • Developers Portal
      • Create team
      • Create game
      • Developers Portal Panel
      • Unity Plugin
      • How to list game on metapro market?
    • Creators
    • Teams
    • Users
    • Wallet App
    • Launcher
    • Market and auction component fees
  • 🚀METAPRO LAUNCHER
    • What is metapro launcher?
    • Download launcher
    • Set your account
      • Login to launcher
    • Home
    • Games
      • Game card on launcher
        • Assets in this game
      • Install game on launcher
      • Update game on launcher
    • My games
      • Installed
      • Not installed
      • Wishlist
    • My assets
      • Collected assets
      • Created assets
      • Wishlist
    • NODEs app
  • 📱metapro one
    • About non-custodial wallet
    • Download & set up
      • Create new metapro wallet
      • Import existing wallet
    • Settings
      • Avatar
      • Multiple wallets
      • Wallet name
      • Private Key
        • Protect Private Key
        • How to find my Private Key
      • Recovery Phrases
        • Protect Recovery Phrases
        • How to find my Recovery Phrases
      • Application version
    • Network switch
    • Deposit (Tokens and Collectibles)
    • Send (Tokens and Collectibles)
      • Send Tokens
      • Send Collectibles (NFT)
    • Buy (Buy and Sell Crypto)
    • Browser
    • My assets
      • Tokens
        • Asset view
        • Adding Tokens
        • Activities
      • Collectibles (NFT)
      • Game assets (NFTma)
    • Explore
      • Apps
      • Collections (NFT)
      • Game assets (NFTma)
    • How to claim Airdrop
    • How to import wallet from MetaMask to metapro
    • Supported devices
  • ⛓️metapro protocol
    • API
      • Users service
      • Teams service
      • Apps service
      • Nft service
      • Nft events service
    • Meta asset
    • Metadata structure
    • Protocole structure
    • Unity Plugin
      • About metapro Unity plugin
      • What's new
      • Guides
        • Installation
        • Requirements
        • Package samples
        • Quick start
          • 1. Editor
            • Access tool
            • Import game key
            • Download resources
            • App data object
            • Change game key
            • Use app data in script
          • 2. Play mode (PC)
            • Enable Web3 in your game
            • Choose provider
            • Connect wallet
            • Login with Web3
            • Display user data
            • Show app tokens
            • Use user and app data from script
          • 3. Play mode (Mobile)
            • Enable Web3 in Your game
            • Choose provider
            • Connect wallet
            • Login with Web3
        • AFP (Additional Features Packages)
          • 1. Safe token transfer
          • 2. Phoenix
        • Troubleshooting
      • Reference
        • MetaproAPPSetup
        • Editor Window
        • Plugin Manager
        • Web3 connection providers
          • metapro
          • Wallet Connect
          • MetaMask
        • WindowController
        • AFP (Additional Features Packages)
          • SafeTransferFrom
          • Phoenix
  • 🛠️WALLET CONNECTOR
    • Introduction
    • Basic informations
      • Next 13 integration
      • React integration
      • Manual installation
  • 👨‍💻Developer Documentation
    • Introduction to Developer Documentation
      • What is a Meta asset?
      • What are the Benefits of Using Tokens as Access Keys for the Game Application
      • Why should I Choose the Meta Assets as the Access Keys for the Game Application?
      • How Does It Work, Exactly?
    • Available Environments
    • Blockchain Communication and information retrieval
      • How can we verify/distinguish a user?
      • How can we track a user's transactions?
      • What information can we obtain?
    • Integration with the Leaderboard service
    • Integration for in-Wallet Apps
    • Integration for Telegram Mini Apps
      • Integration Architecture and Configuration
      • Authorization and Session Management
      • Example Integration and Features
      • Code Examples from the Repository
      • Summary and Appendices
    • Developer documentation for the Construct 3 Plugin
      • Construct 3 - Install plugin
      • Plugin Configuration
      • User onboarding and authorization
      • User Management
      • Score System
      • Leaderboard System
      • Referral System
      • Gameplay
      • Smart Contract Interactions
      • User NFTs
      • Error Handling
      • Additional Getters for Plugin Properties
    • Integration Web3 with Your Game
      • What is Web3
      • Blockchain Basics
      • Differences between chains
      • What is a NFT
      • Advantages of Web3 Gaming
      • Examples of Web3 Games
    • Onboarding the Web3 Player
      • Value for Players
      • Explanation of Cryptocurrency Wallet
      • Rewards for Tournament Participation
      • Reselling Owned Assets
      • Integration of Metapro Wallet Connector
      • Displaying Data for Unlogged Users
      • How to Get Authorization Data
      • User Authorization Benefits
    • Creating Your First Meta Asset
      • The Difference between NFT and Meta Asset
      • Security and Transparency
      • Concept and Value of Meta Assets
      • How and Where to Create Your Meta Asset
        • Step-by-Step Guide on How to Create Your Asset
        • Explanation of URI (Metadata structure)
        • Explanation of the Meta Asset Data taken from our Back End
    • Implementing Meta Assets into Your Game
      • Integrate your Meta Asset to your game using Unity
      • Verify User Tokens Ownership
      • Displaying All User-Owned Tokens
      • Displaying All Assets Assigned to the Game on the Metapro Market
    • Smart Contracts
      • MetaproINS
        • Read Contract
        • Write Contract
      • MetaproBuyNow
        • Read Contract
        • Write Contract
      • MetaproAuction
        • Read Contract
        • Write Contract
      • MetaproMetaAsset
        • Read Contract
        • Write Contract
      • MetaproRoyalty
        • Read Contract
        • Write Contract
      • MetaproReferral
        • Read Contract
        • Write Contract
      • MetaproAirdrop
        • Read Contract
        • Write Contract
    • Universal Links & App Links with WalletConnect
  • 🔎General information
    • Blockchain
    • Blockchain Network Fee
    • Blockchain Native Token
    • Token ERC-1155 vs ERC-721
  • 📄Release Notes
    • Introduction to the Release Notes
    • Marketplace Updates
      • Release 07.03.2024
      • Release 06.03.2024
      • Release 04.03.2024
      • Release 19.02.2024
      • Release 24.01.2024
      • Release 09.01.2024
      • Release 03.01.2024
      • Release 21.12.2023
      • Release 18.12.2023
      • Release 13.12.2023
      • Release 12.12.2023
      • Release 02.12.2023
      • Release 30.11.2023
      • Release 24.11.2023
      • Release 22.11.2023
      • Release 17.11.2023
      • Release 13.11.2023
      • Release 09.11.2023
      • Release 08.11.2023
      • Release 07.11.2023
      • Release 31.10.2023
      • Release 26.10.2023
      • Release 25.10.2023
      • Release 24.10.2023
      • Release 18.10.2023
      • Release 05.10.2023
      • Release 03.10.2023
      • Release 29.09.2023
      • Release 18.09.2023
      • Release 14.09.2023
      • Release 12.09.2023
      • Release 06.09.2023
      • Release 25.08.2023
      • Release 17.08.2023
      • Release 04.08.2023
      • Release 31.07.2023
      • Release 21.07.2023
      • Release 18.07.2023
      • Release 13.07.2023
    • Games Launcher Updates
      • Release 13.03.2024
      • Release 24.01.2024
      • Release 04.01.2024
      • Release 22.11.2023
      • Release 03.10.2023
      • Release 31.07.2023
      • Release 27.07.2023
      • Release 20.07.2023
      • Release 13.07.2023
    • Wallet Updates
      • Release 04.03.2024
      • Release 03.10.2023
      • Release 29.09.2023
      • Release 15.09.2023
      • Release 30.08.2023
      • Release 18.07.2023
Powered by GitBook
On this page
  • Link to the Smart Contract:
  • renounceOwnership
  • saveReferralDeposit
  • setAdminStatus
  • setMyReferral
  • setMyReferrals
  • setReferral
  • setReferralStructure
  • transferOwnership
  1. Developer Documentation
  2. Smart Contracts
  3. MetaproReferral

Write Contract

PreviousRead ContractNextMetaproAirdrop

Last updated 1 year ago

Link to the Smart Contract:

renounceOwnership

This method allows the contract's owner to renounce their ownership. This method is accessible only to the contract's owner. This function enables the current owner to renounce ownership of the contract. Once this method is called, the owner will lose their privileges to manage the contract, and any methods that require owner permissions will no longer be accessible.

saveReferralDeposit

The saveReferralDeposit function is responsible for saving a deposit related to the referral system. The function accepts various parameters. After saving the deposit, the function updates referral-related structures by adding the depositor's address to the appropriate referral levels within the structure.

Data

Description

Restrictions

_referrer (address)

Address of the person who referred.

  • must be an address

_contractAddress (address)

Address of the contract.

  • must be an address

_auctionId (uint256)

The ID of the auction.

  • must be a number

_tokenId (uint256)

The ID of the token.

  • must be a number

_depositer (address)

Address of the depositor.

  • must be an address

_level (uint256)

Referral level.

  • must be a number

_provision (uint256)

Value of the provision.

  • must be a number

setAdminStatus

The setAdminStatus function allows the contract owner to change the admin status. Administrators are individuals with special privileges within the system. The function takes two parameters: the admin's address (_admin) and the status (_status).

Data

Description

Restrictions

_admin (address)

The address of the administrator.

  • must be an address

_status (bool)

The status to set for the administrator.

  • must be true or false

setMyReferral

The setMyReferral function is used to set a referrer for a given wallet address. The function is public and can be called by any user. If no referrer has been set for a particular wallet address (i.e., there's no entry in activeReferral), the function allows assigning the current caller (msg.sender) as the referrer.

Data

Description

Restrictions

_referred (address)

The address for which the referrer is being set.

  • Must be an address

setMyReferrals

The setMyReferrals function allows setting a referrer for multiple wallet addresses simultaneously. The function is public and can be called by any user. For each address in the _referred array, the function checks if a referrer has not been set yet (i.e., there's no entry in activeReferral). If the condition is met, the caller (msg.sender) is set as the referrer, and the referrer is also recorded in the referral structure for the given _referred[i] address. The count of referred individuals for the caller is incremented by the length of the _referred array. The function emits a SetReferral event for each address in the _referred array to indicate the referral setting.

Data

Description

Restrictions

_referred (address[])

An array of addresses for which the referrer is being set.

  • must be an address

setReferral

The setReferral function enables administrators to set referrers for specific wallet addresses. The function is only accessible to administrators, meaning that only individuals with the appropriate permissions can use it. The function checks whether a referrer has not been set for the given wallet address (activeReferral[_referred] is empty) and whether the provided referrer address (_referrer) is not empty. If both conditions are met, the provided referrer is assigned as the referrer for the _referred wallet address, and the count of referred individuals for the referrer is incremented by one. The function emits a SetReferral event to indicate the referral setting.

Data

Description

Restrictions

_referred (address)

The address for which the referrer is being set.

  • Must be an address

_referrer (address)

The address of the referrer being assigned.

  • Must be an address

setReferralStructure

The setReferralStructure function is used to set the referral structure for a specific referrer. The function can only be called by the contract owner. The function accepts several parameters, including the referrer's address (_referrer), the upline referrer's address (_uplineReferrer), and three arrays of addresses (_level1Referred, _level2Referred, _level3Referred) representing referred individuals at different levels. After the function is called, the referral structure for the referrer _referrer is updated. The upline referrer's address for the referrer _referrer is set to _uplineReferrer, and the referred individuals at different levels are added to the respective arrays in the referral structure. The function checks if a referred individual does not already exist in the specific level array to avoid duplicates.

Data

Description

Restrictions

_referrer (address)

The address of the referrer for whom the referral structure is being set.

  • Must be an address

_uplineReferrer (address)

The address of the upline referrer for the specified referrer.

  • Must be an address

_level1Referred (address[])

An array of addresses representing referred individuals on level 1.

  • Must be an address

_level2Referred (address[])

An array of addresses representing referred individuals on level 2.

  • Must be an address

_level3Referred (address[])

An array of addresses representing referred individuals on level 3.

  • Must be an address

transferOwnership

The method is available only to the current owner of the contract and allows changing the ownership of the contract

Data

Description

Restrictions

newOwner (address)

The address of the new contract owner.

  • must be a wallet address

👨‍💻
https://bscscan.com/address/0x5078ef87Afb28e24936a16Fd3FBac27867549626#writeContractbscscan.com