GithubHelp home page GithubHelp logo

su-squares / ethereum-contract Goto Github PK

View Code? Open in Web Editor NEW
40.0 7.0 13.0 177 KB

Su Squares smart contract and bounty program

Home Page: https://tenthousandsu.com/

Shell 8.71% JavaScript 91.29%
ethereum bounty smart-contracts solidity

ethereum-contract's Introduction

Su Squares Ethereum Contract

Build Status Join the chat at https://gitter.im/Su-Squares/Lobby

โฌ›๏ธ๐Ÿ”ฒโฌ›๏ธ Su Squares are cute squares you own and personalize. This repository holds the Ethereum smart contract which handles the ownership, personalization and sales logic of Su Squares. ๐Ÿ”ฒโฌ›๏ธ๐Ÿ”ฒ

Development

We recommend using Remix IDE to develop and test the Su Squares Ethereum Contract.

  1. git clone https://github.com/su-squares/ethereum-contract.git su-squares-ethereum-contract
  2. cd su-squares-ethereum-contract
  3. npx remixd -s .
  4. Open Remix IDE
  5. Click the link icon (:link:) on the top to connect
  6. Edit code, and then run tests using the "Testing" tab on the right

You can also run tests locally by running npm test. Read some details on how that works.

Project scope

This repository is open so that you may study the Su Squares Ethereum Contract code and become confident that it works correctly. This project is deployed already and so upgrades are expensive (see deployment section. We always welcome contributions (issues, pull requests) that improve testing of the smart contract. Changes to the smart contract code will be deployed only if they fix a serious problem (see bug bounty section). Other changes may be accepted into a branch, which might sit there for a long time.

Deployment

Our smart contract deployment process is expensive and requires updating or informing every part of the world that touches the contract. We do not intend to do it often. Each release is expected to be the final release. But we will redeploy if it protects our customers from a documented problem.

Read the full deployment process documentation.

Bug bounty

You are somebody that reads documentation on smart contracts and understands how Su Squares works. So you have unique skills and your time is valuable. We will pay you for your contributions to Su Squares in the form of bug reports.

If your project depends on ERC-721 or you want to help improve the assuarance of this project then you can pledge a bounty. This means you will commit to pay researchers that demonstrate a problem. Contact us at [email protected] if interested. Thank you.

Read the full bug bounty program.

License

Copyright 2018 Su & William Entriken. All rights reserved.

We commit to rerelease this project under the MIT license when 10% of the squares have been sold. At that time we will also release our back-end scripts and other code that you might be interested in also under MIT license.

ethereum-contract's People

Contributors

fulldecent avatar momannn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ethereum-contract's Issues

Operator Send does not use correct check

https://github.com/su-squares/ethereum-contract/blob/master/contracts/SuNFT.sol#L48

modifier canTransfer(uint256 _tokenId) {
    // assert(msg.sender != address(this))
    address owner = _tokenOwnerWithSubstitutions[_tokenId];
    require(msg.sender == owner ||
      msg.sender == tokenApprovals[_tokenId] ||
      operatorApprovals[msg.sender][msg.sender]);
    _;
}

should be

modifier canTransfer(uint256 _tokenId) {
    // assert(msg.sender != address(this))
    address owner = _tokenOwnerWithSubstitutions[_tokenId];
    require(msg.sender == owner ||
      msg.sender == tokenApprovals[_tokenId] ||
      operatorApprovals[owner][msg.sender]);
    _;
}

Finney conversion rate

In personalizeSquare(), the documentation states that 100 finney = 0.01 ether. This is incorrect and the documentation should be updated to state the correct price of 10 finney = 0.01 ether.

Also, a case could be made that we should adopt preferred Ether and Finney capitalizations as per primary source https://ethereum.github.io/yellowpaper/paper.pdf

Rename tagline

Update tagline "blockchain rentable advertising" to "cute blockchain squares" on Su Squares pages

Be consistent with homepage

_transfer doesn't clear approval

Without clearing approval, I can steal back a token I've transferred to you - call approve(me, id), call transferFrom(me, you, id), then I can still call transferFrom(me, anyone, id).

Launch new bounty

This bounty just launched again. I'm only making an issue so I can mention some people:

Ping @sz-piotr @owocki @paulbarclay @MoMannn.

We are going to redeploy the contract to make fixes an a result of this bounty, and also the small changes made to ERC-721 to get to final status.

For those of you that earned squares in the last competition, I will copy your squares over to the new deployment. And I hope you will personalize them this time! Gosh, too much white.

Cheers,
Will

Unnecessary `payable` functions

Are these functions payable for a reason I am missing?

function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes data) external payable;
function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable;
function transferFrom(address _from, address _to, uint256 _tokenId) external payable;
function approve(address _approved, uint256 _tokenId) external payable;

Hi from Gitcoin

hi from Gitcoin!

mind if we promote this bounty program on the gitcoin slack? looks like i might be a day late to really get invovled.... but would like to try.. we have a few thousand members of our network and they are all hungry for ๐Ÿ› squashing oppy's

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.