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

EIP-1921 dType - Extending the Decentralized Type System for Functions #1921

Closed
loredanacirstea opened this issue Apr 6, 2019 · 7 comments
Closed
Labels

Comments

@loredanacirstea
Copy link
Contributor

loredanacirstea commented Apr 6, 2019

Draft can be found at: #2267

In-work implementation examples, articles, video demos & related EIPs can be found at https://github.com/pipeos-one/dType.

@Arachnid
Copy link
Contributor

You should post this as a draft, so it has a persistent URL, and specify a discussions-to address (possibly this thread?)

@loredanacirstea loredanacirstea changed the title EIP-xxxx dType - Extending the Decentralized Type System for Functions EIP-1921 dType - Extending the Decentralized Type System for Functions Sep 8, 2019
@loredanacirstea
Copy link
Contributor Author

I made a PR request with the Draft at #2267.

@Arachnid, regarding your question from another discussion:

Can you give an example, then, of how you would define a DType type with, say, the ERC20 transfer method, and how multiple developers would implement this? I still don’t see how that’s possible in DType, so an end-to-end example would really help.

The original issue that we were discussing was:

DType, in contrast, seems to assume each type will have exactly one implementation.

So, I will give a more appropriate example for the current state of the dType EIPs:

Uint256 is too general a type. In different contexts, it means different things. Using dType, the dev will be able to express the intent:

IntLength:: uint256
IntVolume:: uint256

In a comparison function:

moreThan(uint256 dim1, uint256 dim2) pure public returns(bool result);

We should not be able to compare the length with the volume. That is why we will use dType and the function will describe truthfully our intent:

moreThanLength(IntLength len1, IntLength len2) pure public returns(bool result);
moreThanVolume(IntVolume vol1, IntVolume vol2) pure public returns(bool result);

So, moreThanLength and moreThanVolume can be registered with dType with their ABI definition, but in this case, the implementation is left to the developer.

The ERC20 example is not covered by the functions extension yet. The current proposal targets pure / view functions.

@Arachnid
Copy link
Contributor

Arachnid commented Sep 8, 2019

So, it's not possible to express the interface of a standard like ERC20 in DType? This seems like a basic piece of functionality to me.

Can you give any end-to-end example of how someone defining a smart contract standard could use DType?

@loredanacirstea
Copy link
Contributor Author

EIP-1900 only describes a data type system. EIP-1921 only describes the function type extension.
For standards like ERC20, you need an extension to interfaces and that will come in future EIPs.

@loredanacirstea
Copy link
Contributor Author

Example of end to end use of EIP-1900 and EIP-1921: #1882 (comment)

@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

2 participants