Skip to content

NFT-com/contracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NFT.com contracts

codecov

Welcome to the NFT.com Ethereum Smart Contract repository. To get setup, please copy over .env.example for the necessary secrets.

High Level Architecture

NFT.com Architecture

Mainnet Contracts

Contract Deployed Address
Udo NFT https://etherscan/address/0xa16DD71dE047A086730a0E46Ea60251f2f4104c1
NFT Token https://etherscan.io/address/0x8C42428a747281B03F10C80e978C107D4d85E37F
Vesting https://etherscan.io/address/0x774c2204D9e50CD9d6A579D194c067360604933f
GK Team Distributor https://etherscan.io/address/0x5fb1941b5415b4817d9CC62f8039F7A4B366Ff8F
GK Team Claim https://etherscan.io/address/0xfc99E6b4447a17EA0C6162854fcb572ddC8FbB37
Genesis Key https://etherscan.io/address/0x8fB5a7894AB461a59ACdfab8918335768e411414
NFT Profile Helper https://etherscan.io/address/0xB9A5A787153b6C4898cb2A05A596A22E73B1DCc1
NFT.com Profile https://etherscan.io/address/0x98ca78e89Dd1aBE48A53dEe5799F24cC1A462F2D
Profile Auction https://etherscan.io/address/0x30f649D418AF7358f9c8CB036219fC7f1B646309
Ethereum Regex https://etherscan.io/address/0xe9F5CBeE4a58B1EB47b303c14765Ab102E4ABC37
Profile Resolver https://etherscan.io/address/0xA657C988e8aC39D3268D390eB7c522a535B10453
GK Distributor https://etherscan.io/address/0x0eBa8d862AF4E01A0573B663FB3eb3A06D7937dE
Looksrare Lib https://etherscan.io/address/0xf3d4636d92977b16499c73b1fd3a759e45050d90
Seaport 1.1 Lib https://etherscan.io/address/0x14be7c58087d73b8557438bf9ae3def395837176
X2Y2 Lib https://etherscan.io/address/0xD933Bf5C5B14D9cB86D83eacdbE001c127b699D7
Native Trading Lib https://etherscan.io/address/0x6EDEdFC4E902577074909c084b6Fa4E02F32e9C1
Marketplace Registry https://etherscan.io/address/0x24851a6783fB586E49b1dC71FA40B8307802f2A5
NFT Aggregator https://etherscan.io/address/0xf2821154d4752862b49a7C7fA7728B76ea44495e
NFT Transfer Proxy https://etherscan.io/address/0x7AFAF0D3dd4aC87D21C326A7e07D0345f6071DAD
ERC20 Transfer Proxy https://etherscan.io/address/0x151271EF11D8FA022A81f8de70feA53fdCCc0107
CK Transfer Proxy https://etherscan.io/address/0x3788201387b45456431Fb69817c3fa015A569a3c
Validation Logic https://etherscan.io/address/0x127beBc6380dF5C8d7c0A728D1dd125A50e4b88E
Marketplace Event https://etherscan.io/address/0x2E42652b9B539C849ECe944329C0Ba0bC4F70968
NFT Marketplace https://etherscan.io/address/0x1fD9Bc58C7FfdB18D19a8A8d791B6ae9fa2BD097

Goerli Contracts

