Skip to content

Commit

Permalink
Merge pull request #13 from ipelaez-simtlix/master
Browse files Browse the repository at this point in the history
BGA-363 WBTC smart contract deployment on Tron
  • Loading branch information
twtaylorbitgo authored Dec 13, 2020
2 parents 74368f0 + 9c011e0 commit b0ffa83
Show file tree
Hide file tree
Showing 66 changed files with 5,159 additions and 548 deletions.
25 changes: 5 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,7 @@
This repository has the contracts that implement the wrapped btc token.
This repository has the contracts that implement the wrapped tokens.

# Installation

npm install

# Compilation

npm run compile

# Testing

npm test

# Testing Coverage

npm run coverage

# Deployment

node scripts/deployer.js --input-file [file] --gas-price-gwei [gwei] --rpc-url [url]
# Ethereum network
[ethereumV2/README.md](ethereumV2/README.md)

# Tron network
[tron/README.md](tron/README.md)
File renamed without changes.
21 changes: 21 additions & 0 deletions ethereumV2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
This repository has the contracts that implement the wrapped btc token on Ethereum network.

# Installation

npm install

# Compilation

npm run compile

# Testing

npm test

# Testing Coverage

npm run coverage

# Deployment

node deployer.js --input-file [file] --gas-price-gwei [gwei] --rpc-url [url]
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.
12 changes: 12 additions & 0 deletions ethereumV2/contracts/token/WETH.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
pragma solidity 0.4.24;

import "openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol";
import "openzeppelin-solidity/contracts/token/ERC20/DetailedERC20.sol";
import "openzeppelin-solidity/contracts/token/ERC20/MintableToken.sol";
import "openzeppelin-solidity/contracts/token/ERC20/BurnableToken.sol";
import "openzeppelin-solidity/contracts/token/ERC20/PausableToken.sol";
import "../token/WrappedToken.sol";


contract WETH is WrappedToken, DetailedERC20("Wrapped ETH", "WETH", 18) {}

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 @@ -18,10 +18,10 @@ module.exports.deploy = async function (inputFile, gasPriceGwei, rpcUrl, dontSen
let privateKeyMerchant, accountMerchant, accountMerchantAddress;
let accountMultiSigAddress;

const controllerContractPath = path.join(__dirname, "../contracts/controller/");
const factoryContractPath = path.join(__dirname, "../contracts/factory/");
const tokenContractPath = path.join(__dirname, "../contracts/token/");
const utilsContractPath = path.join(__dirname, "../contracts/utils/");
const controllerContractPath = path.join(__dirname, "./contracts/controller/");
const factoryContractPath = path.join(__dirname, "./contracts/factory/");
const tokenContractPath = path.join(__dirname, "./contracts/token/");
const utilsContractPath = path.join(__dirname, "./contracts/utils/");
const tokenFileName = tokenName + '.sol';

const compilationInput = {
Expand All @@ -37,10 +37,10 @@ module.exports.deploy = async function (inputFile, gasPriceGwei, rpcUrl, dontSen
};

function findImports (_path) {
if(_path.includes("openzeppelin-solidity"))
if(_path.includes("openzeppelin-solidity"))
return { contents: fs.readFileSync("node_modules/" + _path, 'utf8') }
else
return { contents: fs.readFileSync(path.join(__dirname, "../contracts/", _path), 'utf8') }
return { contents: fs.readFileSync(path.join(__dirname, "./contracts/", _path), 'utf8') }
}

function sleep(ms){
Expand All @@ -53,7 +53,7 @@ module.exports.deploy = async function (inputFile, gasPriceGwei, rpcUrl, dontSen

let content = JSON.parse(fs.readFileSync(inputFile, 'utf8'));
privateKey = content["privateKey"]
privateKeyCustodian = content["privateKeyCustodian"]
privateKeyCustodian = content["privateKeyCustodian"]
privateKeyMerchant = content["privateKeyMerchant"]
accountMultiSigAddress = content["accountMultiSigAddress"]

Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit b0ffa83

Please sign in to comment.