Git Product home page Git Product logo

contracts-pre22's People

Contributors

abam-iksde avatar benjamincosman avatar coolgig-as avatar dependabot[bot] avatar dmaretskyi avatar dymitrlubczyk avatar hal909 avatar maciejnadolski98 avatar marcuswin avatar miksujak avatar msieczko avatar pkuchtatt avatar qiwihui avatar rafaelcosman avatar skalermo avatar terryli0095 avatar vanruch avatar vashti-w avatar wjmelements avatar yubo-ruan avatar yuchenlintt avatar yuchennil 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  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  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  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

contracts-pre22's Issues

Truffle Compilation Problem

I cloned your repo but not able to compile
error in: truffle compile
Error: Could not find /home/rival/TrueUSD/trueUSD/registry/contracts/Registry.sol from any sources; imported from /home/rival/TrueUSD/trueUSD/contracts/Admin/TokenController.sol at /usr/lib/node_modules/truffle/build/webpack:/packages/truffle-resolver/index.js:76:1 at /usr/lib/node_modules/truffle/build/webpack:/~/async/internal/onlyOnce.js:12:1 at next (/usr/lib/node_modules/truffle/build/webpack:/~/async/whilst.js:68:1) at /usr/lib/node_modules/truffle/build/webpack:/packages/truffle-resolver/index.js:64:1 at /usr/lib/node_modules/truffle/build/webpack:/packages/truffle-resolver/fs.js:85:1 at /usr/lib/node_modules/truffle/build/webpack:/~/async/internal/once.js:12:1 at replenish (/usr/lib/node_modules/truffle/build/webpack:/~/async/internal/eachOfLimit.js:61:1) at iterateeCallback (/usr/lib/node_modules/truffle/build/webpack:/~/async/internal/eachOfLimit.js:50:1) at /usr/lib/node_modules/truffle/build/webpack:/~/async/internal/onlyOnce.js:12:1 at ReadFileContext.callback (/usr/lib/node_modules/truffle/build/webpack:/packages/truffle-resolver/fs.js:81:1) at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:238:13) Truffle v5.0.3 (core: 5.0.3) Node v10.15.1

Calculate total supply with Transfers

I am trying to calculate total supply with Transfer events. I would expect

total supply = (total Transfer amount from 0x000...000) - (total Transfer amount to 0x000...000)

formula to give me the correct totalSupply ~313866948870000000000000000 (see contract for up-to-date number).
However I am about 3 times off ~106327562000000000000000000.

Is this related to Autosweep and Registar features? If so, how would you account for them?

importing TokenFaucet.sol into Remix IDE

Hi,

I have error when importing TokenFaucet.sol into Remix IDE
import "github.com/trusttoken/true-currencies/contracts/utilities/TokenFaucet.sol";

It seems that some files cannot be found.

2 tests fail

Hi, just tried the tests with ./node_modules/.bin/solidity-coverage.. is needed some more configuration with Ganache or Web3?

185 passing (2m)
  2 failing

  1) Contract: TokenWithFees "before each" hook:
     Error: Contract transaction couldn't be found after 50 blocks
      at /home/grigio/Code/testing/trueUSD/node_modules/truffle/build/webpack:/~/web3/lib/web3/contract.js:112:1
      at /home/grigio/Code/testing/trueUSD/node_modules/truffle/build/webpack:/~/web3/lib/web3/filter.js:128:1
      at Array.forEach (<anonymous>)
      at /home/grigio/Code/testing/trueUSD/node_modules/truffle/build/webpack:/~/web3/lib/web3/filter.js:127:1
      at Array.forEach (<anonymous>)
      at Object.onMessage [as callback] (/home/grigio/Code/testing/trueUSD/node_modules/truffle/build/webpack:/~/web3/lib/web3/filter.js:125:1)
      at /home/grigio/Code/testing/trueUSD/node_modules/truffle/build/webpack:/~/web3/lib/web3/requestmanager.js:259:1
      at Array.forEach (<anonymous>)
      at /home/grigio/Code/testing/trueUSD/node_modules/truffle/build/webpack:/~/web3/lib/web3/requestmanager.js:258:10
      at /home/grigio/Code/testing/trueUSD/node_modules/truffle/build/webpack:/~/truffle-provider/wrapper.js:134:1
      at XMLHttpRequest.request.onreadystatechange (/home/grigio/Code/testing/trueUSD/node_modules/truffle/build/webpack:/~/web3/lib/web3/httpprovider.js:128:1)
      at XMLHttpRequestEventTarget.dispatchEvent (/home/grigio/Code/testing/trueUSD/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:64:1)
      at XMLHttpRequest._setReadyState (/home/grigio/Code/testing/trueUSD/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:354:1)
      at XMLHttpRequest._onHttpResponseEnd (/home/grigio/Code/testing/trueUSD/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:509:1)
      at IncomingMessage.<anonymous> (/home/grigio/Code/testing/trueUSD/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:469:1)
      at endReadableNT (_stream_readable.js:1106:12)
      at process._tickCallback (internal/process/next_tick.js:178:19)

  2) Contract: TokenWithFees "before each" hook:
     Error: Contract transaction couldn't be found after 50 blocks
      at /home/grigio/Code/testing/trueUSD/node_modules/truffle/build/webpack:/~/web3/lib/web3/contract.js:112:1
      at /home/grigio/Code/testing/trueUSD/node_modules/truffle/build/webpack:/~/web3/lib/web3/filter.js:128:1
      at Array.forEach (<anonymous>)
      at /home/grigio/Code/testing/trueUSD/node_modules/truffle/build/webpack:/~/web3/lib/web3/filter.js:127:1
      at Array.forEach (<anonymous>)
      at Object.onMessage [as callback] (/home/grigio/Code/testing/trueUSD/node_modules/truffle/build/webpack:/~/web3/lib/web3/filter.js:125:1)
      at /home/grigio/Code/testing/trueUSD/node_modules/truffle/build/webpack:/~/web3/lib/web3/requestmanager.js:259:1
      at Array.forEach (<anonymous>)
      at /home/grigio/Code/testing/trueUSD/node_modules/truffle/build/webpack:/~/web3/lib/web3/requestmanager.js:258:10
      at /home/grigio/Code/testing/trueUSD/node_modules/truffle/build/webpack:/~/truffle-provider/wrapper.js:134:1
      at XMLHttpRequest.request.onreadystatechange (/home/grigio/Code/testing/trueUSD/node_modules/truffle/build/webpack:/~/web3/lib/web3/httpprovider.js:128:1)
      at XMLHttpRequestEventTarget.dispatchEvent (/home/grigio/Code/testing/trueUSD/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:64:1)
      at XMLHttpRequest._setReadyState (/home/grigio/Code/testing/trueUSD/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:354:1)
      at XMLHttpRequest._onHttpResponseEnd (/home/grigio/Code/testing/trueUSD/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:509:1)
      at IncomingMessage.<anonymous> (/home/grigio/Code/testing/trueUSD/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:469:1)
      at endReadableNT (_stream_readable.js:1106:12)
      at process._tickCallback (internal/process/next_tick.js:178:19)

