• Stars
    star
    386
  • Rank 111,213 (Top 3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Interfaces for smart contracts used by Rarible

Smart contracts for Rarible Protocol

Consists of:

  • Exchange v2: responsible for sales, auctions etc.
  • Tokens: for storing information about NFTs
  • Specifications for on-chain royalties supported by Rarible

See more information about Rarible Protocol at docs.rarible.org.

Also, you can find Rarible Smart Contracts deployed instances across Mainnet, Testnet and Development at Contract Addresses page.

Compile, Test, Deploy

yarn
yarn bootstrap

if error, check node version for yarn expected node version ">=14.18.2", for check and set necessary version use, for example

node -v
nvm use 18.13.0

then use truffle to compile, test: cd into directory and then

truffle test --compile-all

Protocol overview

Rarible protocol is a combination of smart-contracts for exchanging tokens, tokens themselves, APIs for order creation, discovery, standards used in smart contracts.

The Protocol is primarily targeted to NFTs, but it's not limited to NFTs only. Any asset on EVM blockchain can be traded on Rarible.

Smart contracts are constructed in the way to be upgradeable, orders have versioning information, so new fields can be added if needed in the future.

Trade process overview

Users should do these steps to successfully trade on Rarible:

  • Approve transfers for their assets to Exchange contracts (e.g.: call approveForAll for ERC-721, approve for ERC-20) β€” amount of money needed for trade is price + fee on top of that. Learn more at exchange contracts README.
  • Sign trading order via preferred wallet (order is like a statement "I would like to sell my precious crypto kitty for 10 ETH").
  • Save this order and signature to the database using Rarible protocol API (in the future, storing orders on-chain will be supported too).

If the user wants to cancel the order, he must call cancel function of the Exchange smart contract.

Users who want to purchase something on Rarible should do the following:

  • Find an asset they like with an open order.
  • Approve transfers the same way (if not buying using Ether).
  • Form order in the other direction (statement like "I would like to buy precious crypto kitty for 10 ETH").
  • Call Exchange.matchOrders with two orders and first order signature.

Suggestions

You are welcome to suggest features and report bugs found!

Contributing

The codebase is maintained using the "contributor workflow" where everyone without exception contributes patch proposals using "pull requests" (PRs). This facilitates social contribution, easy testing, and peer review.

See more information on CONTRIBUTING.md.

License

Smart contracts for Rarible protocol are available under the MIT License.

More Repositories

1

ethereum-indexer

Ethereum indexer and APIs
Kotlin
143
star
2

sdk

TypeScript
76
star
3

protocol

Issues, Questions, Feature requests for Rarible Protocol
58
star
4

ethereum-sdk

TypeScript
52
star
5

ethereum-example

TypeScript
31
star
6

nft-license

30
star
7

example

TypeScript
23
star
8

subgraph

TypeScript
15
star
9

rixio

TypeScript
13
star
10

solana-indexer

Kotlin
11
star
11

flow-indexer

Kotlin
10
star
12

tezos-protocol-contracts

Interfaces for Tezos smart contracts used by Rarible
JavaScript
9
star
13

protocol-documentation

9
star
14

service-core

Kotlin
8
star
15

flow-contracts

Cadence
7
star
16

union-service

Kotlin
6
star
17

ethereum-core

Kotlin
6
star
18

order-manager

Tool to find inactive orders and cancel them
TypeScript
6
star
19

ethereum-openapi

Kotlin
6
star
20

rarible-docs

6
star
21

gen-art-tool-contracts

Solidity
5
star
22

blockchain-scanner

Blockchain scanner
Kotlin
5
star
23

model-generator

Custom domain model generator for rarible apis
Kotlin
5
star
24

opensea-client

Kotlin
4
star
25

flow-sdk

TypeScript
4
star
26

public-assets

4
star
27

ethereum-e2e-tests

TypeScript
3
star
28

tezos-api

Kotlin
3
star
29

union-openapi

Kotlin
3
star
30

trezor-provider

Trezor Provider to use with Truffle (for migrations, usage from console)
JavaScript
3
star
31

tezos-sdk

TypeScript
3
star
32

immutable-x-sdk

SDK for immutable x
TypeScript
2
star
33

tezos-indexer

Kotlin
2
star
34

rarible-links

1
star
35

scala-rpc

Scala
1
star
36

landing-pages

1
star
37

legacy-rarible-backend

OCaml
1
star
38

scalether-maven-plugin

Maven plugin for generation of contract wrappers
Java
1
star
39

ts-common

Common typescript libraries
TypeScript
1
star
40

ethereum-contracts

Scala
1
star
41

tezos-marketplace-indexer

Python
1
star
42

solana-openapi

Public API of Solana blockchain indexer
Kotlin
1
star
43

mystery-box-tool-contracts

Mystery Box generating tool, a random surprise NFT token to reveal.
1
star
44

server-codegen

Openapi codegen for rarible server components
Mustache
1
star
45

client-codegen

Kotlin client openapi codegen for rarible services
Mustache
1
star
46

solana-sdk

TypeScript
1
star
47

test

1
star
48

x2y2-client

Kotlin
1
star
49

sdk-react

React components and hooks for use with Rarible SDK
TypeScript
1
star