8000 GitHub - Yoelchris/Deploy-smart-contract
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Yoelchris/Deploy-smart-contract

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

// SPDX-License-Identifier: MIT pragma solidity ^0.8.0;

contract Register { string public github; address public owner;

struct Referral {
    address referralAddress;
    string referralString;
}

Referral[] public referrals;

constructor() {
    github = "Yoelchris";
    owner = 0x1681f6dab7Cf97F3434908dF9d05Eb7895Ad3E53;
}

function addReferral(address _referralAddress, string memory _referralString) external {
    require(msg.sender == owner, "Only the owner can add referrals.");
    referrals.push(Referral(_referralAddress, _referralString));
}

function totalReferrals() public view returns (uint256) {
    return referrals.length;
}

}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0