{"id":22701736,"url":"https://github.com/looksrare/contracts-libs","last_synced_at":"2025-04-13T07:53:29.340Z","repository":{"id":45740457,"uuid":"500257151","full_name":"LooksRare/contracts-libs","owner":"LooksRare","description":"A set of Solidity libraries \u0026 contracts shared across the LooksRare ecosystem","archived":false,"fork":false,"pushed_at":"2024-09-21T12:01:00.000Z","size":1388,"stargazers_count":42,"open_issues_count":4,"forks_count":16,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-13T07:53:14.559Z","etag":null,"topics":["looksrare","solidity"],"latest_commit_sha":null,"homepage":"","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LooksRare.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-06T01:39:40.000Z","updated_at":"2025-01-10T21:02:28.000Z","dependencies_parsed_at":"2024-06-18T22:50:28.606Z","dependency_job_id":null,"html_url":"https://github.com/LooksRare/contracts-libs","commit_stats":{"total_commits":183,"total_committers":5,"mean_commits":36.6,"dds":"0.20765027322404372","last_synced_commit":"5f907abb45495a7717e4c8c958ebc57c3662243b"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":"LooksRare/solidity-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LooksRare%2Fcontracts-libs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LooksRare%2Fcontracts-libs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LooksRare%2Fcontracts-libs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LooksRare%2Fcontracts-libs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LooksRare","download_url":"https://codeload.github.com/LooksRare/contracts-libs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248681492,"owners_count":21144700,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["looksrare","solidity"],"created_at":"2024-12-10T07:10:03.658Z","updated_at":"2025-04-13T07:53:29.314Z","avatar_url":"https://github.com/LooksRare.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @looksrare/contracts-libs\n\n[![Tests](https://github.com/LooksRare/contracts-libs/actions/workflows/tests.yaml/badge.svg)](https://github.com/LooksRare/contracts-libs/actions/workflows/tests.yaml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\nThis repository contains a set of Solidity contracts that can be used across contracts for purposes such as verifying signatures, protecting contracts against reentrancy attacks, low-level call functions, and a library for managing the ownership of a contract.\n\nIt also contains generic contract interfaces (for EIP/ERC) that can be used.\n\n## Installation\n\n```shell\n# Yarn\nyarn add @looksrare/contracts-libs\n\n# NPM\nnpm install @looksrare/contracts-libs\n```\n\n## NPM package\n\nThe NPM package contains the following:\n\n- Solidity smart contracts (_\".sol\"_)\n- ABIs (_\".json\"_)\n\n## Current contracts\n\n| Name                                  | Description                                                                                                                   | Type     | Latest version | Audited? |\n| ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -------- | -------------- | -------- |\n| OwnableTwoSteps                       | Contract for managing ownership of a smart contract. The transfer of ownership is done in a 2-step process.                   | Contract | 2.5.0          | Yes      |\n| SignatureCheckerCalldata              | Contract for verifying the validity of a (calldata) signature for EOA (64-byte, 65-byte signatures) and EIP-1271.             | Contract | 3.0.0          | Yes      |\n| SignatureCheckerMemory                | Contract for verifying the validity of a (memory) signature for EOA (64-byte, 65-byte signatures) and EIP-1271.               | Contract | 3.0.0          | Yes      |\n| ReentrancyGuard                       | Contract with a modifier to prevent reentrancy calls.                                                                         | Contract | 2.4.4          | Yes      |\n| PackedReentrancyGuard                 | Contract with a modifier to prevent reentrancy calls. Adapted from ReentrancyGuard.                                           | Contract | 2.5.1          | Yes      |\n| LowLevelETHTransfer                   | Low-level call function to transfer ETH                                                                                       | Contract | 2.4.4          | Yes      |\n| LowLevelETHReturnETHIfAny             | Low-level call function to return all ETH left                                                                                | Contract | 2.4.4          | Yes      |\n| LowLevelETHReturnETHIfAnyExceptOneWei | Low-level call function to return all ETH left except one wei                                                                 | Contract | 2.4.4          | Yes      |\n| LowLevelWETH                          | Low-level call functions to transfer ETH with an option to wrap to WETH if the original ETH transfer fails within a gas limit | Contract | 2.4.4          | Yes      |\n| LowLevelERC20Approve                  | Low-level call functions for ERC20 approve functions                                                                          | Contract | 2.4.4          | Yes      |\n| LowLevelERC20Transfer                 | Low-level call functions for ERC20 transfer functions                                                                         | Contract | 2.4.4          | Yes      |\n| LowLevelERC721Transfer                | Low-level call functions for ERC721 functions                                                                                 | Contract | 2.4.4          | Yes      |\n| LowLevelERC1155Transfer               | Low-level call functions for ERC1155 functions                                                                                | Contract | 2.4.4          | Yes      |\n| ProtocolFee                           | Contract for defining protocol fee recipient and basis points                                                                 | Contract | 3.2.0          | No       |\n| BlastNativeYield                      | Contract for claiming Blast native yield                                                                                      | Contract | 3.5.1          | No       |\n| BlastPoints                           | Contract for configuring Blast points                                                                                         | Contract | 3.5.1          | No       |\n| BlastERC20RebasingYield               | Contract for claiming Blast WETH/USDB yield                                                                                   | Contract | 3.5.1          | No       |\n\n## About this repo\n\n### Structure\n\nIt is a hybrid [Hardhat](https://hardhat.org/) repo that also requires [Foundry](https://book.getfoundry.sh/index.html) to run Solidity tests powered by the [ds-test library](https://github.com/dapphub/ds-test/).\n\n\u003e To install Foundry, please follow the instructions [here](https://book.getfoundry.sh/getting-started/installation.html).\n\n### Run tests\n\n- Solidity tests are included in the `foundry` folder in the `test` folder.\n\n### Example of Foundry/Forge commands\n\n```shell\nforge build\nforge test\nforge test -vv\nforge tree\n```\n\n### Example of other commands\n\n```shell\nnpx eslint '**/*.{js,ts}'\nnpx eslint '**/*.{js,ts}' --fix\nnpx prettier '**/*.{json,sol,md}' --check\nnpx prettier '**/*.{json,sol,md}' --write\nnpx solhint 'contracts/**/*.sol'\nnpx solhint 'contracts/**/*.sol' --fix\n```\n\n### Coverage\n\nIt is required to install lcov.\n\n```shell\nbrew install lcov\n```\n\nTo run the coverage report, the below command can be executed.\n\n```\nforge coverage --report lcov\nLCOV_EXCLUDE=(\"test/*\" \"contracts/interfaces/*\" \"contracts/errors/*.sol\")\necho $LCOV_EXCLUDE | xargs lcov --output-file lcov-filtered.info --remove lcov.info\ngenhtml lcov-filtered.info --output-directory out\nopen out/index.html\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flooksrare%2Fcontracts-libs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flooksrare%2Fcontracts-libs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flooksrare%2Fcontracts-libs/lists"}