trusttoken / contracts-pre22 Goto Github PK
View Code? Open in Web Editor NEWTrustToken smart contracts written pre 2022. Includes TrueCurrencies and TrueFi Pools.
Home Page: https://trusttoken.com
License: Other
TrustToken smart contracts written pre 2022. Includes TrueCurrencies and TrueFi Pools.
Home Page: https://trusttoken.com
License: Other
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
I've tried several times with differing amounts to run the faucet method for TUSD and TCAD and everytime I try the transaction fails and throws an exception. Not sure what I am doing wrong. I'm using the Etherscan dApp pages to easily invoke the methods for example TCAD https://rinkeby.etherscan.io/dapp/0x00005cad001e0900002979f7314d00fc480a29bd#writeContract
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?
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.
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)
Can we have a PDF explaining the working of code.
Will be grateful
It would be useful operationally if there was a unified method that requested a mint, but mints instantly if there is enough in that pool.
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.
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
Does any one knows what am i missing or not doing correct?
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?
Because redemption addresses are more-convenient, and nobody uses burn v1 anymore, we want to remove support for it.
Good morning my love family end of next year is going well for you name Kamil i
I download the code on the etherscan and compared it to the Github code, there are a lot of differences.
Besides, I can't deploy it on the rinkeby or the Ganache, the TrueUSD.sol always meet the problem "out of gas". But the code is not that long. Anyone can tell me what's wrong with it?
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.
https://etherscan.io/address/0x0000000000085d4780B73119b644AE5ecd22b376#code
new contract have no balanceOf methed,how to get token balance ?
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.
The original TUSD contract's ERC20 functions are all broken as of the recent upgrade.
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)
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?
The specification seems nonstandard. EY prefers increaseAllowance though increaseApproval has been preferred in other locations.
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.
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.
HI,
The readme is not describing how to compile. When I'm trying it I got some errors.
Thanks.
do you hava contract in the rinkeby network ,if your has deployed ,show me the contract address,thanks!
This documents work toward supporting the Kovan Testnet.
openning an issue here in case it helps add visibility to my PR (#34) I opened several months ago
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.