mirror of
https://github.com/tornadocash/tornado-core.git
synced 2025-04-05 05:27:24 -04:00
Make final changes
- Update cli.js for the new relayer - Update .env example - Add migrated clients
This commit is contained in:
parent
f27140be02
commit
2392fba1b7
.env.examplecli.js
client/contracts
BadRecipient.jsonContext.jsonERC20.jsonERC20Basic.jsonERC20Detailed.jsonERC20Mintable.jsonERC20Mock.jsonERC20Tornado.jsonETHTornado.jsonHasher.jsonIERC20.jsonIUSDT.jsonIVerifier.jsonMerkleTreeWithHistory.jsonMerkleTreeWithHistoryMock.jsonMigrations.jsonMinterRole.jsonPairing.jsonReentrancyGuard.jsonRoles.jsonSafeMath.jsonTornado.jsonVerifier.json
truffle-config.js
12
.env.example
12
.env.example
@ -4,12 +4,8 @@ ETH_AMOUNT=100000000000000000
|
||||
TOKEN_AMOUNT=100000000000000000
|
||||
PRIVATE_KEY=
|
||||
ERC20_TOKEN=
|
||||
# RPC_URL=https://explorer.celo.org
|
||||
# RPC_URL=https://alfajores-forno.celo-testnet.org
|
||||
|
||||
# DAI mirror in Kovan
|
||||
#ERC20_TOKEN=0xd2b1a6b34f4a68425e7c28b4db5a37be3b7a4947
|
||||
# the block when 0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1 has some DAI is 13146218
|
||||
|
||||
# USDT mirror in Kovan
|
||||
#ERC20_TOKEN=0xf3e0d7bf58c5d455d31ef1c2d5375904df525105
|
||||
#TOKEN_AMOUNT=1000000
|
||||
# the block when 0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1 has some USDT is 13147586
|
||||
# CELO on Alfajores
|
||||
# ERC20_TOKEN=0xf194afdf50b03e69bd7d057c1aa9e10c9954e4c9
|
||||
|
24
cli.js
24
cli.js
@ -145,7 +145,7 @@ async function generateMerkleProof(deposit) {
|
||||
* @param fee Relayer fee
|
||||
* @param refund Receive ether for exchanged tokens
|
||||
*/
|
||||
async function generateProof({deposit, recipient, relayerAddress = 0, fee = 0, refund = 0}) {
|
||||
async function generateProof({deposit, recipient, rewardAccount = 0, fee = 0, refund = 0}) {
|
||||
// Compute merkle proof of our commitment
|
||||
const {root, path_elements, path_index} = await generateMerkleProof(deposit)
|
||||
|
||||
@ -155,7 +155,7 @@ async function generateProof({deposit, recipient, relayerAddress = 0, fee = 0, r
|
||||
root: root,
|
||||
nullifierHash: deposit.nullifierHash,
|
||||
recipient: bigInt(recipient),
|
||||
relayer: bigInt(relayerAddress),
|
||||
relayer: bigInt(rewardAccount),
|
||||
fee: bigInt(fee),
|
||||
refund: bigInt(refund),
|
||||
|
||||
@ -199,16 +199,16 @@ async function withdraw({deposit, currency, amount, recipient, relayerURL, refun
|
||||
throw new Error('ENS name resolving is not supported. Please provide DNS name of the relayer. See instuctions in README.md')
|
||||
}
|
||||
const relayerStatus = await axios.get(relayerURL + '/status')
|
||||
const {relayerAddress, netId, gasPrices, ethPrices, relayerServiceFee} = relayerStatus.data
|
||||
const {rewardAccount, netId, gasPrices, celoPrices, tornadoServiceFee} = relayerStatus.data
|
||||
assert(netId === await web3.eth.net.getId() || netId === '*', 'This relay is for different network')
|
||||
console.log('Relay address: ', relayerAddress)
|
||||
console.log('Reward address:', rewardAccount)
|
||||
|
||||
const decimals = isLocalRPC ? 18 : config.deployments[`netId${netId}`][currency].decimals
|
||||
const fee = calculateFee({gasPrices, currency, amount, refund, ethPrices, relayerServiceFee, decimals})
|
||||
const fee = calculateFee({gasPrices, currency, amount, refund, celoPrices, tornadoServiceFee, decimals})
|
||||
if (fee.gt(fromDecimals({amount, decimals}))) {
|
||||
throw new Error('Too high refund')
|
||||
}
|
||||
const {proof, args} = await generateProof({deposit, recipient, relayerAddress, fee, refund})
|
||||
const {proof, args} = await generateProof({deposit, recipient, rewardAccount, fee, refund})
|
||||
|
||||
console.log('Sending withdraw transaction through relay')
|
||||
try {
|
||||
@ -346,14 +346,14 @@ function getCurrentNetworkName() {
|
||||
|
||||
}
|
||||
|
||||
function calculateFee({gasPrices, currency, amount, refund, ethPrices, relayerServiceFee, decimals}) {
|
||||
const decimalsPoint = Math.floor(relayerServiceFee) === Number(relayerServiceFee) ?
|
||||
function calculateFee({gasPrices, currency, amount, refund, celoPrices, tornadoServiceFee, decimals}) {
|
||||
const decimalsPoint = Math.floor(tornadoServiceFee) === Number(tornadoServiceFee) ?
|
||||
0 :
|
||||
relayerServiceFee.toString().split('.')[1].length
|
||||
tornadoServiceFee.toString().split('.')[1].length
|
||||
const roundDecimal = 10 ** decimalsPoint
|
||||
const total = toBN(fromDecimals({amount, decimals}))
|
||||
const feePercent = total.mul(toBN(relayerServiceFee * roundDecimal)).div(toBN(roundDecimal * 100))
|
||||
const expense = toBN(toWei(gasPrices.fast.toString(), 'gwei')).mul(toBN(5e5))
|
||||
const feePercent = total.mul(toBN(tornadoServiceFee * roundDecimal)).div(toBN(roundDecimal * 100))
|
||||
const expense = toBN(toWei(gasPrices[1.3].toString(), 'gwei')).mul(toBN(5e5))
|
||||
let desiredFee
|
||||
switch (currency) {
|
||||
case 'celo': {
|
||||
@ -363,7 +363,7 @@ function calculateFee({gasPrices, currency, amount, refund, ethPrices, relayerSe
|
||||
default: {
|
||||
desiredFee = expense.add(toBN(refund))
|
||||
.mul(toBN(10 ** decimals))
|
||||
.div(toBN(ethPrices[currency]))
|
||||
.div(toBN(celoPrices[currency]))
|
||||
desiredFee = desiredFee.add(feePercent)
|
||||
break
|
||||
}
|
||||
|
374
client/contracts/BadRecipient.json
Normal file
374
client/contracts/BadRecipient.json
Normal file
@ -0,0 +1,374 @@
|
||||
{
|
||||
"contractName": "BadRecipient",
|
||||
"abi": [
|
||||
{
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "fallback"
|
||||
}
|
||||
],
|
||||
"metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"fallback\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/brianli/dotfiles/tornado-core/contracts/Mocks/BadRecipient.sol\":\"BadRecipient\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/brianli/dotfiles/tornado-core/contracts/Mocks/BadRecipient.sol\":{\"keccak256\":\"0x0329be02a9fec6e4fbd93d8c98887acd5d46bb09af18298232fc2fe72838ca03\",\"urls\":[\"bzz-raw://c4670e578c58b2326efebcba1a2dd2ee0bf6d70c26f84cdaa3e81f67bd0e360d\",\"dweb:/ipfs/QmbVoxKmmrWzjdnLfJkxhWe6UyjrpCFYjMxRP6uRCfGi7r\"]}},\"version\":1}",
|
||||
"bytecode": "0x6080604052348015600f57600080fd5b50609c80601d6000396000f3fe6080604052348015600f57600080fd5b5060405162461bcd60e51b815260040180806020018281038252602181526020018060476021913960400191505060405180910390fdfe7468697320636f6e747261637420646f6573206e6f742061636365707420455448a265627a7a723158206626eee46135a11b00680288c5ee8c30dfbb35f740cb59e3c43a3c6e983a8cb764736f6c63430005110032",
|
||||
"deployedBytecode": "0x6080604052348015600f57600080fd5b5060405162461bcd60e51b815260040180806020018281038252602181526020018060476021913960400191505060405180910390fdfe7468697320636f6e747261637420646f6573206e6f742061636365707420455448a265627a7a723158206626eee46135a11b00680288c5ee8c30dfbb35f740cb59e3c43a3c6e983a8cb764736f6c63430005110032",
|
||||
"sourceMap": "25:110:4:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;25:110:4;;;;;;;",
|
||||
"deployedSourceMap": "25:110:4:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;77:51:4;;-1:-1:-1;;;77:51:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
|
||||
"source": "pragma solidity ^0.5.0;\n\ncontract BadRecipient {\n function() external {\n require(false, \"this contract does not accept ETH\");\n }\n}\n",
|
||||
"sourcePath": "/Users/brianli/dotfiles/tornado-core/contracts/Mocks/BadRecipient.sol",
|
||||
"ast": {
|
||||
"absolutePath": "/Users/brianli/dotfiles/tornado-core/contracts/Mocks/BadRecipient.sol",
|
||||
"exportedSymbols": {
|
||||
"BadRecipient": [
|
||||
763
|
||||
]
|
||||
},
|
||||
"id": 764,
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 753,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"^",
|
||||
"0.5",
|
||||
".0"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "0:23:4"
|
||||
},
|
||||
{
|
||||
"baseContracts": [],
|
||||
"contractDependencies": [],
|
||||
"contractKind": "contract",
|
||||
"documentation": null,
|
||||
"fullyImplemented": true,
|
||||
"id": 763,
|
||||
"linearizedBaseContracts": [
|
||||
763
|
||||
],
|
||||
"name": "BadRecipient",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": {
|
||||
"id": 761,
|
||||
"nodeType": "Block",
|
||||
"src": "71:62:4",
|
||||
"statements": [
|
||||
{
|
||||
"expression": {
|
||||
"argumentTypes": null,
|
||||
"arguments": [
|
||||
{
|
||||
"argumentTypes": null,
|
||||
"hexValue": "66616c7365",
|
||||
"id": 757,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": true,
|
||||
"kind": "bool",
|
||||
"lValueRequested": false,
|
||||
"nodeType": "Literal",
|
||||
"src": "85:5:4",
|
||||
"subdenomination": null,
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bool",
|
||||
"typeString": "bool"
|
||||
},
|
||||
"value": "false"
|
||||
},
|
||||
{
|
||||
"argumentTypes": null,
|
||||
"hexValue": "7468697320636f6e747261637420646f6573206e6f742061636365707420455448",
|
||||
"id": 758,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": true,
|
||||
"kind": "string",
|
||||
"lValueRequested": false,
|
||||
"nodeType": "Literal",
|
||||
"src": "92:35:4",
|
||||
"subdenomination": null,
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_stringliteral_a3dfa67cd4d104a688bb8ad9f6858d9a8fecb15cbae3a5d0cd6923d5d60a93c8",
|
||||
"typeString": "literal_string \"this contract does not accept ETH\""
|
||||
},
|
||||
"value": "this contract does not accept ETH"
|
||||
}
|
||||
],
|
||||
"expression": {
|
||||
"argumentTypes": [
|
||||
{
|
||||
"typeIdentifier": "t_bool",
|
||||
"typeString": "bool"
|
||||
},
|
||||
{
|
||||
"typeIdentifier": "t_stringliteral_a3dfa67cd4d104a688bb8ad9f6858d9a8fecb15cbae3a5d0cd6923d5d60a93c8",
|
||||
"typeString": "literal_string \"this contract does not accept ETH\""
|
||||
}
|
||||
],
|
||||
"id": 756,
|
||||
"name": "require",
|
||||
"nodeType": "Identifier",
|
||||
"overloadedDeclarations": [
|
||||
3263,
|
||||
3264
|
||||
],
|
||||
"referencedDeclaration": 3264,
|
||||
"src": "77:7:4",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
||||
"typeString": "function (bool,string memory) pure"
|
||||
}
|
||||
},
|
||||
"id": 759,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": false,
|
||||
"kind": "functionCall",
|
||||
"lValueRequested": false,
|
||||
"names": [],
|
||||
"nodeType": "FunctionCall",
|
||||
"src": "77:51:4",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_tuple$__$",
|
||||
"typeString": "tuple()"
|
||||
}
|
||||
},
|
||||
"id": 760,
|
||||
"nodeType": "ExpressionStatement",
|
||||
"src": "77:51:4"
|
||||
}
|
||||
]
|
||||
},
|
||||
"documentation": null,
|
||||
"id": 762,
|
||||
"implemented": true,
|
||||
"kind": "fallback",
|
||||
"modifiers": [],
|
||||
"name": "",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"parameters": {
|
||||
"id": 754,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "59:2:4"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 755,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "71:0:4"
|
||||
},
|
||||
"scope": 763,
|
||||
"src": "51:82:4",
|
||||
"stateMutability": "nonpayable",
|
||||
"superFunction": null,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 764,
|
||||
"src": "25:110:4"
|
||||
}
|
||||
],
|
||||
"src": "0:136:4"
|
||||
},
|
||||
"legacyAST": {
|
||||
"attributes": {
|
||||
"absolutePath": "/Users/brianli/dotfiles/tornado-core/contracts/Mocks/BadRecipient.sol",
|
||||
"exportedSymbols": {
|
||||
"BadRecipient": [
|
||||
763
|
||||
]
|
||||
}
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"literals": [
|
||||
"solidity",
|
||||
"^",
|
||||
"0.5",
|
||||
".0"
|
||||
]
|
||||
},
|
||||
"id": 753,
|
||||
"name": "PragmaDirective",
|
||||
"src": "0:23:4"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"baseContracts": [
|
||||
null
|
||||
],
|
||||
"contractDependencies": [
|
||||
null
|
||||
],
|
||||
"contractKind": "contract",
|
||||
"documentation": null,
|
||||
"fullyImplemented": true,
|
||||
"linearizedBaseContracts": [
|
||||
763
|
||||
],
|
||||
"name": "BadRecipient",
|
||||
"scope": 764
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"documentation": null,
|
||||
"implemented": true,
|
||||
"isConstructor": false,
|
||||
"kind": "fallback",
|
||||
"modifiers": [
|
||||
null
|
||||
],
|
||||
"name": "",
|
||||
"scope": 763,
|
||||
"stateMutability": "nonpayable",
|
||||
"superFunction": null,
|
||||
"visibility": "external"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"parameters": [
|
||||
null
|
||||
]
|
||||
},
|
||||
"children": [],
|
||||
"id": 754,
|
||||
"name": "ParameterList",
|
||||
"src": "59:2:4"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"parameters": [
|
||||
null
|
||||
]
|
||||
},
|
||||
"children": [],
|
||||
"id": 755,
|
||||
"name": "ParameterList",
|
||||
"src": "71:0:4"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"argumentTypes": null,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": false,
|
||||
"isStructConstructorCall": false,
|
||||
"lValueRequested": false,
|
||||
"names": [
|
||||
null
|
||||
],
|
||||
"type": "tuple()",
|
||||
"type_conversion": false
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"argumentTypes": [
|
||||
{
|
||||
"typeIdentifier": "t_bool",
|
||||
"typeString": "bool"
|
||||
},
|
||||
{
|
||||
"typeIdentifier": "t_stringliteral_a3dfa67cd4d104a688bb8ad9f6858d9a8fecb15cbae3a5d0cd6923d5d60a93c8",
|
||||
"typeString": "literal_string \"this contract does not accept ETH\""
|
||||
}
|
||||
],
|
||||
"overloadedDeclarations": [
|
||||
3263,
|
||||
3264
|
||||
],
|
||||
"referencedDeclaration": 3264,
|
||||
"type": "function (bool,string memory) pure",
|
||||
"value": "require"
|
||||
},
|
||||
"id": 756,
|
||||
"name": "Identifier",
|
||||
"src": "77:7:4"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"argumentTypes": null,
|
||||
"hexvalue": "66616c7365",
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": true,
|
||||
"lValueRequested": false,
|
||||
"subdenomination": null,
|
||||
"token": "bool",
|
||||
"type": "bool",
|
||||
"value": "false"
|
||||
},
|
||||
"id": 757,
|
||||
"name": "Literal",
|
||||
"src": "85:5:4"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"argumentTypes": null,
|
||||
"hexvalue": "7468697320636f6e747261637420646f6573206e6f742061636365707420455448",
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": true,
|
||||
"lValueRequested": false,
|
||||
"subdenomination": null,
|
||||
"token": "string",
|
||||
"type": "literal_string \"this contract does not accept ETH\"",
|
||||
"value": "this contract does not accept ETH"
|
||||
},
|
||||
"id": 758,
|
||||
"name": "Literal",
|
||||
"src": "92:35:4"
|
||||
}
|
||||
],
|
||||
"id": 759,
|
||||
"name": "FunctionCall",
|
||||
"src": "77:51:4"
|
||||
}
|
||||
],
|
||||
"id": 760,
|
||||
"name": "ExpressionStatement",
|
||||
"src": "77:51:4"
|
||||
}
|
||||
],
|
||||
"id": 761,
|
||||
"name": "Block",
|
||||
"src": "71:62:4"
|
||||
}
|
||||
],
|
||||
"id": 762,
|
||||
"name": "FunctionDefinition",
|
||||
"src": "51:82:4"
|
||||
}
|
||||
],
|
||||
"id": 763,
|
||||
"name": "ContractDefinition",
|
||||
"src": "25:110:4"
|
||||
}
|
||||
],
|
||||
"id": 764,
|
||||
"name": "SourceUnit",
|
||||
"src": "0:136:4"
|
||||
},
|
||||
"compiler": {
|
||||
"name": "solc",
|
||||
"version": "0.5.17+commit.d19bba13.Emscripten.clang"
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.3.4",
|
||||
"updatedAt": "2021-03-14T02:18:33.084Z",
|
||||
"devdoc": {
|
||||
"methods": {}
|
||||
},
|
||||
"userdoc": {
|
||||
"methods": {}
|
||||
}
|
||||
}
|
666
client/contracts/Context.json
Normal file
666
client/contracts/Context.json
Normal file
@ -0,0 +1,666 @@
|
||||
{
|
||||
"contractName": "Context",
|
||||
"abi": [
|
||||
{
|
||||
"inputs": [],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "constructor"
|
||||
}
|
||||
],
|
||||
"metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/GSN/Context.sol\":\"Context\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x90a3995645af7562d84b9d69363ffa5ae7217714ab61e951bf7bc450f40e4061\",\"urls\":[\"bzz-raw://216ef9d6b614db4eb46970b4e84903f2534a45572dd30a79f0041f1a5830f436\",\"dweb:/ipfs/QmNPrJ4MWKUAWzKXpUqeyKRUfosaoANZAqXgvepdrCwZAG\"]}},\"version\":1}",
|
||||
"bytecode": "0x",
|
||||
"deployedBytecode": "0x",
|
||||
"sourceMap": "",
|
||||
"deployedSourceMap": "",
|
||||
"source": "pragma solidity ^0.5.0;\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor () internal { }\n // solhint-disable-previous-line no-empty-blocks\n\n function _msgSender() internal view returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n",
|
||||
"sourcePath": "@openzeppelin/contracts/GSN/Context.sol",
|
||||
"ast": {
|
||||
"absolutePath": "@openzeppelin/contracts/GSN/Context.sol",
|
||||
"exportedSymbols": {
|
||||
"Context": [
|
||||
2280
|
||||
]
|
||||
},
|
||||
"id": 2281,
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 2255,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"^",
|
||||
"0.5",
|
||||
".0"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "0:23:10"
|
||||
},
|
||||
{
|
||||
"baseContracts": [],
|
||||
"contractDependencies": [],
|
||||
"contractKind": "contract",
|
||||
"documentation": null,
|
||||
"fullyImplemented": true,
|
||||
"id": 2280,
|
||||
"linearizedBaseContracts": [
|
||||
2280
|
||||
],
|
||||
"name": "Context",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": {
|
||||
"id": 2258,
|
||||
"nodeType": "Block",
|
||||
"src": "726:3:10",
|
||||
"statements": []
|
||||
},
|
||||
"documentation": null,
|
||||
"id": 2259,
|
||||
"implemented": true,
|
||||
"kind": "constructor",
|
||||
"modifiers": [],
|
||||
"name": "",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"parameters": {
|
||||
"id": 2256,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "714:2:10"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 2257,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "726:0:10"
|
||||
},
|
||||
"scope": 2280,
|
||||
"src": "702:27:10",
|
||||
"stateMutability": "nonpayable",
|
||||
"superFunction": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
{
|
||||
"body": {
|
||||
"id": 2267,
|
||||
"nodeType": "Block",
|
||||
"src": "850:34:10",
|
||||
"statements": [
|
||||
{
|
||||
"expression": {
|
||||
"argumentTypes": null,
|
||||
"expression": {
|
||||
"argumentTypes": null,
|
||||
"id": 2264,
|
||||
"name": "msg",
|
||||
"nodeType": "Identifier",
|
||||
"overloadedDeclarations": [],
|
||||
"referencedDeclaration": 3260,
|
||||
"src": "867:3:10",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_magic_message",
|
||||
"typeString": "msg"
|
||||
}
|
||||
},
|
||||
"id": 2265,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": false,
|
||||
"lValueRequested": false,
|
||||
"memberName": "sender",
|
||||
"nodeType": "MemberAccess",
|
||||
"referencedDeclaration": null,
|
||||
"src": "867:10:10",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address_payable",
|
||||
"typeString": "address payable"
|
||||
}
|
||||
},
|
||||
"functionReturnParameters": 2263,
|
||||
"id": 2266,
|
||||
"nodeType": "Return",
|
||||
"src": "860:17:10"
|
||||
}
|
||||
]
|
||||
},
|
||||
"documentation": null,
|
||||
"id": 2268,
|
||||
"implemented": true,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "_msgSender",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"parameters": {
|
||||
"id": 2260,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "807:2:10"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 2263,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 2262,
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 2268,
|
||||
"src": "833:15:10",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address_payable",
|
||||
"typeString": "address payable"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 2261,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "833:15:10",
|
||||
"stateMutability": "payable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address_payable",
|
||||
"typeString": "address payable"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "832:17:10"
|
||||
},
|
||||
"scope": 2280,
|
||||
"src": "788:96:10",
|
||||
"stateMutability": "view",
|
||||
"superFunction": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
{
|
||||
"body": {
|
||||
"id": 2278,
|
||||
"nodeType": "Block",
|
||||
"src": "947:165:10",
|
||||
"statements": [
|
||||
{
|
||||
"expression": {
|
||||
"argumentTypes": null,
|
||||
"id": 2273,
|
||||
"name": "this",
|
||||
"nodeType": "Identifier",
|
||||
"overloadedDeclarations": [],
|
||||
"referencedDeclaration": 3292,
|
||||
"src": "957:4:10",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_Context_$2280",
|
||||
"typeString": "contract Context"
|
||||
}
|
||||
},
|
||||
"id": 2274,
|
||||
"nodeType": "ExpressionStatement",
|
||||
"src": "957:4:10"
|
||||
},
|
||||
{
|
||||
"expression": {
|
||||
"argumentTypes": null,
|
||||
"expression": {
|
||||
"argumentTypes": null,
|
||||
"id": 2275,
|
||||
"name": "msg",
|
||||
"nodeType": "Identifier",
|
||||
"overloadedDeclarations": [],
|
||||
"referencedDeclaration": 3260,
|
||||
"src": "1097:3:10",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_magic_message",
|
||||
"typeString": "msg"
|
||||
}
|
||||
},
|
||||
"id": 2276,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": false,
|
||||
"lValueRequested": false,
|
||||
"memberName": "data",
|
||||
"nodeType": "MemberAccess",
|
||||
"referencedDeclaration": null,
|
||||
"src": "1097:8:10",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bytes_calldata_ptr",
|
||||
"typeString": "bytes calldata"
|
||||
}
|
||||
},
|
||||
"functionReturnParameters": 2272,
|
||||
"id": 2277,
|
||||
"nodeType": "Return",
|
||||
"src": "1090:15:10"
|
||||
}
|
||||
]
|
||||
},
|
||||
"documentation": null,
|
||||
"id": 2279,
|
||||
"implemented": true,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "_msgData",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"parameters": {
|
||||
"id": 2269,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "907:2:10"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 2272,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 2271,
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 2279,
|
||||
"src": "933:12:10",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "memory",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bytes_memory_ptr",
|
||||
"typeString": "bytes"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 2270,
|
||||
"name": "bytes",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "933:5:10",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bytes_storage_ptr",
|
||||
"typeString": "bytes"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "932:14:10"
|
||||
},
|
||||
"scope": 2280,
|
||||
"src": "890:222:10",
|
||||
"stateMutability": "view",
|
||||
"superFunction": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"scope": 2281,
|
||||
"src": "525:589:10"
|
||||
}
|
||||
],
|
||||
"src": "0:1115:10"
|
||||
},
|
||||
"legacyAST": {
|
||||
"attributes": {
|
||||
"absolutePath": "@openzeppelin/contracts/GSN/Context.sol",
|
||||
"exportedSymbols": {
|
||||
"Context": [
|
||||
2280
|
||||
]
|
||||
}
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"literals": [
|
||||
"solidity",
|
||||
"^",
|
||||
"0.5",
|
||||
".0"
|
||||
]
|
||||
},
|
||||
"id": 2255,
|
||||
"name": "PragmaDirective",
|
||||
"src": "0:23:10"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"baseContracts": [
|
||||
null
|
||||
],
|
||||
"contractDependencies": [
|
||||
null
|
||||
],
|
||||
"contractKind": "contract",
|
||||
"documentation": null,
|
||||
"fullyImplemented": true,
|
||||
"linearizedBaseContracts": [
|
||||
2280
|
||||
],
|
||||
"name": "Context",
|
||||
"scope": 2281
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"documentation": null,
|
||||
"implemented": true,
|
||||
"isConstructor": true,
|
||||
"kind": "constructor",
|
||||
"modifiers": [
|
||||
null
|
||||
],
|
||||
"name": "",
|
||||
"scope": 2280,
|
||||
"stateMutability": "nonpayable",
|
||||
"superFunction": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"parameters": [
|
||||
null
|
||||
]
|
||||
},
|
||||
"children": [],
|
||||
"id": 2256,
|
||||
"name": "ParameterList",
|
||||
"src": "714:2:10"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"parameters": [
|
||||
null
|
||||
]
|
||||
},
|
||||
"children": [],
|
||||
"id": 2257,
|
||||
"name": "ParameterList",
|
||||
"src": "726:0:10"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"statements": [
|
||||
null
|
||||
]
|
||||
},
|
||||
"children": [],
|
||||
"id": 2258,
|
||||
"name": "Block",
|
||||
"src": "726:3:10"
|
||||
}
|
||||
],
|
||||
"id": 2259,
|
||||
"name": "FunctionDefinition",
|
||||
"src": "702:27:10"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"documentation": null,
|
||||
"implemented": true,
|
||||
"isConstructor": false,
|
||||
"kind": "function",
|
||||
"modifiers": [
|
||||
null
|
||||
],
|
||||
"name": "_msgSender",
|
||||
"scope": 2280,
|
||||
"stateMutability": "view",
|
||||
"superFunction": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"parameters": [
|
||||
null
|
||||
]
|
||||
},
|
||||
"children": [],
|
||||
"id": 2260,
|
||||
"name": "ParameterList",
|
||||
"src": "807:2:10"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"constant": false,
|
||||
"name": "",
|
||||
"scope": 2268,
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"type": "address payable",
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"name": "address",
|
||||
"stateMutability": "payable",
|
||||
"type": "address payable"
|
||||
},
|
||||
"id": 2261,
|
||||
"name": "ElementaryTypeName",
|
||||
"src": "833:15:10"
|
||||
}
|
||||
],
|
||||
"id": 2262,
|
||||
"name": "VariableDeclaration",
|
||||
"src": "833:15:10"
|
||||
}
|
||||
],
|
||||
"id": 2263,
|
||||
"name": "ParameterList",
|
||||
"src": "832:17:10"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"functionReturnParameters": 2263
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"argumentTypes": null,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": false,
|
||||
"lValueRequested": false,
|
||||
"member_name": "sender",
|
||||
"referencedDeclaration": null,
|
||||
"type": "address payable"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"argumentTypes": null,
|
||||
"overloadedDeclarations": [
|
||||
null
|
||||
],
|
||||
"referencedDeclaration": 3260,
|
||||
"type": "msg",
|
||||
"value": "msg"
|
||||
},
|
||||
"id": 2264,
|
||||
"name": "Identifier",
|
||||
"src": "867:3:10"
|
||||
}
|
||||
],
|
||||
"id": 2265,
|
||||
"name": "MemberAccess",
|
||||
"src": "867:10:10"
|
||||
}
|
||||
],
|
||||
"id": 2266,
|
||||
"name": "Return",
|
||||
"src": "860:17:10"
|
||||
}
|
||||
],
|
||||
"id": 2267,
|
||||
"name": "Block",
|
||||
"src": "850:34:10"
|
||||
}
|
||||
],
|
||||
"id": 2268,
|
||||
"name": "FunctionDefinition",
|
||||
"src": "788:96:10"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"documentation": null,
|
||||
"implemented": true,
|
||||
"isConstructor": false,
|
||||
"kind": "function",
|
||||
"modifiers": [
|
||||
null
|
||||
],
|
||||
"name": "_msgData",
|
||||
"scope": 2280,
|
||||
"stateMutability": "view",
|
||||
"superFunction": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"parameters": [
|
||||
null
|
||||
]
|
||||
},
|
||||
"children": [],
|
||||
"id": 2269,
|
||||
"name": "ParameterList",
|
||||
"src": "907:2:10"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"constant": false,
|
||||
"name": "",
|
||||
"scope": 2279,
|
||||
"stateVariable": false,
|
||||
"storageLocation": "memory",
|
||||
"type": "bytes",
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"name": "bytes",
|
||||
"type": "bytes"
|
||||
},
|
||||
"id": 2270,
|
||||
"name": "ElementaryTypeName",
|
||||
"src": "933:5:10"
|
||||
}
|
||||
],
|
||||
"id": 2271,
|
||||
"name": "VariableDeclaration",
|
||||
"src": "933:12:10"
|
||||
}
|
||||
],
|
||||
"id": 2272,
|
||||
"name": "ParameterList",
|
||||
"src": "932:14:10"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"argumentTypes": null,
|
||||
"overloadedDeclarations": [
|
||||
null
|
||||
],
|
||||
"referencedDeclaration": 3292,
|
||||
"type": "contract Context",
|
||||
"value": "this"
|
||||
},
|
||||
"id": 2273,
|
||||
"name": "Identifier",
|
||||
"src": "957:4:10"
|
||||
}
|
||||
],
|
||||
"id": 2274,
|
||||
"name": "ExpressionStatement",
|
||||
"src": "957:4:10"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"functionReturnParameters": 2272
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"argumentTypes": null,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": false,
|
||||
"lValueRequested": false,
|
||||
"member_name": "data",
|
||||
"referencedDeclaration": null,
|
||||
"type": "bytes calldata"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"argumentTypes": null,
|
||||
"overloadedDeclarations": [
|
||||
null
|
||||
],
|
||||
"referencedDeclaration": 3260,
|
||||
"type": "msg",
|
||||
"value": "msg"
|
||||
},
|
||||
"id": 2275,
|
||||
"name": "Identifier",
|
||||
"src": "1097:3:10"
|
||||
}
|
||||
],
|
||||
"id": 2276,
|
||||
"name": "MemberAccess",
|
||||
"src": "1097:8:10"
|
||||
}
|
||||
],
|
||||
"id": 2277,
|
||||
"name": "Return",
|
||||
"src": "1090:15:10"
|
||||
}
|
||||
],
|
||||
"id": 2278,
|
||||
"name": "Block",
|
||||
"src": "947:165:10"
|
||||
}
|
||||
],
|
||||
"id": 2279,
|
||||
"name": "FunctionDefinition",
|
||||
"src": "890:222:10"
|
||||
}
|
||||
],
|
||||
"id": 2280,
|
||||
"name": "ContractDefinition",
|
||||
"src": "525:589:10"
|
||||
}
|
||||
],
|
||||
"id": 2281,
|
||||
"name": "SourceUnit",
|
||||
"src": "0:1115:10"
|
||||
},
|
||||
"compiler": {
|
||||
"name": "solc",
|
||||
"version": "0.5.17+commit.d19bba13.Emscripten.clang"
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.3.4",
|
||||
"updatedAt": "2021-03-14T02:18:33.142Z",
|
||||
"devdoc": {
|
||||
"methods": {}
|
||||
},
|
||||
"userdoc": {
|
||||
"methods": {}
|
||||
}
|
||||
}
|
11864
client/contracts/ERC20.json
Normal file
11864
client/contracts/ERC20.json
Normal file
File diff suppressed because one or more lines are too long
1842
client/contracts/ERC20Basic.json
Normal file
1842
client/contracts/ERC20Basic.json
Normal file
File diff suppressed because it is too large
Load Diff
1686
client/contracts/ERC20Detailed.json
Normal file
1686
client/contracts/ERC20Detailed.json
Normal file
File diff suppressed because one or more lines are too long
1110
client/contracts/ERC20Mintable.json
Normal file
1110
client/contracts/ERC20Mintable.json
Normal file
File diff suppressed because one or more lines are too long
965
client/contracts/ERC20Mock.json
Normal file
965
client/contracts/ERC20Mock.json
Normal file
File diff suppressed because one or more lines are too long
7219
client/contracts/ERC20Tornado.json
Normal file
7219
client/contracts/ERC20Tornado.json
Normal file
File diff suppressed because one or more lines are too long
3532
client/contracts/ETHTornado.json
Normal file
3532
client/contracts/ETHTornado.json
Normal file
File diff suppressed because one or more lines are too long
50
client/contracts/Hasher.json
Normal file
50
client/contracts/Hasher.json
Normal file
File diff suppressed because one or more lines are too long
1971
client/contracts/IERC20.json
Normal file
1971
client/contracts/IERC20.json
Normal file
File diff suppressed because one or more lines are too long
1940
client/contracts/IUSDT.json
Normal file
1940
client/contracts/IUSDT.json
Normal file
File diff suppressed because it is too large
Load Diff
8638
client/contracts/IVerifier.json
Normal file
8638
client/contracts/IVerifier.json
Normal file
File diff suppressed because one or more lines are too long
10235
client/contracts/MerkleTreeWithHistory.json
Normal file
10235
client/contracts/MerkleTreeWithHistory.json
Normal file
File diff suppressed because one or more lines are too long
881
client/contracts/MerkleTreeWithHistoryMock.json
Normal file
881
client/contracts/MerkleTreeWithHistoryMock.json
Normal file
File diff suppressed because one or more lines are too long
1491
client/contracts/Migrations.json
Normal file
1491
client/contracts/Migrations.json
Normal file
File diff suppressed because it is too large
Load Diff
2811
client/contracts/MinterRole.json
Normal file
2811
client/contracts/MinterRole.json
Normal file
File diff suppressed because it is too large
Load Diff
29852
client/contracts/Pairing.json
Normal file
29852
client/contracts/Pairing.json
Normal file
File diff suppressed because one or more lines are too long
796
client/contracts/ReentrancyGuard.json
Normal file
796
client/contracts/ReentrancyGuard.json
Normal file
@ -0,0 +1,796 @@
|
||||
{
|
||||
"contractName": "ReentrancyGuard",
|
||||
"abi": [
|
||||
{
|
||||
"inputs": [],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "constructor"
|
||||
}
|
||||
],
|
||||
"metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"details\":\"Contract module that helps prevent reentrant calls to a function. * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier available, which can be applied to functions to make sure there are no nested (reentrant) calls to them. * Note that because there is a single `nonReentrant` guard, functions marked as `nonReentrant` may not call one another. This can be worked around by making those functions `private`, and then adding `external` `nonReentrant` entry points to them. * TIP: If you would like to learn more about reentrancy and alternative ways to protect against it, check out our blog post https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. * _Since v2.5.0:_ this module is now much more gas efficient, given net gas metering changes introduced in the Istanbul hardfork.\",\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":\"ReentrancyGuard\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0xb63221b23818d622bfd83d18e0968307e4fcb7a35536bdceded76e1cf8349acd\",\"urls\":[\"bzz-raw://44e1e8c22362c4708a8c3362735f1465f5b05e2f7315e16c7010d694ce019d73\",\"dweb:/ipfs/QmWj9g8X1hxkXRre2kwkEjLBetjuzmSbWHD81bsSojnBkS\"]}},\"version\":1}",
|
||||
"bytecode": "0x",
|
||||
"deployedBytecode": "0x",
|
||||
"sourceMap": "",
|
||||
"deployedSourceMap": "",
|
||||
"source": "pragma solidity ^0.5.0;\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n *\n * _Since v2.5.0:_ this module is now much more gas efficient, given net gas\n * metering changes introduced in the Istanbul hardfork.\n */\ncontract ReentrancyGuard {\n bool private _notEntered;\n\n constructor () internal {\n // Storing an initial non-zero value makes deployment a bit more\n // expensive, but in exchange the refund on every call to nonReentrant\n // will be lower in amount. Since refunds are capped to a percetange of\n // the total transaction's gas, it is best to keep them low in cases\n // like this one, to increase the likelihood of the full refund coming\n // into effect.\n _notEntered = true;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and make it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n // On the first call to nonReentrant, _notEntered will be true\n require(_notEntered, \"ReentrancyGuard: reentrant call\");\n\n // Any calls to nonReentrant after this point will fail\n _notEntered = false;\n\n _;\n\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _notEntered = true;\n }\n}\n",
|
||||
"sourcePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol",
|
||||
"ast": {
|
||||
"absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol",
|
||||
"exportedSymbols": {
|
||||
"ReentrancyGuard": [
|
||||
3245
|
||||
]
|
||||
},
|
||||
"id": 3246,
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 3217,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"^",
|
||||
"0.5",
|
||||
".0"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "0:23:18"
|
||||
},
|
||||
{
|
||||
"baseContracts": [],
|
||||
"contractDependencies": [],
|
||||
"contractKind": "contract",
|
||||
"documentation": "@dev Contract module that helps prevent reentrant calls to a function.\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\navailable, which can be applied to functions to make sure there are no nested\n(reentrant) calls to them.\n * Note that because there is a single `nonReentrant` guard, functions marked as\n`nonReentrant` may not call one another. This can be worked around by making\nthose functions `private`, and then adding `external` `nonReentrant` entry\npoints to them.\n * TIP: If you would like to learn more about reentrancy and alternative ways\nto protect against it, check out our blog post\nhttps://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n * _Since v2.5.0:_ this module is now much more gas efficient, given net gas\nmetering changes introduced in the Istanbul hardfork.",
|
||||
"fullyImplemented": true,
|
||||
"id": 3245,
|
||||
"linearizedBaseContracts": [
|
||||
3245
|
||||
],
|
||||
"name": "ReentrancyGuard",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 3219,
|
||||
"name": "_notEntered",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 3245,
|
||||
"src": "944:24:18",
|
||||
"stateVariable": true,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bool",
|
||||
"typeString": "bool"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 3218,
|
||||
"name": "bool",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "944:4:18",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bool",
|
||||
"typeString": "bool"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "private"
|
||||
},
|
||||
{
|
||||
"body": {
|
||||
"id": 3226,
|
||||
"nodeType": "Block",
|
||||
"src": "999:447:18",
|
||||
"statements": [
|
||||
{
|
||||
"expression": {
|
||||
"argumentTypes": null,
|
||||
"id": 3224,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": false,
|
||||
"lValueRequested": false,
|
||||
"leftHandSide": {
|
||||
"argumentTypes": null,
|
||||
"id": 3222,
|
||||
"name": "_notEntered",
|
||||
"nodeType": "Identifier",
|
||||
"overloadedDeclarations": [],
|
||||
"referencedDeclaration": 3219,
|
||||
"src": "1421:11:18",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bool",
|
||||
"typeString": "bool"
|
||||
}
|
||||
},
|
||||
"nodeType": "Assignment",
|
||||
"operator": "=",
|
||||
"rightHandSide": {
|
||||
"argumentTypes": null,
|
||||
"hexValue": "74727565",
|
||||
"id": 3223,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": true,
|
||||
"kind": "bool",
|
||||
"lValueRequested": false,
|
||||
"nodeType": "Literal",
|
||||
"src": "1435:4:18",
|
||||
"subdenomination": null,
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bool",
|
||||
"typeString": "bool"
|
||||
},
|
||||
"value": "true"
|
||||
},
|
||||
"src": "1421:18:18",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bool",
|
||||
"typeString": "bool"
|
||||
}
|
||||
},
|
||||
"id": 3225,
|
||||
"nodeType": "ExpressionStatement",
|
||||
"src": "1421:18:18"
|
||||
}
|
||||
]
|
||||
},
|
||||
"documentation": null,
|
||||
"id": 3227,
|
||||
"implemented": true,
|
||||
"kind": "constructor",
|
||||
"modifiers": [],
|
||||
"name": "",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"parameters": {
|
||||
"id": 3220,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "987:2:18"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 3221,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "999:0:18"
|
||||
},
|
||||
"scope": 3245,
|
||||
"src": "975:471:18",
|
||||
"stateMutability": "nonpayable",
|
||||
"superFunction": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
{
|
||||
"body": {
|
||||
"id": 3243,
|
||||
"nodeType": "Block",
|
||||
"src": "1845:410:18",
|
||||
"statements": [
|
||||
{
|
||||
"expression": {
|
||||
"argumentTypes": null,
|
||||
"arguments": [
|
||||
{
|
||||
"argumentTypes": null,
|
||||
"id": 3230,
|
||||
"name": "_notEntered",
|
||||
"nodeType": "Identifier",
|
||||
"overloadedDeclarations": [],
|
||||
"referencedDeclaration": 3219,
|
||||
"src": "1934:11:18",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bool",
|
||||
"typeString": "bool"
|
||||
}
|
||||
},
|
||||
{
|
||||
"argumentTypes": null,
|
||||
"hexValue": "5265656e7472616e637947756172643a207265656e7472616e742063616c6c",
|
||||
"id": 3231,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": true,
|
||||
"kind": "string",
|
||||
"lValueRequested": false,
|
||||
"nodeType": "Literal",
|
||||
"src": "1947:33:18",
|
||||
"subdenomination": null,
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_stringliteral_ebf73bba305590e4764d5cb53b69bffd6d4d092d1a67551cb346f8cfcdab8619",
|
||||
"typeString": "literal_string \"ReentrancyGuard: reentrant call\""
|
||||
},
|
||||
"value": "ReentrancyGuard: reentrant call"
|
||||
}
|
||||
],
|
||||
"expression": {
|
||||
"argumentTypes": [
|
||||
{
|
||||
"typeIdentifier": "t_bool",
|
||||
"typeString": "bool"
|
||||
},
|
||||
{
|
||||
"typeIdentifier": "t_stringliteral_ebf73bba305590e4764d5cb53b69bffd6d4d092d1a67551cb346f8cfcdab8619",
|
||||
"typeString": "literal_string \"ReentrancyGuard: reentrant call\""
|
||||
}
|
||||
],
|
||||
"id": 3229,
|
||||
"name": "require",
|
||||
"nodeType": "Identifier",
|
||||
"overloadedDeclarations": [
|
||||
3263,
|
||||
3264
|
||||
],
|
||||
"referencedDeclaration": 3264,
|
||||
"src": "1926:7:18",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
||||
"typeString": "function (bool,string memory) pure"
|
||||
}
|
||||
},
|
||||
"id": 3232,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": false,
|
||||
"kind": "functionCall",
|
||||
"lValueRequested": false,
|
||||
"names": [],
|
||||
"nodeType": "FunctionCall",
|
||||
"src": "1926:55:18",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_tuple$__$",
|
||||
"typeString": "tuple()"
|
||||
}
|
||||
},
|
||||
"id": 3233,
|
||||
"nodeType": "ExpressionStatement",
|
||||
"src": "1926:55:18"
|
||||
},
|
||||
{
|
||||
"expression": {
|
||||
"argumentTypes": null,
|
||||
"id": 3236,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": false,
|
||||
"lValueRequested": false,
|
||||
"leftHandSide": {
|
||||
"argumentTypes": null,
|
||||
"id": 3234,
|
||||
"name": "_notEntered",
|
||||
"nodeType": "Identifier",
|
||||
"overloadedDeclarations": [],
|
||||
"referencedDeclaration": 3219,
|
||||
"src": "2056:11:18",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bool",
|
||||
"typeString": "bool"
|
||||
}
|
||||
},
|
||||
"nodeType": "Assignment",
|
||||
"operator": "=",
|
||||
"rightHandSide": {
|
||||
"argumentTypes": null,
|
||||
"hexValue": "66616c7365",
|
||||
"id": 3235,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": true,
|
||||
"kind": "bool",
|
||||
"lValueRequested": false,
|
||||
"nodeType": "Literal",
|
||||
"src": "2070:5:18",
|
||||
"subdenomination": null,
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bool",
|
||||
"typeString": "bool"
|
||||
},
|
||||
"value": "false"
|
||||
},
|
||||
"src": "2056:19:18",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bool",
|
||||
"typeString": "bool"
|
||||
}
|
||||
},
|
||||
"id": 3237,
|
||||
"nodeType": "ExpressionStatement",
|
||||
"src": "2056:19:18"
|
||||
},
|
||||
{
|
||||
"id": 3238,
|
||||
"nodeType": "PlaceholderStatement",
|
||||
"src": "2086:1:18"
|
||||
},
|
||||
{
|
||||
"expression": {
|
||||
"argumentTypes": null,
|
||||
"id": 3241,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": false,
|
||||
"lValueRequested": false,
|
||||
"leftHandSide": {
|
||||
"argumentTypes": null,
|
||||
"id": 3239,
|
||||
"name": "_notEntered",
|
||||
"nodeType": "Identifier",
|
||||
"overloadedDeclarations": [],
|
||||
"referencedDeclaration": 3219,
|
||||
"src": "2230:11:18",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bool",
|
||||
"typeString": "bool"
|
||||
}
|
||||
},
|
||||
"nodeType": "Assignment",
|
||||
"operator": "=",
|
||||
"rightHandSide": {
|
||||
"argumentTypes": null,
|
||||
"hexValue": "74727565",
|
||||
"id": 3240,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": true,
|
||||
"kind": "bool",
|
||||
"lValueRequested": false,
|
||||
"nodeType": "Literal",
|
||||
"src": "2244:4:18",
|
||||
"subdenomination": null,
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bool",
|
||||
"typeString": "bool"
|
||||
},
|
||||
"value": "true"
|
||||
},
|
||||
"src": "2230:18:18",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bool",
|
||||
"typeString": "bool"
|
||||
}
|
||||
},
|
||||
"id": 3242,
|
||||
"nodeType": "ExpressionStatement",
|
||||
"src": "2230:18:18"
|
||||
}
|
||||
]
|
||||
},
|
||||
"documentation": "@dev Prevents a contract from calling itself, directly or indirectly.\nCalling a `nonReentrant` function from another `nonReentrant`\nfunction is not supported. It is possible to prevent this from happening\nby making the `nonReentrant` function external, and make it call a\n`private` function that does the actual work.",
|
||||
"id": 3244,
|
||||
"name": "nonReentrant",
|
||||
"nodeType": "ModifierDefinition",
|
||||
"parameters": {
|
||||
"id": 3228,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "1842:2:18"
|
||||
},
|
||||
"src": "1821:434:18",
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"scope": 3246,
|
||||
"src": "913:1344:18"
|
||||
}
|
||||
],
|
||||
"src": "0:2258:18"
|
||||
},
|
||||
"legacyAST": {
|
||||
"attributes": {
|
||||
"absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol",
|
||||
"exportedSymbols": {
|
||||
"ReentrancyGuard": [
|
||||
3245
|
||||
]
|
||||
}
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"literals": [
|
||||
"solidity",
|
||||
"^",
|
||||
"0.5",
|
||||
".0"
|
||||
]
|
||||
},
|
||||
"id": 3217,
|
||||
"name": "PragmaDirective",
|
||||
"src": "0:23:18"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"baseContracts": [
|
||||
null
|
||||
],
|
||||
"contractDependencies": [
|
||||
null
|
||||
],
|
||||
"contractKind": "contract",
|
||||
"documentation": "@dev Contract module that helps prevent reentrant calls to a function.\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\navailable, which can be applied to functions to make sure there are no nested\n(reentrant) calls to them.\n * Note that because there is a single `nonReentrant` guard, functions marked as\n`nonReentrant` may not call one another. This can be worked around by making\nthose functions `private`, and then adding `external` `nonReentrant` entry\npoints to them.\n * TIP: If you would like to learn more about reentrancy and alternative ways\nto protect against it, check out our blog post\nhttps://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n * _Since v2.5.0:_ this module is now much more gas efficient, given net gas\nmetering changes introduced in the Istanbul hardfork.",
|
||||
"fullyImplemented": true,
|
||||
"linearizedBaseContracts": [
|
||||
3245
|
||||
],
|
||||
"name": "ReentrancyGuard",
|
||||
"scope": 3246
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"constant": false,
|
||||
"name": "_notEntered",
|
||||
"scope": 3245,
|
||||
"stateVariable": true,
|
||||
"storageLocation": "default",
|
||||
"type": "bool",
|
||||
"value": null,
|
||||
"visibility": "private"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"name": "bool",
|
||||
"type": "bool"
|
||||
},
|
||||
"id": 3218,
|
||||
"name": "ElementaryTypeName",
|
||||
"src": "944:4:18"
|
||||
}
|
||||
],
|
||||
"id": 3219,
|
||||
"name": "VariableDeclaration",
|
||||
"src": "944:24:18"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"documentation": null,
|
||||
"implemented": true,
|
||||
"isConstructor": true,
|
||||
"kind": "constructor",
|
||||
"modifiers": [
|
||||
null
|
||||
],
|
||||
"name": "",
|
||||
"scope": 3245,
|
||||
"stateMutability": "nonpayable",
|
||||
"superFunction": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"parameters": [
|
||||
null
|
||||
]
|
||||
},
|
||||
"children": [],
|
||||
"id": 3220,
|
||||
"name": "ParameterList",
|
||||
"src": "987:2:18"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"parameters": [
|
||||
null
|
||||
]
|
||||
},
|
||||
"children": [],
|
||||
"id": 3221,
|
||||
"name": "ParameterList",
|
||||
"src": "999:0:18"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"argumentTypes": null,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": false,
|
||||
"lValueRequested": false,
|
||||
"operator": "=",
|
||||
"type": "bool"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"argumentTypes": null,
|
||||
"overloadedDeclarations": [
|
||||
null
|
||||
],
|
||||
"referencedDeclaration": 3219,
|
||||
"type": "bool",
|
||||
"value": "_notEntered"
|
||||
},
|
||||
"id": 3222,
|
||||
"name": "Identifier",
|
||||
"src": "1421:11:18"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"argumentTypes": null,
|
||||
"hexvalue": "74727565",
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": true,
|
||||
"lValueRequested": false,
|
||||
"subdenomination": null,
|
||||
"token": "bool",
|
||||
"type": "bool",
|
||||
"value": "true"
|
||||
},
|
||||
"id": 3223,
|
||||
"name": "Literal",
|
||||
"src": "1435:4:18"
|
||||
}
|
||||
],
|
||||
"id": 3224,
|
||||
"name": "Assignment",
|
||||
"src": "1421:18:18"
|
||||
}
|
||||
],
|
||||
"id": 3225,
|
||||
"name": "ExpressionStatement",
|
||||
"src": "1421:18:18"
|
||||
}
|
||||
],
|
||||
"id": 3226,
|
||||
"name": "Block",
|
||||
"src": "999:447:18"
|
||||
}
|
||||
],
|
||||
"id": 3227,
|
||||
"name": "FunctionDefinition",
|
||||
"src": "975:471:18"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"documentation": "@dev Prevents a contract from calling itself, directly or indirectly.\nCalling a `nonReentrant` function from another `nonReentrant`\nfunction is not supported. It is possible to prevent this from happening\nby making the `nonReentrant` function external, and make it call a\n`private` function that does the actual work.",
|
||||
"name": "nonReentrant",
|
||||
"visibility": "internal"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"parameters": [
|
||||
null
|
||||
]
|
||||
},
|
||||
"children": [],
|
||||
"id": 3228,
|
||||
"name": "ParameterList",
|
||||
"src": "1842:2:18"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"argumentTypes": null,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": false,
|
||||
"isStructConstructorCall": false,
|
||||
"lValueRequested": false,
|
||||
"names": [
|
||||
null
|
||||
],
|
||||
"type": "tuple()",
|
||||
"type_conversion": false
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"argumentTypes": [
|
||||
{
|
||||
"typeIdentifier": "t_bool",
|
||||
"typeString": "bool"
|
||||
},
|
||||
{
|
||||
"typeIdentifier": "t_stringliteral_ebf73bba305590e4764d5cb53b69bffd6d4d092d1a67551cb346f8cfcdab8619",
|
||||
"typeString": "literal_string \"ReentrancyGuard: reentrant call\""
|
||||
}
|
||||
],
|
||||
"overloadedDeclarations": [
|
||||
3263,
|
||||
3264
|
||||
],
|
||||
"referencedDeclaration": 3264,
|
||||
"type": "function (bool,string memory) pure",
|
||||
"value": "require"
|
||||
},
|
||||
"id": 3229,
|
||||
"name": "Identifier",
|
||||
"src": "1926:7:18"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"argumentTypes": null,
|
||||
"overloadedDeclarations": [
|
||||
null
|
||||
],
|
||||
"referencedDeclaration": 3219,
|
||||
"type": "bool",
|
||||
"value": "_notEntered"
|
||||
},
|
||||
"id": 3230,
|
||||
"name": "Identifier",
|
||||
"src": "1934:11:18"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"argumentTypes": null,
|
||||
"hexvalue": "5265656e7472616e637947756172643a207265656e7472616e742063616c6c",
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": true,
|
||||
"lValueRequested": false,
|
||||
"subdenomination": null,
|
||||
"token": "string",
|
||||
"type": "literal_string \"ReentrancyGuard: reentrant call\"",
|
||||
"value": "ReentrancyGuard: reentrant call"
|
||||
},
|
||||
"id": 3231,
|
||||
"name": "Literal",
|
||||
"src": "1947:33:18"
|
||||
}
|
||||
],
|
||||
"id": 3232,
|
||||
"name": "FunctionCall",
|
||||
"src": "1926:55:18"
|
||||
}
|
||||
],
|
||||
"id": 3233,
|
||||
"name": "ExpressionStatement",
|
||||
"src": "1926:55:18"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"argumentTypes": null,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": false,
|
||||
"lValueRequested": false,
|
||||
"operator": "=",
|
||||
"type": "bool"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"argumentTypes": null,
|
||||
"overloadedDeclarations": [
|
||||
null
|
||||
],
|
||||
"referencedDeclaration": 3219,
|
||||
"type": "bool",
|
||||
"value": "_notEntered"
|
||||
},
|
||||
"id": 3234,
|
||||
"name": "Identifier",
|
||||
"src": "2056:11:18"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"argumentTypes": null,
|
||||
"hexvalue": "66616c7365",
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": true,
|
||||
"lValueRequested": false,
|
||||
"subdenomination": null,
|
||||
"token": "bool",
|
||||
"type": "bool",
|
||||
"value": "false"
|
||||
},
|
||||
"id": 3235,
|
||||
"name": "Literal",
|
||||
"src": "2070:5:18"
|
||||
}
|
||||
],
|
||||
"id": 3236,
|
||||
"name": "Assignment",
|
||||
"src": "2056:19:18"
|
||||
}
|
||||
],
|
||||
"id": 3237,
|
||||
"name": "ExpressionStatement",
|
||||
"src": "2056:19:18"
|
||||
},
|
||||
{
|
||||
"id": 3238,
|
||||
"name": "PlaceholderStatement",
|
||||
"src": "2086:1:18"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"argumentTypes": null,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": false,
|
||||
"lValueRequested": false,
|
||||
"operator": "=",
|
||||
"type": "bool"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"attributes": {
|
||||
"argumentTypes": null,
|
||||
"overloadedDeclarations": [
|
||||
null
|
||||
],
|
||||
"referencedDeclaration": 3219,
|
||||
"type": "bool",
|
||||
"value": "_notEntered"
|
||||
},
|
||||
"id": 3239,
|
||||
"name": "Identifier",
|
||||
"src": "2230:11:18"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"argumentTypes": null,
|
||||
"hexvalue": "74727565",
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": true,
|
||||
"lValueRequested": false,
|
||||
"subdenomination": null,
|
||||
"token": "bool",
|
||||
"type": "bool",
|
||||
"value": "true"
|
||||
},
|
||||
"id": 3240,
|
||||
"name": "Literal",
|
||||
"src": "2244:4:18"
|
||||
}
|
||||
],
|
||||
"id": 3241,
|
||||
"name": "Assignment",
|
||||
"src": "2230:18:18"
|
||||
}
|
||||
],
|
||||
"id": 3242,
|
||||
"name": "ExpressionStatement",
|
||||
"src": "2230:18:18"
|
||||
}
|
||||
],
|
||||
"id": 3243,
|
||||
"name": "Block",
|
||||
"src": "1845:410:18"
|
||||
}
|
||||
],
|
||||
"id": 3244,
|
||||
"name": "ModifierDefinition",
|
||||
"src": "1821:434:18"
|
||||
}
|
||||
],
|
||||
"id": 3245,
|
||||
"name": "ContractDefinition",
|
||||
"src": "913:1344:18"
|
||||
}
|
||||
],
|
||||
"id": 3246,
|
||||
"name": "SourceUnit",
|
||||
"src": "0:2258:18"
|
||||
},
|
||||
"compiler": {
|
||||
"name": "solc",
|
||||
"version": "0.5.17+commit.d19bba13.Emscripten.clang"
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.3.4",
|
||||
"updatedAt": "2021-03-14T02:18:33.155Z",
|
||||
"devdoc": {
|
||||
"details": "Contract module that helps prevent reentrant calls to a function. * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier available, which can be applied to functions to make sure there are no nested (reentrant) calls to them. * Note that because there is a single `nonReentrant` guard, functions marked as `nonReentrant` may not call one another. This can be worked around by making those functions `private`, and then adding `external` `nonReentrant` entry points to them. * TIP: If you would like to learn more about reentrancy and alternative ways to protect against it, check out our blog post https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. * _Since v2.5.0:_ this module is now much more gas efficient, given net gas metering changes introduced in the Istanbul hardfork.",
|
||||
"methods": {}
|
||||
},
|
||||
"userdoc": {
|
||||
"methods": {}
|
||||
}
|
||||
}
|
2258
client/contracts/Roles.json
Normal file
2258
client/contracts/Roles.json
Normal file
File diff suppressed because it is too large
Load Diff
5061
client/contracts/SafeMath.json
Normal file
5061
client/contracts/SafeMath.json
Normal file
File diff suppressed because one or more lines are too long
9169
client/contracts/Tornado.json
Normal file
9169
client/contracts/Tornado.json
Normal file
File diff suppressed because one or more lines are too long
29929
client/contracts/Verifier.json
Normal file
29929
client/contracts/Verifier.json
Normal file
File diff suppressed because one or more lines are too long
@ -7,7 +7,7 @@ const Web3 = require('web3')
|
||||
const path = require('path')
|
||||
|
||||
// Connect to the desired network
|
||||
const web3 = new Web3('https://alfajores-forno.celo-testnet.org')
|
||||
const web3 = new Web3(process.env.RPC_URL)
|
||||
const kit = ContractKit.newKitFromWeb3(web3)
|
||||
kit.addAccount(process.env.PRIVATE_KEY)
|
||||
// const kit = Kit.newKit('https://forno.celo.org') // mainnet endpoint
|
||||
|
Loading…
x
Reference in New Issue
Block a user