Dual ownership for NFTs, preventing rugs when collection metadata/royalties are changed

Overview

Multisig Ownable

Opensea only allows EOAs to make changes to collections, which makes it impossible to use multisigs to secure NFT contracts since when you want to make changes you need to transfer ownership to an EOA, who can just keep ownership forever and never give it back, enabling them to set high royalties to themselves and rug the project.

This contract establishes a second owner that can change the EOA owner, this way a multisig or an on-chain DAO can give ownership to an EOA and later claim it back, making it impossible to rug.

In short, this contract creates a dual ownership model with an admin that can be set to a multisig or DAO.

Usage

Just import MultisigOwnable into your contract and use the onlyRealOwner modifier for any functions that need to have restricted access.

Example

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "../MultisigOwnable.sol";

contract Example is ERC721, MultisigOwnable {
    constructor()
        ERC721("Mock NFT", "MNFT")
    {}

    function retrieveFunds(address payable to) external onlyRealOwner {
        to.transfer(address(this).balance);
    }
}

License

All code has been licensed under CC0, just like tubby cats themselves.

You might also like...

Passport NFT using on-chain metadata

Passport NFT Collection Setup yarn Environment File (.env) RINKEBY_URL: Ethereum (Rinkeby) Testnet Provider endpoint MATIC_URL: Polygon (Matic Mumbai)

Jun 2, 2022

An Obsidian plugin to upload your notes' metadata to your database.

An Obsidian plugin to upload your notes' metadata to your database.

Obsidian + PostgreSQL = ❤️ An Obsidian plugin to upload your notes' metadata to your database. Features send the Dataview annotations of a page to a P

Dec 19, 2022

A plugin for Obsidian that can create input fields inside your notes and bind them to metadata fields.

Obsidian Meta Bind Plugin This plugin can create input fields inside your notes and bind them to metadata fields. New docs I am currently working on n

Jan 4, 2023

Node.js library that provide a cache for file metadata or file content.

@file-cache A cache library for file metadata or file content. It is useful for process that work a given series of files and that only need to repeat

Aug 6, 2022

A GitHub Action to enable Pages and extract various metadata about a site

A GitHub Action to enable Pages and extract various metadata about a site. It can also be used to configure various static site generators we support as starter workflows.

Jan 1, 2023

For data quality enthousiasts (and dataview lovers): manage the metadata of your notes.

Metadata Menu This plugin is made for data quality enthousiasts: access and manage the metadata of your notes in Obsidian. Metadata Menu adds context

Dec 23, 2022

🎨 Dynamic Token Images and Metadata

ERC721K - Dynamic Token Images and Metadata Overview ERC721K is an ERC721 implementation with zero dependencies for off-chain data. Both the token ima

Dec 29, 2022

the music metadata you love, with IPFS hosting on nft.storage :rainbow:

the music metadata you love, with IPFS hosting on nft.storage :rainbow:

Music NFT IPFS Metadata Standard for musicians pioneered by Catalog & Mint Songs. Compatible with contracts created by: Catalog Sound.xyz Manifold - W

Oct 17, 2022

🎨 Dynamic Token Images and Metadata

ERC721K - Dynamic Token Images and Metadata Overview ERC721K is an ERC721 implementation with zero dependencies for off-chain data. Both the token ima

Sep 30, 2022
Comments
  • Override instead of adding transferLowerOwnership

    Override instead of adding transferLowerOwnership

    Love these tubby-cats contracts!

    Currently the owner can still call transferOwnership: this PR overrides transferOwnership (with onlyRealOwner) instead of adding transferLowerOwnership

    I might have missed something here though!

    opened by azf20 2
Owner
Tubby Cats
Tubby Cats
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
A Javascript library that discourages and prevents image theft/download by preventing client ability to retrieve the image.

ProtectImage.js ProtectImage.js is a Javascript library that helps prevent image theft by disabling traditional user interactions to download/copy ima

null 4 Aug 18, 2022
A collection of crypto tokens (metadata, logos, links)

@deliquid/token-list (beta) A multi-chain collection of crypto tokens, including metadata, logos, and more. Installation npm i @deliquid/token-list Ba

DeLiquid 4 Jun 3, 2022
Master Collection NFT. Mints NFTs on Ethereum containing unique combination of titles for fun.

Master NFT Collection Master NFT Collection is an NFT minting platform that mints NFTs that contain a unique combination of snazzy titles just for fun

MJ LEE 2 Mar 22, 2022
A util for getting data and metadata for all markdown files in a given dir. Useful for building static site generators

extract-md-data A util for getting data and metadata for all markdown files in a given dir. Useful for building static site generators. Usage Given th

Claire Froelich 2 Jan 6, 2022
The ICPverse service to extract the metadata from an existing NFT project on the Internet Computer.

Infinity_Rank The ICPverse service to extract the metadata from an existing NFT project on the Internet Computer. Requirements for Use: npm installed

ICPverse 10 Nov 5, 2022
Yet another library for generating NFT artwork, uploading NFT assets and metadata to IPFS, deploying NFT smart contracts, and minting NFT collections

eznft Yet another library for generating NFT artwork, uploading NFT assets and metadata to IPFS, deploying NFT smart contracts, and minting NFT collec

null 3 Sep 21, 2022
Fetch publication metadata from the INSPIRE-HEP database

Zotero INSPIRE Metadata Updater This is an add-on for the excellent open-source reference manager Zotero. It is useful as most papers from arXiv will

null 20 Nov 27, 2022