Skip to content

Commit

Permalink
Working
Browse files Browse the repository at this point in the history
  • Loading branch information
sullof committed Oct 10, 2019
1 parent 05bd20c commit 5db18b1
Show file tree
Hide file tree
Showing 273 changed files with 585 additions and 6,796 deletions.
14 changes: 8 additions & 6 deletions .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
.idea
.ID_Store
node_modules

# we use yarn
.DS_Store
.tern-port
package-lock.json
metacoin-box
dependencies
build
tmp
.scratch

# for now
CONTRIBUTING.md

3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "packages/tronwrap/tronweb"]
path = packages/tronwrap/tronweb
url = [email protected]:TRON-US/tronweb.git
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,26 @@ lerna bootstrap
./tronbox.dev migrate --reset
```

## Solc versions

TronBox does not supports all the Solidity compilers.
Supported versions:
```
0.4.24
0.4.25
0.5.4
0.5.8
0.5.9
```

## Latest version is 2.3.16

## Recent history (selected)

__3.0.0__
* Full refactoring
* Add support for Solidity compiler 0.5.9

__2.5.2__
* Fix bug in compiler wrapper calls

Expand Down
12 changes: 6 additions & 6 deletions packages/tronbox/cli.webpack.config.js → cli.webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ var CleanWebpackPlugin = require('clean-webpack-plugin');
var webpack = require('webpack');
var pkg = require("./package.json");

var rootDir = path.join(__dirname, "../..");
var rootDir = path.join(__dirname, ".");
var outputDir = path.join(__dirname, "build");
var outputFilename = 'cli.bundled.js';

module.exports = {
entry: {
cli: path.join(__dirname, "../..", "node_modules", "truffle-core", "cli.js"),
chain: path.join(__dirname, "../..", "node_modules", "truffle-core", "chain.js")
cli: path.join(__dirname, "core", "cli.js"),
chain: path.join(__dirname, "core", "chain.js")
},
target: 'node',
node: {
Expand Down Expand Up @@ -70,10 +70,10 @@ module.exports = {

// `truffle test`
new CopyWebpackPlugin([
{ from: path.join(__dirname, "../..", "node_modules", "truffle-core", "lib", "testing", "Assert.sol") },
{ from: path.join(__dirname, "../..", "node_modules", "truffle-core", "lib", "testing", "SafeSend.sol") },
{ from: path.join(__dirname, "core", "lib", "testing", "Assert.sol") },
{ from: path.join(__dirname, "core", "lib", "testing", "SafeSend.sol") },
{
from: path.join(__dirname, "../..", "node_modules", "truffle-core", "lib", "templates/"),
from: path.join(__dirname, "core", "lib", "templates/"),
to: "templates",
flatten: true
},
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var utils = require("./lib/utils");
var tmp = require("tmp");
var path = require("path");

var Config = require("truffle-config");
var Config = require("../Config");

var Box = {
unbox: function(url, destination, options) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ var compile = function(sources, options, callback) {
]);

// Load solc module only when compilation is actually required.
const {getWrapper} = require("tron-solc")
const {getWrapper} = require("../TronSolc")

var solc = getWrapper(options);
// Clean up after solc.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var CompileError = require("./compileerror");
const {getWrapper} = require("tron-solc")
const {getWrapper} = require("../TronSolc")
// var solc = require("tron-solc");
var fs = require("fs");
var path = require("path");
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var fs = require("fs");
var _ = require("lodash");
var path = require("path");
var { constants } = require('tronwrap');
var { constants } = require('./Tronwrap');
var Provider = require("./Provider");
var TruffleError = require("truffle-error");
var Module = require('module');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var ethJSABI = require("ethjs-abi");
var TronWrap = require('tronwrap');
var {constants} = require('tronwrap');
var TronWrap = require('../Tronwrap');
var {constants} = require('../Tronwrap');
var BigNumber = require("bignumber.js")
var StatusError = require("./statuserror.js")

Expand Down Expand Up @@ -625,9 +625,6 @@ var contract = (function (module) {

Utils.bootstrap(temp);

// temp.web3 = new Web3();
// require("TronWrap").ext(temp);
// temp.tron = require("TronWrap").TronWrap;
temp.class_defaults = temp.prototype.defaults || {};

if (network_id) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"abi": {
"allOf": [
{ "$ref": "abi.spec.json#" },
{ "$ref": "abi.spec.json#"},
{ "description": "Interface description returned by compiler for source" }
]
},
Expand Down Expand Up @@ -58,7 +58,7 @@
},
"networks": {
"patternProperties": {
"^[a-zA-Z0-9]+$": { "$ref": "network-object.spec.json#" }
"^[a-zA-Z0-9]+$": { "$ref": "network-object.spec.json#"}
},
"additionalProperties": false
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"events": {
"type": "object",
"patternProperties": {
"^0x[a-fA-F0-9]{64}$": { "$ref": "abi.spec.json#/definitions/Event" }
"^0x[a-fA-F0-9]{64}$": { "$ref": "abi.spec.json#/definitions/Event"}
},
"additionalProperties": false
},
Expand Down Expand Up @@ -42,7 +42,7 @@
"events": {
"type": "object",
"patternProperties": {
"^0x[a-fA-F0-9]{64}$": { "$ref": "abi.spec.json#/definitions/Event" }
"^0x[a-fA-F0-9]{64}$": { "$ref": "abi.spec.json#/definitions/Event"}
},
"additionalProperties": false
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var deploy = require("./src/actions/deploy");
var deployMany = require("./src/actions/deploymany");
var link = require("./src/actions/link");
var create = require("./src/actions/new");
var {dlog} = require('tronwrap')
var {dlog} = require('../Tronwrap')

function Deployer(options) {
var self = this;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const TronWrap = require('tronwrap');
const {dlog} = require('tronwrap');
const TronWrap = require('../../../Tronwrap');
const {dlog} = require('../../../Tronwrap');


module.exports = function (contract, args, deployer) {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ var Require = require("truffle-require");
var async = require("async");
// var Web3 = require("web3-mock");
var expect = require("truffle-expect");
var Deployer = require("truffle-deployer");
var Deployer = require("../Deployer");
var chalk = require("chalk")

var TronWrap = require('tronwrap');
const logErrorAndExit = require('tronwrap').logErrorAndExit
var TronWrap = require('../Tronwrap');
const logErrorAndExit = require('../Tronwrap').logErrorAndExit
var tronWrap;

function Migration(file) {
Expand All @@ -26,10 +26,6 @@ Migration.prototype.run = function (options, callback) {
var self = this;
var logger = options.logger;

// var web3 = new Web3();
// require("TronWrap").ext(web3);
// TronWrap.setHttpProvider(options.network_config.host + "");

logger.log("Running migration: " + path.relative(options.migrations_directory, this.file));

var resolver = new ResolverIntercept(options.resolver);
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var {TronWeb} = require("tronwrap");
var {TronWeb} = require("../Tronwrap");
var wrapper = require('./wrapper');

module.exports = {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var _TronWeb = require("./tronweb/dist/TronWeb.node");
var _TronWeb = require("tronweb");
var chalk = require('chalk')
var constants = require('./constants')
var axios = require('axios');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var _ = require("lodash");
var Resolver = require("./Resolver");
var Artifactor = require("./Artifactor");
var OS = require("os");
var TronWrap = require("tronwrap");
var TronWrap = require("./Tronwrap");

async function getCompilerVersion(options) {

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/truffle-core/index.js → core/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var pkg = require("./package.json");
var pkg = require("../package.json");

module.exports = {
build: require("./lib/build"),
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ var command = {
var Develop = require("./develop");
var TruffleError = require("truffle-error");

var TronWrap = require("TronWrap");
const logErrorAndExit = require('tronwrap').logErrorAndExit
var TronWrap = require("../../components/Tronwrap");
const logErrorAndExit = require('../../components/Tronwrap').logErrorAndExit

var config = Config.detect(options);

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ var command = {
process.env.CURRENT = 'debug'
var OS = require("os");
var path = require("path");
var debugModule = require("debug");
var debugModule = require("core/lib/commands/debug");
var debug = debugModule("lib:commands:debug");
var safeEval = require('safe-eval')
var util = require("util");
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ var command = {
var Environment = require("../environment");
var temp = require("temp");
var copy = require("../copy");
var TronWrap = require("tronwrap");
var {dlog} = require("tronwrap");
const logErrorAndExit = require('tronwrap').logErrorAndExit
var TronWrap = require("../../components/Tronwrap");
var {dlog} = require("../../components/Tronwrap");
const logErrorAndExit = require('../../components/Tronwrap').logErrorAndExit

var config = Config.detect(options);

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ var command = {
var fs = require("fs");
var copy = require("../copy");
var Environment = require("../environment");
var TronWrap = require('tronwrap')
const logErrorAndExit = require('tronwrap').logErrorAndExit
var TronWrap = require('../../components/Tronwrap')
const logErrorAndExit = require('../../components/Tronwrap').logErrorAndExit

var config = Config.detect(options);

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var {supportedVersions} = require('../../../tron-solc')
var {supportedVersions} = require('../../components/TronSolc')

var command = {
command: 'version',
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions packages/truffle-core/lib/console.js → core/lib/console.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var ReplManager = require("./repl");
var Command = require("./command");
var provision = require("../components/Provisioner");
var contract = require("../components/Contract");
var TronWrap = require("tronwrap");
var TronWrap = require("../components/Tronwrap");
var vm = require("vm");
var expect = require("truffle-expect");
var _ = require("lodash");
Expand All @@ -12,7 +12,7 @@ var os = require("os");
var path = require("path");
var EventEmitter = require("events");
var inherits = require("util").inherits;
const logErrorAndExit = require('tronwrap').logErrorAndExit
const logErrorAndExit = require('../components/Tronwrap').logErrorAndExit

inherits(Console, EventEmitter);

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var TestRPC = require("ganache-cli");
var spawn = require("child_process").spawn;
var path = require("path");
var Develop = require("./develop");
var TronWrap = require('Tronwrap')
var TronWrap = require('../components/Tronwrap')

var Environment = {
// It's important config is a Config object and not a vanilla object
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/truffle-core/lib/repl.js → core/lib/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var path = require("path");
var async = require("async");
var EventEmitter = require("events");
var inherits = require("util").inherits;
var TronWrap = require('tronwrap');
var TronWrap = require('../components/Tronwrap');

inherits(ReplManager, EventEmitter);

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/truffle-core/lib/test.js → core/lib/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var Migrate = require("../components/Migrate");
var Profiler = require("../components/Compile/profiler");
var async = require("async");
var originalrequire = require("original-require");
var TronWrap = require('tronwrap');
var TronWrap = require('../components/Tronwrap');

chai.use(require("./assertions"));

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Using web3 for its sha function...
var TronWrap = require("tronwrap");
var TronWrap = require("../../components/Tronwrap");

var Deployed = {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var contract = require("../../components/Contract");
var series = require("async").series;
var path = require("path");
var SolidityCoder = require("web3/lib/solidity/coder.js");
var TronWrap = require("tronwrap");
var TronWrap = require("../../components/Tronwrap");

var SolidityTest = {
define: function(abstraction, dependency_paths, runner, mocha) {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ var path = require("path");
var _ = require("lodash");
var async = require("async");
var fs = require("fs");
var TronWrap = require('tronwrap');
var TronWeb = require("../../../tronwrap/tronweb/dist/TronWeb.node");
var TronWrap = require('../../components/Tronwrap');
var TronWeb = require("tronweb");
var waitForTransactionReceipt = require('./waitForTransactionReceipt');

function TestRunner(options) {
Expand Down
File renamed without changes.
10 changes: 10 additions & 0 deletions core/lib/version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// var pkg = require("../../package.json");
// var solcpkg = require("tron-solc/package.json");

var bundle = require("../../package.json");

module.exports = {
// core: pkg.version,
bundle: bundle.version,
// solc: solcpkg.version
};
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 5db18b1

Please sign in to comment.