This commit is contained in:
Roman Storm 2020-10-14 12:36:34 -07:00
parent 90cbde0840
commit ca1eb0d6cf
No known key found for this signature in database
GPG Key ID: 522F2A785F34E71F
6 changed files with 729560 additions and 122644 deletions

View File

@ -2,19 +2,19 @@
{ {
"inputs": [ "inputs": [
{ {
"internalType": "contract IRewardSwap", "internalType": "bytes32",
"name": "_rewardSwap", "name": "_rewardSwap",
"type": "address" "type": "bytes32"
}, },
{ {
"internalType": "address", "internalType": "bytes32",
"name": "_governance", "name": "_governance",
"type": "address" "type": "bytes32"
}, },
{ {
"internalType": "contract IVerifier[]", "internalType": "bytes32[3]",
"name": "verifiers", "name": "verifiers",
"type": "address[]" "type": "bytes32[3]"
}, },
{ {
"internalType": "bytes32", "internalType": "bytes32",
@ -44,7 +44,7 @@
"type": "uint256" "type": "uint256"
} }
], ],
"internalType": "struct Farm.Rate[]", "internalType": "struct Miner.Rate[]",
"name": "_rates", "name": "_rates",
"type": "tuple[]" "type": "tuple[]"
} }
@ -188,9 +188,22 @@
"name": "ACCOUNT_ROOT_HISTORY_SIZE", "name": "ACCOUNT_ROOT_HISTORY_SIZE",
"outputs": [ "outputs": [
{ {
"internalType": "uint32", "internalType": "uint256",
"name": "", "name": "",
"type": "uint32" "type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "accountCount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
} }
], ],
"stateMutability": "view", "stateMutability": "view",
@ -234,32 +247,6 @@
"stateMutability": "view", "stateMutability": "view",
"type": "function" "type": "function"
}, },
{
"inputs": [],
"name": "currentAccountIndex",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "currentAccountRootIndex",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{ {
"inputs": [], "inputs": [],
"name": "depositRoot", "name": "depositRoot",
@ -351,6 +338,25 @@
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"type": "function" "type": "function"
}, },
{
"inputs": [
{
"internalType": "bytes32",
"name": "node",
"type": "bytes32"
}
],
"name": "resolve",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{ {
"inputs": [ "inputs": [
{ {
@ -518,7 +524,7 @@
"type": "bytes" "type": "bytes"
} }
], ],
"internalType": "struct Farm.RewardExtData", "internalType": "struct Miner.RewardExtData",
"name": "extData", "name": "extData",
"type": "tuple" "type": "tuple"
}, },
@ -550,12 +556,12 @@
"type": "bytes32" "type": "bytes32"
} }
], ],
"internalType": "struct Farm.AccountUpdate", "internalType": "struct Miner.AccountUpdate",
"name": "account", "name": "account",
"type": "tuple" "type": "tuple"
} }
], ],
"internalType": "struct Farm.RewardArgs", "internalType": "struct Miner.RewardArgs",
"name": "_args", "name": "_args",
"type": "tuple" "type": "tuple"
}, },
@ -587,7 +593,7 @@
"type": "uint256" "type": "uint256"
} }
], ],
"internalType": "struct Farm.TreeUpdateArgs", "internalType": "struct Miner.TreeUpdateArgs",
"name": "_treeUpdateArgs", "name": "_treeUpdateArgs",
"type": "tuple" "type": "tuple"
} }
@ -654,7 +660,7 @@
"type": "bytes" "type": "bytes"
} }
], ],
"internalType": "struct Farm.RewardExtData", "internalType": "struct Miner.RewardExtData",
"name": "extData", "name": "extData",
"type": "tuple" "type": "tuple"
}, },
@ -686,12 +692,12 @@
"type": "bytes32" "type": "bytes32"
} }
], ],
"internalType": "struct Farm.AccountUpdate", "internalType": "struct Miner.AccountUpdate",
"name": "account", "name": "account",
"type": "tuple" "type": "tuple"
} }
], ],
"internalType": "struct Farm.RewardArgs", "internalType": "struct Miner.RewardArgs",
"name": "_args", "name": "_args",
"type": "tuple" "type": "tuple"
} }
@ -715,11 +721,6 @@
"name": "amount", "name": "amount",
"type": "uint256" "type": "uint256"
}, },
{
"internalType": "uint256",
"name": "fee",
"type": "uint256"
},
{ {
"internalType": "bytes32", "internalType": "bytes32",
"name": "extDataHash", "name": "extDataHash",
@ -727,6 +728,11 @@
}, },
{ {
"components": [ "components": [
{
"internalType": "uint256",
"name": "fee",
"type": "uint256"
},
{ {
"internalType": "address", "internalType": "address",
"name": "recipient", "name": "recipient",
@ -743,7 +749,7 @@
"type": "bytes" "type": "bytes"
} }
], ],
"internalType": "struct Farm.WithdrawExtData", "internalType": "struct Miner.WithdrawExtData",
"name": "extData", "name": "extData",
"type": "tuple" "type": "tuple"
}, },
@ -775,12 +781,12 @@
"type": "bytes32" "type": "bytes32"
} }
], ],
"internalType": "struct Farm.AccountUpdate", "internalType": "struct Miner.AccountUpdate",
"name": "account", "name": "account",
"type": "tuple" "type": "tuple"
} }
], ],
"internalType": "struct Farm.WithdrawArgs", "internalType": "struct Miner.WithdrawArgs",
"name": "_args", "name": "_args",
"type": "tuple" "type": "tuple"
} }
@ -804,11 +810,6 @@
"name": "amount", "name": "amount",
"type": "uint256" "type": "uint256"
}, },
{
"internalType": "uint256",
"name": "fee",
"type": "uint256"
},
{ {
"internalType": "bytes32", "internalType": "bytes32",
"name": "extDataHash", "name": "extDataHash",
@ -816,6 +817,11 @@
}, },
{ {
"components": [ "components": [
{
"internalType": "uint256",
"name": "fee",
"type": "uint256"
},
{ {
"internalType": "address", "internalType": "address",
"name": "recipient", "name": "recipient",
@ -832,7 +838,7 @@
"type": "bytes" "type": "bytes"
} }
], ],
"internalType": "struct Farm.WithdrawExtData", "internalType": "struct Miner.WithdrawExtData",
"name": "extData", "name": "extData",
"type": "tuple" "type": "tuple"
}, },
@ -864,12 +870,12 @@
"type": "bytes32" "type": "bytes32"
} }
], ],
"internalType": "struct Farm.AccountUpdate", "internalType": "struct Miner.AccountUpdate",
"name": "account", "name": "account",
"type": "tuple" "type": "tuple"
} }
], ],
"internalType": "struct Farm.WithdrawArgs", "internalType": "struct Miner.WithdrawArgs",
"name": "_args", "name": "_args",
"type": "tuple" "type": "tuple"
}, },
@ -901,7 +907,7 @@
"type": "uint256" "type": "uint256"
} }
], ],
"internalType": "struct Farm.TreeUpdateArgs", "internalType": "struct Miner.TreeUpdateArgs",
"name": "_treeUpdateArgs", "name": "_treeUpdateArgs",
"type": "tuple" "type": "tuple"
} }
@ -946,7 +952,7 @@
"type": "uint256" "type": "uint256"
} }
], ],
"internalType": "struct Farm.TreeLeaf[]", "internalType": "struct Miner.TreeLeaf[]",
"name": "_deposits", "name": "_deposits",
"type": "tuple[]" "type": "tuple[]"
}, },
@ -983,7 +989,7 @@
"type": "uint256" "type": "uint256"
} }
], ],
"internalType": "struct Farm.TreeLeaf[]", "internalType": "struct Miner.TreeLeaf[]",
"name": "_withdrawals", "name": "_withdrawals",
"type": "tuple[]" "type": "tuple[]"
} }
@ -1008,7 +1014,7 @@
"type": "uint256" "type": "uint256"
} }
], ],
"internalType": "struct Farm.Rate[]", "internalType": "struct Miner.Rate[]",
"name": "_rates", "name": "_rates",
"type": "tuple[]" "type": "tuple[]"
} }
@ -1031,31 +1037,17 @@
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"type": "function" "type": "function"
}, },
{
"inputs": [
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"name": "keccak252",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "pure",
"type": "function"
},
{ {
"inputs": [ "inputs": [
{ {
"internalType": "bytes32", "internalType": "bytes32",
"name": "_root", "name": "_root",
"type": "bytes32" "type": "bytes32"
},
{
"internalType": "uint256",
"name": "index",
"type": "uint256"
} }
], ],
"name": "isKnownAccountRoot", "name": "isKnownAccountRoot",

View File

@ -2,9 +2,14 @@
{ {
"inputs": [ "inputs": [
{ {
"internalType": "address", "internalType": "bytes32",
"name": "_torn", "name": "_torn",
"type": "address" "type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_miner",
"type": "bytes32"
}, },
{ {
"internalType": "uint256", "internalType": "uint256",
@ -69,8 +74,7 @@
} }
], ],
"stateMutability": "view", "stateMutability": "view",
"type": "function", "type": "function"
"constant": true
}, },
{ {
"inputs": [], "inputs": [],
@ -83,8 +87,7 @@
} }
], ],
"stateMutability": "view", "stateMutability": "view",
"type": "function", "type": "function"
"constant": true
}, },
{ {
"inputs": [], "inputs": [],
@ -97,8 +100,7 @@
} }
], ],
"stateMutability": "view", "stateMutability": "view",
"type": "function", "type": "function"
"constant": true
}, },
{ {
"inputs": [], "inputs": [],
@ -111,8 +113,7 @@
} }
], ],
"stateMutability": "view", "stateMutability": "view",
"type": "function", "type": "function"
"constant": true
}, },
{ {
"inputs": [], "inputs": [],
@ -125,8 +126,26 @@
} }
], ],
"stateMutability": "view", "stateMutability": "view",
"type": "function", "type": "function"
"constant": true },
{
"inputs": [
{
"internalType": "bytes32",
"name": "node",
"type": "bytes32"
}
],
"name": "resolve",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}, },
{ {
"inputs": [], "inputs": [],
@ -139,8 +158,7 @@
} }
], ],
"stateMutability": "view", "stateMutability": "view",
"type": "function", "type": "function"
"constant": true
}, },
{ {
"inputs": [], "inputs": [],
@ -153,8 +171,7 @@
} }
], ],
"stateMutability": "view", "stateMutability": "view",
"type": "function", "type": "function"
"constant": true
}, },
{ {
"inputs": [], "inputs": [],
@ -167,20 +184,6 @@
} }
], ],
"stateMutability": "view", "stateMutability": "view",
"type": "function",
"constant": true
},
{
"inputs": [
{
"internalType": "address",
"name": "_miner",
"type": "address"
}
],
"name": "init",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function" "type": "function"
}, },
{ {
@ -218,8 +221,7 @@
} }
], ],
"stateMutability": "view", "stateMutability": "view",
"type": "function", "type": "function"
"constant": true
}, },
{ {
"inputs": [], "inputs": [],
@ -232,8 +234,7 @@
} }
], ],
"stateMutability": "view", "stateMutability": "view",
"type": "function", "type": "function"
"constant": true
}, },
{ {
"inputs": [ "inputs": [

View File

@ -6,7 +6,7 @@ services:
restart: always restart: always
command: server command: server
env_file: .env env_file: .env
expose: [ 8000 ] expose: [8000]
environment: environment:
VIRTUAL_HOST: example.duckdns.org VIRTUAL_HOST: example.duckdns.org
LETSENCRYPT_HOST: example.duckdns.org LETSENCRYPT_HOST: example.duckdns.org
@ -15,10 +15,18 @@ services:
depends_on: depends_on:
- redis - redis
tree-monitor: treeWatcher:
image: tornadocash/relayer image: tornadocash/relayer
restart: always restart: always
command: tree-monitor command: treeWatcher
env_file: .env
environment:
REDIS_URL: redis://redis/0
priceWatcher:
image: tornadocash/relayer
restart: always
command: priceWatcher
env_file: .env env_file: .env
environment: environment:
REDIS_URL: redis://redis/0 REDIS_URL: redis://redis/0
@ -31,14 +39,14 @@ services:
environment: environment:
REDIS_URL: redis://redis/0 REDIS_URL: redis://redis/0
# worker2: # worker2:
# image: tornadocash/relayer # image: tornadocash/relayer
# restart: always # restart: always
# command: worker # command: worker
# env_file: .env # env_file: .env
# environment: # environment:
# PRIVATE_KEY: qwe # PRIVATE_KEY: qwe
# REDIS_URL: redis://redis/0 # REDIS_URL: redis://redis/0
redis: redis:
image: redis image: redis

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -9,9 +9,9 @@ module.exports = {
wsRpcUrl: process.env.WS_RPC_URL, wsRpcUrl: process.env.WS_RPC_URL,
oracleRpcUrl: process.env.ORACLE_RPC_URL || 'https://mainnet.infura.io/', oracleRpcUrl: process.env.ORACLE_RPC_URL || 'https://mainnet.infura.io/',
oracleAddress: '0xA2b8E7ee7c8a18ea561A5CF7C9C365592026E374', oracleAddress: '0xA2b8E7ee7c8a18ea561A5CF7C9C365592026E374',
minerAddress: '0x96c7B5c39542bae92b3cD39392a81De514c6E698', // each network has its own instance minerAddress: '0xB28038Cd60777aF2264F46C0009dC57975239B11', // each network has its own instance
swapAddress: '0xFc82977BfAEBE93486Ac42ac7c8Ea1043f9a3500', swapAddress: '0xec236719BEbfC1D303739FbE11Bf3a42aF1A41f4',
minerMerkleTreeHeight: 10, minerMerkleTreeHeight: 20,
privateKey: process.env.PRIVATE_KEY, privateKey: process.env.PRIVATE_KEY,
instances: require('torn-token').instances, instances: require('torn-token').instances,
port: process.env.APP_PORT || 8000, port: process.env.APP_PORT || 8000,