TrueCoinReceiver + Autosweep: originalSender?

In the case of autosweep, we use the intermediate alias address as the original sender parameter, which preserves some information about the intent of the transfer. But for some contracts, they may be more interested in the original sender. Crediting a deposit account with a staked balance might be the wrong thing to do if that account doesn't have a key, for example.

Error: Could not find artifacts for MultisigOwner from any sources

Hi
I am trying to setup TrueUSD coin so i can test it with my exchange but i am not able to setup it. I am not an expert but i am facing this issue:
Error: Could not find artifacts for MultisigOwner from any sources
I cloned the repository and then followed the commands mentioned in the readme

  1. git submodule init && git submodule update
  2. npm install
  3. npm test
    While running npm test i am facing this issue.

Does any one knows what am i missing or not doing correct?

Deploy own copy of trueUSD token in rinkeby

Hello!

I find a way to create my own copy of trueUSD token in rinkeby testnet. I was deploy trueUSD token, but I can't initialize it.

Can you write steps to create and initialize my own copy of trueUSD?

Deprecate Burn V1

Because redemption addresses are more-convenient, and nobody uses burn v1 anymore, we want to remove support for it.

+310653470153

Good morning my love family end of next year is going well for you name Kamil i

Profiling instructions are outdated

The README asks contributors to run the profiler, but profile.sh has been removed from the root directory. The instructions should be removed, or updated to point to your new profiling setup.

Update compiler from 0.4.23 to 0.5.13

Using an old version of the compiler has security and stability advantages but because the next batch of upgrades will target Istanbul, we should use a compiler that is aware of the fork.

Legacy access request rate exceeded

This seems to be an issue with truffle. It happens when I run npm test.

> [email protected] test /Users/williammorriss/work/trueusd
> ./test.sh


/Users/williammorriss/work/trueusd/node_modules/truffle-hdwallet-provider/node_modules/web3/lib/web3/httpprovider.js:118
            callback(error, result);
            ^
Error: legacy access request rate exceeded
    at /Users/williammorriss/work/trueusd/node_modules/web3-provider-engine/subproviders/web3.js:15:44
    at XMLHttpRequest.request.onreadystatechange (/Users/williammorriss/work/trueusd/node_modules/truffle-hdwallet-provider/node_modules/web3/lib/web3/httpprovider.js:118:13)
    at XMLHttpRequestEventTarget.dispatchEvent (/Users/williammorriss/work/trueusd/node_modules/xhr2/lib/xhr2.js:64:18)
    at XMLHttpRequest._setReadyState (/Users/williammorriss/work/trueusd/node_modules/xhr2/lib/xhr2.js:354:12)
    at XMLHttpRequest._onHttpResponseEnd (/Users/williammorriss/work/trueusd/node_modules/xhr2/lib/xhr2.js:509:12)
    at IncomingMessage.<anonymous> (/Users/williammorriss/work/trueusd/node_modules/xhr2/lib/xhr2.js:469:24)
    at IncomingMessage.emit (events.js:187:15)
    at endReadableNT (_stream_readable.js:1094:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)

web3 calls returning null

I try to read token name and decimals but web3 returns null.
In the same time if I call some other ERC20 Token contract it return correct values.

const client = new Web3(host).eth;
const contract = new client.Contract(erc20Abi, '0x0000000000085d4780B73119b644AE5ecd22b376');

const name = await contract.methods.name().call();
console.log(`Token name: ${name}`);

Could you help me with some advise what should I also try to know the problem reason?

creating trueusd token

I have seen contract -> 0x0000000000085d4780B73119b644AE5ecd22b376 in etherscan, the same is available in rinkeby/ropsten? I am trying to create trueusd token . I am new to smart contract. Can anyone help me with this? I have gone through the deployed contract and couldn't find a way.

Do not decrement approval in transferFrom for sufficiently large allowances

This idea comes from a reddit comment.

We can reduce the cost of transferFrom in a common case, where users set "unlimited" token allowance by setting the allowance to 0xffff...ffff. We can take advantage of this by checking if the allowance is greater than 0xff00...0000 and not touching the allowance storage in that case. From the user's perspective, nothing is different, but we can save almost 5000 gas.

Compilation guide

HI,
The readme is not describing how to compile. When I'm trying it I got some errors.

Thanks.

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.