Contract Deployed Address
NFT Token https://goerli.etherscan.io/address/0x7ffe04f3213d893bb4ebe76fbb49ca2a8f9c4610
Vesting https://goerli.etherscan.io/address/0x0638A014c45BE910d4611bAfaBcC8219A075788B
GK Team Distributor https://goerli.etherscan.io/address/0x85c7fBFD62C4470Ee6C0Eb8a722c92d7cD840A11
GK Team Claim https://goerli.etherscan.io/address/0x7B7d88d7718294E27575aA7F4d1e2F25fF51b81c
Genesis Key https://goerli.etherscan.io/address/0xe0060010c2c81A817f4c52A9263d4Ce5c5B66D55
NFT Profile Helper https://goerli.etherscan.io/address/0x3efb23c05DD34035fDb23cC74D85Ec586A2e7068
NFT.com Profile https://goerli.etherscan.io/address/0x9Ef7A34dcCc32065802B1358129a226B228daB4E
Profile Auction https://goerli.etherscan.io/address/0x40023d97Ca437B966C8f669C91a9740C639E21C3
Ethereum Regex https://goerli.etherscan.io/address/0x6379A115EA1E18E817f8B3aA4990E217822B1C38
Profile Resolver https://goerli.etherscan.io/address/0x3a3539B6727E74fa1c5D4d39B433F0fAB5BC4F4a
Looksrare Lib https://goerli.etherscan.io/address/0x55BbE37dAa3b72cBE75203CFF032F2f34B151e43
Seaport 1.1 Lib https://goerli.etherscan.io/address/0x5c1614A3299B65225550eBdCB7615c216B8dAd9d
X2Y2 Lib https://goerli.etherscan.io/address/0x36D7407dDB103EE8D605759D4a129F500567289C
Marketplace Registry https://goerli.etherscan.io/address/0xeBc58f24393c8488DcD47CFC351F869618348dFC
NFT Aggregator https://goerli.etherscan.io/address/0x89b030Ba3424C7A145c23dA2042cd46C073dE4e6
NFT Marketplace https://goerli.etherscan.io/address/0xa75F995f252ba5F7C17f834b314201271d32eC35
Marketplace Event https://goerli.etherscan.io/address/0xca2A56282ac2B8B42c506225c2bD4dbB8169aC25
NFT Transfer Proxy https://goerli.etherscan.io/address/0x73994Fc4aC9EAb8e8E1c29E5C9d27A761D9Ab1eF
ERC20 Transfer Proxy https://goerli.etherscan.io/address/0xCD979ec33B43eCE6523B41BA5c9e409568eDFB97
CK Transfer Proxy https://goerli.etherscan.io/address/0xB8E272017D402E6e9243953CFef1AC256F3E2e84
Validation Logic https://goerli.etherscan.io/address/0x69267B594C79F6C37d827B7f8D2bdDb755307Be8

Regex Generation

  1. npm install -g solregex2
  2. solregex2 --name RegexContractName '[a-zA-Z0-9.%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}'

Pre Requisites

Before running any command, you need to create a .env file and set a BIP-39 compatible mnemonic as an environment variable. Follow the example in .env.example. If you don't already have a mnemonic, use this website to generate one.

You will also need to set the following pairs:

  • Signing Pairs
    • PUBLIC_SALE_PK
    • PUBLIC_SALE_SIGNER_ADDRESS
  • CICD = true
  • Mnemonic Pair
    • MNEMONIC_PUBLIC_ADDR
    • MNEMONIC

Then, proceed with installing dependencies:

yarn install

Tools Used

  • Hardhat: compile and run the smart contracts on a local development network
  • TypeChain: generate TypeScript types for smart contracts
  • Ethers: renowned Ethereum library and wallet implementation
  • Waffle: tooling for writing comprehensive smart contract tests
  • Solhint: linter
  • Solcover: code coverage
  • Prettier Plugin Solidity: code formatter

Compile

Compile the smart contracts with Hardhat:

$ yarn compile

TypeChain

Compile the smart contracts and generate TypeChain artifacts:

$ yarn typechain

Lint Solidity

Lint the Solidity code:

$ yarn lint:sol

Lint TypeScript

Lint the TypeScript code:

$ yarn lint:ts

Test

Run the Mocha tests:

$ yarn test

Coverage

Generate the code coverage report:

$ yarn coverage

Report Gas

See the gas usage per unit test and average gas per method call:

$ REPORT_GAS=true yarn test

Clean

Delete the smart contract artifacts, the coverage reports and the Hardhat cache:

$ yarn clean

Deploy

Deploy the contracts to Hardhat Network:

$ yarn deploy --greeting "Bonjour, le monde!"

Syntax Highlighting

If you use VSCode, you can enjoy syntax highlighting for your Solidity code via the vscode-solidity extension. The recommended approach to set the compiler version is to add the following fields to your VSCode user settings:

{
  "solidity.compileUsingRemoteVersion": "v0.8.4+commit.c7e474f2",
  "solidity.defaultCompiler": "remote"
}

Where of course v0.8.4+commit.c7e474f2 can be replaced with any other version.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •