This repository has been archived by the owner on Oct 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
3,155 additions
and
2,121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,4 +32,4 @@ ppa/metronome-desktop-walle* | |
.eslintcache | ||
|
||
# Certificates | ||
*.p12 | ||
*.p12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,3 +34,5 @@ for: | |
build_script: | ||
- npm run env | ||
- npm run release | ||
|
||
skip_tags: true |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
patch-package | ||
--- a/node_modules/web3-eth/src/index.js | ||
+++ b/node_modules/web3-eth/src/index.js | ||
@@ -368,6 +368,12 @@ var Eth = function Eth() { | ||
inputFormatter: [formatter.inputLogFormatter], | ||
outputFormatter: formatter.outputLogFormatter | ||
}), | ||
+ new Method({ | ||
+ name: 'getChainId', | ||
+ call: 'eth_chainId', | ||
+ params: 0, | ||
+ outputFormatter: utils.hexToNumber | ||
+ }), | ||
|
||
// subscriptions | ||
new Subscriptions({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,34 @@ | ||
patch-package | ||
--- a/node_modules/web3-eth-accounts/node_modules/eth-lib/lib/bytes.js | ||
+++ b/node_modules/web3-eth-accounts/node_modules/eth-lib/lib/bytes.js | ||
@@ -6,7 +6,7 @@ var at = function at(bytes, index) { | ||
|
||
var random = function random(bytes) { | ||
var rnd = void 0; | ||
- if (typeof window !== "undefined" && window.crypto && window.crypto.getRandomValues) rnd = window.crypto.getRandomValues(new Uint8Array(bytes));else if (typeof require !== "undefined") rnd = require("c" + "rypto").randomBytes(bytes);else throw "Safe random numbers not available."; | ||
+ if (typeof window !== "undefined" && window.crypto && window.crypto.getRandomValues) rnd = window.crypto.getRandomValues(new Uint8Array(bytes));else if (typeof require !== "undefined") rnd = require("crypto").randomBytes(bytes);else throw "Safe random numbers not available."; | ||
var hex = "0x"; | ||
for (var i = 0; i < bytes; ++i) { | ||
hex += ("00" + rnd[i].toString(16)).slice(-2); | ||
--- a/node_modules/web3-eth-accounts/src/index.js | ||
+++ b/node_modules/web3-eth-accounts/src/index.js | ||
@@ -69,7 +69,7 @@ var Accounts = function Accounts() { | ||
@@ -68,8 +68,8 @@ var Accounts = function Accounts() { | ||
|
||
var _ethereumCall = [ | ||
new Method({ | ||
name: 'getId', | ||
- name: 'getId', | ||
- call: 'net_version', | ||
+ name: 'getChainId', | ||
+ call: 'eth_chainId', | ||
params: 0, | ||
outputFormatter: utils.hexToNumber | ||
}), | ||
@@ -220,7 +220,7 @@ Accounts.prototype.signTransaction = function signTransaction(tx, privateKey, ca | ||
|
||
// Otherwise, get the missing info from the Ethereum Node | ||
return Promise.all([ | ||
- isNot(tx.chainId) ? _this._ethereumCall.getId() : tx.chainId, | ||
+ isNot(tx.chainId) ? _this._ethereumCall.getChainId() : tx.chainId, | ||
isNot(tx.gasPrice) ? _this._ethereumCall.getGasPrice() : tx.gasPrice, | ||
isNot(tx.nonce) ? _this._ethereumCall.getTransactionCount(_this.privateKeyToAccount(privateKey).address) : tx.nonce | ||
]).then(function (args) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
patch-package | ||
--- a/node_modules/web3-utils/src/index.js | ||
+++ b/node_modules/web3-utils/src/index.js | ||
@@ -225,7 +225,7 @@ var getUnitValue = function (unit) { | ||
* | ||
* @method fromWei | ||
* @param {Number|String} number can be a number, number string or a HEX of a decimal | ||
- * @param {String} unit the unit to convert to, default ether | ||
+ * @param {String} [unit] the unit to convert to, default ether | ||
* @return {String|Object} When given a BN object it returns one as well, otherwise a number | ||
*/ | ||
var fromWei = function(number, unit) { | ||
@@ -257,7 +257,7 @@ var fromWei = function(number, unit) { | ||
* | ||
* @method toWei | ||
* @param {Number|String|BN} number can be a number, number string or a HEX of a decimal | ||
- * @param {String} unit the unit to convert from, default ether | ||
+ * @param {String} [unit] the unit to convert from, default ether | ||
* @return {String|Object} When given a BN object it returns one as well, otherwise a number | ||
*/ | ||
var toWei = function(number, unit) { | ||
--- a/node_modules/web3-utils/src/utils.js | ||
+++ b/node_modules/web3-utils/src/utils.js | ||
@@ -320,7 +320,7 @@ var hexToBytes = function(hex) { | ||
* | ||
* @method toHex | ||
* @param {String|Number|BN|Object} value | ||
- * @param {Boolean} returnType | ||
+ * @param {Boolean} [returnType] | ||
* @return {String} | ||
*/ | ||
var toHex = function (value, returnType) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
'use strict' | ||
|
||
const MetronomeContracts = require('metronome-contracts') | ||
const contracts = MetronomeContracts['classic'] | ||
|
||
module.exports = { | ||
displayName: 'Ethereum Classic', | ||
chainId: 61, | ||
symbol: 'ETC', | ||
|
||
// contracts addresses | ||
tokenPorterAddress: contracts.TokenPorter.address, | ||
converterAddress: contracts.AutonomousConverter.address, | ||
validatorAddress: contracts.Validator.address, | ||
metTokenAddress: contracts.METToken.address, | ||
auctionAddress: contracts.Auctions.address, | ||
|
||
// urls | ||
explorerUrl: 'https://blockscout.com/etc/mainnet/tx/{{hash}}/internal_transactions', | ||
indexerUrl: 'https://etc.indexer.metronome.io', | ||
metApiUrl: 'https://etc.api.metronome.io/', | ||
wsApiUrl: 'wss://etc.wallet.metronome.io:8546', | ||
|
||
// defauls | ||
coinDefaultGasLimit: '21000', | ||
metDefaultGasLimit: '250000', | ||
defaultGasPrice: '10000000000', | ||
maxGasPrice: '200000000000000000' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.