Code Monkey home page Code Monkey logo

Comments (9)

anilcse avatar anilcse commented on August 16, 2024

Suggestions:

  • Repo name can be just cosmwasm/smart-contracts, cosmwasm/CosmWasm-Contracts looks duplicate and let's avoid short names

Contracts List:
Multisig is a great utitlity. Along side, we can plan for these contracts too.

  1. Token Swap:
    It's a simple contract to swap 2 tokens. Let's say there are two parties, buyer and seller. Seller wants to exchange tokenA with tokenB. He deposits tokenA and creates an order with price (x tokenB). Buyer who are interested can view that and PlaceBid with required tokenB tokens. Once the criteria is matched, tokens will be swapped. Buyer will receive tokenA and seller will receive tokenB. There will be following activities: CreateOrder (seller), PlaceBid (buyer), CancelOrder (seller before fullfilment).

  2. Token Sale Contracts

  3. Token Timelock
    A token holder contract that will allow a beneficiary to extract the

  • tokens after a given release time.
  • Useful for simple vesting schedules like "founders get all of their tokens after 1 year"
  1. Having different contracts for mintable, fixed supply (capped) would be good
  2. Payment Split contract:
  • This allows to distribute earnings to multiple parties in the group. This contract allows to split token payments among a group of accounts. The sender does not need to be aware that the Ether will be split in this way, since it is handled transparently by the contract.
  • The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each account to a number of shares. Of all the tokens that this contract receives, each account will then be able to claim an amount proportional to the percentage of total shares they were assigned.
  • The contract should implement pull payment method i.e., it will not directly transfer tokens to each share holder, but share holders can withdraw the allocated tokens when they wish.
  1. We can also have conditional token transfers like isPaused/isTransferAllowed, isTooEarly, isBlockedAccount, etc. How about keeping them in utilities so anyone can just import it and use?

from cw-contracts.

webmaster128 avatar webmaster128 commented on August 16, 2024

It this about writing spefications (BIP/SLIP/EIP style) or a collection of contracts? I think we should make that clear and reflect it in the repo name.

+1 for dropping the "cosmwasm-" prefix whenever possible, since everything is under one organization now.

from cw-contracts.

ethanfrey avatar ethanfrey commented on August 16, 2024

I was thinking a place for specs like this: https://eips.ethereum.org/EIPS/eip-20

Yes, EIP style... I was thinking on those for contract specs mainly. Maybe this makes sense for extending the core protocol, but I don't want to put that into some EIP-like protocol yet (until we hit 1.0)

from cw-contracts.

ethanfrey avatar ethanfrey commented on August 16, 2024

What is the proper term to differentiate https://eips.ethereum.org/erc from the rest of the EIPS, like https://eips.ethereum.org/networking ?

I was thinking CWIP (sounds like quip)

from cw-contracts.

ethanfrey avatar ethanfrey commented on August 16, 2024

+1 for dropping the "cosmwasm-" prefix whenever possible, since everything is under one organization now.

I am not so sure of removing it from cosmwasm-examples, as that will likely be forked a lot (and examples is a pretty generic name). But maybe the following repos can be renamed?

  • CosmWasm/cosmwasm-template -> CosmWasm/template
  • CosmWasm/cosmwasm-verify -> CosmWasm/verify

These could have clearer names if we removed cosmwasm from them:

  • CosmWasm/go-cosmwasm -> CosmWasm/go-bindings ??
  • CosmWasm/cosmwasm-opt -> CosmWasm/rust-builder ??

from cw-contracts.

webmaster128 avatar webmaster128 commented on August 16, 2024

I guess the repo naming is tricky. cosmwasm-opt and cosmwasm-verify are the names of the main binaries in those repos, so they are probably not bad. Let's focus on names for new repos here. The existing names can evolve somehow along with their content.

from cw-contracts.

ethanfrey avatar ethanfrey commented on August 16, 2024

I would also rename the docker image for cosmwasm-opt... But I agree, easier to start out with naming new repos.

And back to the topic... something like the ERC subsection of the EIPs?

from cw-contracts.

ethanfrey avatar ethanfrey commented on August 16, 2024

For contract specs, I started a CW20 spec here. Probably closer to ERC777.

Intended to use this as a generic spec, and also provide a default implementation.

What do you think of this?

from cw-contracts.

ethanfrey avatar ethanfrey commented on August 16, 2024

I started this in https://github.com/CosmWasm/cosmwasm-plus with spec and implementations.

I will just keep on coding there and writing down specs until there is a community push to move it somewhere else (or ideally, they join this repo and add more info there)

from cw-contracts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.