Git Product home page Git Product logo

tip3's Introduction

TIP3

Broxus TIP3 (tip3.1, tip3.2) Fungible tokens implementation

Logo

npm

Firstly

npm install

Then use Locklift v2 to deploy

  1. To deploy tokens via token factory

npx locklift run --config locklift.config.ts --network local --script scripts/0-deploy-token.ts

  1. To deploy factory

npx locklift run --config locklift.config.ts --network local --script scripts/1-deploy-factory.ts

For test Token Factory

npx locklift test -n local

tip3's People

Contributors

30mb1 avatar abionics avatar aleksandr-hramcov avatar cyace84 avatar karneges avatar matt5346 avatar pavelkhachatrian avatar pavlovdog 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

Watchers

 avatar  avatar  avatar  avatar  avatar

tip3's Issues

Proposal: add checking for minimum value in TokenWallet "transfer" and "transferToWallet" methods

"transfer" and "transferToWallet" methods don't check the minimum required value to start the transfer.

For correctly finish the transfer user must attach at least:
require(msg.value > TokenGas.TARGET_WALLET_BALANCE * 2 + deployWalletValue);

Plus gas for the "transfer" and "acceptTransfer"

This must be explicitly described or checked before starting the transfer because smaller value can lead to the tokens lost.

Example:

  • TokenWallet was without transactions for a while.
  • Some dapp tried to call the transfer with attached amount 0.2 ever and deployWalletValue: 0.1 ever
  • This amount of value is enough for particular transfers, but in our case 0.07 evers will be taken as storage payment
  • Destination wallet will be deployed successfully, but "acceptTransfer" will be aborted with error "Out of gas" and a bounce message will not be created.

Example of token lost by out of gas:
https://everscan.io/messages/9ef01bb5a831d1286de67183197a7bb34b3cc2955ed719d9f79ec778b6c304e3

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.