mirror of
https://github.com/tornadocash/tornado-core.git
synced 2024-11-22 09:47:13 +01:00
ether sending
This commit is contained in:
parent
bc8d0b20fc
commit
e6cce0c7ce
@ -39,7 +39,7 @@ contract ERC20Mixer is Mixer {
|
|||||||
_safeErc20Transfer(_relayer, _fee);
|
_safeErc20Transfer(_relayer, _fee);
|
||||||
}
|
}
|
||||||
if (_refund > 0) {
|
if (_refund > 0) {
|
||||||
_recipient.transfer(_refund);
|
_recipient.call.value(_refund)("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,9 +31,11 @@ contract ETHMixer is Mixer {
|
|||||||
require(msg.value == 0, "Message value is supposed to be zero for ETH mixer");
|
require(msg.value == 0, "Message value is supposed to be zero for ETH mixer");
|
||||||
require(_refund == 0, "Refund value is supposed to be zero for ETH mixer");
|
require(_refund == 0, "Refund value is supposed to be zero for ETH mixer");
|
||||||
|
|
||||||
_recipient.transfer(denomination - _fee);
|
(bool success, ) = _recipient.call.value(denomination - _fee)("");
|
||||||
|
require(success, "payment to _recipient did not go thru");
|
||||||
if (_fee > 0) {
|
if (_fee > 0) {
|
||||||
_relayer.transfer(_fee);
|
(success, ) = _relayer.call.value(_fee)("");
|
||||||
|
require(success, "payment to _relayer did not go thru");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
107
package-lock.json
generated
107
package-lock.json
generated
@ -1680,6 +1680,113 @@
|
|||||||
"snarkjs": "^0.1.20",
|
"snarkjs": "^0.1.20",
|
||||||
"typedarray-to-buffer": "^3.1.5",
|
"typedarray-to-buffer": "^3.1.5",
|
||||||
"web3": "^1.0.0-beta.55"
|
"web3": "^1.0.0-beta.55"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"ansi-regex": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
|
||||||
|
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg="
|
||||||
|
},
|
||||||
|
"ansi-styles": {
|
||||||
|
"version": "3.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
|
||||||
|
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
|
||||||
|
"requires": {
|
||||||
|
"color-convert": "^1.9.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"chalk": {
|
||||||
|
"version": "2.4.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
|
||||||
|
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
|
||||||
|
"requires": {
|
||||||
|
"ansi-styles": "^3.2.1",
|
||||||
|
"escape-string-regexp": "^1.0.5",
|
||||||
|
"supports-color": "^5.3.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"eslint": {
|
||||||
|
"version": "5.16.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz",
|
||||||
|
"integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==",
|
||||||
|
"requires": {
|
||||||
|
"@babel/code-frame": "^7.0.0",
|
||||||
|
"ajv": "^6.9.1",
|
||||||
|
"chalk": "^2.1.0",
|
||||||
|
"cross-spawn": "^6.0.5",
|
||||||
|
"debug": "^4.0.1",
|
||||||
|
"doctrine": "^3.0.0",
|
||||||
|
"eslint-scope": "^4.0.3",
|
||||||
|
"eslint-utils": "^1.3.1",
|
||||||
|
"eslint-visitor-keys": "^1.0.0",
|
||||||
|
"espree": "^5.0.1",
|
||||||
|
"esquery": "^1.0.1",
|
||||||
|
"esutils": "^2.0.2",
|
||||||
|
"file-entry-cache": "^5.0.1",
|
||||||
|
"functional-red-black-tree": "^1.0.1",
|
||||||
|
"glob": "^7.1.2",
|
||||||
|
"globals": "^11.7.0",
|
||||||
|
"ignore": "^4.0.6",
|
||||||
|
"import-fresh": "^3.0.0",
|
||||||
|
"imurmurhash": "^0.1.4",
|
||||||
|
"inquirer": "^6.2.2",
|
||||||
|
"js-yaml": "^3.13.0",
|
||||||
|
"json-stable-stringify-without-jsonify": "^1.0.1",
|
||||||
|
"levn": "^0.3.0",
|
||||||
|
"lodash": "^4.17.11",
|
||||||
|
"minimatch": "^3.0.4",
|
||||||
|
"mkdirp": "^0.5.1",
|
||||||
|
"natural-compare": "^1.4.0",
|
||||||
|
"optionator": "^0.8.2",
|
||||||
|
"path-is-inside": "^1.0.2",
|
||||||
|
"progress": "^2.0.0",
|
||||||
|
"regexpp": "^2.0.1",
|
||||||
|
"semver": "^5.5.1",
|
||||||
|
"strip-ansi": "^4.0.0",
|
||||||
|
"strip-json-comments": "^2.0.1",
|
||||||
|
"table": "^5.2.3",
|
||||||
|
"text-table": "^0.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"globals": {
|
||||||
|
"version": "11.12.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
|
||||||
|
"integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA=="
|
||||||
|
},
|
||||||
|
"semver": {
|
||||||
|
"version": "5.7.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||||
|
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
|
||||||
|
},
|
||||||
|
"snarkjs": {
|
||||||
|
"version": "0.1.20",
|
||||||
|
"resolved": "https://registry.npmjs.org/snarkjs/-/snarkjs-0.1.20.tgz",
|
||||||
|
"integrity": "sha512-tYmWiVm1sZiB44aIh5w/3HUaTntTUC4fv+CWs4rR0gfkt2KbHTpArOqZW++/Lxujrn9IypXVhdKVUr/eE6Hxfg==",
|
||||||
|
"requires": {
|
||||||
|
"big-integer": "^1.6.43",
|
||||||
|
"chai": "^4.2.0",
|
||||||
|
"escape-string-regexp": "^1.0.5",
|
||||||
|
"eslint": "^5.16.0",
|
||||||
|
"keccak": "^2.0.0",
|
||||||
|
"yargs": "^12.0.5"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"strip-ansi": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
|
||||||
|
"integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
|
||||||
|
"requires": {
|
||||||
|
"ansi-regex": "^3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"supports-color": {
|
||||||
|
"version": "5.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
||||||
|
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
|
||||||
|
"requires": {
|
||||||
|
"has-flag": "^3.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"cli-cursor": {
|
"cli-cursor": {
|
||||||
|
Loading…
Reference in New Issue
Block a user