All Projects β†’ livepeer β†’ protocol

livepeer / protocol

Licence: MIT license
Livepeer protocol

Programming Languages

javascript
184084 projects - #8 most used programming language
solidity
1140 projects
typescript
32286 projects

Projects that are alternatives of or similar to protocol

v1-contracts
🐍Uniswap V1 smart contracts
Stars: ✭ 430 (+216.18%)
Mutual labels:  smart-contracts
learning-solidity-2018
Basic examples of Solidity smart contracts
Stars: ✭ 92 (-32.35%)
Mutual labels:  smart-contracts
eth-decoder
Simple library to decode ethereum transaction and logs
Stars: ✭ 32 (-76.47%)
Mutual labels:  smart-contracts
ethereum-erc20
Fungible token implementation for the Ethereum blockchain.
Stars: ✭ 27 (-80.15%)
Mutual labels:  smart-contracts
v2-periphery
🎚 Peripheral smart contracts for interacting with Uniswap V2
Stars: ✭ 900 (+561.76%)
Mutual labels:  smart-contracts
zeneth
🏡️ Let Your ETH Chill β€” Gasless Ethereum account abstraction with Flashbots
Stars: ✭ 112 (-17.65%)
Mutual labels:  smart-contracts
algo-builder
Framework to automate development of Algorand Assets and Smart Contracts.
Stars: ✭ 132 (-2.94%)
Mutual labels:  smart-contracts
pallet-contracts-waterfall
Collection of simple Substrate smart contract examples written in Rust, AssemblyScript, Solang and the smart contract language ink! to test substrates pallet-contracts module
Stars: ✭ 28 (-79.41%)
Mutual labels:  smart-contracts
contracts
Neufund and platform smart contracts
Stars: ✭ 23 (-83.09%)
Mutual labels:  smart-contracts
awesome-smart-contracts
Awesome Ethereum Projects List
Stars: ✭ 35 (-74.26%)
Mutual labels:  smart-contracts
solidity-unfolder
A Python package to flatten Solidity code with imports into a single file
Stars: ✭ 19 (-86.03%)
Mutual labels:  smart-contracts
erc721-extensions
A set of composable extension contracts for the OpenZeppelin ERC721 base contracts.
Stars: ✭ 157 (+15.44%)
Mutual labels:  smart-contracts
solidstate-solidity
πŸ’  Upgradeable-first Solidity smart contract development library πŸ’ 
Stars: ✭ 264 (+94.12%)
Mutual labels:  smart-contracts
awesome-solidity-gas-optimization
Best resources for Solidity gas optimizations β›½
Stars: ✭ 893 (+556.62%)
Mutual labels:  smart-contracts
ctf-eth-env
Moved to https://github.com/chainflag/eth-challenge-base/tree/main/geth
Stars: ✭ 30 (-77.94%)
Mutual labels:  smart-contracts
baseline
The Baseline Protocol is an open source initiative that combines advances in cryptography, messaging, and distributed ledger technology to enable confidential and complex coordination between enterprises while keeping data in systems of record. This repo serves as the main repo for the Baseline Protocol, containing core packages, examples, and r…
Stars: ✭ 565 (+315.44%)
Mutual labels:  smart-contracts
cheezyverse
Cheeze Wizards is the world's first battle royale on the blockchain (with cheese!)
Stars: ✭ 38 (-72.06%)
Mutual labels:  smart-contracts
fnd-docs
Foundation developer docs
Stars: ✭ 33 (-75.74%)
Mutual labels:  smart-contracts
ex-healthcare-claims-processing
Reference DAML application demonstrating a healthcare use case.
Stars: ✭ 27 (-80.15%)
Mutual labels:  smart-contracts
ethereum-crowdsale
0xcert protocol crowdsale contracts for Ethereum blockchain.
Stars: ✭ 15 (-88.97%)
Mutual labels:  smart-contracts

CircleCI Coverage Status

Livepeer Protocol

Ethereum smart contracts used for the Livepeer protocol. These contracts govern the logic for:

  • Livepeer Token (LPT) ownership
  • Bonding and delegating LPT to elect active workers
  • Distributing inflationary rewards and fees to active participants
  • Time progression in the protocol
  • ETH escrow and ticket validation for a probabilistic micropayment protocol used to pay for transcoding work

Documentation

For a general overview of the protocol see:

The contracts are based off of the technical protocol specification.

Development

All contributions and bug fixes are welcome as pull requests back into the repo.

ERC20 Note

The Livepeer token is implemented as an ERC20 token in token/LivepeerToken.sol which inherits from the OpenZeppelin ERC20 token contract and all implemented ERC20 functions will revert if the operation is not successful. However, the ERC20 spec does not require functions to revert and instead requires functions to return true if the operation succeed and false if the operation fails. The contracts bonding/BondingManager.sol and token/Minter.sol do not check the return value of ERC20 functions and instead assume that they will revert if the operation fails. The Livepeer token contract is already deployed on mainnet and its implementation should not change so this is not a problem. However, if for some reason the implementation ever does change, developers should keep in mind that bonding/BondingManager.sol and token/Minter.sol do not check the return value of ERC20 functions.

Install

Make sure Node.js (>=v12.0) is installed.

git clone https://github.com/livepeer/protocol.git
cd protocol
yarn

Build

Compile the contracts and build artifacts used for testing and deployment.

yarn compile

Clean

Remove existing build artifacts.

yarn clean

Lint

The project uses ESLint for Javascript linting and Solium for Solidity linting.

yarn lint

Run Tests

All tests will be executed via hardhat.

Make sure to add relevant API keys inside .env file (by copying provided .env.example) to assist tests and deployments.

To run all tests:

yarn test

To run unit tests only:

yarn test:unit

To run integration tests only:

yarn test:integration

To run gas reporting tests (via hardhat-gas-reporter) only:

yarn test:gas

To run tests with coverage (via solidity-coverage) reporting:

yarn test:coverage

Deployment

Make sure that an ETH node is accessible and that the network being deployed to is supported by the hardhat.config.ts configuration.

export LPT_DEPLOYMENT_EXPORT_PATH=~/Development/lpt_contracts.json
yarn deploy
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].