✨ The platform is currently open for beta testing at https://syns-platform.com ✨
SYNS/contracts, a suite of smart contracts, written in Solidity, that are deployed on the Polygon network. This collection of smart contracts serves as the backbone for the platform's decentralized functionality and enables secure, transparent, and immutable transactions.
- SynsERC721 - includes all the standard features of an NFT industry, as defined by the
ERC721 specification
from OpenZeppelin, as well as additional custom logic developed by SYNS to automatically set the default royalty fee for new NFTs as soon as they are minted.
-
SynsERC1155 - includes all the standard features of the NFT industry as defined by the ERC1155 specification, as well as additional custom logic developed by SYNS.
-
SynsDonation - allows users to make donations to other users using any type of cryptocurrency. All transactions are transparently recorded on the blockchain for full transparency.
-
SynsMarketPlace - combination of various safe, gas-optimizing, and well-tested features from the Thirdweb Marketplace and a range of complex custom logic developed by SYNS.
SynsMarketplace
is able to:-
Enable token owners to create, update, and cancel NFT listings for sale on the blockchain
-
Safely facilitate the buying and transfer of NFTs on behalf of the seller, automatically transferring the sale price from the buyer's to the seller's crypto wallet address
-
automatically calculates and transfers royties to original creator
-
-
SynsClub - most honored and complex out of the five contracts, powers all the complex Syns membership logic. SynsClub is able to:
-
Allow potential club owners to create a
SYNS Club
and add multiple membership plans, known asSYNS Tiers
, where the owner can configure their desired membership fee and limit the number of members in each tier, as well as update the metadata at any time. -
Enable club owners to easily track the total and active members in each
SYNS Tier
and periodically request to remove inactive members. -
Allow potential subscribers to subscribe or unsubscribe to any
SYNS Tier
in anySYNS Club
on the platform. TheSYNS Club
automatically calculates the next payment in 30 days for followers, records the date they started following the club, and increases the SYNS Royalty Stars (an honor system based on how long a follower has been following the club).
-
git clone https://github.com/syns-platform/contracts.git
cd contracts
yarn
-
create a
.env
file using the.example.env
as the template and fill out the variables.SYNS_SERVICE_PRIVATE_KEY:
The private key of your metamask account. See Helpers.PRIVATE-KEY on how to export yourPRIVATE KEY
. NOTE: FOR DEVELOPMENT, PLEASE USE A KEY THAT DOESN'T HAVE ANY REAL FUNDS ASSOCIATED WITH IT AND DO NOT SHARE YOUR PRIVATE KEY.MUMBAI_RPC_URL
: This is url of theMumbai
testnet node you're working with then deploy thesmart contracts
to. Setup with one for free from Alchemy. See Helpers.MUMBAI-RPC-URL on how to export aMUMBAI_RPC_URL
from Alchemy.COINMARKETCAP_API_KEY
: This is mainly for thehardhat-gas-report
pluggin so this is optional. If you want to play withhardhat-gas-report
pluggin, first go tohardhat.config.ts
, toggle thegasReporter.enabled
to true. Then see Helpers.COINMARKETCAP_API_KEY on how to export yourCOINMARKETCAP_API_KEY
(deprecated)
-
Head to Mumbai Faucet
-
Sign into the site using the Alchemy account you've created for the
MUMBAI_RPC_URL
-
Paste your metamask
PUBLIC_KEY
a.k.aaccount's address
(notPRIVATE_KEY
) -
Hit
Send Me MATIC
to get freeMUMBAI MATIC
make compile
yarn hardhat compile
make deploy
yarn hardhat run ./deploy-scripts/v1/ --network mumbai
5. Verify
smart contracts on etherscan
make verify
5.2.a. verify SynsClub Smart Contract
yarn hardhat verify --network mumbai ${SYNSCLUB_CONTRACT_ADDRESS_FROM_DEPLOY_PHASE} ${NATIVE_TOKEN_WRAPPER_ADDRESS}
5.2.b. verify SynsDonation Smart Contract
yarn hardhat verify --network mumbai ${SYNSDONATION_CONTRACT_ADDRESS_FROM_DEPLOY_PHASE} ${NATIVE_TOKEN_WRAPPER_ADDRESS}
5.2.a. verify Club Smart Contract
yarn hardhat verify --network mumbai ${SYNSERC721_CONTRACT_ADDRESS_FROM_DEPLOY_PHASE}
5.2.a. verify Club Smart Contract
yarn hardhat verify --network mumbai ${SYNSERC1155_CONTRACT_ADDRESS_FROM_DEPLOY_PHASE}
5.2.a. verify Club Smart Contract
yarn hardhat verify --network mumbai ${SYNSMARKETPLACE_CONTRACT_ADDRESS_FROM_DEPLOY_PHASE} ${NATIVE_TOKEN_WRAPPER_ADDRESS} ${PLATFORM_FEE_SERVICE_RECIPIENT} ${PLATFORM_FEE_BPS(%)}
1. How to export PRIVATE_KEY
from your metamask
How to export an account's private key
2. How to export a MUMBAI_RPC_URL
from Alchemy.
- Go to Alchemy =>
Signup
=>Signin
- Hit
CREATE APP
=> fill out the form{ NAME: 'ANY', DESCRIPTION: 'ANY', CHAIN: 'Polygon', NETWORK: 'Mumbai` }
- Now, go to the app you just created. Find and click on the
VIEW KEY
button top-right. - The
URL
underHTTPS
is theMUMBAI_RPC_URL
you want. - Copy the
URL
and paste it to your.env
file underMUMBAI_RPC_URL
3. How to export a COINMARKETCAP_API_KEY
from coinmarketcap
- Go here and pick the first plan-
GET FREE API KEY
. - Signup with your email then sign into coinmarketcap
- Now copy the API Key there and paste it to your
.env
file underCOINMARKETCAP_API_KEY