Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERC-1668 - Root contract #1668

Closed
rumkin opened this issue Dec 22, 2018 · 2 comments
Closed

ERC-1668 - Root contract #1668

rumkin opened this issue Dec 22, 2018 · 2 comments
Labels

Comments

@rumkin
Copy link

rumkin commented Dec 22, 2018

eip: 1668
title: Root contract
author: Rumkin @rumkin.
status: Draft
type: Standards Track
category: ERC
created: 2018-12-22T22:00:00Z

Today any account can create any contract and transfer tokens to anyone on blockchain. This is good for general blockchain but not for something special like corporate or community chain, which need to have more control. This suggestion provide description of the Root contract which is using to resolve permissions:

  • who can transfer coins,
  • who can create contract,
  • which contract code could be deployed.

Optional abilities:

  • Receive funds of destroyed contract.
  • Root contract can be located at pseudo-address 0x00, that will solve missed funds problem.

Contract interface:

contract Root {
  function canTransfer(address _from, address _to, uint256 _amount) returns(bool) {}
  function canCreateContract(address _from, bytes _code, bytes _args) returns(bool) {}
  function withdraw(address _to, uint256 _amount) public {}
  function () payable {}
}

This allows to create full specter of chains from centralized to fully decentralized.

Simple example

Suppose I'm going to create a chain which driven by group of experts like TC39 or WhatWG. All contracts should be specified and published only by this group. This is what for canCreateContract() exists. This group creates contracts factories and publish to the network. Then this group grants permission to create contracts to this factory contract. When user decided to publish a contract he call one of the factory's methods instead of directly publishing contract code.

The other limitation that could be realized is payments. For example this network supports only account-to-contract and contract-to-account transactions. This is possible with canTransfer() which receives sender and receiver of the transfer and decide is payment allowed.

@rumkin rumkin changed the title Root contract ERC1668 - Root contract Dec 22, 2018
@rumkin rumkin changed the title ERC1668 - Root contract ERC-1668 - Root contract Dec 22, 2018
@github-actions
Copy link

There has been no activity on this issue for two months. It will be closed in a week if no further activity occurs. If you would like to move this EIP forward, please respond to any outstanding feedback or add a comment indicating that you have addressed all required feedback and are ready for a review.

@github-actions github-actions bot added the stale label Nov 20, 2021
@github-actions
Copy link

github-actions bot commented Dec 4, 2021

This issue was closed due to inactivity. If you are still pursuing it, feel free to reopen it and respond to any feedback or request a review in a comment.

@github-actions github-actions bot closed this as completed Dec 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant