diff --git a/.gitignore b/.gitignore index 1316995926..fb21c0b564 100644 --- a/.gitignore +++ b/.gitignore @@ -106,4 +106,7 @@ dist # TernJS port file .tern-port +.DS_Store +package-lock.json + data diff --git a/build/contracts/DKGcontract.json b/build/contracts/DKGcontract.json index 84af5322ad..78a927e6ac 100644 --- a/build/contracts/DKGcontract.json +++ b/build/contracts/DKGcontract.json @@ -197,6 +197,11 @@ "name": "rootHash", "type": "bytes32" }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, { "internalType": "uint256", "name": "numberOfEpochs", @@ -366,65 +371,82 @@ "constant": true } ], - "metadata": "{\"compiler\":{\"version\":\"0.6.10+commit.00c0fcaf\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token_address\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assertionIssuer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"numberOfEpochs\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assertionTimeToLive\",\"type\":\"uint256\"}],\"name\":\"AssertionCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"TokenAddressSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensCollected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationFailed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"TRAC_TOKEN_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"numberOfEpochs\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assertionTimeToLive\",\"type\":\"uint256\"}],\"name\":\"createAssertionRecord\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"}],\"name\":\"getAssertionIssuer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"}],\"name\":\"getAssertionNumberOfEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"numberOfEpochs\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"}],\"name\":\"getAssertionRootHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"name\":\"getAssertionTask\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"task\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"}],\"name\":\"getAssertionTimeToLive\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"timeToLive\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"epochAssertionProof\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"epochNumber\",\"type\":\"uint256\"}],\"name\":\"submitHoldingProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"epochAssertionProof\",\"type\":\"bytes32\"}],\"name\":\"verifyAssertionProof\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"proofValid\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"project:/contracts/DKGcontract.sol\":\"DKGcontract\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"openzeppelin-solidity/contracts/access/Ownable.sol\":{\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://90faf5851c02f9bd42c5bfb54d4f0421a2612f50ab80b2c4fa24fa3792071cc2\",\"dweb:/ipfs/QmRGM4F2PcGVF85aTfaA9YBhCHHDqrMhRjyp6fGeBTtirb\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://526dc85e1f9b9b45830e202568d267d93dde7a4fcccf4ad7798dadcd92304d3c\",\"dweb:/ipfs/QmaoXMB972J3cSDLtBq3xBo4jLwqD2uzXTwujtSPqkYVhR\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://24427744bd3e6cb73c17010119af12a318289c0253a4d9acb8576c9fb3797b08\",\"dweb:/ipfs/QmTLDqpKRBuxGxRAmjgXt9AkXyACW3MtKzi7PYjm5iMfGC\"]},\"openzeppelin-solidity/contracts/utils/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]},\"project:/contracts/DKGcontract.sol\":{\"keccak256\":\"0xfa24b77f960260a7c18ffaa7baad79dd0445e41dad18b362c426fac931181f79\",\"urls\":[\"bzz-raw://a93e453a11a03c2e599a5ed89c37b4a20d62ec8bed33765c8f5fde0cb7912922\",\"dweb:/ipfs/QmSPqJ2bsC7vKfv292LBWU9otbuT9EacCAYboWBEKQBFUW\"]}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506040516110673803806110678339818101604052602081101561003357600080fd5b810190808051906020019092919050505060006100546101f760201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561012c57600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167fd82cad5fdc98633445b90f806f2e1a61a5409f92187ee9cd87f1da18c906926660405160405180910390a2506101ff565b600033905090565b610e598061020e6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80638da5cb5b116100715780638da5cb5b1461025b5780638f9cd32b146102a55780639e50e72c146102ef578063b934b4e414610331578063ce64c64314610373578063f2fde38b146103b5576100b4565b80630828e9f3146100b957806308c4933b14610127578063193f9c7e146101735780636988bc03146101c3578063715018a61461020557806373a773891461020f575b600080fd5b6100e5600480360360208110156100cf57600080fd5b81019080803590602001909291905050506103f9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61015d6004803603604081101561013d57600080fd5b810190808035906020019092919080359060200190929190505050610436565b6040518082815260200191505060405180910390f35b6101a96004803603604081101561018957600080fd5b810190808035906020019092919080359060200190929190505050610441565b604051808215151515815260200191505060405180910390f35b6101ef600480360360208110156101d957600080fd5b810190808035906020019092919050505061044d565b6040518082815260200191505060405180910390f35b61020d61046d565b005b6102596004803603608081101561022557600080fd5b81019080803590602001909291908035906020019092919080359060200190929190803590602001909291905050506105db565b005b61026361097e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102ad6109a7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61031b6004803603602081101561030557600080fd5b81019080803590602001909291905050506109cd565b6040518082815260200191505060405180910390f35b61035d6004803603602081101561034757600080fd5b81019080803590602001909291905050506109ed565b6040518082815260200191505060405180910390f35b6103b36004803603606081101561038957600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050610a0d565b005b6103f7600480360360208110156103cb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b92565b005b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600043905092915050565b60006001905092915050565b600060036000838152602001908152602001600020600001549050919050565b610475610d85565b73ffffffffffffffffffffffffffffffffffffffff1661049361097e565b73ffffffffffffffffffffffffffffffffffffffff161461051c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000801b841415610654576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f617373657274696f6e494420686173682063616e6e6f74206265207a65726f0081525060200191505060405180910390fd5b6000801b8314156106cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f726f6f744861736820686173682063616e6e6f74206265207a65726f0000000081525060200191505060405180910390fd5b6000821415610727576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180610e026022913960400191505060405180910390fd5b6000811415610781576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180610d8e6027913960400191505060405180910390fd5b600060036000868152602001908152602001600020600201541461080d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f417373657274696f6e20616c726561647920657869737473210000000000000081525060200191505060405180910390fd5b816003600086815260200190815260200160002060010181905550806003600086815260200190815260200160002060000181905550426003600086815260200190815260200160002060020181905550826003600086815260200190815260200160002060040181905550336003600086815260200190815260200160002060030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550336004600086815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff1683857f25e2604032d2f5a218a9bed084fc10fd98b83e3b86a79ba39c214095984250168585604051808381526020018281526020019250505060405180910390a450505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060036000838152602001908152602001600020600101549050919050565b600060036000838152602001908152602001600020600401549050919050565b6000801b831415610a86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f617373657274696f6e494420686173682063616e6e6f74206265207a65726f0081525060200191505060405180910390fd5b6000801b821415610ae2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180610ddb6027913960400191505060405180910390fd5b610aec8383610441565b15610b4757803373ffffffffffffffffffffffffffffffffffffffff16847fce001fcd900079c312eaa96f5c1c389ffe207eb41e90197f5a011668b58ef598607b6040518082815260200191505060405180910390a4610b8d565b803373ffffffffffffffffffffffffffffffffffffffff16847f37d4188105d31e43e2177257c4e9cc2c8eda5c0783943eb00abe942ac687b03a60405160405180910390a45b505050565b610b9a610d85565b73ffffffffffffffffffffffffffffffffffffffff16610bb861097e565b73ffffffffffffffffffffffffffffffffffffffff1614610c41576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610cc7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180610db56026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60003390509056fe617373657274696f6e54696d65546f4c69766520686173682063616e6e6f74206265207a65726f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737365706f6368417373657274696f6e50726f6f6620686173682063616e6e6f74206265207a65726f6e756d6265724f6645706f63687320686173682063616e6e6f74206265207a65726fa2646970667358221220d151e176ae4d67c504e535c636330af1f8b3721ef6dd169fa6e164193c3cb83164736f6c634300060a0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c80638da5cb5b116100715780638da5cb5b1461025b5780638f9cd32b146102a55780639e50e72c146102ef578063b934b4e414610331578063ce64c64314610373578063f2fde38b146103b5576100b4565b80630828e9f3146100b957806308c4933b14610127578063193f9c7e146101735780636988bc03146101c3578063715018a61461020557806373a773891461020f575b600080fd5b6100e5600480360360208110156100cf57600080fd5b81019080803590602001909291905050506103f9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61015d6004803603604081101561013d57600080fd5b810190808035906020019092919080359060200190929190505050610436565b6040518082815260200191505060405180910390f35b6101a96004803603604081101561018957600080fd5b810190808035906020019092919080359060200190929190505050610441565b604051808215151515815260200191505060405180910390f35b6101ef600480360360208110156101d957600080fd5b810190808035906020019092919050505061044d565b6040518082815260200191505060405180910390f35b61020d61046d565b005b6102596004803603608081101561022557600080fd5b81019080803590602001909291908035906020019092919080359060200190929190803590602001909291905050506105db565b005b61026361097e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102ad6109a7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61031b6004803603602081101561030557600080fd5b81019080803590602001909291905050506109cd565b6040518082815260200191505060405180910390f35b61035d6004803603602081101561034757600080fd5b81019080803590602001909291905050506109ed565b6040518082815260200191505060405180910390f35b6103b36004803603606081101561038957600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050610a0d565b005b6103f7600480360360208110156103cb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b92565b005b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600043905092915050565b60006001905092915050565b600060036000838152602001908152602001600020600001549050919050565b610475610d85565b73ffffffffffffffffffffffffffffffffffffffff1661049361097e565b73ffffffffffffffffffffffffffffffffffffffff161461051c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000801b841415610654576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f617373657274696f6e494420686173682063616e6e6f74206265207a65726f0081525060200191505060405180910390fd5b6000801b8314156106cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f726f6f744861736820686173682063616e6e6f74206265207a65726f0000000081525060200191505060405180910390fd5b6000821415610727576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180610e026022913960400191505060405180910390fd5b6000811415610781576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180610d8e6027913960400191505060405180910390fd5b600060036000868152602001908152602001600020600201541461080d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f417373657274696f6e20616c726561647920657869737473210000000000000081525060200191505060405180910390fd5b816003600086815260200190815260200160002060010181905550806003600086815260200190815260200160002060000181905550426003600086815260200190815260200160002060020181905550826003600086815260200190815260200160002060040181905550336003600086815260200190815260200160002060030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550336004600086815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff1683857f25e2604032d2f5a218a9bed084fc10fd98b83e3b86a79ba39c214095984250168585604051808381526020018281526020019250505060405180910390a450505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060036000838152602001908152602001600020600101549050919050565b600060036000838152602001908152602001600020600401549050919050565b6000801b831415610a86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f617373657274696f6e494420686173682063616e6e6f74206265207a65726f0081525060200191505060405180910390fd5b6000801b821415610ae2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180610ddb6027913960400191505060405180910390fd5b610aec8383610441565b15610b4757803373ffffffffffffffffffffffffffffffffffffffff16847fce001fcd900079c312eaa96f5c1c389ffe207eb41e90197f5a011668b58ef598607b6040518082815260200191505060405180910390a4610b8d565b803373ffffffffffffffffffffffffffffffffffffffff16847f37d4188105d31e43e2177257c4e9cc2c8eda5c0783943eb00abe942ac687b03a60405160405180910390a45b505050565b610b9a610d85565b73ffffffffffffffffffffffffffffffffffffffff16610bb861097e565b73ffffffffffffffffffffffffffffffffffffffff1614610c41576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610cc7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180610db56026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60003390509056fe617373657274696f6e54696d65546f4c69766520686173682063616e6e6f74206265207a65726f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737365706f6368417373657274696f6e50726f6f6620686173682063616e6e6f74206265207a65726f6e756d6265724f6645706f63687320686173682063616e6e6f74206265207a65726fa2646970667358221220d151e176ae4d67c504e535c636330af1f8b3721ef6dd169fa6e164193c3cb83164736f6c634300060a0033", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token_address\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assertionIssuer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"numberOfEpochs\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assertionTimeToLive\",\"type\":\"uint256\"}],\"name\":\"AssertionCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"TokenAddressSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensCollected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationFailed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"TRAC_TOKEN_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"numberOfEpochs\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assertionTimeToLive\",\"type\":\"uint256\"}],\"name\":\"createAssertionRecord\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"}],\"name\":\"getAssertionIssuer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"}],\"name\":\"getAssertionNumberOfEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"numberOfEpochs\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"}],\"name\":\"getAssertionRootHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"name\":\"getAssertionTask\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"task\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"}],\"name\":\"getAssertionTimeToLive\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"timeToLive\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"epochAssertionProof\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"epochNumber\",\"type\":\"uint256\"}],\"name\":\"submitHoldingProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"epochAssertionProof\",\"type\":\"bytes32\"}],\"name\":\"verifyAssertionProof\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"proofValid\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/DKGcontract.sol\":\"DKGcontract\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"openzeppelin-solidity/contracts/access/Ownable.sol\":{\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://90faf5851c02f9bd42c5bfb54d4f0421a2612f50ab80b2c4fa24fa3792071cc2\",\"dweb:/ipfs/QmRGM4F2PcGVF85aTfaA9YBhCHHDqrMhRjyp6fGeBTtirb\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://526dc85e1f9b9b45830e202568d267d93dde7a4fcccf4ad7798dadcd92304d3c\",\"dweb:/ipfs/QmaoXMB972J3cSDLtBq3xBo4jLwqD2uzXTwujtSPqkYVhR\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://24427744bd3e6cb73c17010119af12a318289c0253a4d9acb8576c9fb3797b08\",\"dweb:/ipfs/QmTLDqpKRBuxGxRAmjgXt9AkXyACW3MtKzi7PYjm5iMfGC\"]},\"openzeppelin-solidity/contracts/utils/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]},\"project:/contracts/DKGcontract.sol\":{\"keccak256\":\"0xea0c3c1edba3277ff8a18e50b054ab4d2e1f9434b2554270a4cccb3edb0d9ef3\",\"urls\":[\"bzz-raw://259759777c8a56dae6f5980dd9b6a27725636643e6cc54b0fd6e6f3e997176c6\",\"dweb:/ipfs/QmWzcVDUJ8ymwT6dYd15VhpyZsB9WeCs9BeomSVxr5Cer7\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506040516110423803806110428339818101604052602081101561003357600080fd5b810190808051906020019092919050505060006100546101f760201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561012c57600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167fd82cad5fdc98633445b90f806f2e1a61a5409f92187ee9cd87f1da18c906926660405160405180910390a2506101ff565b600033905090565b610e348061020e6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80638f9cd32b116100715780638f9cd32b1461022b5780639e50e72c1461025f578063b934b4e4146102a1578063ce64c643146102e3578063f164c43614610325578063f2fde38b14610391576100b4565b80630828e9f3146100b957806308c4933b14610111578063193f9c7e1461015d5780636988bc03146101ab578063715018a6146101ed5780638da5cb5b146101f7575b600080fd5b6100e5600480360360208110156100cf57600080fd5b81019080803590602001909291905050506103d5565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101476004803603604081101561012757600080fd5b810190808035906020019092919080359060200190929190505050610412565b6040518082815260200191505060405180910390f35b6101936004803603604081101561017357600080fd5b81019080803590602001909291908035906020019092919050505061041d565b60405180821515815260200191505060405180910390f35b6101d7600480360360208110156101c157600080fd5b8101908080359060200190929190505050610429565b6040518082815260200191505060405180910390f35b6101f5610449565b005b6101ff6105b6565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102336105df565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61028b6004803603602081101561027557600080fd5b8101908080359060200190929190505050610605565b6040518082815260200191505060405180910390f35b6102cd600480360360208110156102b757600080fd5b8101908080359060200190929190505050610625565b6040518082815260200191505060405180910390f35b610323600480360360608110156102f957600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050610645565b005b61038f600480360360a081101561033b57600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291905050506107ca565b005b6103d3600480360360208110156103a757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b6e565b005b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600043905092915050565b60006001905092915050565b600060036000838152602001908152602001600020600001549050919050565b610451610d60565b73ffffffffffffffffffffffffffffffffffffffff1661046f6105b6565b73ffffffffffffffffffffffffffffffffffffffff16146104f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060036000838152602001908152602001600020600101549050919050565b600060036000838152602001908152602001600020600401549050919050565b6000801b8314156106be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f617373657274696f6e494420686173682063616e6e6f74206265207a65726f0081525060200191505060405180910390fd5b6000801b82141561071a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180610db66027913960400191505060405180910390fd5b610724838361041d565b1561077f57803373ffffffffffffffffffffffffffffffffffffffff16847fce001fcd900079c312eaa96f5c1c389ffe207eb41e90197f5a011668b58ef598607b6040518082815260200191505060405180910390a46107c5565b803373ffffffffffffffffffffffffffffffffffffffff16847f37d4188105d31e43e2177257c4e9cc2c8eda5c0783943eb00abe942ac687b03a60405160405180910390a45b505050565b6000801b851415610843576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f617373657274696f6e494420686173682063616e6e6f74206265207a65726f0081525060200191505060405180910390fd5b6000801b8414156108bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f726f6f744861736820686173682063616e6e6f74206265207a65726f0000000081525060200191505060405180910390fd5b6000821415610916576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180610ddd6022913960400191505060405180910390fd5b6000811415610970576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180610d696027913960400191505060405180910390fd5b60006003600087815260200190815260200160002060020154146109fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f417373657274696f6e20616c726561647920657869737473210000000000000081525060200191505060405180910390fd5b816003600087815260200190815260200160002060010181905550806003600087815260200190815260200160002060000181905550426003600087815260200190815260200160002060020181905550836003600087815260200190815260200160002060040181905550826003600087815260200190815260200160002060030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550826004600087815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff1684867f25e2604032d2f5a218a9bed084fc10fd98b83e3b86a79ba39c214095984250168585604051808381526020018281526020019250505060405180910390a45050505050565b610b76610d60565b73ffffffffffffffffffffffffffffffffffffffff16610b946105b6565b73ffffffffffffffffffffffffffffffffffffffff1614610c1d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610ca3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180610d906026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60003390509056fe617373657274696f6e54696d65546f4c69766520686173682063616e6e6f74206265207a65726f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737365706f6368417373657274696f6e50726f6f6620686173682063616e6e6f74206265207a65726f6e756d6265724f6645706f63687320686173682063616e6e6f74206265207a65726fa2646970667358221220152e1139f6922ba82f151b38f91761c9b96c2f0c3be8314e4fb01b519122451964736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c80638f9cd32b116100715780638f9cd32b1461022b5780639e50e72c1461025f578063b934b4e4146102a1578063ce64c643146102e3578063f164c43614610325578063f2fde38b14610391576100b4565b80630828e9f3146100b957806308c4933b14610111578063193f9c7e1461015d5780636988bc03146101ab578063715018a6146101ed5780638da5cb5b146101f7575b600080fd5b6100e5600480360360208110156100cf57600080fd5b81019080803590602001909291905050506103d5565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101476004803603604081101561012757600080fd5b810190808035906020019092919080359060200190929190505050610412565b6040518082815260200191505060405180910390f35b6101936004803603604081101561017357600080fd5b81019080803590602001909291908035906020019092919050505061041d565b60405180821515815260200191505060405180910390f35b6101d7600480360360208110156101c157600080fd5b8101908080359060200190929190505050610429565b6040518082815260200191505060405180910390f35b6101f5610449565b005b6101ff6105b6565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102336105df565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61028b6004803603602081101561027557600080fd5b8101908080359060200190929190505050610605565b6040518082815260200191505060405180910390f35b6102cd600480360360208110156102b757600080fd5b8101908080359060200190929190505050610625565b6040518082815260200191505060405180910390f35b610323600480360360608110156102f957600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050610645565b005b61038f600480360360a081101561033b57600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291905050506107ca565b005b6103d3600480360360208110156103a757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b6e565b005b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600043905092915050565b60006001905092915050565b600060036000838152602001908152602001600020600001549050919050565b610451610d60565b73ffffffffffffffffffffffffffffffffffffffff1661046f6105b6565b73ffffffffffffffffffffffffffffffffffffffff16146104f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060036000838152602001908152602001600020600101549050919050565b600060036000838152602001908152602001600020600401549050919050565b6000801b8314156106be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f617373657274696f6e494420686173682063616e6e6f74206265207a65726f0081525060200191505060405180910390fd5b6000801b82141561071a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180610db66027913960400191505060405180910390fd5b610724838361041d565b1561077f57803373ffffffffffffffffffffffffffffffffffffffff16847fce001fcd900079c312eaa96f5c1c389ffe207eb41e90197f5a011668b58ef598607b6040518082815260200191505060405180910390a46107c5565b803373ffffffffffffffffffffffffffffffffffffffff16847f37d4188105d31e43e2177257c4e9cc2c8eda5c0783943eb00abe942ac687b03a60405160405180910390a45b505050565b6000801b851415610843576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f617373657274696f6e494420686173682063616e6e6f74206265207a65726f0081525060200191505060405180910390fd5b6000801b8414156108bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f726f6f744861736820686173682063616e6e6f74206265207a65726f0000000081525060200191505060405180910390fd5b6000821415610916576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180610ddd6022913960400191505060405180910390fd5b6000811415610970576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180610d696027913960400191505060405180910390fd5b60006003600087815260200190815260200160002060020154146109fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f417373657274696f6e20616c726561647920657869737473210000000000000081525060200191505060405180910390fd5b816003600087815260200190815260200160002060010181905550806003600087815260200190815260200160002060000181905550426003600087815260200190815260200160002060020181905550836003600087815260200190815260200160002060040181905550826003600087815260200190815260200160002060030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550826004600087815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff1684867f25e2604032d2f5a218a9bed084fc10fd98b83e3b86a79ba39c214095984250168585604051808381526020018281526020019250505060405180910390a45050505050565b610b76610d60565b73ffffffffffffffffffffffffffffffffffffffff16610b946105b6565b73ffffffffffffffffffffffffffffffffffffffff1614610c1d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610ca3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180610d906026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60003390509056fe617373657274696f6e54696d65546f4c69766520686173682063616e6e6f74206265207a65726f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737365706f6368417373657274696f6e50726f6f6620686173682063616e6e6f74206265207a65726f6e756d6265724f6645706f63687320686173682063616e6e6f74206265207a65726fa2646970667358221220152e1139f6922ba82f151b38f91761c9b96c2f0c3be8314e4fb01b519122451964736f6c63430007060033", "immutableReferences": {}, - "sourceMap": "278:3619:4:-:0;;;1347:199;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;884:17:0;904:12;:10;;;:12;;:::i;:::-;884:32;;935:9;926:6;;:18;;;;;;;;;;;;;;;;;;992:9;959:43;;988:1;959:43;;;;;;;;;;;;850:159;1425:1:4;1402:25;;:13;:25;;;;1394:34;;;;;;1447:13;1432:5;;:29;;;;;;;;;;;;;;;;;;1486:13;1465:18;;:34;;;;;;;;;;;;;;;;;;1527:13;1511:30;;;;;;;;;;;;1347:199;278:3619;;598:104:3;651:15;685:10;678:17;;598:104;:::o;278:3619:4:-;;;;;;;", - "deployedSourceMap": "278:3619:4:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3177:129;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;3771:123;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3038:134;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;3451:156;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1717:145:0;;;:::i;:::-;;1559:990:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1085:85:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;360:33:4;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;3609:159;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3308:141;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2564:469;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;2011:240:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;3177:129:4;3247:15;3274;:28;3290:11;3274:28;;;;;;;;;;;;;;;;;;;;;3267:35;;3177:129;;;:::o;3771:123::-;3854:12;3878;3871:19;;3771:123;;;;:::o;3038:134::-;3136:15;3163:4;3156:11;;3038:134;;;;:::o;3451:156::-;3525:18;3555:15;:28;3571:11;3555:28;;;;;;;;;;;:48;;;3548:55;;3451:156;;;:::o;1717:145:0:-;1308:12;:10;:12::i;:::-;1297:23;;:7;:5;:7::i;:::-;:23;;;1289:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1823:1:::1;1786:40;;1807:6;::::0;::::1;;;;;;;;;1786:40;;;;;;;;;;;;1853:1;1836:6:::0;::::1;:19;;;;;;;;;;;;;;;;;;1717:145::o:0;1559:990:4:-;1716:1;1701:16;;:11;:16;;1693:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1777:1;1765:13;;:8;:13;;1757:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1841:1;1823:14;:19;;1815:66;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1916:1;1893:19;:24;;1885:76;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2016:1;1973:15;:28;1989:11;1973:28;;;;;;;;;;;:41;;;:44;1965:82;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2151:14;2105:15;:28;2121:11;2105:28;;;;;;;;;;;:43;;:60;;;;2220:19;2169:15;:28;2185:11;2169:28;;;;;;;;;;;:48;;:70;;;;2287:15;2243;:28;2259:11;2243:28;;;;;;;;;;;:41;;:59;;;;2346:8;2306:15;:28;2322:11;2306:28;;;;;;;;;;;:37;;:48;;;;2396:10;2358:15;:28;2374:11;2358:28;;;;;;;;;;;:35;;;:48;;;;;;;;;;;;;;;;;;2441:10;2410:15;:28;2426:11;2410:28;;;;;;;;;;;;:41;;;;;;;;;;;;;;;;;;2499:10;2461:84;;2490:8;2478:11;2461:84;2510:14;2525:19;2461:84;;;;;;;;;;;;;;;;;;;;;;;;1559:990;;;;:::o;1085:85:0:-;1131:7;1157:6;;;;;;;;;;;1150:13;;1085:85;:::o;360:33:4:-;;;;;;;;;;;;;:::o;3609:159::-;3687:22;3721:15;:28;3737:11;3721:28;;;;;;;;;;;:43;;;3714:50;;3609:159;;;:::o;3308:141::-;3380:16;3408:15;:28;3424:11;3408:28;;;;;;;;;;;:37;;;3401:44;;3308:141;;;:::o;2564:469::-;2699:1;2684:16;;:11;:16;;2676:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2771:1;2748:24;;:19;:24;;2740:76;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2825:54;2846:11;2859:19;2825:20;:54::i;:::-;2821:208;;;2929:11;2918:10;2890:56;;2906:11;2890:56;2942:3;2890:56;;;;;;;;;;;;;;;;;;2821:208;;;3011:11;3000:10;2969:54;;2988:11;2969:54;;;;;;;;;;2821:208;2564:469;;;:::o;2011:240:0:-;1308:12;:10;:12::i;:::-;1297:23;;:7;:5;:7::i;:::-;:23;;;1289:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2119:1:::1;2099:22;;:8;:22;;;;2091:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2208:8;2179:38;;2200:6;::::0;::::1;;;;;;;;;2179:38;;;;;;;;;;;;2236:8;2227:6;::::0;:17:::1;;;;;;;;;;;;;;;;;;2011:240:::0;:::o;598:104:3:-;651:15;685:10;678:17;;598:104;:::o", - "source": "pragma solidity 0.6.10;\n\nimport \"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\";\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"openzeppelin-solidity/contracts/access/Ownable.sol\";\n\n\n// mock contract for now, we will add the hub and the rest later\ncontract DKGcontract is Ownable {\n\n\n\tusing SafeMath for uint256;\n\tIERC20 token;\n\n\taddress public TRAC_TOKEN_ADDRESS;\n\n\tstruct AssertionRecord{\n\t\t// bytes32 assertionID; // hash (multihash) of the assertion\n\t\tuint256 assertionTimeToLive;\n\t\tuint256 numberOfEpochs;\n\t\tuint256 creationTime;\n\t\taddress issuer;\n\t\tbytes32 rootHash;\n\t\tbytes32 data; // for extensibility\n\t\t// TODO: include Token management\n\t}\n\n\tmapping(bytes32 => AssertionRecord) internal assertionRecord; // assertionRecord[assertionID] , formerly offer[offerID]\n\tmapping(bytes32 => address) internal assertionIssuer; // mapping assertionID -> assertionIssuer\n\n\n\t// events\n\tevent TokenAddressSet(address indexed token);\n\tevent AssertionCreated(bytes32 indexed assertionID, bytes32 indexed rootHash, address indexed assertionIssuer, uint256 numberOfEpochs, uint256 assertionTimeToLive);\n\tevent TokensCollected(bytes32 indexed assertionID, address indexed prover, uint256 indexed epoch, uint256 amount);\n\tevent VerificationFailed(bytes32 indexed assertionID, address indexed prover, uint256 indexed epoch);\n\n\n\n\tconstructor(address token_address) public {\n\t\trequire(token_address!=address(0));\n\t\ttoken = IERC20(token_address);\n\t\tTRAC_TOKEN_ADDRESS = token_address;\n\t\t\n\t\temit TokenAddressSet(token_address);\n\n\t}\n\n\t/* DC */\n\tfunction createAssertionRecord(bytes32 assertionID, bytes32 rootHash, uint256 numberOfEpochs, uint256 assertionTimeToLive) public {\n\t\trequire(assertionID != 0, \"assertionID hash cannot be zero\");\n\t\trequire(rootHash != 0, \"rootHash hash cannot be zero\");\n\t\trequire(numberOfEpochs != 0, \"numberOfEpochs hash cannot be zero\");\n\t\trequire(assertionTimeToLive != 0, \"assertionTimeToLive hash cannot be zero\");\n\t\trequire(assertionRecord[assertionID].creationTime==0, \"Assertion already exists!\");\n\n\t\t// transfer token to contract here (next version)\n\n\t\tassertionRecord[assertionID].numberOfEpochs = numberOfEpochs;\n\t\tassertionRecord[assertionID].assertionTimeToLive = assertionTimeToLive;\n\t\tassertionRecord[assertionID].creationTime = block.timestamp;\n\t\tassertionRecord[assertionID].rootHash = rootHash;\n\t\tassertionRecord[assertionID].issuer = msg.sender;\n\t\tassertionIssuer[assertionID] = msg.sender;\n\n\t\temit AssertionCreated(assertionID,rootHash,msg.sender,numberOfEpochs,assertionTimeToLive);\n\t}\n\n\n\t/* DH */\n\n\tfunction submitHoldingProof(bytes32 assertionID, bytes32 epochAssertionProof, uint256 epochNumber) \n\tpublic {\n\t\trequire(assertionID != 0, \"assertionID hash cannot be zero\");\n\t\trequire(epochAssertionProof != 0, \"epochAssertionProof hash cannot be zero\");\n\n\t\tif (verifyAssertionProof(assertionID, epochAssertionProof)){\n\t\t\temit TokensCollected(assertionID,msg.sender,epochNumber, 123);\n\t\t\t} else {\n\t\t\t\temit VerificationFailed(assertionID,msg.sender,epochNumber);\n\t\t\t}\n\n\t}\n\n\n\n\tfunction verifyAssertionProof(bytes32 assertionID, bytes32 epochAssertionProof) \n\t\tpublic returns(bool proofValid){\n\t\treturn true;\n\n\t}\n\n\n\n\tfunction getAssertionIssuer(bytes32 assertionID)\n\tpublic view returns(address creator){\n\t\treturn assertionIssuer[assertionID];\n\t}\n\tfunction getAssertionRootHash(bytes32 assertionID)\n\tpublic view returns(bytes32 rootHash){\n\t\treturn assertionRecord[assertionID].rootHash;\n\t}\n\tfunction getAssertionTimeToLive(bytes32 assertionID)\n\tpublic view returns(uint256 timeToLive){\n\t\treturn assertionRecord[assertionID].assertionTimeToLive;\n\t}\n\tfunction getAssertionNumberOfEpochs(bytes32 assertionID)\n\tpublic view returns(uint256 numberOfEpochs){\n\t\treturn assertionRecord[assertionID].numberOfEpochs;\n\t}\n\n\tfunction getAssertionTask(bytes32 assertionID, uint256 epoch)\n\tpublic view returns(uint256 task){\n\t\treturn block.number;\n\t}\n\n}", + "generatedSources": [], + "deployedGeneratedSources": [], + "sourceMap": "286:3623:7:-:0;;;1355:199;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;884:17:0;904:12;:10;;;:12;;:::i;:::-;884:32;;935:9;926:6;;:18;;;;;;;;;;;;;;;;;;992:9;959:43;;988:1;959:43;;;;;;;;;;;;850:159;1433:1:7;1410:25;;:13;:25;;;;1402:34;;;;;;1455:13;1440:5;;:29;;;;;;;;;;;;;;;;;;1494:13;1473:18;;:34;;;;;;;;;;;;;;;;;;1535:13;1519:30;;;;;;;;;;;;1355:199;286:3623;;598:104:6;651:15;685:10;678:17;;598:104;:::o;286:3623:7:-;;;;;;;", + "deployedSourceMap": "286:3623:7:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3189:129;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;3783:123;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3050:134;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;3463:156;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1717:145:0;;;:::i;:::-;;1085:85;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;368:33:7;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;3621:159;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3320:141;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2576:469;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1567:994;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;2011:240:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;3189:129:7;3259:15;3286;:28;3302:11;3286:28;;;;;;;;;;;;;;;;;;;;;3279:35;;3189:129;;;:::o;3783:123::-;3866:12;3890;3883:19;;3783:123;;;;:::o;3050:134::-;3148:15;3175:4;3168:11;;3050:134;;;;:::o;3463:156::-;3537:18;3567:15;:28;3583:11;3567:28;;;;;;;;;;;:48;;;3560:55;;3463:156;;;:::o;1717:145:0:-;1308:12;:10;:12::i;:::-;1297:23;;:7;:5;:7::i;:::-;:23;;;1289:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1823:1:::1;1786:40;;1807:6;::::0;::::1;;;;;;;;1786:40;;;;;;;;;;;;1853:1;1836:6:::0;::::1;:19;;;;;;;;;;;;;;;;;;1717:145::o:0;1085:85::-;1131:7;1157:6;;;;;;;;;;;1150:13;;1085:85;:::o;368:33:7:-;;;;;;;;;;;;;:::o;3621:159::-;3699:22;3733:15;:28;3749:11;3733:28;;;;;;;;;;;:43;;;3726:50;;3621:159;;;:::o;3320:141::-;3392:16;3420:15;:28;3436:11;3420:28;;;;;;;;;;;:37;;;3413:44;;3320:141;;;:::o;2576:469::-;2711:1;2696:16;;:11;:16;;2688:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2783:1;2760:24;;:19;:24;;2752:76;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2837:54;2858:11;2871:19;2837:20;:54::i;:::-;2833:208;;;2941:11;2930:10;2902:56;;2918:11;2902:56;2954:3;2902:56;;;;;;;;;;;;;;;;;;2833:208;;;3023:11;3012:10;2981:54;;3000:11;2981:54;;;;;;;;;;2833:208;2576:469;;;:::o;1567:994::-;1740:1;1725:16;;:11;:16;;1717:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1801:1;1789:13;;:8;:13;;1781:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1865:1;1847:14;:19;;1839:66;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1940:1;1917:19;:24;;1909:76;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2040:1;1997:15;:28;2013:11;1997:28;;;;;;;;;;;:41;;;:44;1989:82;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2175:14;2129:15;:28;2145:11;2129:28;;;;;;;;;;;:43;;:60;;;;2244:19;2193:15;:28;2209:11;2193:28;;;;;;;;;;;:48;;:70;;;;2311:15;2267;:28;2283:11;2267:28;;;;;;;;;;;:41;;:59;;;;2370:8;2330:15;:28;2346:11;2330:28;;;;;;;;;;;:37;;:48;;;;2420:6;2382:15;:28;2398:11;2382:28;;;;;;;;;;;:35;;;:44;;;;;;;;;;;;;;;;;;2461:6;2430:15;:28;2446:11;2430:28;;;;;;;;;;;;:37;;;;;;;;;;;;;;;;;;2515:6;2477:80;;2506:8;2494:11;2477:80;2522:14;2537:19;2477:80;;;;;;;;;;;;;;;;;;;;;;;;1567:994;;;;;:::o;2011:240:0:-;1308:12;:10;:12::i;:::-;1297:23;;:7;:5;:7::i;:::-;:23;;;1289:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2119:1:::1;2099:22;;:8;:22;;;;2091:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2208:8;2179:38;;2200:6;::::0;::::1;;;;;;;;2179:38;;;;;;;;;;;;2236:8;2227:6;::::0;:17:::1;;;;;;;;;;;;;;;;;;2011:240:::0;:::o;598:104:6:-;651:15;685:10;678:17;;598:104;:::o", + "source": "pragma solidity >=0.6.0 <0.8.0;\n\nimport \"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\";\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"openzeppelin-solidity/contracts/access/Ownable.sol\";\n\n\n// mock contract for now, we will add the hub and the rest later\ncontract DKGcontract is Ownable {\n\n\n\tusing SafeMath for uint256;\n\tIERC20 token;\n\n\taddress public TRAC_TOKEN_ADDRESS;\n\n\tstruct AssertionRecord{\n\t\t// bytes32 assertionID; // hash (multihash) of the assertion\n\t\tuint256 assertionTimeToLive;\n\t\tuint256 numberOfEpochs;\n\t\tuint256 creationTime;\n\t\taddress issuer;\n\t\tbytes32 rootHash;\n\t\tbytes32 data; // for extensibility\n\t\t// TODO: include Token management\n\t}\n\n\tmapping(bytes32 => AssertionRecord) internal assertionRecord; // assertionRecord[assertionID] , formerly offer[offerID]\n\tmapping(bytes32 => address) internal assertionIssuer; // mapping assertionID -> assertionIssuer\n\n\n\t// events\n\tevent TokenAddressSet(address indexed token);\n\tevent AssertionCreated(bytes32 indexed assertionID, bytes32 indexed rootHash, address indexed assertionIssuer, uint256 numberOfEpochs, uint256 assertionTimeToLive);\n\tevent TokensCollected(bytes32 indexed assertionID, address indexed prover, uint256 indexed epoch, uint256 amount);\n\tevent VerificationFailed(bytes32 indexed assertionID, address indexed prover, uint256 indexed epoch);\n\n\n\n\tconstructor(address token_address) public {\n\t\trequire(token_address!=address(0));\n\t\ttoken = IERC20(token_address);\n\t\tTRAC_TOKEN_ADDRESS = token_address;\n\t\t\n\t\temit TokenAddressSet(token_address);\n\n\t}\n\n\t/* DC */\n\tfunction createAssertionRecord(bytes32 assertionID, bytes32 rootHash, address issuer, uint256 numberOfEpochs, uint256 assertionTimeToLive) public {\n\t\trequire(assertionID != 0, \"assertionID hash cannot be zero\");\n\t\trequire(rootHash != 0, \"rootHash hash cannot be zero\");\n\t\trequire(numberOfEpochs != 0, \"numberOfEpochs hash cannot be zero\");\n\t\trequire(assertionTimeToLive != 0, \"assertionTimeToLive hash cannot be zero\");\n\t\trequire(assertionRecord[assertionID].creationTime==0, \"Assertion already exists!\");\n\n\t\t// transfer token to contract here (next version)\n\n\t\tassertionRecord[assertionID].numberOfEpochs = numberOfEpochs;\n\t\tassertionRecord[assertionID].assertionTimeToLive = assertionTimeToLive;\n\t\tassertionRecord[assertionID].creationTime = block.timestamp;\n\t\tassertionRecord[assertionID].rootHash = rootHash;\n\t\tassertionRecord[assertionID].issuer = issuer;\n\t\tassertionIssuer[assertionID] = issuer;\n\n\t\temit AssertionCreated(assertionID,rootHash,issuer,numberOfEpochs,assertionTimeToLive);\n\t}\n\n\n\t/* DH */\n\n\tfunction submitHoldingProof(bytes32 assertionID, bytes32 epochAssertionProof, uint256 epochNumber) \n\tpublic {\n\t\trequire(assertionID != 0, \"assertionID hash cannot be zero\");\n\t\trequire(epochAssertionProof != 0, \"epochAssertionProof hash cannot be zero\");\n\n\t\tif (verifyAssertionProof(assertionID, epochAssertionProof)){\n\t\t\temit TokensCollected(assertionID,msg.sender,epochNumber, 123);\n\t\t\t} else {\n\t\t\t\temit VerificationFailed(assertionID,msg.sender,epochNumber);\n\t\t\t}\n\n\t}\n\n\n\n\tfunction verifyAssertionProof(bytes32 assertionID, bytes32 epochAssertionProof) \n\t\tpublic returns(bool proofValid){\n\t\treturn true;\n\n\t}\n\n\n\n\tfunction getAssertionIssuer(bytes32 assertionID)\n\tpublic view returns(address creator){\n\t\treturn assertionIssuer[assertionID];\n\t}\n\tfunction getAssertionRootHash(bytes32 assertionID)\n\tpublic view returns(bytes32 rootHash){\n\t\treturn assertionRecord[assertionID].rootHash;\n\t}\n\tfunction getAssertionTimeToLive(bytes32 assertionID)\n\tpublic view returns(uint256 timeToLive){\n\t\treturn assertionRecord[assertionID].assertionTimeToLive;\n\t}\n\tfunction getAssertionNumberOfEpochs(bytes32 assertionID)\n\tpublic view returns(uint256 numberOfEpochs){\n\t\treturn assertionRecord[assertionID].numberOfEpochs;\n\t}\n\n\tfunction getAssertionTask(bytes32 assertionID, uint256 epoch)\n\tpublic view returns(uint256 task){\n\t\treturn block.number;\n\t}\n\n}", "sourcePath": "/Users/miloskotlar/dkg-onchain-module-v6/contracts/DKGcontract.sol", "ast": { "absolutePath": "project:/contracts/DKGcontract.sol", "exportedSymbols": { + "Context": [ + 815 + ], "DKGcontract": [ - 889 + 1138 + ], + "IERC20": [ + 676 + ], + "Ownable": [ + 109 + ], + "SafeMath": [ + 476 ] }, - "id": 890, - "license": null, + "id": 1139, "nodeType": "SourceUnit", "nodes": [ { - "id": 567, + "id": 817, "literals": [ "solidity", + ">=", "0.6", - ".10" + ".0", + "<", + "0.8", + ".0" ], "nodeType": "PragmaDirective", - "src": "0:23:4" + "src": "0:31:7" }, { "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", "file": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", - "id": 568, + "id": 818, "nodeType": "ImportDirective", - "scope": 890, - "sourceUnit": 543, - "src": "25:64:4", + "scope": 1139, + "sourceUnit": 677, + "src": "33:64:7", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", "file": "openzeppelin-solidity/contracts/math/SafeMath.sol", - "id": 569, + "id": 819, "nodeType": "ImportDirective", - "scope": 890, - "sourceUnit": 465, - "src": "90:59:4", + "scope": 1139, + "sourceUnit": 477, + "src": "98:59:7", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "openzeppelin-solidity/contracts/access/Ownable.sol", "file": "openzeppelin-solidity/contracts/access/Ownable.sol", - "id": 570, + "id": 820, "nodeType": "ImportDirective", - "scope": 890, + "scope": 1139, "sourceUnit": 110, - "src": "150:60:4", + "src": "158:60:7", "symbolAliases": [], "unitAlias": "" }, @@ -432,61 +454,57 @@ "abstract": false, "baseContracts": [ { - "arguments": null, "baseName": { - "contractScope": null, - "id": 571, + "id": 821, "name": "Ownable", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 109, - "src": "302:7:4", + "src": "310:7:7", "typeDescriptions": { "typeIdentifier": "t_contract$_Ownable_$109", "typeString": "contract Ownable" } }, - "id": 572, + "id": 822, "nodeType": "InheritanceSpecifier", - "src": "302:7:4" + "src": "310:7:7" } ], "contractDependencies": [ 109, - 565 + 815 ], "contractKind": "contract", - "documentation": null, "fullyImplemented": true, - "id": 889, + "id": 1138, "linearizedBaseContracts": [ - 889, + 1138, 109, - 565 + 815 ], "name": "DKGcontract", "nodeType": "ContractDefinition", "nodes": [ { - "id": 575, + "id": 825, "libraryName": { - "contractScope": null, - "id": 573, + "id": 823, "name": "SafeMath", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 464, - "src": "321:8:4", + "referencedDeclaration": 476, + "src": "329:8:7", "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$464", + "typeIdentifier": "t_contract$_SafeMath_$476", "typeString": "library SafeMath" } }, "nodeType": "UsingForDirective", - "src": "315:27:4", + "src": "323:27:7", "typeName": { - "id": 574, + "id": 824, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "334:7:4", + "src": "342:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -495,44 +513,40 @@ }, { "constant": false, - "id": 577, + "id": 827, "mutability": "mutable", "name": "token", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 889, - "src": "344:12:4", + "scope": 1138, + "src": "352:12:7", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$542", + "typeIdentifier": "t_contract$_IERC20_$676", "typeString": "contract IERC20" }, "typeName": { - "contractScope": null, - "id": 576, + "id": 826, "name": "IERC20", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 542, - "src": "344:6:4", + "referencedDeclaration": 676, + "src": "352:6:7", "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$542", + "typeIdentifier": "t_contract$_IERC20_$676", "typeString": "contract IERC20" } }, - "value": null, "visibility": "internal" }, { "constant": false, "functionSelector": "8f9cd32b", - "id": 579, + "id": 829, "mutability": "mutable", "name": "TRAC_TOKEN_ADDRESS", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 889, - "src": "360:33:4", + "scope": 1138, + "src": "368:33:7", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -540,32 +554,30 @@ "typeString": "address" }, "typeName": { - "id": 578, + "id": 828, "name": "address", "nodeType": "ElementaryTypeName", - "src": "360:7:4", + "src": "368:7:7", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "public" }, { "canonicalName": "DKGcontract.AssertionRecord", - "id": 592, + "id": 842, "members": [ { "constant": false, - "id": 581, + "id": 831, "mutability": "mutable", "name": "assertionTimeToLive", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 592, - "src": "486:27:4", + "scope": 842, + "src": "494:27:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -573,27 +585,25 @@ "typeString": "uint256" }, "typeName": { - "id": 580, + "id": 830, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "486:7:4", + "src": "494:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 583, + "id": 833, "mutability": "mutable", "name": "numberOfEpochs", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 592, - "src": "517:22:4", + "scope": 842, + "src": "525:22:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -601,27 +611,25 @@ "typeString": "uint256" }, "typeName": { - "id": 582, + "id": 832, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "517:7:4", + "src": "525:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 585, + "id": 835, "mutability": "mutable", "name": "creationTime", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 592, - "src": "543:20:4", + "scope": 842, + "src": "551:20:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -629,27 +637,25 @@ "typeString": "uint256" }, "typeName": { - "id": 584, + "id": 834, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "543:7:4", + "src": "551:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 587, + "id": 837, "mutability": "mutable", "name": "issuer", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 592, - "src": "567:14:4", + "scope": 842, + "src": "575:14:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -657,28 +663,26 @@ "typeString": "address" }, "typeName": { - "id": 586, + "id": 836, "name": "address", "nodeType": "ElementaryTypeName", - "src": "567:7:4", + "src": "575:7:7", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 589, + "id": 839, "mutability": "mutable", "name": "rootHash", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 592, - "src": "585:16:4", + "scope": 842, + "src": "593:16:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -686,27 +690,25 @@ "typeString": "bytes32" }, "typeName": { - "id": 588, + "id": 838, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "585:7:4", + "src": "593:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 591, + "id": 841, "mutability": "mutable", "name": "data", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 592, - "src": "605:12:4", + "scope": 842, + "src": "613:12:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -714,83 +716,78 @@ "typeString": "bytes32" }, "typeName": { - "id": 590, + "id": 840, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "605:7:4", + "src": "613:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" } ], "name": "AssertionRecord", "nodeType": "StructDefinition", - "scope": 889, - "src": "397:281:4", + "scope": 1138, + "src": "405:281:7", "visibility": "public" }, { "constant": false, - "id": 596, + "id": 846, "mutability": "mutable", "name": "assertionRecord", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 889, - "src": "681:60:4", + "scope": 1138, + "src": "689:60:7", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$592_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$842_storage_$", "typeString": "mapping(bytes32 => struct DKGcontract.AssertionRecord)" }, "typeName": { - "id": 595, + "id": 845, "keyType": { - "id": 593, + "id": 843, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "689:7:4", + "src": "697:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Mapping", - "src": "681:35:4", + "src": "689:35:7", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$592_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$842_storage_$", "typeString": "mapping(bytes32 => struct DKGcontract.AssertionRecord)" }, "valueType": { - "contractScope": null, - "id": 594, + "id": 844, "name": "AssertionRecord", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 592, - "src": "700:15:4", + "referencedDeclaration": 842, + "src": "708:15:7", "typeDescriptions": { - "typeIdentifier": "t_struct$_AssertionRecord_$592_storage_ptr", + "typeIdentifier": "t_struct$_AssertionRecord_$842_storage_ptr", "typeString": "struct DKGcontract.AssertionRecord" } } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 600, + "id": 850, "mutability": "mutable", "name": "assertionIssuer", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 889, - "src": "802:52:4", + "scope": 1138, + "src": "810:52:7", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -798,28 +795,28 @@ "typeString": "mapping(bytes32 => address)" }, "typeName": { - "id": 599, + "id": 849, "keyType": { - "id": 597, + "id": 847, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "810:7:4", + "src": "818:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Mapping", - "src": "802:27:4", + "src": "810:27:7", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", "typeString": "mapping(bytes32 => address)" }, "valueType": { - "id": 598, + "id": 848, "name": "address", "nodeType": "ElementaryTypeName", - "src": "821:7:4", + "src": "829:7:7", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -827,29 +824,26 @@ } } }, - "value": null, "visibility": "internal" }, { "anonymous": false, - "documentation": null, - "id": 604, + "id": 854, "name": "TokenAddressSet", "nodeType": "EventDefinition", "parameters": { - "id": 603, + "id": 853, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 602, + "id": 852, "indexed": true, "mutability": "mutable", "name": "token", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 604, - "src": "934:21:4", + "scope": 854, + "src": "942:21:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -857,44 +851,41 @@ "typeString": "address" }, "typeName": { - "id": 601, + "id": 851, "name": "address", "nodeType": "ElementaryTypeName", - "src": "934:7:4", + "src": "942:7:7", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" } ], - "src": "933:23:4" + "src": "941:23:7" }, - "src": "912:45:4" + "src": "920:45:7" }, { "anonymous": false, - "documentation": null, - "id": 616, + "id": 866, "name": "AssertionCreated", "nodeType": "EventDefinition", "parameters": { - "id": 615, + "id": 865, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 606, + "id": 856, "indexed": true, "mutability": "mutable", "name": "assertionID", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 616, - "src": "982:27:4", + "scope": 866, + "src": "990:27:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -902,28 +893,26 @@ "typeString": "bytes32" }, "typeName": { - "id": 605, + "id": 855, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "982:7:4", + "src": "990:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 608, + "id": 858, "indexed": true, "mutability": "mutable", "name": "rootHash", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 616, - "src": "1011:24:4", + "scope": 866, + "src": "1019:24:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -931,28 +920,26 @@ "typeString": "bytes32" }, "typeName": { - "id": 607, + "id": 857, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "1011:7:4", + "src": "1019:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 610, + "id": 860, "indexed": true, "mutability": "mutable", "name": "assertionIssuer", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 616, - "src": "1037:31:4", + "scope": 866, + "src": "1045:31:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -960,29 +947,27 @@ "typeString": "address" }, "typeName": { - "id": 609, + "id": 859, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1037:7:4", + "src": "1045:7:7", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 612, + "id": 862, "indexed": false, "mutability": "mutable", "name": "numberOfEpochs", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 616, - "src": "1070:22:4", + "scope": 866, + "src": "1078:22:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -990,28 +975,26 @@ "typeString": "uint256" }, "typeName": { - "id": 611, + "id": 861, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1070:7:4", + "src": "1078:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 614, + "id": 864, "indexed": false, "mutability": "mutable", "name": "assertionTimeToLive", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 616, - "src": "1094:27:4", + "scope": 866, + "src": "1102:27:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1019,43 +1002,40 @@ "typeString": "uint256" }, "typeName": { - "id": 613, + "id": 863, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1094:7:4", + "src": "1102:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "981:141:4" + "src": "989:141:7" }, - "src": "959:164:4" + "src": "967:164:7" }, { "anonymous": false, - "documentation": null, - "id": 626, + "id": 876, "name": "TokensCollected", "nodeType": "EventDefinition", "parameters": { - "id": 625, + "id": 875, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 618, + "id": 868, "indexed": true, "mutability": "mutable", "name": "assertionID", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 626, - "src": "1147:27:4", + "scope": 876, + "src": "1155:27:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1063,28 +1043,26 @@ "typeString": "bytes32" }, "typeName": { - "id": 617, + "id": 867, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "1147:7:4", + "src": "1155:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 620, + "id": 870, "indexed": true, "mutability": "mutable", "name": "prover", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 626, - "src": "1176:22:4", + "scope": 876, + "src": "1184:22:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1092,29 +1070,27 @@ "typeString": "address" }, "typeName": { - "id": 619, + "id": 869, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1176:7:4", + "src": "1184:7:7", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 622, + "id": 872, "indexed": true, "mutability": "mutable", "name": "epoch", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 626, - "src": "1200:21:4", + "scope": 876, + "src": "1208:21:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1122,28 +1098,26 @@ "typeString": "uint256" }, "typeName": { - "id": 621, + "id": 871, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1200:7:4", + "src": "1208:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 624, + "id": 874, "indexed": false, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 626, - "src": "1223:14:4", + "scope": 876, + "src": "1231:14:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1151,43 +1125,40 @@ "typeString": "uint256" }, "typeName": { - "id": 623, + "id": 873, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1223:7:4", + "src": "1231:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "1146:92:4" + "src": "1154:92:7" }, - "src": "1125:114:4" + "src": "1133:114:7" }, { "anonymous": false, - "documentation": null, - "id": 634, + "id": 884, "name": "VerificationFailed", "nodeType": "EventDefinition", "parameters": { - "id": 633, + "id": 883, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 628, + "id": 878, "indexed": true, "mutability": "mutable", "name": "assertionID", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 634, - "src": "1266:27:4", + "scope": 884, + "src": "1274:27:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1195,28 +1166,26 @@ "typeString": "bytes32" }, "typeName": { - "id": 627, + "id": 877, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "1266:7:4", + "src": "1274:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 630, + "id": 880, "indexed": true, "mutability": "mutable", "name": "prover", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 634, - "src": "1295:22:4", + "scope": 884, + "src": "1303:22:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1224,29 +1193,27 @@ "typeString": "address" }, "typeName": { - "id": 629, + "id": 879, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1295:7:4", + "src": "1303:7:7", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 632, + "id": 882, "indexed": true, "mutability": "mutable", "name": "epoch", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 634, - "src": "1319:21:4", + "scope": 884, + "src": "1327:21:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1254,52 +1221,48 @@ "typeString": "uint256" }, "typeName": { - "id": 631, + "id": 881, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1319:7:4", + "src": "1327:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "1265:76:4" + "src": "1273:76:7" }, - "src": "1241:101:4" + "src": "1249:101:7" }, { "body": { - "id": 662, + "id": 912, "nodeType": "Block", - "src": "1390:156:4", + "src": "1398:156:7", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, - "id": 645, + "id": 895, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 640, + "id": 890, "name": "token_address", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 636, - "src": "1402:13:4", + "referencedDeclaration": 886, + "src": "1410:13:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1308,20 +1271,17 @@ "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "hexValue": "30", - "id": 643, + "id": 893, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "1425:1:4", - "subdenomination": null, + "src": "1433:1:7", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" @@ -1336,29 +1296,26 @@ "typeString": "int_const 0" } ], - "id": 642, + "id": 892, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "1417:7:4", + "src": "1425:7:7", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { - "id": 641, + "id": 891, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1417:7:4", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } + "src": "1425:7:7", + "typeDescriptions": {} } }, - "id": 644, + "id": 894, "isConstant": false, "isLValue": false, "isPure": true, @@ -1366,14 +1323,14 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1417:10:4", + "src": "1425:10:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, - "src": "1402:25:4", + "src": "1410:25:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1387,21 +1344,21 @@ "typeString": "bool" } ], - "id": 639, + "id": 889, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - -18, - -18 + 4294967278, + 4294967278 ], - "referencedDeclaration": -18, - "src": "1394:7:4", + "referencedDeclaration": 4294967278, + "src": "1402:7:7", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 646, + "id": 896, "isConstant": false, "isLValue": false, "isPure": false, @@ -1409,51 +1366,47 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1394:34:4", + "src": "1402:34:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 647, + "id": 897, "nodeType": "ExpressionStatement", - "src": "1394:34:4" + "src": "1402:34:7" }, { "expression": { - "argumentTypes": null, - "id": 652, + "id": 902, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, - "id": 648, + "id": 898, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 577, - "src": "1432:5:4", + "referencedDeclaration": 827, + "src": "1440:5:7", "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$542", + "typeIdentifier": "t_contract$_IERC20_$676", "typeString": "contract IERC20" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 650, + "id": 900, "name": "token_address", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 636, - "src": "1447:13:4", + "referencedDeclaration": 886, + "src": "1455:13:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1467,18 +1420,18 @@ "typeString": "address" } ], - "id": 649, + "id": 899, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 542, - "src": "1440:6:4", + "referencedDeclaration": 676, + "src": "1448:6:7", "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$542_$", + "typeIdentifier": "t_type$_t_contract$_IERC20_$676_$", "typeString": "type(contract IERC20)" } }, - "id": 651, + "id": 901, "isConstant": false, "isLValue": false, "isPure": false, @@ -1486,39 +1439,37 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1440:21:4", + "src": "1448:21:7", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$542", + "typeIdentifier": "t_contract$_IERC20_$676", "typeString": "contract IERC20" } }, - "src": "1432:29:4", + "src": "1440:29:7", "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$542", + "typeIdentifier": "t_contract$_IERC20_$676", "typeString": "contract IERC20" } }, - "id": 653, + "id": 903, "nodeType": "ExpressionStatement", - "src": "1432:29:4" + "src": "1440:29:7" }, { "expression": { - "argumentTypes": null, - "id": 656, + "id": 906, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, - "id": 654, + "id": 904, "name": "TRAC_TOKEN_ADDRESS", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 579, - "src": "1465:18:4", + "referencedDeclaration": 829, + "src": "1473:18:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1527,40 +1478,37 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, - "id": 655, + "id": 905, "name": "token_address", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 636, - "src": "1486:13:4", + "referencedDeclaration": 886, + "src": "1494:13:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "1465:34:4", + "src": "1473:34:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 657, + "id": 907, "nodeType": "ExpressionStatement", - "src": "1465:34:4" + "src": "1473:34:7" }, { "eventCall": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 659, + "id": 909, "name": "token_address", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 636, - "src": "1527:13:4", + "referencedDeclaration": 886, + "src": "1535:13:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1574,18 +1522,18 @@ "typeString": "address" } ], - "id": 658, + "id": 908, "name": "TokenAddressSet", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 604, - "src": "1511:15:4", + "referencedDeclaration": 854, + "src": "1519:15:7", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, - "id": 660, + "id": 910, "isConstant": false, "isLValue": false, "isPure": false, @@ -1593,40 +1541,37 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1511:30:4", + "src": "1519:30:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 661, + "id": 911, "nodeType": "EmitStatement", - "src": "1506:35:4" + "src": "1514:35:7" } ] }, - "documentation": null, - "id": 663, + "id": 913, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", - "overrides": null, "parameters": { - "id": 637, + "id": 887, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 636, + "id": 886, "mutability": "mutable", "name": "token_address", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 663, - "src": "1359:21:4", + "scope": 913, + "src": "1367:21:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1634,63 +1579,59 @@ "typeString": "address" }, "typeName": { - "id": 635, + "id": 885, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1359:7:4", + "src": "1367:7:7", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" } ], - "src": "1358:23:4" + "src": "1366:23:7" }, "returnParameters": { - "id": 638, + "id": 888, "nodeType": "ParameterList", "parameters": [], - "src": "1390:0:4" + "src": "1398:0:7" }, - "scope": 889, - "src": "1347:199:4", + "scope": 1138, + "src": "1355:199:7", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { - "id": 765, + "id": 1014, "nodeType": "Block", - "src": "1689:860:4", + "src": "1713:848:7", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, - "id": 677, + "id": 929, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 675, + "id": 927, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 665, - "src": "1701:11:4", + "referencedDeclaration": 915, + "src": "1725:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -1699,41 +1640,37 @@ "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { - "argumentTypes": null, "hexValue": "30", - "id": 676, + "id": 928, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "1716:1:4", - "subdenomination": null, + "src": "1740:1:7", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "1701:16:4", + "src": "1725:16:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "617373657274696f6e494420686173682063616e6e6f74206265207a65726f", - "id": 678, + "id": 930, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "1719:33:4", - "subdenomination": null, + "src": "1743:33:7", "typeDescriptions": { "typeIdentifier": "t_stringliteral_649a3d58a096eb864e1646a68edf6e493c6de795be271ef6a8cd2b478518591c", "typeString": "literal_string \"assertionID hash cannot be zero\"" @@ -1752,21 +1689,21 @@ "typeString": "literal_string \"assertionID hash cannot be zero\"" } ], - "id": 674, + "id": 926, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - -18, - -18 + 4294967278, + 4294967278 ], - "referencedDeclaration": -18, - "src": "1693:7:4", + "referencedDeclaration": 4294967278, + "src": "1717:7:7", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 679, + "id": 931, "isConstant": false, "isLValue": false, "isPure": false, @@ -1774,40 +1711,37 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1693:60:4", + "src": "1717:60:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 680, + "id": 932, "nodeType": "ExpressionStatement", - "src": "1693:60:4" + "src": "1717:60:7" }, { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, - "id": 684, + "id": 936, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 682, + "id": 934, "name": "rootHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 667, - "src": "1765:8:4", + "referencedDeclaration": 917, + "src": "1789:8:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -1816,41 +1750,37 @@ "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { - "argumentTypes": null, "hexValue": "30", - "id": 683, + "id": 935, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "1777:1:4", - "subdenomination": null, + "src": "1801:1:7", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "1765:13:4", + "src": "1789:13:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "726f6f744861736820686173682063616e6e6f74206265207a65726f", - "id": 685, + "id": 937, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "1780:30:4", - "subdenomination": null, + "src": "1804:30:7", "typeDescriptions": { "typeIdentifier": "t_stringliteral_224e5e3aafad117a551900ad41b6b8fd4124c64978d6cb6f2d999d30b5a7caf6", "typeString": "literal_string \"rootHash hash cannot be zero\"" @@ -1869,21 +1799,21 @@ "typeString": "literal_string \"rootHash hash cannot be zero\"" } ], - "id": 681, + "id": 933, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - -18, - -18 + 4294967278, + 4294967278 ], - "referencedDeclaration": -18, - "src": "1757:7:4", + "referencedDeclaration": 4294967278, + "src": "1781:7:7", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 686, + "id": 938, "isConstant": false, "isLValue": false, "isPure": false, @@ -1891,40 +1821,37 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1757:54:4", + "src": "1781:54:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 687, + "id": 939, "nodeType": "ExpressionStatement", - "src": "1757:54:4" + "src": "1781:54:7" }, { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 691, + "id": 943, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 689, + "id": 941, "name": "numberOfEpochs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 669, - "src": "1823:14:4", + "referencedDeclaration": 921, + "src": "1847:14:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1933,41 +1860,37 @@ "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { - "argumentTypes": null, "hexValue": "30", - "id": 690, + "id": 942, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "1841:1:4", - "subdenomination": null, + "src": "1865:1:7", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "1823:19:4", + "src": "1847:19:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "6e756d6265724f6645706f63687320686173682063616e6e6f74206265207a65726f", - "id": 692, + "id": 944, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "1844:36:4", - "subdenomination": null, + "src": "1868:36:7", "typeDescriptions": { "typeIdentifier": "t_stringliteral_fa4af5b2a5d3b443608ae031fd9009eab2ce4cb844577b417eed67d3d60328f1", "typeString": "literal_string \"numberOfEpochs hash cannot be zero\"" @@ -1986,21 +1909,21 @@ "typeString": "literal_string \"numberOfEpochs hash cannot be zero\"" } ], - "id": 688, + "id": 940, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - -18, - -18 + 4294967278, + 4294967278 ], - "referencedDeclaration": -18, - "src": "1815:7:4", + "referencedDeclaration": 4294967278, + "src": "1839:7:7", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 693, + "id": 945, "isConstant": false, "isLValue": false, "isPure": false, @@ -2008,40 +1931,37 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1815:66:4", + "src": "1839:66:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 694, + "id": 946, "nodeType": "ExpressionStatement", - "src": "1815:66:4" + "src": "1839:66:7" }, { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 698, + "id": 950, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 696, + "id": 948, "name": "assertionTimeToLive", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 671, - "src": "1893:19:4", + "referencedDeclaration": 923, + "src": "1917:19:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2050,41 +1970,37 @@ "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { - "argumentTypes": null, "hexValue": "30", - "id": 697, + "id": 949, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "1916:1:4", - "subdenomination": null, + "src": "1940:1:7", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "1893:24:4", + "src": "1917:24:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "617373657274696f6e54696d65546f4c69766520686173682063616e6e6f74206265207a65726f", - "id": 699, + "id": 951, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "1919:41:4", - "subdenomination": null, + "src": "1943:41:7", "typeDescriptions": { "typeIdentifier": "t_stringliteral_069e2edd21d0b2ae0e0fdeacec1cd50fed913131221cbb295c527db83a0001af", "typeString": "literal_string \"assertionTimeToLive hash cannot be zero\"" @@ -2103,21 +2019,21 @@ "typeString": "literal_string \"assertionTimeToLive hash cannot be zero\"" } ], - "id": 695, + "id": 947, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - -18, - -18 + 4294967278, + 4294967278 ], - "referencedDeclaration": -18, - "src": "1885:7:4", + "referencedDeclaration": 4294967278, + "src": "1909:7:7", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 700, + "id": 952, "isConstant": false, "isLValue": false, "isPure": false, @@ -2125,58 +2041,52 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1885:76:4", + "src": "1909:76:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 701, + "id": 953, "nodeType": "ExpressionStatement", - "src": "1885:76:4" + "src": "1909:76:7" }, { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 708, + "id": 960, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 703, + "id": 955, "name": "assertionRecord", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 596, - "src": "1973:15:4", + "referencedDeclaration": 846, + "src": "1997:15:7", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$592_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$842_storage_$", "typeString": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)" } }, - "id": 705, + "id": 957, "indexExpression": { - "argumentTypes": null, - "id": 704, + "id": 956, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 665, - "src": "1989:11:4", + "referencedDeclaration": 915, + "src": "2013:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2187,21 +2097,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "1973:28:4", + "src": "1997:28:7", "typeDescriptions": { - "typeIdentifier": "t_struct$_AssertionRecord_$592_storage", + "typeIdentifier": "t_struct$_AssertionRecord_$842_storage", "typeString": "struct DKGcontract.AssertionRecord storage ref" } }, - "id": 706, + "id": 958, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "creationTime", "nodeType": "MemberAccess", - "referencedDeclaration": 585, - "src": "1973:41:4", + "referencedDeclaration": 835, + "src": "1997:41:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2210,41 +2120,37 @@ "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { - "argumentTypes": null, "hexValue": "30", - "id": 707, + "id": 959, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2016:1:4", - "subdenomination": null, + "src": "2040:1:7", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "1973:44:4", + "src": "1997:44:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "417373657274696f6e20616c72656164792065786973747321", - "id": 709, + "id": 961, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "2019:27:4", - "subdenomination": null, + "src": "2043:27:7", "typeDescriptions": { "typeIdentifier": "t_stringliteral_533fbfe4d9ec6c5b4aac3ac2c85a5993318086c6dfacddd0ec06ea4b669082d1", "typeString": "literal_string \"Assertion already exists!\"" @@ -2263,21 +2169,21 @@ "typeString": "literal_string \"Assertion already exists!\"" } ], - "id": 702, + "id": 954, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - -18, - -18 + 4294967278, + 4294967278 ], - "referencedDeclaration": -18, - "src": "1965:7:4", + "referencedDeclaration": 4294967278, + "src": "1989:7:7", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 710, + "id": 962, "isConstant": false, "isLValue": false, "isPure": false, @@ -2285,51 +2191,46 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1965:82:4", + "src": "1989:82:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 711, + "id": 963, "nodeType": "ExpressionStatement", - "src": "1965:82:4" + "src": "1989:82:7" }, { "expression": { - "argumentTypes": null, - "id": 717, + "id": 969, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 712, + "id": 964, "name": "assertionRecord", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 596, - "src": "2105:15:4", + "referencedDeclaration": 846, + "src": "2129:15:7", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$592_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$842_storage_$", "typeString": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)" } }, - "id": 714, + "id": 966, "indexExpression": { - "argumentTypes": null, - "id": 713, + "id": 965, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 665, - "src": "2121:11:4", + "referencedDeclaration": 915, + "src": "2145:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2340,21 +2241,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2105:28:4", + "src": "2129:28:7", "typeDescriptions": { - "typeIdentifier": "t_struct$_AssertionRecord_$592_storage", + "typeIdentifier": "t_struct$_AssertionRecord_$842_storage", "typeString": "struct DKGcontract.AssertionRecord storage ref" } }, - "id": 715, + "id": 967, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "numberOfEpochs", "nodeType": "MemberAccess", - "referencedDeclaration": 583, - "src": "2105:43:4", + "referencedDeclaration": 833, + "src": "2129:43:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2363,62 +2264,56 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, - "id": 716, + "id": 968, "name": "numberOfEpochs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 669, - "src": "2151:14:4", + "referencedDeclaration": 921, + "src": "2175:14:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "2105:60:4", + "src": "2129:60:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 718, + "id": 970, "nodeType": "ExpressionStatement", - "src": "2105:60:4" + "src": "2129:60:7" }, { "expression": { - "argumentTypes": null, - "id": 724, + "id": 976, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 719, + "id": 971, "name": "assertionRecord", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 596, - "src": "2169:15:4", + "referencedDeclaration": 846, + "src": "2193:15:7", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$592_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$842_storage_$", "typeString": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)" } }, - "id": 721, + "id": 973, "indexExpression": { - "argumentTypes": null, - "id": 720, + "id": 972, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 665, - "src": "2185:11:4", + "referencedDeclaration": 915, + "src": "2209:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2429,21 +2324,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2169:28:4", + "src": "2193:28:7", "typeDescriptions": { - "typeIdentifier": "t_struct$_AssertionRecord_$592_storage", + "typeIdentifier": "t_struct$_AssertionRecord_$842_storage", "typeString": "struct DKGcontract.AssertionRecord storage ref" } }, - "id": 722, + "id": 974, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "assertionTimeToLive", "nodeType": "MemberAccess", - "referencedDeclaration": 581, - "src": "2169:48:4", + "referencedDeclaration": 831, + "src": "2193:48:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2452,62 +2347,56 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, - "id": 723, + "id": 975, "name": "assertionTimeToLive", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 671, - "src": "2220:19:4", + "referencedDeclaration": 923, + "src": "2244:19:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "2169:70:4", + "src": "2193:70:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 725, + "id": 977, "nodeType": "ExpressionStatement", - "src": "2169:70:4" + "src": "2193:70:7" }, { "expression": { - "argumentTypes": null, - "id": 732, + "id": 984, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 726, + "id": 978, "name": "assertionRecord", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 596, - "src": "2243:15:4", + "referencedDeclaration": 846, + "src": "2267:15:7", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$592_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$842_storage_$", "typeString": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)" } }, - "id": 728, + "id": 980, "indexExpression": { - "argumentTypes": null, - "id": 727, + "id": 979, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 665, - "src": "2259:11:4", + "referencedDeclaration": 915, + "src": "2283:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2518,21 +2407,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2243:28:4", + "src": "2267:28:7", "typeDescriptions": { - "typeIdentifier": "t_struct$_AssertionRecord_$592_storage", + "typeIdentifier": "t_struct$_AssertionRecord_$842_storage", "typeString": "struct DKGcontract.AssertionRecord storage ref" } }, - "id": 729, + "id": 981, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "creationTime", "nodeType": "MemberAccess", - "referencedDeclaration": 585, - "src": "2243:41:4", + "referencedDeclaration": 835, + "src": "2267:41:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2541,78 +2430,70 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 730, + "id": 982, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "2287:5:4", + "referencedDeclaration": 4294967292, + "src": "2311:5:7", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 731, + "id": 983, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2287:15:4", + "src": "2311:15:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "2243:59:4", + "src": "2267:59:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 733, + "id": 985, "nodeType": "ExpressionStatement", - "src": "2243:59:4" + "src": "2267:59:7" }, { "expression": { - "argumentTypes": null, - "id": 739, + "id": 991, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 734, + "id": 986, "name": "assertionRecord", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 596, - "src": "2306:15:4", + "referencedDeclaration": 846, + "src": "2330:15:7", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$592_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$842_storage_$", "typeString": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)" } }, - "id": 736, + "id": 988, "indexExpression": { - "argumentTypes": null, - "id": 735, + "id": 987, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 665, - "src": "2322:11:4", + "referencedDeclaration": 915, + "src": "2346:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2623,21 +2504,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2306:28:4", + "src": "2330:28:7", "typeDescriptions": { - "typeIdentifier": "t_struct$_AssertionRecord_$592_storage", + "typeIdentifier": "t_struct$_AssertionRecord_$842_storage", "typeString": "struct DKGcontract.AssertionRecord storage ref" } }, - "id": 737, + "id": 989, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "rootHash", "nodeType": "MemberAccess", - "referencedDeclaration": 589, - "src": "2306:37:4", + "referencedDeclaration": 839, + "src": "2330:37:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2646,62 +2527,56 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, - "id": 738, + "id": 990, "name": "rootHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 667, - "src": "2346:8:4", + "referencedDeclaration": 917, + "src": "2370:8:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "src": "2306:48:4", + "src": "2330:48:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "id": 740, + "id": 992, "nodeType": "ExpressionStatement", - "src": "2306:48:4" + "src": "2330:48:7" }, { "expression": { - "argumentTypes": null, - "id": 747, + "id": 998, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 741, + "id": 993, "name": "assertionRecord", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 596, - "src": "2358:15:4", + "referencedDeclaration": 846, + "src": "2382:15:7", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$592_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$842_storage_$", "typeString": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)" } }, - "id": 743, + "id": 995, "indexExpression": { - "argumentTypes": null, - "id": 742, + "id": 994, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 665, - "src": "2374:11:4", + "referencedDeclaration": 915, + "src": "2398:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2712,21 +2587,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2358:28:4", + "src": "2382:28:7", "typeDescriptions": { - "typeIdentifier": "t_struct$_AssertionRecord_$592_storage", + "typeIdentifier": "t_struct$_AssertionRecord_$842_storage", "typeString": "struct DKGcontract.AssertionRecord storage ref" } }, - "id": 744, + "id": 996, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "issuer", "nodeType": "MemberAccess", - "referencedDeclaration": 587, - "src": "2358:35:4", + "referencedDeclaration": 837, + "src": "2382:35:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2735,76 +2610,55 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 745, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "2396:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 746, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2396:10:4", + "id": 997, + "name": "issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 919, + "src": "2420:6:7", "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "src": "2358:48:4", + "src": "2382:44:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 748, + "id": 999, "nodeType": "ExpressionStatement", - "src": "2358:48:4" + "src": "2382:44:7" }, { "expression": { - "argumentTypes": null, - "id": 754, + "id": 1004, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 749, + "id": 1000, "name": "assertionIssuer", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 600, - "src": "2410:15:4", + "referencedDeclaration": 850, + "src": "2430:15:7", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", "typeString": "mapping(bytes32 => address)" } }, - "id": 751, + "id": 1002, "indexExpression": { - "argumentTypes": null, - "id": 750, + "id": 1001, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 665, - "src": "2426:11:4", + "referencedDeclaration": 915, + "src": "2446:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2815,7 +2669,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "2410:28:4", + "src": "2430:28:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2824,124 +2678,85 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 752, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "2441:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 753, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2441:10:4", + "id": 1003, + "name": "issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 919, + "src": "2461:6:7", "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "src": "2410:41:4", + "src": "2430:37:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 755, + "id": 1005, "nodeType": "ExpressionStatement", - "src": "2410:41:4" + "src": "2430:37:7" }, { "eventCall": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 757, + "id": 1007, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 665, - "src": "2478:11:4", + "referencedDeclaration": 915, + "src": "2494:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { - "argumentTypes": null, - "id": 758, + "id": 1008, "name": "rootHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 667, - "src": "2490:8:4", + "referencedDeclaration": 917, + "src": "2506:8:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 759, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "2499:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 760, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2499:10:4", + "id": 1009, + "name": "issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 919, + "src": "2515:6:7", "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "typeIdentifier": "t_address", + "typeString": "address" } }, { - "argumentTypes": null, - "id": 761, + "id": 1010, "name": "numberOfEpochs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 669, - "src": "2510:14:4", + "referencedDeclaration": 921, + "src": "2522:14:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "argumentTypes": null, - "id": 762, + "id": 1011, "name": "assertionTimeToLive", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 671, - "src": "2525:19:4", + "referencedDeclaration": 923, + "src": "2537:19:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2959,8 +2774,8 @@ "typeString": "bytes32" }, { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "typeIdentifier": "t_address", + "typeString": "address" }, { "typeIdentifier": "t_uint256", @@ -2971,18 +2786,18 @@ "typeString": "uint256" } ], - "id": 756, + "id": 1006, "name": "AssertionCreated", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 616, - "src": "2461:16:4", + "referencedDeclaration": 866, + "src": "2477:16:7", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (bytes32,bytes32,address,uint256,uint256)" } }, - "id": 763, + "id": 1012, "isConstant": false, "isLValue": false, "isPure": false, @@ -2990,41 +2805,38 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2461:84:4", + "src": "2477:80:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 764, + "id": 1013, "nodeType": "EmitStatement", - "src": "2456:89:4" + "src": "2472:85:7" } ] }, - "documentation": null, - "functionSelector": "73a77389", - "id": 766, + "functionSelector": "f164c436", + "id": 1015, "implemented": true, "kind": "function", "modifiers": [], "name": "createAssertionRecord", "nodeType": "FunctionDefinition", - "overrides": null, "parameters": { - "id": 672, + "id": 924, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 665, + "id": 915, "mutability": "mutable", "name": "assertionID", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 766, - "src": "1590:19:4", + "scope": 1015, + "src": "1598:19:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3032,27 +2844,25 @@ "typeString": "bytes32" }, "typeName": { - "id": 664, + "id": 914, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "1590:7:4", + "src": "1598:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 667, + "id": 917, "mutability": "mutable", "name": "rootHash", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 766, - "src": "1611:16:4", + "scope": 1015, + "src": "1619:16:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3060,27 +2870,52 @@ "typeString": "bytes32" }, "typeName": { - "id": 666, + "id": 916, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "1611:7:4", + "src": "1619:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 669, + "id": 919, + "mutability": "mutable", + "name": "issuer", + "nodeType": "VariableDeclaration", + "scope": 1015, + "src": "1637:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 918, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1637:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 921, "mutability": "mutable", "name": "numberOfEpochs", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 766, - "src": "1629:22:4", + "scope": 1015, + "src": "1653:22:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3088,27 +2923,25 @@ "typeString": "uint256" }, "typeName": { - "id": 668, + "id": 920, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1629:7:4", + "src": "1653:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 671, + "id": 923, "mutability": "mutable", "name": "assertionTimeToLive", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 766, - "src": "1653:27:4", + "scope": 1015, + "src": "1677:27:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3116,62 +2949,58 @@ "typeString": "uint256" }, "typeName": { - "id": 670, + "id": 922, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1653:7:4", + "src": "1677:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "1589:92:4" + "src": "1597:108:7" }, "returnParameters": { - "id": 673, + "id": 925, "nodeType": "ParameterList", "parameters": [], - "src": "1689:0:4" + "src": "1713:0:7" }, - "scope": 889, - "src": "1559:990:4", + "scope": 1138, + "src": "1567:994:7", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { - "id": 811, + "id": 1060, "nodeType": "Block", - "src": "2672:361:4", + "src": "2684:361:7", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, - "id": 778, + "id": 1027, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 776, + "id": 1025, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 768, - "src": "2684:11:4", + "referencedDeclaration": 1017, + "src": "2696:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3180,41 +3009,37 @@ "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { - "argumentTypes": null, "hexValue": "30", - "id": 777, + "id": 1026, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2699:1:4", - "subdenomination": null, + "src": "2711:1:7", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "2684:16:4", + "src": "2696:16:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "617373657274696f6e494420686173682063616e6e6f74206265207a65726f", - "id": 779, + "id": 1028, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "2702:33:4", - "subdenomination": null, + "src": "2714:33:7", "typeDescriptions": { "typeIdentifier": "t_stringliteral_649a3d58a096eb864e1646a68edf6e493c6de795be271ef6a8cd2b478518591c", "typeString": "literal_string \"assertionID hash cannot be zero\"" @@ -3233,21 +3058,21 @@ "typeString": "literal_string \"assertionID hash cannot be zero\"" } ], - "id": 775, + "id": 1024, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - -18, - -18 + 4294967278, + 4294967278 ], - "referencedDeclaration": -18, - "src": "2676:7:4", + "referencedDeclaration": 4294967278, + "src": "2688:7:7", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 780, + "id": 1029, "isConstant": false, "isLValue": false, "isPure": false, @@ -3255,40 +3080,37 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2676:60:4", + "src": "2688:60:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 781, + "id": 1030, "nodeType": "ExpressionStatement", - "src": "2676:60:4" + "src": "2688:60:7" }, { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, - "id": 785, + "id": 1034, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 783, + "id": 1032, "name": "epochAssertionProof", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 770, - "src": "2748:19:4", + "referencedDeclaration": 1019, + "src": "2760:19:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3297,41 +3119,37 @@ "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { - "argumentTypes": null, "hexValue": "30", - "id": 784, + "id": 1033, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2771:1:4", - "subdenomination": null, + "src": "2783:1:7", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "2748:24:4", + "src": "2760:24:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "65706f6368417373657274696f6e50726f6f6620686173682063616e6e6f74206265207a65726f", - "id": 786, + "id": 1035, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "2774:41:4", - "subdenomination": null, + "src": "2786:41:7", "typeDescriptions": { "typeIdentifier": "t_stringliteral_51a89ccd247a0e5232bbda470ea88b3fa7ebe5c9c4e686866df3ae98cc738613", "typeString": "literal_string \"epochAssertionProof hash cannot be zero\"" @@ -3350,21 +3168,21 @@ "typeString": "literal_string \"epochAssertionProof hash cannot be zero\"" } ], - "id": 782, + "id": 1031, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - -18, - -18 + 4294967278, + 4294967278 ], - "referencedDeclaration": -18, - "src": "2740:7:4", + "referencedDeclaration": 4294967278, + "src": "2752:7:7", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 787, + "id": 1036, "isConstant": false, "isLValue": false, "isPure": false, @@ -3372,42 +3190,39 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2740:76:4", + "src": "2752:76:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 788, + "id": 1037, "nodeType": "ExpressionStatement", - "src": "2740:76:4" + "src": "2752:76:7" }, { "condition": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 790, + "id": 1039, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 768, - "src": "2846:11:4", + "referencedDeclaration": 1017, + "src": "2858:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { - "argumentTypes": null, - "id": 791, + "id": 1040, "name": "epochAssertionProof", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 770, - "src": "2859:19:4", + "referencedDeclaration": 1019, + "src": "2871:19:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3425,18 +3240,18 @@ "typeString": "bytes32" } ], - "id": 789, + "id": 1038, "name": "verifyAssertionProof", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 824, - "src": "2825:20:4", + "referencedDeclaration": 1073, + "src": "2837:20:7", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$_t_bool_$", "typeString": "function (bytes32,bytes32) returns (bool)" } }, - "id": 792, + "id": 1041, "isConstant": false, "isLValue": false, "isPure": false, @@ -3444,7 +3259,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2825:54:4", + "src": "2837:54:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -3452,64 +3267,58 @@ } }, "falseBody": { - "id": 809, + "id": 1058, "nodeType": "Block", - "src": "2958:71:4", + "src": "2970:71:7", "statements": [ { "eventCall": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 803, + "id": 1052, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 768, - "src": "2988:11:4", + "referencedDeclaration": 1017, + "src": "3000:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 804, + "id": 1053, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "3000:3:4", + "referencedDeclaration": 4294967281, + "src": "3012:3:7", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 805, + "id": 1054, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3000:10:4", + "src": "3012:10:7", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { - "argumentTypes": null, - "id": 806, + "id": 1055, "name": "epochNumber", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 772, - "src": "3011:11:4", + "referencedDeclaration": 1021, + "src": "3023:11:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3531,18 +3340,18 @@ "typeString": "uint256" } ], - "id": 802, + "id": 1051, "name": "VerificationFailed", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 634, - "src": "2969:18:4", + "referencedDeclaration": 884, + "src": "2981:18:7", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (bytes32,address,uint256)" } }, - "id": 807, + "id": 1056, "isConstant": false, "isLValue": false, "isPure": false, @@ -3550,98 +3359,90 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2969:54:4", + "src": "2981:54:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 808, + "id": 1057, "nodeType": "EmitStatement", - "src": "2964:59:4" + "src": "2976:59:7" } ] }, - "id": 810, + "id": 1059, "nodeType": "IfStatement", - "src": "2821:208:4", + "src": "2833:208:7", "trueBody": { - "id": 801, + "id": 1050, "nodeType": "Block", - "src": "2880:72:4", + "src": "2892:72:7", "statements": [ { "eventCall": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 794, + "id": 1043, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 768, - "src": "2906:11:4", + "referencedDeclaration": 1017, + "src": "2918:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 795, + "id": 1044, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "2918:3:4", + "referencedDeclaration": 4294967281, + "src": "2930:3:7", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 796, + "id": 1045, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2918:10:4", + "src": "2930:10:7", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { - "argumentTypes": null, - "id": 797, + "id": 1046, "name": "epochNumber", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 772, - "src": "2929:11:4", + "referencedDeclaration": 1021, + "src": "2941:11:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "argumentTypes": null, "hexValue": "313233", - "id": 798, + "id": 1047, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2942:3:4", - "subdenomination": null, + "src": "2954:3:7", "typeDescriptions": { "typeIdentifier": "t_rational_123_by_1", "typeString": "int_const 123" @@ -3668,18 +3469,18 @@ "typeString": "int_const 123" } ], - "id": 793, + "id": 1042, "name": "TokensCollected", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 626, - "src": "2890:15:4", + "referencedDeclaration": 876, + "src": "2902:15:7", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (bytes32,address,uint256,uint256)" } }, - "id": 799, + "id": 1048, "isConstant": false, "isLValue": false, "isPure": false, @@ -3687,44 +3488,41 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2890:56:4", + "src": "2902:56:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 800, + "id": 1049, "nodeType": "EmitStatement", - "src": "2885:61:4" + "src": "2897:61:7" } ] } } ] }, - "documentation": null, "functionSelector": "ce64c643", - "id": 812, + "id": 1061, "implemented": true, "kind": "function", "modifiers": [], "name": "submitHoldingProof", "nodeType": "FunctionDefinition", - "overrides": null, "parameters": { - "id": 773, + "id": 1022, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 768, + "id": 1017, "mutability": "mutable", "name": "assertionID", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 812, - "src": "2592:19:4", + "scope": 1061, + "src": "2604:19:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3732,27 +3530,25 @@ "typeString": "bytes32" }, "typeName": { - "id": 767, + "id": 1016, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "2592:7:4", + "src": "2604:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 770, + "id": 1019, "mutability": "mutable", "name": "epochAssertionProof", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 812, - "src": "2613:27:4", + "scope": 1061, + "src": "2625:27:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3760,27 +3556,25 @@ "typeString": "bytes32" }, "typeName": { - "id": 769, + "id": 1018, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "2613:7:4", + "src": "2625:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 772, + "id": 1021, "mutability": "mutable", "name": "epochNumber", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 812, - "src": "2642:19:4", + "scope": 1061, + "src": "2654:19:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3788,87 +3582,81 @@ "typeString": "uint256" }, "typeName": { - "id": 771, + "id": 1020, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "2642:7:4", + "src": "2654:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "2591:71:4" + "src": "2603:71:7" }, "returnParameters": { - "id": 774, + "id": 1023, "nodeType": "ParameterList", "parameters": [], - "src": "2672:0:4" + "src": "2684:0:7" }, - "scope": 889, - "src": "2564:469:4", + "scope": 1138, + "src": "2576:469:7", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { - "id": 823, + "id": 1072, "nodeType": "Block", - "src": "3152:20:4", + "src": "3164:20:7", "statements": [ { "expression": { - "argumentTypes": null, "hexValue": "74727565", - "id": 821, + "id": 1070, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "3163:4:4", - "subdenomination": null, + "src": "3175:4:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, - "functionReturnParameters": 820, - "id": 822, + "functionReturnParameters": 1069, + "id": 1071, "nodeType": "Return", - "src": "3156:11:4" + "src": "3168:11:7" } ] }, - "documentation": null, "functionSelector": "193f9c7e", - "id": 824, + "id": 1073, "implemented": true, "kind": "function", "modifiers": [], "name": "verifyAssertionProof", "nodeType": "FunctionDefinition", - "overrides": null, "parameters": { - "id": 817, + "id": 1066, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 814, + "id": 1063, "mutability": "mutable", "name": "assertionID", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 824, - "src": "3068:19:4", + "scope": 1073, + "src": "3080:19:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3876,27 +3664,25 @@ "typeString": "bytes32" }, "typeName": { - "id": 813, + "id": 1062, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3068:7:4", + "src": "3080:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 816, + "id": 1065, "mutability": "mutable", "name": "epochAssertionProof", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 824, - "src": "3089:27:4", + "scope": 1073, + "src": "3101:27:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3904,34 +3690,32 @@ "typeString": "bytes32" }, "typeName": { - "id": 815, + "id": 1064, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3089:7:4", + "src": "3101:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" } ], - "src": "3067:50:4" + "src": "3079:50:7" }, "returnParameters": { - "id": 820, + "id": 1069, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 819, + "id": 1068, "mutability": "mutable", "name": "proofValid", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 824, - "src": "3136:15:4", + "scope": 1073, + "src": "3148:15:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3939,58 +3723,54 @@ "typeString": "bool" }, "typeName": { - "id": 818, + "id": 1067, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "3136:4:4", + "src": "3148:4:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "value": null, "visibility": "internal" } ], - "src": "3135:17:4" + "src": "3147:17:7" }, - "scope": 889, - "src": "3038:134:4", + "scope": 1138, + "src": "3050:134:7", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { - "id": 835, + "id": 1084, "nodeType": "Block", - "src": "3263:43:4", + "src": "3275:43:7", "statements": [ { "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 831, + "id": 1080, "name": "assertionIssuer", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 600, - "src": "3274:15:4", + "referencedDeclaration": 850, + "src": "3286:15:7", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", "typeString": "mapping(bytes32 => address)" } }, - "id": 833, + "id": 1082, "indexExpression": { - "argumentTypes": null, - "id": 832, + "id": 1081, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 826, - "src": "3290:11:4", + "referencedDeclaration": 1075, + "src": "3302:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4001,41 +3781,38 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3274:28:4", + "src": "3286:28:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "functionReturnParameters": 830, - "id": 834, + "functionReturnParameters": 1079, + "id": 1083, "nodeType": "Return", - "src": "3267:35:4" + "src": "3279:35:7" } ] }, - "documentation": null, "functionSelector": "0828e9f3", - "id": 836, + "id": 1085, "implemented": true, "kind": "function", "modifiers": [], "name": "getAssertionIssuer", "nodeType": "FunctionDefinition", - "overrides": null, "parameters": { - "id": 827, + "id": 1076, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 826, + "id": 1075, "mutability": "mutable", "name": "assertionID", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 836, - "src": "3205:19:4", + "scope": 1085, + "src": "3217:19:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4043,34 +3820,32 @@ "typeString": "bytes32" }, "typeName": { - "id": 825, + "id": 1074, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3205:7:4", + "src": "3217:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" } ], - "src": "3204:21:4" + "src": "3216:21:7" }, "returnParameters": { - "id": 830, + "id": 1079, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 829, + "id": 1078, "mutability": "mutable", "name": "creator", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 836, - "src": "3247:15:4", + "scope": 1085, + "src": "3259:15:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4078,61 +3853,56 @@ "typeString": "address" }, "typeName": { - "id": 828, + "id": 1077, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3247:7:4", + "src": "3259:7:7", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" } ], - "src": "3246:17:4" + "src": "3258:17:7" }, - "scope": 889, - "src": "3177:129:4", + "scope": 1138, + "src": "3189:129:7", "stateMutability": "view", "virtual": false, "visibility": "public" }, { "body": { - "id": 848, + "id": 1097, "nodeType": "Block", - "src": "3397:52:4", + "src": "3409:52:7", "statements": [ { "expression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 843, + "id": 1092, "name": "assertionRecord", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 596, - "src": "3408:15:4", + "referencedDeclaration": 846, + "src": "3420:15:7", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$592_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$842_storage_$", "typeString": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)" } }, - "id": 845, + "id": 1094, "indexExpression": { - "argumentTypes": null, - "id": 844, + "id": 1093, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 838, - "src": "3424:11:4", + "referencedDeclaration": 1087, + "src": "3436:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4143,55 +3913,52 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3408:28:4", + "src": "3420:28:7", "typeDescriptions": { - "typeIdentifier": "t_struct$_AssertionRecord_$592_storage", + "typeIdentifier": "t_struct$_AssertionRecord_$842_storage", "typeString": "struct DKGcontract.AssertionRecord storage ref" } }, - "id": 846, + "id": 1095, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "rootHash", "nodeType": "MemberAccess", - "referencedDeclaration": 589, - "src": "3408:37:4", + "referencedDeclaration": 839, + "src": "3420:37:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "functionReturnParameters": 842, - "id": 847, + "functionReturnParameters": 1091, + "id": 1096, "nodeType": "Return", - "src": "3401:44:4" + "src": "3413:44:7" } ] }, - "documentation": null, "functionSelector": "b934b4e4", - "id": 849, + "id": 1098, "implemented": true, "kind": "function", "modifiers": [], "name": "getAssertionRootHash", "nodeType": "FunctionDefinition", - "overrides": null, "parameters": { - "id": 839, + "id": 1088, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 838, + "id": 1087, "mutability": "mutable", "name": "assertionID", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 849, - "src": "3338:19:4", + "scope": 1098, + "src": "3350:19:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4199,34 +3966,32 @@ "typeString": "bytes32" }, "typeName": { - "id": 837, + "id": 1086, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3338:7:4", + "src": "3350:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" } ], - "src": "3337:21:4" + "src": "3349:21:7" }, "returnParameters": { - "id": 842, + "id": 1091, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 841, + "id": 1090, "mutability": "mutable", "name": "rootHash", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 849, - "src": "3380:16:4", + "scope": 1098, + "src": "3392:16:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4234,60 +3999,55 @@ "typeString": "bytes32" }, "typeName": { - "id": 840, + "id": 1089, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3380:7:4", + "src": "3392:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" } ], - "src": "3379:18:4" + "src": "3391:18:7" }, - "scope": 889, - "src": "3308:141:4", + "scope": 1138, + "src": "3320:141:7", "stateMutability": "view", "virtual": false, "visibility": "public" }, { "body": { - "id": 861, + "id": 1110, "nodeType": "Block", - "src": "3544:63:4", + "src": "3556:63:7", "statements": [ { "expression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 856, + "id": 1105, "name": "assertionRecord", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 596, - "src": "3555:15:4", + "referencedDeclaration": 846, + "src": "3567:15:7", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$592_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$842_storage_$", "typeString": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)" } }, - "id": 858, + "id": 1107, "indexExpression": { - "argumentTypes": null, - "id": 857, + "id": 1106, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 851, - "src": "3571:11:4", + "referencedDeclaration": 1100, + "src": "3583:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4298,55 +4058,52 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3555:28:4", + "src": "3567:28:7", "typeDescriptions": { - "typeIdentifier": "t_struct$_AssertionRecord_$592_storage", + "typeIdentifier": "t_struct$_AssertionRecord_$842_storage", "typeString": "struct DKGcontract.AssertionRecord storage ref" } }, - "id": 859, + "id": 1108, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "assertionTimeToLive", "nodeType": "MemberAccess", - "referencedDeclaration": 581, - "src": "3555:48:4", + "referencedDeclaration": 831, + "src": "3567:48:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 855, - "id": 860, + "functionReturnParameters": 1104, + "id": 1109, "nodeType": "Return", - "src": "3548:55:4" + "src": "3560:55:7" } ] }, - "documentation": null, "functionSelector": "6988bc03", - "id": 862, + "id": 1111, "implemented": true, "kind": "function", "modifiers": [], "name": "getAssertionTimeToLive", "nodeType": "FunctionDefinition", - "overrides": null, "parameters": { - "id": 852, + "id": 1101, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 851, + "id": 1100, "mutability": "mutable", "name": "assertionID", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 862, - "src": "3483:19:4", + "scope": 1111, + "src": "3495:19:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4354,34 +4111,32 @@ "typeString": "bytes32" }, "typeName": { - "id": 850, + "id": 1099, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3483:7:4", + "src": "3495:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" } ], - "src": "3482:21:4" + "src": "3494:21:7" }, "returnParameters": { - "id": 855, + "id": 1104, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 854, + "id": 1103, "mutability": "mutable", "name": "timeToLive", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 862, - "src": "3525:18:4", + "scope": 1111, + "src": "3537:18:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4389,60 +4144,55 @@ "typeString": "uint256" }, "typeName": { - "id": 853, + "id": 1102, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3525:7:4", + "src": "3537:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "3524:20:4" + "src": "3536:20:7" }, - "scope": 889, - "src": "3451:156:4", + "scope": 1138, + "src": "3463:156:7", "stateMutability": "view", "virtual": false, "visibility": "public" }, { "body": { - "id": 874, + "id": 1123, "nodeType": "Block", - "src": "3710:58:4", + "src": "3722:58:7", "statements": [ { "expression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 869, + "id": 1118, "name": "assertionRecord", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 596, - "src": "3721:15:4", + "referencedDeclaration": 846, + "src": "3733:15:7", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$592_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$842_storage_$", "typeString": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)" } }, - "id": 871, + "id": 1120, "indexExpression": { - "argumentTypes": null, - "id": 870, + "id": 1119, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 864, - "src": "3737:11:4", + "referencedDeclaration": 1113, + "src": "3749:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4453,55 +4203,52 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3721:28:4", + "src": "3733:28:7", "typeDescriptions": { - "typeIdentifier": "t_struct$_AssertionRecord_$592_storage", + "typeIdentifier": "t_struct$_AssertionRecord_$842_storage", "typeString": "struct DKGcontract.AssertionRecord storage ref" } }, - "id": 872, + "id": 1121, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "numberOfEpochs", "nodeType": "MemberAccess", - "referencedDeclaration": 583, - "src": "3721:43:4", + "referencedDeclaration": 833, + "src": "3733:43:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 868, - "id": 873, + "functionReturnParameters": 1117, + "id": 1122, "nodeType": "Return", - "src": "3714:50:4" + "src": "3726:50:7" } ] }, - "documentation": null, "functionSelector": "9e50e72c", - "id": 875, + "id": 1124, "implemented": true, "kind": "function", "modifiers": [], "name": "getAssertionNumberOfEpochs", "nodeType": "FunctionDefinition", - "overrides": null, "parameters": { - "id": 865, + "id": 1114, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 864, + "id": 1113, "mutability": "mutable", "name": "assertionID", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 875, - "src": "3645:19:4", + "scope": 1124, + "src": "3657:19:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4509,34 +4256,32 @@ "typeString": "bytes32" }, "typeName": { - "id": 863, + "id": 1112, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3645:7:4", + "src": "3657:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" } ], - "src": "3644:21:4" + "src": "3656:21:7" }, "returnParameters": { - "id": 868, + "id": 1117, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 867, + "id": 1116, "mutability": "mutable", "name": "numberOfEpochs", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 875, - "src": "3687:22:4", + "scope": 1124, + "src": "3699:22:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4544,92 +4289,85 @@ "typeString": "uint256" }, "typeName": { - "id": 866, + "id": 1115, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3687:7:4", + "src": "3699:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "3686:24:4" + "src": "3698:24:7" }, - "scope": 889, - "src": "3609:159:4", + "scope": 1138, + "src": "3621:159:7", "stateMutability": "view", "virtual": false, "visibility": "public" }, { "body": { - "id": 887, + "id": 1136, "nodeType": "Block", - "src": "3867:27:4", + "src": "3879:27:7", "statements": [ { "expression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 884, + "id": 1133, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "3878:5:4", + "referencedDeclaration": 4294967292, + "src": "3890:5:7", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 885, + "id": 1134, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "number", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3878:12:4", + "src": "3890:12:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 883, - "id": 886, + "functionReturnParameters": 1132, + "id": 1135, "nodeType": "Return", - "src": "3871:19:4" + "src": "3883:19:7" } ] }, - "documentation": null, "functionSelector": "08c4933b", - "id": 888, + "id": 1137, "implemented": true, "kind": "function", "modifiers": [], "name": "getAssertionTask", "nodeType": "FunctionDefinition", - "overrides": null, "parameters": { - "id": 880, + "id": 1129, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 877, + "id": 1126, "mutability": "mutable", "name": "assertionID", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 888, - "src": "3797:19:4", + "scope": 1137, + "src": "3809:19:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4637,27 +4375,25 @@ "typeString": "bytes32" }, "typeName": { - "id": 876, + "id": 1125, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3797:7:4", + "src": "3809:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 879, + "id": 1128, "mutability": "mutable", "name": "epoch", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 888, - "src": "3818:13:4", + "scope": 1137, + "src": "3830:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4665,34 +4401,32 @@ "typeString": "uint256" }, "typeName": { - "id": 878, + "id": 1127, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3818:7:4", + "src": "3830:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "3796:36:4" + "src": "3808:36:7" }, "returnParameters": { - "id": 883, + "id": 1132, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 882, + "id": 1131, "mutability": "mutable", "name": "task", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 888, - "src": "3854:12:4", + "scope": 1137, + "src": "3866:12:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4700,198 +4434,204 @@ "typeString": "uint256" }, "typeName": { - "id": 881, + "id": 1130, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3854:7:4", + "src": "3866:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "3853:14:4" + "src": "3865:14:7" }, - "scope": 889, - "src": "3771:123:4", + "scope": 1138, + "src": "3783:123:7", "stateMutability": "view", "virtual": false, "visibility": "public" } ], - "scope": 890, - "src": "278:3619:4" + "scope": 1139, + "src": "286:3623:7" } ], - "src": "0:3897:4" + "src": "0:3909:7" }, "legacyAST": { "attributes": { "absolutePath": "project:/contracts/DKGcontract.sol", "exportedSymbols": { + "Context": [ + 815 + ], "DKGcontract": [ - 889 + 1138 + ], + "IERC20": [ + 676 + ], + "Ownable": [ + 109 + ], + "SafeMath": [ + 476 ] - }, - "license": null + } }, "children": [ { "attributes": { "literals": [ "solidity", + ">=", "0.6", - ".10" + ".0", + "<", + "0.8", + ".0" ] }, - "id": 567, + "id": 817, "name": "PragmaDirective", - "src": "0:23:4" + "src": "0:31:7" }, { "attributes": { - "SourceUnit": 543, + "SourceUnit": 677, "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", "file": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", - "scope": 890, + "scope": 1139, "symbolAliases": [ null ], "unitAlias": "" }, - "id": 568, + "id": 818, "name": "ImportDirective", - "src": "25:64:4" + "src": "33:64:7" }, { "attributes": { - "SourceUnit": 465, + "SourceUnit": 477, "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", "file": "openzeppelin-solidity/contracts/math/SafeMath.sol", - "scope": 890, + "scope": 1139, "symbolAliases": [ null ], "unitAlias": "" }, - "id": 569, + "id": 819, "name": "ImportDirective", - "src": "90:59:4" + "src": "98:59:7" }, { "attributes": { "SourceUnit": 110, "absolutePath": "openzeppelin-solidity/contracts/access/Ownable.sol", "file": "openzeppelin-solidity/contracts/access/Ownable.sol", - "scope": 890, + "scope": 1139, "symbolAliases": [ null ], "unitAlias": "" }, - "id": 570, + "id": 820, "name": "ImportDirective", - "src": "150:60:4" + "src": "158:60:7" }, { "attributes": { "abstract": false, "contractDependencies": [ 109, - 565 + 815 ], "contractKind": "contract", - "documentation": null, "fullyImplemented": true, "linearizedBaseContracts": [ - 889, + 1138, 109, - 565 + 815 ], "name": "DKGcontract", - "scope": 890 + "scope": 1139 }, "children": [ { - "attributes": { - "arguments": null - }, + "attributes": {}, "children": [ { "attributes": { - "contractScope": null, "name": "Ownable", "referencedDeclaration": 109, "type": "contract Ownable" }, - "id": 571, + "id": 821, "name": "UserDefinedTypeName", - "src": "302:7:4" + "src": "310:7:7" } ], - "id": 572, + "id": 822, "name": "InheritanceSpecifier", - "src": "302:7:4" + "src": "310:7:7" }, { "children": [ { "attributes": { - "contractScope": null, "name": "SafeMath", - "referencedDeclaration": 464, + "referencedDeclaration": 476, "type": "library SafeMath" }, - "id": 573, + "id": 823, "name": "UserDefinedTypeName", - "src": "321:8:4" + "src": "329:8:7" }, { "attributes": { "name": "uint256", "type": "uint256" }, - "id": 574, + "id": 824, "name": "ElementaryTypeName", - "src": "334:7:4" + "src": "342:7:7" } ], - "id": 575, + "id": 825, "name": "UsingForDirective", - "src": "315:27:4" + "src": "323:27:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "token", - "overrides": null, - "scope": 889, + "scope": 1138, "stateVariable": true, "storageLocation": "default", "type": "contract IERC20", - "value": null, "visibility": "internal" }, "children": [ { "attributes": { - "contractScope": null, "name": "IERC20", - "referencedDeclaration": 542, + "referencedDeclaration": 676, "type": "contract IERC20" }, - "id": 576, + "id": 826, "name": "UserDefinedTypeName", - "src": "344:6:4" + "src": "352:6:7" } ], - "id": 577, + "id": 827, "name": "VariableDeclaration", - "src": "344:12:4" + "src": "352:12:7" }, { "attributes": { @@ -4899,12 +4639,10 @@ "functionSelector": "8f9cd32b", "mutability": "mutable", "name": "TRAC_TOKEN_ADDRESS", - "overrides": null, - "scope": 889, + "scope": 1138, "stateVariable": true, "storageLocation": "default", "type": "address", - "value": null, "visibility": "public" }, "children": [ @@ -4914,20 +4652,20 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 578, + "id": 828, "name": "ElementaryTypeName", - "src": "360:7:4" + "src": "368:7:7" } ], - "id": 579, + "id": 829, "name": "VariableDeclaration", - "src": "360:33:4" + "src": "368:33:7" }, { "attributes": { "canonicalName": "DKGcontract.AssertionRecord", "name": "AssertionRecord", - "scope": 889, + "scope": 1138, "visibility": "public" }, "children": [ @@ -4936,12 +4674,10 @@ "constant": false, "mutability": "mutable", "name": "assertionTimeToLive", - "overrides": null, - "scope": 592, + "scope": 842, "stateVariable": false, "storageLocation": "default", "type": "uint256", - "value": null, "visibility": "internal" }, "children": [ @@ -4950,26 +4686,24 @@ "name": "uint256", "type": "uint256" }, - "id": 580, + "id": 830, "name": "ElementaryTypeName", - "src": "486:7:4" + "src": "494:7:7" } ], - "id": 581, + "id": 831, "name": "VariableDeclaration", - "src": "486:27:4" + "src": "494:27:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "numberOfEpochs", - "overrides": null, - "scope": 592, + "scope": 842, "stateVariable": false, "storageLocation": "default", "type": "uint256", - "value": null, "visibility": "internal" }, "children": [ @@ -4978,26 +4712,24 @@ "name": "uint256", "type": "uint256" }, - "id": 582, + "id": 832, "name": "ElementaryTypeName", - "src": "517:7:4" + "src": "525:7:7" } ], - "id": 583, + "id": 833, "name": "VariableDeclaration", - "src": "517:22:4" + "src": "525:22:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "creationTime", - "overrides": null, - "scope": 592, + "scope": 842, "stateVariable": false, "storageLocation": "default", "type": "uint256", - "value": null, "visibility": "internal" }, "children": [ @@ -5006,26 +4738,24 @@ "name": "uint256", "type": "uint256" }, - "id": 584, + "id": 834, "name": "ElementaryTypeName", - "src": "543:7:4" + "src": "551:7:7" } ], - "id": 585, + "id": 835, "name": "VariableDeclaration", - "src": "543:20:4" + "src": "551:20:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "issuer", - "overrides": null, - "scope": 592, + "scope": 842, "stateVariable": false, "storageLocation": "default", "type": "address", - "value": null, "visibility": "internal" }, "children": [ @@ -5035,26 +4765,24 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 586, + "id": 836, "name": "ElementaryTypeName", - "src": "567:7:4" + "src": "575:7:7" } ], - "id": 587, + "id": 837, "name": "VariableDeclaration", - "src": "567:14:4" + "src": "575:14:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "rootHash", - "overrides": null, - "scope": 592, + "scope": 842, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -5063,26 +4791,24 @@ "name": "bytes32", "type": "bytes32" }, - "id": 588, + "id": 838, "name": "ElementaryTypeName", - "src": "585:7:4" + "src": "593:7:7" } ], - "id": 589, + "id": 839, "name": "VariableDeclaration", - "src": "585:16:4" + "src": "593:16:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "data", - "overrides": null, - "scope": 592, + "scope": 842, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -5091,31 +4817,29 @@ "name": "bytes32", "type": "bytes32" }, - "id": 590, + "id": 840, "name": "ElementaryTypeName", - "src": "605:7:4" + "src": "613:7:7" } ], - "id": 591, + "id": 841, "name": "VariableDeclaration", - "src": "605:12:4" + "src": "613:12:7" } ], - "id": 592, + "id": 842, "name": "StructDefinition", - "src": "397:281:4" + "src": "405:281:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "assertionRecord", - "overrides": null, - "scope": 889, + "scope": 1138, "stateVariable": true, "storageLocation": "default", "type": "mapping(bytes32 => struct DKGcontract.AssertionRecord)", - "value": null, "visibility": "internal" }, "children": [ @@ -5129,42 +4853,39 @@ "name": "bytes32", "type": "bytes32" }, - "id": 593, + "id": 843, "name": "ElementaryTypeName", - "src": "689:7:4" + "src": "697:7:7" }, { "attributes": { - "contractScope": null, "name": "AssertionRecord", - "referencedDeclaration": 592, + "referencedDeclaration": 842, "type": "struct DKGcontract.AssertionRecord" }, - "id": 594, + "id": 844, "name": "UserDefinedTypeName", - "src": "700:15:4" + "src": "708:15:7" } ], - "id": 595, + "id": 845, "name": "Mapping", - "src": "681:35:4" + "src": "689:35:7" } ], - "id": 596, + "id": 846, "name": "VariableDeclaration", - "src": "681:60:4" + "src": "689:60:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "assertionIssuer", - "overrides": null, - "scope": 889, + "scope": 1138, "stateVariable": true, "storageLocation": "default", "type": "mapping(bytes32 => address)", - "value": null, "visibility": "internal" }, "children": [ @@ -5178,9 +4899,9 @@ "name": "bytes32", "type": "bytes32" }, - "id": 597, + "id": 847, "name": "ElementaryTypeName", - "src": "810:7:4" + "src": "818:7:7" }, { "attributes": { @@ -5188,24 +4909,23 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 598, + "id": 848, "name": "ElementaryTypeName", - "src": "821:7:4" + "src": "829:7:7" } ], - "id": 599, + "id": 849, "name": "Mapping", - "src": "802:27:4" + "src": "810:27:7" } ], - "id": 600, + "id": 850, "name": "VariableDeclaration", - "src": "802:52:4" + "src": "810:52:7" }, { "attributes": { "anonymous": false, - "documentation": null, "name": "TokenAddressSet" }, "children": [ @@ -5217,12 +4937,10 @@ "indexed": true, "mutability": "mutable", "name": "token", - "overrides": null, - "scope": 604, + "scope": 854, "stateVariable": false, "storageLocation": "default", "type": "address", - "value": null, "visibility": "internal" }, "children": [ @@ -5232,29 +4950,28 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 601, + "id": 851, "name": "ElementaryTypeName", - "src": "934:7:4" + "src": "942:7:7" } ], - "id": 602, + "id": 852, "name": "VariableDeclaration", - "src": "934:21:4" + "src": "942:21:7" } ], - "id": 603, + "id": 853, "name": "ParameterList", - "src": "933:23:4" + "src": "941:23:7" } ], - "id": 604, + "id": 854, "name": "EventDefinition", - "src": "912:45:4" + "src": "920:45:7" }, { "attributes": { "anonymous": false, - "documentation": null, "name": "AssertionCreated" }, "children": [ @@ -5266,12 +4983,10 @@ "indexed": true, "mutability": "mutable", "name": "assertionID", - "overrides": null, - "scope": 616, + "scope": 866, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -5280,14 +4995,14 @@ "name": "bytes32", "type": "bytes32" }, - "id": 605, + "id": 855, "name": "ElementaryTypeName", - "src": "982:7:4" + "src": "990:7:7" } ], - "id": 606, + "id": 856, "name": "VariableDeclaration", - "src": "982:27:4" + "src": "990:27:7" }, { "attributes": { @@ -5295,12 +5010,10 @@ "indexed": true, "mutability": "mutable", "name": "rootHash", - "overrides": null, - "scope": 616, + "scope": 866, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -5309,14 +5022,14 @@ "name": "bytes32", "type": "bytes32" }, - "id": 607, + "id": 857, "name": "ElementaryTypeName", - "src": "1011:7:4" + "src": "1019:7:7" } ], - "id": 608, + "id": 858, "name": "VariableDeclaration", - "src": "1011:24:4" + "src": "1019:24:7" }, { "attributes": { @@ -5324,12 +5037,10 @@ "indexed": true, "mutability": "mutable", "name": "assertionIssuer", - "overrides": null, - "scope": 616, + "scope": 866, "stateVariable": false, "storageLocation": "default", "type": "address", - "value": null, "visibility": "internal" }, "children": [ @@ -5339,14 +5050,14 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 609, + "id": 859, "name": "ElementaryTypeName", - "src": "1037:7:4" + "src": "1045:7:7" } ], - "id": 610, + "id": 860, "name": "VariableDeclaration", - "src": "1037:31:4" + "src": "1045:31:7" }, { "attributes": { @@ -5354,12 +5065,10 @@ "indexed": false, "mutability": "mutable", "name": "numberOfEpochs", - "overrides": null, - "scope": 616, + "scope": 866, "stateVariable": false, "storageLocation": "default", "type": "uint256", - "value": null, "visibility": "internal" }, "children": [ @@ -5368,14 +5077,14 @@ "name": "uint256", "type": "uint256" }, - "id": 611, + "id": 861, "name": "ElementaryTypeName", - "src": "1070:7:4" + "src": "1078:7:7" } ], - "id": 612, + "id": 862, "name": "VariableDeclaration", - "src": "1070:22:4" + "src": "1078:22:7" }, { "attributes": { @@ -5383,12 +5092,10 @@ "indexed": false, "mutability": "mutable", "name": "assertionTimeToLive", - "overrides": null, - "scope": 616, + "scope": 866, "stateVariable": false, "storageLocation": "default", "type": "uint256", - "value": null, "visibility": "internal" }, "children": [ @@ -5397,29 +5104,28 @@ "name": "uint256", "type": "uint256" }, - "id": 613, + "id": 863, "name": "ElementaryTypeName", - "src": "1094:7:4" + "src": "1102:7:7" } ], - "id": 614, + "id": 864, "name": "VariableDeclaration", - "src": "1094:27:4" + "src": "1102:27:7" } ], - "id": 615, + "id": 865, "name": "ParameterList", - "src": "981:141:4" + "src": "989:141:7" } ], - "id": 616, + "id": 866, "name": "EventDefinition", - "src": "959:164:4" + "src": "967:164:7" }, { "attributes": { "anonymous": false, - "documentation": null, "name": "TokensCollected" }, "children": [ @@ -5431,12 +5137,10 @@ "indexed": true, "mutability": "mutable", "name": "assertionID", - "overrides": null, - "scope": 626, + "scope": 876, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -5445,14 +5149,14 @@ "name": "bytes32", "type": "bytes32" }, - "id": 617, + "id": 867, "name": "ElementaryTypeName", - "src": "1147:7:4" + "src": "1155:7:7" } ], - "id": 618, + "id": 868, "name": "VariableDeclaration", - "src": "1147:27:4" + "src": "1155:27:7" }, { "attributes": { @@ -5460,12 +5164,10 @@ "indexed": true, "mutability": "mutable", "name": "prover", - "overrides": null, - "scope": 626, + "scope": 876, "stateVariable": false, "storageLocation": "default", "type": "address", - "value": null, "visibility": "internal" }, "children": [ @@ -5475,14 +5177,14 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 619, + "id": 869, "name": "ElementaryTypeName", - "src": "1176:7:4" + "src": "1184:7:7" } ], - "id": 620, + "id": 870, "name": "VariableDeclaration", - "src": "1176:22:4" + "src": "1184:22:7" }, { "attributes": { @@ -5490,12 +5192,10 @@ "indexed": true, "mutability": "mutable", "name": "epoch", - "overrides": null, - "scope": 626, + "scope": 876, "stateVariable": false, "storageLocation": "default", "type": "uint256", - "value": null, "visibility": "internal" }, "children": [ @@ -5504,14 +5204,14 @@ "name": "uint256", "type": "uint256" }, - "id": 621, + "id": 871, "name": "ElementaryTypeName", - "src": "1200:7:4" + "src": "1208:7:7" } ], - "id": 622, + "id": 872, "name": "VariableDeclaration", - "src": "1200:21:4" + "src": "1208:21:7" }, { "attributes": { @@ -5519,12 +5219,10 @@ "indexed": false, "mutability": "mutable", "name": "amount", - "overrides": null, - "scope": 626, + "scope": 876, "stateVariable": false, "storageLocation": "default", "type": "uint256", - "value": null, "visibility": "internal" }, "children": [ @@ -5533,29 +5231,28 @@ "name": "uint256", "type": "uint256" }, - "id": 623, + "id": 873, "name": "ElementaryTypeName", - "src": "1223:7:4" + "src": "1231:7:7" } ], - "id": 624, + "id": 874, "name": "VariableDeclaration", - "src": "1223:14:4" + "src": "1231:14:7" } ], - "id": 625, + "id": 875, "name": "ParameterList", - "src": "1146:92:4" + "src": "1154:92:7" } ], - "id": 626, + "id": 876, "name": "EventDefinition", - "src": "1125:114:4" + "src": "1133:114:7" }, { "attributes": { "anonymous": false, - "documentation": null, "name": "VerificationFailed" }, "children": [ @@ -5567,12 +5264,10 @@ "indexed": true, "mutability": "mutable", "name": "assertionID", - "overrides": null, - "scope": 634, + "scope": 884, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -5581,14 +5276,14 @@ "name": "bytes32", "type": "bytes32" }, - "id": 627, + "id": 877, "name": "ElementaryTypeName", - "src": "1266:7:4" + "src": "1274:7:7" } ], - "id": 628, + "id": 878, "name": "VariableDeclaration", - "src": "1266:27:4" + "src": "1274:27:7" }, { "attributes": { @@ -5596,12 +5291,10 @@ "indexed": true, "mutability": "mutable", "name": "prover", - "overrides": null, - "scope": 634, + "scope": 884, "stateVariable": false, "storageLocation": "default", "type": "address", - "value": null, "visibility": "internal" }, "children": [ @@ -5611,14 +5304,14 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 629, + "id": 879, "name": "ElementaryTypeName", - "src": "1295:7:4" + "src": "1303:7:7" } ], - "id": 630, + "id": 880, "name": "VariableDeclaration", - "src": "1295:22:4" + "src": "1303:22:7" }, { "attributes": { @@ -5626,12 +5319,10 @@ "indexed": true, "mutability": "mutable", "name": "epoch", - "overrides": null, - "scope": 634, + "scope": 884, "stateVariable": false, "storageLocation": "default", "type": "uint256", - "value": null, "visibility": "internal" }, "children": [ @@ -5640,28 +5331,27 @@ "name": "uint256", "type": "uint256" }, - "id": 631, + "id": 881, "name": "ElementaryTypeName", - "src": "1319:7:4" + "src": "1327:7:7" } ], - "id": 632, + "id": 882, "name": "VariableDeclaration", - "src": "1319:21:4" + "src": "1327:21:7" } ], - "id": 633, + "id": 883, "name": "ParameterList", - "src": "1265:76:4" + "src": "1273:76:7" } ], - "id": 634, + "id": 884, "name": "EventDefinition", - "src": "1241:101:4" + "src": "1249:101:7" }, { "attributes": { - "documentation": null, "implemented": true, "isConstructor": true, "kind": "constructor", @@ -5669,8 +5359,7 @@ null ], "name": "", - "overrides": null, - "scope": 889, + "scope": 1138, "stateMutability": "nonpayable", "virtual": false, "visibility": "public" @@ -5683,12 +5372,10 @@ "constant": false, "mutability": "mutable", "name": "token_address", - "overrides": null, - "scope": 663, + "scope": 913, "stateVariable": false, "storageLocation": "default", "type": "address", - "value": null, "visibility": "internal" }, "children": [ @@ -5698,19 +5385,19 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 635, + "id": 885, "name": "ElementaryTypeName", - "src": "1359:7:4" + "src": "1367:7:7" } ], - "id": 636, + "id": 886, "name": "VariableDeclaration", - "src": "1359:21:4" + "src": "1367:21:7" } ], - "id": 637, + "id": 887, "name": "ParameterList", - "src": "1358:23:4" + "src": "1366:23:7" }, { "attributes": { @@ -5719,9 +5406,9 @@ ] }, "children": [], - "id": 638, + "id": 888, "name": "ParameterList", - "src": "1390:0:4" + "src": "1398:0:7" }, { "children": [ @@ -5729,7 +5416,6 @@ "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -5752,20 +5438,19 @@ } ], "overloadedDeclarations": [ - -18, - -18 + 4294967278, + 4294967278 ], - "referencedDeclaration": -18, + "referencedDeclaration": 4294967278, "type": "function (bool) pure", "value": "require" }, - "id": 639, + "id": 889, "name": "Identifier", - "src": "1394:7:4" + "src": "1402:7:7" }, { "attributes": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" @@ -5780,21 +5465,19 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 636, + "referencedDeclaration": 886, "type": "address", "value": "token_address" }, - "id": 640, + "id": 890, "name": "Identifier", - "src": "1402:13:4" + "src": "1410:13:7" }, { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": true, @@ -5825,60 +5508,56 @@ "children": [ { "attributes": { - "name": "address", - "type": null + "name": "address" }, - "id": 641, + "id": 891, "name": "ElementaryTypeName", - "src": "1417:7:4" + "src": "1425:7:7" } ], - "id": 642, + "id": 892, "name": "ElementaryTypeNameExpression", - "src": "1417:7:4" + "src": "1425:7:7" }, { "attributes": { - "argumentTypes": null, "hexvalue": "30", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "number", "type": "int_const 0", "value": "0" }, - "id": 643, + "id": 893, "name": "Literal", - "src": "1425:1:4" + "src": "1433:1:7" } ], - "id": 644, + "id": 894, "name": "FunctionCall", - "src": "1417:10:4" + "src": "1425:10:7" } ], - "id": 645, + "id": 895, "name": "BinaryOperation", - "src": "1402:25:4" + "src": "1410:25:7" } ], - "id": 646, + "id": 896, "name": "FunctionCall", - "src": "1394:34:4" + "src": "1402:34:7" } ], - "id": 647, + "id": 897, "name": "ExpressionStatement", - "src": "1394:34:4" + "src": "1402:34:7" }, { "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -5889,21 +5568,19 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 577, + "referencedDeclaration": 827, "type": "contract IERC20", "value": "token" }, - "id": 648, + "id": 898, "name": "Identifier", - "src": "1432:5:4" + "src": "1440:5:7" }, { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -5928,48 +5605,46 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 542, + "referencedDeclaration": 676, "type": "type(contract IERC20)", "value": "IERC20" }, - "id": 649, + "id": 899, "name": "Identifier", - "src": "1440:6:4" + "src": "1448:6:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 636, + "referencedDeclaration": 886, "type": "address", "value": "token_address" }, - "id": 650, + "id": 900, "name": "Identifier", - "src": "1447:13:4" + "src": "1455:13:7" } ], - "id": 651, + "id": 901, "name": "FunctionCall", - "src": "1440:21:4" + "src": "1448:21:7" } ], - "id": 652, + "id": 902, "name": "Assignment", - "src": "1432:29:4" + "src": "1440:29:7" } ], - "id": 653, + "id": 903, "name": "ExpressionStatement", - "src": "1432:29:4" + "src": "1440:29:7" }, { "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -5980,47 +5655,44 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 579, + "referencedDeclaration": 829, "type": "address", "value": "TRAC_TOKEN_ADDRESS" }, - "id": 654, + "id": 904, "name": "Identifier", - "src": "1465:18:4" + "src": "1473:18:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 636, + "referencedDeclaration": 886, "type": "address", "value": "token_address" }, - "id": 655, + "id": 905, "name": "Identifier", - "src": "1486:13:4" + "src": "1494:13:7" } ], - "id": 656, + "id": 906, "name": "Assignment", - "src": "1465:34:4" + "src": "1473:34:7" } ], - "id": 657, + "id": 907, "name": "ExpressionStatement", - "src": "1465:34:4" + "src": "1473:34:7" }, { "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -6045,52 +5717,50 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 604, + "referencedDeclaration": 854, "type": "function (address)", "value": "TokenAddressSet" }, - "id": 658, + "id": 908, "name": "Identifier", - "src": "1511:15:4" + "src": "1519:15:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 636, + "referencedDeclaration": 886, "type": "address", "value": "token_address" }, - "id": 659, + "id": 909, "name": "Identifier", - "src": "1527:13:4" + "src": "1535:13:7" } ], - "id": 660, + "id": 910, "name": "FunctionCall", - "src": "1511:30:4" + "src": "1519:30:7" } ], - "id": 661, + "id": 911, "name": "EmitStatement", - "src": "1506:35:4" + "src": "1514:35:7" } ], - "id": 662, + "id": 912, "name": "Block", - "src": "1390:156:4" + "src": "1398:156:7" } ], - "id": 663, + "id": 913, "name": "FunctionDefinition", - "src": "1347:199:4" + "src": "1355:199:7" }, { "attributes": { - "documentation": null, - "functionSelector": "73a77389", + "functionSelector": "f164c436", "implemented": true, "isConstructor": false, "kind": "function", @@ -6098,8 +5768,7 @@ null ], "name": "createAssertionRecord", - "overrides": null, - "scope": 889, + "scope": 1138, "stateMutability": "nonpayable", "virtual": false, "visibility": "public" @@ -6112,12 +5781,10 @@ "constant": false, "mutability": "mutable", "name": "assertionID", - "overrides": null, - "scope": 766, + "scope": 1015, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -6126,26 +5793,24 @@ "name": "bytes32", "type": "bytes32" }, - "id": 664, + "id": 914, "name": "ElementaryTypeName", - "src": "1590:7:4" + "src": "1598:7:7" } ], - "id": 665, + "id": 915, "name": "VariableDeclaration", - "src": "1590:19:4" + "src": "1598:19:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "rootHash", - "overrides": null, - "scope": 766, + "scope": 1015, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -6154,26 +5819,51 @@ "name": "bytes32", "type": "bytes32" }, - "id": 666, + "id": 916, + "name": "ElementaryTypeName", + "src": "1619:7:7" + } + ], + "id": 917, + "name": "VariableDeclaration", + "src": "1619:16:7" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "issuer", + "scope": 1015, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 918, "name": "ElementaryTypeName", - "src": "1611:7:4" + "src": "1637:7:7" } ], - "id": 667, + "id": 919, "name": "VariableDeclaration", - "src": "1611:16:4" + "src": "1637:14:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "numberOfEpochs", - "overrides": null, - "scope": 766, + "scope": 1015, "stateVariable": false, "storageLocation": "default", "type": "uint256", - "value": null, "visibility": "internal" }, "children": [ @@ -6182,26 +5872,24 @@ "name": "uint256", "type": "uint256" }, - "id": 668, + "id": 920, "name": "ElementaryTypeName", - "src": "1629:7:4" + "src": "1653:7:7" } ], - "id": 669, + "id": 921, "name": "VariableDeclaration", - "src": "1629:22:4" + "src": "1653:22:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "assertionTimeToLive", - "overrides": null, - "scope": 766, + "scope": 1015, "stateVariable": false, "storageLocation": "default", "type": "uint256", - "value": null, "visibility": "internal" }, "children": [ @@ -6210,19 +5898,19 @@ "name": "uint256", "type": "uint256" }, - "id": 670, + "id": 922, "name": "ElementaryTypeName", - "src": "1653:7:4" + "src": "1677:7:7" } ], - "id": 671, + "id": 923, "name": "VariableDeclaration", - "src": "1653:27:4" + "src": "1677:27:7" } ], - "id": 672, + "id": 924, "name": "ParameterList", - "src": "1589:92:4" + "src": "1597:108:7" }, { "attributes": { @@ -6231,9 +5919,9 @@ ] }, "children": [], - "id": 673, + "id": 925, "name": "ParameterList", - "src": "1689:0:4" + "src": "1713:0:7" }, { "children": [ @@ -6241,7 +5929,6 @@ "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -6268,20 +5955,19 @@ } ], "overloadedDeclarations": [ - -18, - -18 + 4294967278, + 4294967278 ], - "referencedDeclaration": -18, + "referencedDeclaration": 4294967278, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 674, + "id": 926, "name": "Identifier", - "src": "1693:7:4" + "src": "1717:7:7" }, { "attributes": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -6296,72 +5982,66 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 665, + "referencedDeclaration": 915, "type": "bytes32", "value": "assertionID" }, - "id": 675, + "id": 927, "name": "Identifier", - "src": "1701:11:4" + "src": "1725:11:7" }, { "attributes": { - "argumentTypes": null, "hexvalue": "30", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "number", "type": "int_const 0", "value": "0" }, - "id": 676, + "id": 928, "name": "Literal", - "src": "1716:1:4" + "src": "1740:1:7" } ], - "id": 677, + "id": 929, "name": "BinaryOperation", - "src": "1701:16:4" + "src": "1725:16:7" }, { "attributes": { - "argumentTypes": null, "hexvalue": "617373657274696f6e494420686173682063616e6e6f74206265207a65726f", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "string", "type": "literal_string \"assertionID hash cannot be zero\"", "value": "assertionID hash cannot be zero" }, - "id": 678, + "id": 930, "name": "Literal", - "src": "1719:33:4" + "src": "1743:33:7" } ], - "id": 679, + "id": 931, "name": "FunctionCall", - "src": "1693:60:4" + "src": "1717:60:7" } ], - "id": 680, + "id": 932, "name": "ExpressionStatement", - "src": "1693:60:4" + "src": "1717:60:7" }, { "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -6388,20 +6068,19 @@ } ], "overloadedDeclarations": [ - -18, - -18 + 4294967278, + 4294967278 ], - "referencedDeclaration": -18, + "referencedDeclaration": 4294967278, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 681, + "id": 933, "name": "Identifier", - "src": "1757:7:4" + "src": "1781:7:7" }, { "attributes": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -6416,72 +6095,66 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 667, + "referencedDeclaration": 917, "type": "bytes32", "value": "rootHash" }, - "id": 682, + "id": 934, "name": "Identifier", - "src": "1765:8:4" + "src": "1789:8:7" }, { "attributes": { - "argumentTypes": null, "hexvalue": "30", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "number", "type": "int_const 0", "value": "0" }, - "id": 683, + "id": 935, "name": "Literal", - "src": "1777:1:4" + "src": "1801:1:7" } ], - "id": 684, + "id": 936, "name": "BinaryOperation", - "src": "1765:13:4" + "src": "1789:13:7" }, { "attributes": { - "argumentTypes": null, "hexvalue": "726f6f744861736820686173682063616e6e6f74206265207a65726f", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "string", "type": "literal_string \"rootHash hash cannot be zero\"", "value": "rootHash hash cannot be zero" }, - "id": 685, + "id": 937, "name": "Literal", - "src": "1780:30:4" + "src": "1804:30:7" } ], - "id": 686, + "id": 938, "name": "FunctionCall", - "src": "1757:54:4" + "src": "1781:54:7" } ], - "id": 687, + "id": 939, "name": "ExpressionStatement", - "src": "1757:54:4" + "src": "1781:54:7" }, { "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -6508,20 +6181,19 @@ } ], "overloadedDeclarations": [ - -18, - -18 + 4294967278, + 4294967278 ], - "referencedDeclaration": -18, + "referencedDeclaration": 4294967278, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 688, + "id": 940, "name": "Identifier", - "src": "1815:7:4" + "src": "1839:7:7" }, { "attributes": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6536,72 +6208,66 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 669, + "referencedDeclaration": 921, "type": "uint256", "value": "numberOfEpochs" }, - "id": 689, + "id": 941, "name": "Identifier", - "src": "1823:14:4" + "src": "1847:14:7" }, { "attributes": { - "argumentTypes": null, "hexvalue": "30", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "number", "type": "int_const 0", "value": "0" }, - "id": 690, + "id": 942, "name": "Literal", - "src": "1841:1:4" + "src": "1865:1:7" } ], - "id": 691, + "id": 943, "name": "BinaryOperation", - "src": "1823:19:4" + "src": "1847:19:7" }, { "attributes": { - "argumentTypes": null, "hexvalue": "6e756d6265724f6645706f63687320686173682063616e6e6f74206265207a65726f", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "string", "type": "literal_string \"numberOfEpochs hash cannot be zero\"", "value": "numberOfEpochs hash cannot be zero" }, - "id": 692, + "id": 944, "name": "Literal", - "src": "1844:36:4" + "src": "1868:36:7" } ], - "id": 693, + "id": 945, "name": "FunctionCall", - "src": "1815:66:4" + "src": "1839:66:7" } ], - "id": 694, + "id": 946, "name": "ExpressionStatement", - "src": "1815:66:4" + "src": "1839:66:7" }, { "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -6628,20 +6294,19 @@ } ], "overloadedDeclarations": [ - -18, - -18 + 4294967278, + 4294967278 ], - "referencedDeclaration": -18, + "referencedDeclaration": 4294967278, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 695, + "id": 947, "name": "Identifier", - "src": "1885:7:4" + "src": "1909:7:7" }, { "attributes": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6656,72 +6321,66 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 671, + "referencedDeclaration": 923, "type": "uint256", "value": "assertionTimeToLive" }, - "id": 696, + "id": 948, "name": "Identifier", - "src": "1893:19:4" + "src": "1917:19:7" }, { "attributes": { - "argumentTypes": null, "hexvalue": "30", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "number", "type": "int_const 0", "value": "0" }, - "id": 697, + "id": 949, "name": "Literal", - "src": "1916:1:4" + "src": "1940:1:7" } ], - "id": 698, + "id": 950, "name": "BinaryOperation", - "src": "1893:24:4" + "src": "1917:24:7" }, { "attributes": { - "argumentTypes": null, "hexvalue": "617373657274696f6e54696d65546f4c69766520686173682063616e6e6f74206265207a65726f", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "string", "type": "literal_string \"assertionTimeToLive hash cannot be zero\"", "value": "assertionTimeToLive hash cannot be zero" }, - "id": 699, + "id": 951, "name": "Literal", - "src": "1919:41:4" + "src": "1943:41:7" } ], - "id": 700, + "id": 952, "name": "FunctionCall", - "src": "1885:76:4" + "src": "1909:76:7" } ], - "id": 701, + "id": 953, "name": "ExpressionStatement", - "src": "1885:76:4" + "src": "1909:76:7" }, { "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -6748,20 +6407,19 @@ } ], "overloadedDeclarations": [ - -18, - -18 + 4294967278, + 4294967278 ], - "referencedDeclaration": -18, + "referencedDeclaration": 4294967278, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 702, + "id": 954, "name": "Identifier", - "src": "1965:7:4" + "src": "1989:7:7" }, { "attributes": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6776,19 +6434,17 @@ "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "member_name": "creationTime", - "referencedDeclaration": 585, + "referencedDeclaration": 835, "type": "uint256" }, "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, @@ -6798,96 +6454,89 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 596, + "referencedDeclaration": 846, "type": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)", "value": "assertionRecord" }, - "id": 703, + "id": 955, "name": "Identifier", - "src": "1973:15:4" + "src": "1997:15:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 665, + "referencedDeclaration": 915, "type": "bytes32", "value": "assertionID" }, - "id": 704, + "id": 956, "name": "Identifier", - "src": "1989:11:4" + "src": "2013:11:7" } ], - "id": 705, + "id": 957, "name": "IndexAccess", - "src": "1973:28:4" + "src": "1997:28:7" } ], - "id": 706, + "id": 958, "name": "MemberAccess", - "src": "1973:41:4" + "src": "1997:41:7" }, { "attributes": { - "argumentTypes": null, "hexvalue": "30", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "number", "type": "int_const 0", "value": "0" }, - "id": 707, + "id": 959, "name": "Literal", - "src": "2016:1:4" + "src": "2040:1:7" } ], - "id": 708, + "id": 960, "name": "BinaryOperation", - "src": "1973:44:4" + "src": "1997:44:7" }, { "attributes": { - "argumentTypes": null, "hexvalue": "417373657274696f6e20616c72656164792065786973747321", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "string", "type": "literal_string \"Assertion already exists!\"", "value": "Assertion already exists!" }, - "id": 709, + "id": 961, "name": "Literal", - "src": "2019:27:4" + "src": "2043:27:7" } ], - "id": 710, + "id": 962, "name": "FunctionCall", - "src": "1965:82:4" + "src": "1989:82:7" } ], - "id": 711, + "id": 963, "name": "ExpressionStatement", - "src": "1965:82:4" + "src": "1989:82:7" }, { "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -6898,19 +6547,17 @@ "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "member_name": "numberOfEpochs", - "referencedDeclaration": 583, + "referencedDeclaration": 833, "type": "uint256" }, "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, @@ -6920,71 +6567,67 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 596, + "referencedDeclaration": 846, "type": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)", "value": "assertionRecord" }, - "id": 712, + "id": 964, "name": "Identifier", - "src": "2105:15:4" + "src": "2129:15:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 665, + "referencedDeclaration": 915, "type": "bytes32", "value": "assertionID" }, - "id": 713, + "id": 965, "name": "Identifier", - "src": "2121:11:4" + "src": "2145:11:7" } ], - "id": 714, + "id": 966, "name": "IndexAccess", - "src": "2105:28:4" + "src": "2129:28:7" } ], - "id": 715, + "id": 967, "name": "MemberAccess", - "src": "2105:43:4" + "src": "2129:43:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 669, + "referencedDeclaration": 921, "type": "uint256", "value": "numberOfEpochs" }, - "id": 716, + "id": 968, "name": "Identifier", - "src": "2151:14:4" + "src": "2175:14:7" } ], - "id": 717, + "id": 969, "name": "Assignment", - "src": "2105:60:4" + "src": "2129:60:7" } ], - "id": 718, + "id": 970, "name": "ExpressionStatement", - "src": "2105:60:4" + "src": "2129:60:7" }, { "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -6995,19 +6638,17 @@ "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "member_name": "assertionTimeToLive", - "referencedDeclaration": 581, + "referencedDeclaration": 831, "type": "uint256" }, "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, @@ -7017,71 +6658,67 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 596, + "referencedDeclaration": 846, "type": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)", "value": "assertionRecord" }, - "id": 719, + "id": 971, "name": "Identifier", - "src": "2169:15:4" + "src": "2193:15:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 665, + "referencedDeclaration": 915, "type": "bytes32", "value": "assertionID" }, - "id": 720, + "id": 972, "name": "Identifier", - "src": "2185:11:4" + "src": "2209:11:7" } ], - "id": 721, + "id": 973, "name": "IndexAccess", - "src": "2169:28:4" + "src": "2193:28:7" } ], - "id": 722, + "id": 974, "name": "MemberAccess", - "src": "2169:48:4" + "src": "2193:48:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 671, + "referencedDeclaration": 923, "type": "uint256", "value": "assertionTimeToLive" }, - "id": 723, + "id": 975, "name": "Identifier", - "src": "2220:19:4" + "src": "2244:19:7" } ], - "id": 724, + "id": 976, "name": "Assignment", - "src": "2169:70:4" + "src": "2193:70:7" } ], - "id": 725, + "id": 977, "name": "ExpressionStatement", - "src": "2169:70:4" + "src": "2193:70:7" }, { "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -7092,19 +6729,17 @@ "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "member_name": "creationTime", - "referencedDeclaration": 585, + "referencedDeclaration": 835, "type": "uint256" }, "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, @@ -7114,88 +6749,82 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 596, + "referencedDeclaration": 846, "type": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)", "value": "assertionRecord" }, - "id": 726, + "id": 978, "name": "Identifier", - "src": "2243:15:4" + "src": "2267:15:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 665, + "referencedDeclaration": 915, "type": "bytes32", "value": "assertionID" }, - "id": 727, + "id": 979, "name": "Identifier", - "src": "2259:11:4" + "src": "2283:11:7" } ], - "id": 728, + "id": 980, "name": "IndexAccess", - "src": "2243:28:4" + "src": "2267:28:7" } ], - "id": 729, + "id": 981, "name": "MemberAccess", - "src": "2243:41:4" + "src": "2267:41:7" }, { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "member_name": "timestamp", - "referencedDeclaration": null, "type": "uint256" }, "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": -4, + "referencedDeclaration": 4294967292, "type": "block", "value": "block" }, - "id": 730, + "id": 982, "name": "Identifier", - "src": "2287:5:4" + "src": "2311:5:7" } ], - "id": 731, + "id": 983, "name": "MemberAccess", - "src": "2287:15:4" + "src": "2311:15:7" } ], - "id": 732, + "id": 984, "name": "Assignment", - "src": "2243:59:4" + "src": "2267:59:7" } ], - "id": 733, + "id": 985, "name": "ExpressionStatement", - "src": "2243:59:4" + "src": "2267:59:7" }, { "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -7206,19 +6835,17 @@ "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "member_name": "rootHash", - "referencedDeclaration": 589, + "referencedDeclaration": 839, "type": "bytes32" }, "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, @@ -7228,71 +6855,67 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 596, + "referencedDeclaration": 846, "type": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)", "value": "assertionRecord" }, - "id": 734, + "id": 986, "name": "Identifier", - "src": "2306:15:4" + "src": "2330:15:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 665, + "referencedDeclaration": 915, "type": "bytes32", "value": "assertionID" }, - "id": 735, + "id": 987, "name": "Identifier", - "src": "2322:11:4" + "src": "2346:11:7" } ], - "id": 736, + "id": 988, "name": "IndexAccess", - "src": "2306:28:4" + "src": "2330:28:7" } ], - "id": 737, + "id": 989, "name": "MemberAccess", - "src": "2306:37:4" + "src": "2330:37:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 667, + "referencedDeclaration": 917, "type": "bytes32", "value": "rootHash" }, - "id": 738, + "id": 990, "name": "Identifier", - "src": "2346:8:4" + "src": "2370:8:7" } ], - "id": 739, + "id": 991, "name": "Assignment", - "src": "2306:48:4" + "src": "2330:48:7" } ], - "id": 740, + "id": 992, "name": "ExpressionStatement", - "src": "2306:48:4" + "src": "2330:48:7" }, { "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -7303,19 +6926,17 @@ "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "member_name": "issuer", - "referencedDeclaration": 587, + "referencedDeclaration": 837, "type": "address" }, "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, @@ -7325,88 +6946,67 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 596, + "referencedDeclaration": 846, "type": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)", "value": "assertionRecord" }, - "id": 741, + "id": 993, "name": "Identifier", - "src": "2358:15:4" + "src": "2382:15:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 665, + "referencedDeclaration": 915, "type": "bytes32", "value": "assertionID" }, - "id": 742, + "id": 994, "name": "Identifier", - "src": "2374:11:4" + "src": "2398:11:7" } ], - "id": 743, + "id": 995, "name": "IndexAccess", - "src": "2358:28:4" + "src": "2382:28:7" } ], - "id": 744, + "id": 996, "name": "MemberAccess", - "src": "2358:35:4" + "src": "2382:35:7" }, { "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sender", - "referencedDeclaration": null, - "type": "address payable" + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 919, + "type": "address", + "value": "issuer" }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": -15, - "type": "msg", - "value": "msg" - }, - "id": 745, - "name": "Identifier", - "src": "2396:3:4" - } - ], - "id": 746, - "name": "MemberAccess", - "src": "2396:10:4" + "id": 997, + "name": "Identifier", + "src": "2420:6:7" } ], - "id": 747, + "id": 998, "name": "Assignment", - "src": "2358:48:4" + "src": "2382:44:7" } ], - "id": 748, + "id": 999, "name": "ExpressionStatement", - "src": "2358:48:4" + "src": "2382:44:7" }, { "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -7417,7 +7017,6 @@ "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, @@ -7427,83 +7026,62 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 600, + "referencedDeclaration": 850, "type": "mapping(bytes32 => address)", "value": "assertionIssuer" }, - "id": 749, + "id": 1000, "name": "Identifier", - "src": "2410:15:4" + "src": "2430:15:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 665, + "referencedDeclaration": 915, "type": "bytes32", "value": "assertionID" }, - "id": 750, + "id": 1001, "name": "Identifier", - "src": "2426:11:4" + "src": "2446:11:7" } ], - "id": 751, + "id": 1002, "name": "IndexAccess", - "src": "2410:28:4" + "src": "2430:28:7" }, { "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sender", - "referencedDeclaration": null, - "type": "address payable" + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 919, + "type": "address", + "value": "issuer" }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": -15, - "type": "msg", - "value": "msg" - }, - "id": 752, - "name": "Identifier", - "src": "2441:3:4" - } - ], - "id": 753, - "name": "MemberAccess", - "src": "2441:10:4" + "id": 1003, + "name": "Identifier", + "src": "2461:6:7" } ], - "id": 754, + "id": 1004, "name": "Assignment", - "src": "2410:41:4" + "src": "2430:37:7" } ], - "id": 755, + "id": 1005, "name": "ExpressionStatement", - "src": "2410:41:4" + "src": "2430:37:7" }, { "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -7529,8 +7107,8 @@ "typeString": "bytes32" }, { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "typeIdentifier": "t_address", + "typeString": "address" }, { "typeIdentifier": "t_uint256", @@ -7544,124 +7122,101 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 616, + "referencedDeclaration": 866, "type": "function (bytes32,bytes32,address,uint256,uint256)", "value": "AssertionCreated" }, - "id": 756, + "id": 1006, "name": "Identifier", - "src": "2461:16:4" + "src": "2477:16:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 665, + "referencedDeclaration": 915, "type": "bytes32", "value": "assertionID" }, - "id": 757, + "id": 1007, "name": "Identifier", - "src": "2478:11:4" + "src": "2494:11:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 667, + "referencedDeclaration": 917, "type": "bytes32", "value": "rootHash" }, - "id": 758, + "id": 1008, "name": "Identifier", - "src": "2490:8:4" + "src": "2506:8:7" }, { "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sender", - "referencedDeclaration": null, - "type": "address payable" + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 919, + "type": "address", + "value": "issuer" }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": -15, - "type": "msg", - "value": "msg" - }, - "id": 759, - "name": "Identifier", - "src": "2499:3:4" - } - ], - "id": 760, - "name": "MemberAccess", - "src": "2499:10:4" + "id": 1009, + "name": "Identifier", + "src": "2515:6:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 669, + "referencedDeclaration": 921, "type": "uint256", "value": "numberOfEpochs" }, - "id": 761, + "id": 1010, "name": "Identifier", - "src": "2510:14:4" + "src": "2522:14:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 671, + "referencedDeclaration": 923, "type": "uint256", "value": "assertionTimeToLive" }, - "id": 762, + "id": 1011, "name": "Identifier", - "src": "2525:19:4" + "src": "2537:19:7" } ], - "id": 763, + "id": 1012, "name": "FunctionCall", - "src": "2461:84:4" + "src": "2477:80:7" } ], - "id": 764, + "id": 1013, "name": "EmitStatement", - "src": "2456:89:4" + "src": "2472:85:7" } ], - "id": 765, + "id": 1014, "name": "Block", - "src": "1689:860:4" + "src": "1713:848:7" } ], - "id": 766, + "id": 1015, "name": "FunctionDefinition", - "src": "1559:990:4" + "src": "1567:994:7" }, { "attributes": { - "documentation": null, "functionSelector": "ce64c643", "implemented": true, "isConstructor": false, @@ -7670,8 +7225,7 @@ null ], "name": "submitHoldingProof", - "overrides": null, - "scope": 889, + "scope": 1138, "stateMutability": "nonpayable", "virtual": false, "visibility": "public" @@ -7684,12 +7238,10 @@ "constant": false, "mutability": "mutable", "name": "assertionID", - "overrides": null, - "scope": 812, + "scope": 1061, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -7698,26 +7250,24 @@ "name": "bytes32", "type": "bytes32" }, - "id": 767, + "id": 1016, "name": "ElementaryTypeName", - "src": "2592:7:4" + "src": "2604:7:7" } ], - "id": 768, + "id": 1017, "name": "VariableDeclaration", - "src": "2592:19:4" + "src": "2604:19:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "epochAssertionProof", - "overrides": null, - "scope": 812, + "scope": 1061, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -7726,26 +7276,24 @@ "name": "bytes32", "type": "bytes32" }, - "id": 769, + "id": 1018, "name": "ElementaryTypeName", - "src": "2613:7:4" + "src": "2625:7:7" } ], - "id": 770, + "id": 1019, "name": "VariableDeclaration", - "src": "2613:27:4" + "src": "2625:27:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "epochNumber", - "overrides": null, - "scope": 812, + "scope": 1061, "stateVariable": false, "storageLocation": "default", "type": "uint256", - "value": null, "visibility": "internal" }, "children": [ @@ -7754,19 +7302,19 @@ "name": "uint256", "type": "uint256" }, - "id": 771, + "id": 1020, "name": "ElementaryTypeName", - "src": "2642:7:4" + "src": "2654:7:7" } ], - "id": 772, + "id": 1021, "name": "VariableDeclaration", - "src": "2642:19:4" + "src": "2654:19:7" } ], - "id": 773, + "id": 1022, "name": "ParameterList", - "src": "2591:71:4" + "src": "2603:71:7" }, { "attributes": { @@ -7775,9 +7323,9 @@ ] }, "children": [], - "id": 774, + "id": 1023, "name": "ParameterList", - "src": "2672:0:4" + "src": "2684:0:7" }, { "children": [ @@ -7785,7 +7333,6 @@ "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -7812,20 +7359,19 @@ } ], "overloadedDeclarations": [ - -18, - -18 + 4294967278, + 4294967278 ], - "referencedDeclaration": -18, + "referencedDeclaration": 4294967278, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 775, + "id": 1024, "name": "Identifier", - "src": "2676:7:4" + "src": "2688:7:7" }, { "attributes": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -7840,72 +7386,66 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 768, + "referencedDeclaration": 1017, "type": "bytes32", "value": "assertionID" }, - "id": 776, + "id": 1025, "name": "Identifier", - "src": "2684:11:4" + "src": "2696:11:7" }, { "attributes": { - "argumentTypes": null, "hexvalue": "30", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "number", "type": "int_const 0", "value": "0" }, - "id": 777, + "id": 1026, "name": "Literal", - "src": "2699:1:4" + "src": "2711:1:7" } ], - "id": 778, + "id": 1027, "name": "BinaryOperation", - "src": "2684:16:4" + "src": "2696:16:7" }, { "attributes": { - "argumentTypes": null, "hexvalue": "617373657274696f6e494420686173682063616e6e6f74206265207a65726f", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "string", "type": "literal_string \"assertionID hash cannot be zero\"", "value": "assertionID hash cannot be zero" }, - "id": 779, + "id": 1028, "name": "Literal", - "src": "2702:33:4" + "src": "2714:33:7" } ], - "id": 780, + "id": 1029, "name": "FunctionCall", - "src": "2676:60:4" + "src": "2688:60:7" } ], - "id": 781, + "id": 1030, "name": "ExpressionStatement", - "src": "2676:60:4" + "src": "2688:60:7" }, { "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -7932,20 +7472,19 @@ } ], "overloadedDeclarations": [ - -18, - -18 + 4294967278, + 4294967278 ], - "referencedDeclaration": -18, + "referencedDeclaration": 4294967278, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 782, + "id": 1031, "name": "Identifier", - "src": "2740:7:4" + "src": "2752:7:7" }, { "attributes": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -7960,72 +7499,66 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 770, + "referencedDeclaration": 1019, "type": "bytes32", "value": "epochAssertionProof" }, - "id": 783, + "id": 1032, "name": "Identifier", - "src": "2748:19:4" + "src": "2760:19:7" }, { "attributes": { - "argumentTypes": null, "hexvalue": "30", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "number", "type": "int_const 0", "value": "0" }, - "id": 784, + "id": 1033, "name": "Literal", - "src": "2771:1:4" + "src": "2783:1:7" } ], - "id": 785, + "id": 1034, "name": "BinaryOperation", - "src": "2748:24:4" + "src": "2760:24:7" }, { "attributes": { - "argumentTypes": null, "hexvalue": "65706f6368417373657274696f6e50726f6f6620686173682063616e6e6f74206265207a65726f", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "string", "type": "literal_string \"epochAssertionProof hash cannot be zero\"", "value": "epochAssertionProof hash cannot be zero" }, - "id": 786, + "id": 1035, "name": "Literal", - "src": "2774:41:4" + "src": "2786:41:7" } ], - "id": 787, + "id": 1036, "name": "FunctionCall", - "src": "2740:76:4" + "src": "2752:76:7" } ], - "id": 788, + "id": 1037, "name": "ExpressionStatement", - "src": "2740:76:4" + "src": "2752:76:7" }, { "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -8054,46 +7587,44 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 824, + "referencedDeclaration": 1073, "type": "function (bytes32,bytes32) returns (bool)", "value": "verifyAssertionProof" }, - "id": 789, + "id": 1038, "name": "Identifier", - "src": "2825:20:4" + "src": "2837:20:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 768, + "referencedDeclaration": 1017, "type": "bytes32", "value": "assertionID" }, - "id": 790, + "id": 1039, "name": "Identifier", - "src": "2846:11:4" + "src": "2858:11:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 770, + "referencedDeclaration": 1019, "type": "bytes32", "value": "epochAssertionProof" }, - "id": 791, + "id": 1040, "name": "Identifier", - "src": "2859:19:4" + "src": "2871:19:7" } ], - "id": 792, + "id": 1041, "name": "FunctionCall", - "src": "2825:54:4" + "src": "2837:54:7" }, { "children": [ @@ -8101,7 +7632,6 @@ "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -8138,104 +7668,97 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 626, + "referencedDeclaration": 876, "type": "function (bytes32,address,uint256,uint256)", "value": "TokensCollected" }, - "id": 793, + "id": 1042, "name": "Identifier", - "src": "2890:15:4" + "src": "2902:15:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 768, + "referencedDeclaration": 1017, "type": "bytes32", "value": "assertionID" }, - "id": 794, + "id": 1043, "name": "Identifier", - "src": "2906:11:4" + "src": "2918:11:7" }, { "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": -15, + "referencedDeclaration": 4294967281, "type": "msg", "value": "msg" }, - "id": 795, + "id": 1044, "name": "Identifier", - "src": "2918:3:4" + "src": "2930:3:7" } ], - "id": 796, + "id": 1045, "name": "MemberAccess", - "src": "2918:10:4" + "src": "2930:10:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 772, + "referencedDeclaration": 1021, "type": "uint256", "value": "epochNumber" }, - "id": 797, + "id": 1046, "name": "Identifier", - "src": "2929:11:4" + "src": "2941:11:7" }, { "attributes": { - "argumentTypes": null, "hexvalue": "313233", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "number", "type": "int_const 123", "value": "123" }, - "id": 798, + "id": 1047, "name": "Literal", - "src": "2942:3:4" + "src": "2954:3:7" } ], - "id": 799, + "id": 1048, "name": "FunctionCall", - "src": "2890:56:4" + "src": "2902:56:7" } ], - "id": 800, + "id": 1049, "name": "EmitStatement", - "src": "2885:61:4" + "src": "2897:61:7" } ], - "id": 801, + "id": 1050, "name": "Block", - "src": "2880:72:4" + "src": "2892:72:7" }, { "children": [ @@ -8243,7 +7766,6 @@ "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -8276,106 +7798,100 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 634, + "referencedDeclaration": 884, "type": "function (bytes32,address,uint256)", "value": "VerificationFailed" }, - "id": 802, + "id": 1051, "name": "Identifier", - "src": "2969:18:4" + "src": "2981:18:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 768, + "referencedDeclaration": 1017, "type": "bytes32", "value": "assertionID" }, - "id": 803, + "id": 1052, "name": "Identifier", - "src": "2988:11:4" + "src": "3000:11:7" }, { "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": -15, + "referencedDeclaration": 4294967281, "type": "msg", "value": "msg" }, - "id": 804, + "id": 1053, "name": "Identifier", - "src": "3000:3:4" + "src": "3012:3:7" } ], - "id": 805, + "id": 1054, "name": "MemberAccess", - "src": "3000:10:4" + "src": "3012:10:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 772, + "referencedDeclaration": 1021, "type": "uint256", "value": "epochNumber" }, - "id": 806, + "id": 1055, "name": "Identifier", - "src": "3011:11:4" + "src": "3023:11:7" } ], - "id": 807, + "id": 1056, "name": "FunctionCall", - "src": "2969:54:4" + "src": "2981:54:7" } ], - "id": 808, + "id": 1057, "name": "EmitStatement", - "src": "2964:59:4" + "src": "2976:59:7" } ], - "id": 809, + "id": 1058, "name": "Block", - "src": "2958:71:4" + "src": "2970:71:7" } ], - "id": 810, + "id": 1059, "name": "IfStatement", - "src": "2821:208:4" + "src": "2833:208:7" } ], - "id": 811, + "id": 1060, "name": "Block", - "src": "2672:361:4" + "src": "2684:361:7" } ], - "id": 812, + "id": 1061, "name": "FunctionDefinition", - "src": "2564:469:4" + "src": "2576:469:7" }, { "attributes": { - "documentation": null, "functionSelector": "193f9c7e", "implemented": true, "isConstructor": false, @@ -8384,8 +7900,7 @@ null ], "name": "verifyAssertionProof", - "overrides": null, - "scope": 889, + "scope": 1138, "stateMutability": "nonpayable", "virtual": false, "visibility": "public" @@ -8398,12 +7913,10 @@ "constant": false, "mutability": "mutable", "name": "assertionID", - "overrides": null, - "scope": 824, + "scope": 1073, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -8412,26 +7925,24 @@ "name": "bytes32", "type": "bytes32" }, - "id": 813, + "id": 1062, "name": "ElementaryTypeName", - "src": "3068:7:4" + "src": "3080:7:7" } ], - "id": 814, + "id": 1063, "name": "VariableDeclaration", - "src": "3068:19:4" + "src": "3080:19:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "epochAssertionProof", - "overrides": null, - "scope": 824, + "scope": 1073, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -8440,19 +7951,19 @@ "name": "bytes32", "type": "bytes32" }, - "id": 815, + "id": 1064, "name": "ElementaryTypeName", - "src": "3089:7:4" + "src": "3101:7:7" } ], - "id": 816, + "id": 1065, "name": "VariableDeclaration", - "src": "3089:27:4" + "src": "3101:27:7" } ], - "id": 817, + "id": 1066, "name": "ParameterList", - "src": "3067:50:4" + "src": "3079:50:7" }, { "children": [ @@ -8461,12 +7972,10 @@ "constant": false, "mutability": "mutable", "name": "proofValid", - "overrides": null, - "scope": 824, + "scope": 1073, "stateVariable": false, "storageLocation": "default", "type": "bool", - "value": null, "visibility": "internal" }, "children": [ @@ -8475,62 +7984,59 @@ "name": "bool", "type": "bool" }, - "id": 818, + "id": 1067, "name": "ElementaryTypeName", - "src": "3136:4:4" + "src": "3148:4:7" } ], - "id": 819, + "id": 1068, "name": "VariableDeclaration", - "src": "3136:15:4" + "src": "3148:15:7" } ], - "id": 820, + "id": 1069, "name": "ParameterList", - "src": "3135:17:4" + "src": "3147:17:7" }, { "children": [ { "attributes": { - "functionReturnParameters": 820 + "functionReturnParameters": 1069 }, "children": [ { "attributes": { - "argumentTypes": null, "hexvalue": "74727565", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "bool", "type": "bool", "value": "true" }, - "id": 821, + "id": 1070, "name": "Literal", - "src": "3163:4:4" + "src": "3175:4:7" } ], - "id": 822, + "id": 1071, "name": "Return", - "src": "3156:11:4" + "src": "3168:11:7" } ], - "id": 823, + "id": 1072, "name": "Block", - "src": "3152:20:4" + "src": "3164:20:7" } ], - "id": 824, + "id": 1073, "name": "FunctionDefinition", - "src": "3038:134:4" + "src": "3050:134:7" }, { "attributes": { - "documentation": null, "functionSelector": "0828e9f3", "implemented": true, "isConstructor": false, @@ -8539,8 +8045,7 @@ null ], "name": "getAssertionIssuer", - "overrides": null, - "scope": 889, + "scope": 1138, "stateMutability": "view", "virtual": false, "visibility": "public" @@ -8553,12 +8058,10 @@ "constant": false, "mutability": "mutable", "name": "assertionID", - "overrides": null, - "scope": 836, + "scope": 1085, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -8567,19 +8070,19 @@ "name": "bytes32", "type": "bytes32" }, - "id": 825, + "id": 1074, "name": "ElementaryTypeName", - "src": "3205:7:4" + "src": "3217:7:7" } ], - "id": 826, + "id": 1075, "name": "VariableDeclaration", - "src": "3205:19:4" + "src": "3217:19:7" } ], - "id": 827, + "id": 1076, "name": "ParameterList", - "src": "3204:21:4" + "src": "3216:21:7" }, { "children": [ @@ -8588,12 +8091,10 @@ "constant": false, "mutability": "mutable", "name": "creator", - "overrides": null, - "scope": 836, + "scope": 1085, "stateVariable": false, "storageLocation": "default", "type": "address", - "value": null, "visibility": "internal" }, "children": [ @@ -8603,30 +8104,29 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 828, + "id": 1077, "name": "ElementaryTypeName", - "src": "3247:7:4" + "src": "3259:7:7" } ], - "id": 829, + "id": 1078, "name": "VariableDeclaration", - "src": "3247:15:4" + "src": "3259:15:7" } ], - "id": 830, + "id": 1079, "name": "ParameterList", - "src": "3246:17:4" + "src": "3258:17:7" }, { "children": [ { "attributes": { - "functionReturnParameters": 830 + "functionReturnParameters": 1079 }, "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, @@ -8636,55 +8136,52 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 600, + "referencedDeclaration": 850, "type": "mapping(bytes32 => address)", "value": "assertionIssuer" }, - "id": 831, + "id": 1080, "name": "Identifier", - "src": "3274:15:4" + "src": "3286:15:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 826, + "referencedDeclaration": 1075, "type": "bytes32", "value": "assertionID" }, - "id": 832, + "id": 1081, "name": "Identifier", - "src": "3290:11:4" + "src": "3302:11:7" } ], - "id": 833, + "id": 1082, "name": "IndexAccess", - "src": "3274:28:4" + "src": "3286:28:7" } ], - "id": 834, + "id": 1083, "name": "Return", - "src": "3267:35:4" + "src": "3279:35:7" } ], - "id": 835, + "id": 1084, "name": "Block", - "src": "3263:43:4" + "src": "3275:43:7" } ], - "id": 836, + "id": 1085, "name": "FunctionDefinition", - "src": "3177:129:4" + "src": "3189:129:7" }, { "attributes": { - "documentation": null, "functionSelector": "b934b4e4", "implemented": true, "isConstructor": false, @@ -8693,8 +8190,7 @@ null ], "name": "getAssertionRootHash", - "overrides": null, - "scope": 889, + "scope": 1138, "stateMutability": "view", "virtual": false, "visibility": "public" @@ -8707,12 +8203,10 @@ "constant": false, "mutability": "mutable", "name": "assertionID", - "overrides": null, - "scope": 849, + "scope": 1098, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -8721,19 +8215,19 @@ "name": "bytes32", "type": "bytes32" }, - "id": 837, + "id": 1086, "name": "ElementaryTypeName", - "src": "3338:7:4" + "src": "3350:7:7" } ], - "id": 838, + "id": 1087, "name": "VariableDeclaration", - "src": "3338:19:4" + "src": "3350:19:7" } ], - "id": 839, + "id": 1088, "name": "ParameterList", - "src": "3337:21:4" + "src": "3349:21:7" }, { "children": [ @@ -8742,12 +8236,10 @@ "constant": false, "mutability": "mutable", "name": "rootHash", - "overrides": null, - "scope": 849, + "scope": 1098, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -8756,42 +8248,40 @@ "name": "bytes32", "type": "bytes32" }, - "id": 840, + "id": 1089, "name": "ElementaryTypeName", - "src": "3380:7:4" + "src": "3392:7:7" } ], - "id": 841, + "id": 1090, "name": "VariableDeclaration", - "src": "3380:16:4" + "src": "3392:16:7" } ], - "id": 842, + "id": 1091, "name": "ParameterList", - "src": "3379:18:4" + "src": "3391:18:7" }, { "children": [ { "attributes": { - "functionReturnParameters": 842 + "functionReturnParameters": 1091 }, "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "member_name": "rootHash", - "referencedDeclaration": 589, + "referencedDeclaration": 839, "type": "bytes32" }, "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, @@ -8801,60 +8291,57 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 596, + "referencedDeclaration": 846, "type": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)", "value": "assertionRecord" }, - "id": 843, + "id": 1092, "name": "Identifier", - "src": "3408:15:4" + "src": "3420:15:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 838, + "referencedDeclaration": 1087, "type": "bytes32", "value": "assertionID" }, - "id": 844, + "id": 1093, "name": "Identifier", - "src": "3424:11:4" + "src": "3436:11:7" } ], - "id": 845, + "id": 1094, "name": "IndexAccess", - "src": "3408:28:4" + "src": "3420:28:7" } ], - "id": 846, + "id": 1095, "name": "MemberAccess", - "src": "3408:37:4" + "src": "3420:37:7" } ], - "id": 847, + "id": 1096, "name": "Return", - "src": "3401:44:4" + "src": "3413:44:7" } ], - "id": 848, + "id": 1097, "name": "Block", - "src": "3397:52:4" + "src": "3409:52:7" } ], - "id": 849, + "id": 1098, "name": "FunctionDefinition", - "src": "3308:141:4" + "src": "3320:141:7" }, { "attributes": { - "documentation": null, "functionSelector": "6988bc03", "implemented": true, "isConstructor": false, @@ -8863,8 +8350,7 @@ null ], "name": "getAssertionTimeToLive", - "overrides": null, - "scope": 889, + "scope": 1138, "stateMutability": "view", "virtual": false, "visibility": "public" @@ -8877,12 +8363,10 @@ "constant": false, "mutability": "mutable", "name": "assertionID", - "overrides": null, - "scope": 862, + "scope": 1111, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -8891,19 +8375,19 @@ "name": "bytes32", "type": "bytes32" }, - "id": 850, + "id": 1099, "name": "ElementaryTypeName", - "src": "3483:7:4" + "src": "3495:7:7" } ], - "id": 851, + "id": 1100, "name": "VariableDeclaration", - "src": "3483:19:4" + "src": "3495:19:7" } ], - "id": 852, + "id": 1101, "name": "ParameterList", - "src": "3482:21:4" + "src": "3494:21:7" }, { "children": [ @@ -8912,12 +8396,10 @@ "constant": false, "mutability": "mutable", "name": "timeToLive", - "overrides": null, - "scope": 862, + "scope": 1111, "stateVariable": false, "storageLocation": "default", "type": "uint256", - "value": null, "visibility": "internal" }, "children": [ @@ -8926,42 +8408,40 @@ "name": "uint256", "type": "uint256" }, - "id": 853, + "id": 1102, "name": "ElementaryTypeName", - "src": "3525:7:4" + "src": "3537:7:7" } ], - "id": 854, + "id": 1103, "name": "VariableDeclaration", - "src": "3525:18:4" + "src": "3537:18:7" } ], - "id": 855, + "id": 1104, "name": "ParameterList", - "src": "3524:20:4" + "src": "3536:20:7" }, { "children": [ { "attributes": { - "functionReturnParameters": 855 + "functionReturnParameters": 1104 }, "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "member_name": "assertionTimeToLive", - "referencedDeclaration": 581, + "referencedDeclaration": 831, "type": "uint256" }, "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, @@ -8971,60 +8451,57 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 596, + "referencedDeclaration": 846, "type": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)", "value": "assertionRecord" }, - "id": 856, + "id": 1105, "name": "Identifier", - "src": "3555:15:4" + "src": "3567:15:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 851, + "referencedDeclaration": 1100, "type": "bytes32", "value": "assertionID" }, - "id": 857, + "id": 1106, "name": "Identifier", - "src": "3571:11:4" + "src": "3583:11:7" } ], - "id": 858, + "id": 1107, "name": "IndexAccess", - "src": "3555:28:4" + "src": "3567:28:7" } ], - "id": 859, + "id": 1108, "name": "MemberAccess", - "src": "3555:48:4" + "src": "3567:48:7" } ], - "id": 860, + "id": 1109, "name": "Return", - "src": "3548:55:4" + "src": "3560:55:7" } ], - "id": 861, + "id": 1110, "name": "Block", - "src": "3544:63:4" + "src": "3556:63:7" } ], - "id": 862, + "id": 1111, "name": "FunctionDefinition", - "src": "3451:156:4" + "src": "3463:156:7" }, { "attributes": { - "documentation": null, "functionSelector": "9e50e72c", "implemented": true, "isConstructor": false, @@ -9033,8 +8510,7 @@ null ], "name": "getAssertionNumberOfEpochs", - "overrides": null, - "scope": 889, + "scope": 1138, "stateMutability": "view", "virtual": false, "visibility": "public" @@ -9047,12 +8523,10 @@ "constant": false, "mutability": "mutable", "name": "assertionID", - "overrides": null, - "scope": 875, + "scope": 1124, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -9061,19 +8535,19 @@ "name": "bytes32", "type": "bytes32" }, - "id": 863, + "id": 1112, "name": "ElementaryTypeName", - "src": "3645:7:4" + "src": "3657:7:7" } ], - "id": 864, + "id": 1113, "name": "VariableDeclaration", - "src": "3645:19:4" + "src": "3657:19:7" } ], - "id": 865, + "id": 1114, "name": "ParameterList", - "src": "3644:21:4" + "src": "3656:21:7" }, { "children": [ @@ -9082,12 +8556,10 @@ "constant": false, "mutability": "mutable", "name": "numberOfEpochs", - "overrides": null, - "scope": 875, + "scope": 1124, "stateVariable": false, "storageLocation": "default", "type": "uint256", - "value": null, "visibility": "internal" }, "children": [ @@ -9096,42 +8568,40 @@ "name": "uint256", "type": "uint256" }, - "id": 866, + "id": 1115, "name": "ElementaryTypeName", - "src": "3687:7:4" + "src": "3699:7:7" } ], - "id": 867, + "id": 1116, "name": "VariableDeclaration", - "src": "3687:22:4" + "src": "3699:22:7" } ], - "id": 868, + "id": 1117, "name": "ParameterList", - "src": "3686:24:4" + "src": "3698:24:7" }, { "children": [ { "attributes": { - "functionReturnParameters": 868 + "functionReturnParameters": 1117 }, "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "member_name": "numberOfEpochs", - "referencedDeclaration": 583, + "referencedDeclaration": 833, "type": "uint256" }, "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, @@ -9141,60 +8611,57 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 596, + "referencedDeclaration": 846, "type": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)", "value": "assertionRecord" }, - "id": 869, + "id": 1118, "name": "Identifier", - "src": "3721:15:4" + "src": "3733:15:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 864, + "referencedDeclaration": 1113, "type": "bytes32", "value": "assertionID" }, - "id": 870, + "id": 1119, "name": "Identifier", - "src": "3737:11:4" + "src": "3749:11:7" } ], - "id": 871, + "id": 1120, "name": "IndexAccess", - "src": "3721:28:4" + "src": "3733:28:7" } ], - "id": 872, + "id": 1121, "name": "MemberAccess", - "src": "3721:43:4" + "src": "3733:43:7" } ], - "id": 873, + "id": 1122, "name": "Return", - "src": "3714:50:4" + "src": "3726:50:7" } ], - "id": 874, + "id": 1123, "name": "Block", - "src": "3710:58:4" + "src": "3722:58:7" } ], - "id": 875, + "id": 1124, "name": "FunctionDefinition", - "src": "3609:159:4" + "src": "3621:159:7" }, { "attributes": { - "documentation": null, "functionSelector": "08c4933b", "implemented": true, "isConstructor": false, @@ -9203,8 +8670,7 @@ null ], "name": "getAssertionTask", - "overrides": null, - "scope": 889, + "scope": 1138, "stateMutability": "view", "virtual": false, "visibility": "public" @@ -9217,12 +8683,10 @@ "constant": false, "mutability": "mutable", "name": "assertionID", - "overrides": null, - "scope": 888, + "scope": 1137, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -9231,26 +8695,24 @@ "name": "bytes32", "type": "bytes32" }, - "id": 876, + "id": 1125, "name": "ElementaryTypeName", - "src": "3797:7:4" + "src": "3809:7:7" } ], - "id": 877, + "id": 1126, "name": "VariableDeclaration", - "src": "3797:19:4" + "src": "3809:19:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "epoch", - "overrides": null, - "scope": 888, + "scope": 1137, "stateVariable": false, "storageLocation": "default", "type": "uint256", - "value": null, "visibility": "internal" }, "children": [ @@ -9259,19 +8721,19 @@ "name": "uint256", "type": "uint256" }, - "id": 878, + "id": 1127, "name": "ElementaryTypeName", - "src": "3818:7:4" + "src": "3830:7:7" } ], - "id": 879, + "id": 1128, "name": "VariableDeclaration", - "src": "3818:13:4" + "src": "3830:13:7" } ], - "id": 880, + "id": 1129, "name": "ParameterList", - "src": "3796:36:4" + "src": "3808:36:7" }, { "children": [ @@ -9280,12 +8742,10 @@ "constant": false, "mutability": "mutable", "name": "task", - "overrides": null, - "scope": 888, + "scope": 1137, "stateVariable": false, "storageLocation": "default", "type": "uint256", - "value": null, "visibility": "internal" }, "children": [ @@ -9294,93 +8754,216 @@ "name": "uint256", "type": "uint256" }, - "id": 881, + "id": 1130, "name": "ElementaryTypeName", - "src": "3854:7:4" + "src": "3866:7:7" } ], - "id": 882, + "id": 1131, "name": "VariableDeclaration", - "src": "3854:12:4" + "src": "3866:12:7" } ], - "id": 883, + "id": 1132, "name": "ParameterList", - "src": "3853:14:4" + "src": "3865:14:7" }, { "children": [ { "attributes": { - "functionReturnParameters": 883 + "functionReturnParameters": 1132 }, "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "member_name": "number", - "referencedDeclaration": null, "type": "uint256" }, "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": -4, + "referencedDeclaration": 4294967292, "type": "block", "value": "block" }, - "id": 884, + "id": 1133, "name": "Identifier", - "src": "3878:5:4" + "src": "3890:5:7" } ], - "id": 885, + "id": 1134, "name": "MemberAccess", - "src": "3878:12:4" + "src": "3890:12:7" } ], - "id": 886, + "id": 1135, "name": "Return", - "src": "3871:19:4" + "src": "3883:19:7" } ], - "id": 887, + "id": 1136, "name": "Block", - "src": "3867:27:4" + "src": "3879:27:7" } ], - "id": 888, + "id": 1137, "name": "FunctionDefinition", - "src": "3771:123:4" + "src": "3783:123:7" } ], - "id": 889, + "id": 1138, "name": "ContractDefinition", - "src": "278:3619:4" + "src": "286:3623:7" } ], - "id": 890, + "id": 1139, "name": "SourceUnit", - "src": "0:3897:4" + "src": "0:3909:7" }, "compiler": { "name": "solc", - "version": "0.6.10+commit.00c0fcaf.Emscripten.clang" + "version": "0.7.6+commit.7338295f.Emscripten.clang" }, "networks": { "5777": { - "events": {}, + "events": { + "0x25e2604032d2f5a218a9bed084fc10fd98b83e3b86a79ba39c21409598425016": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "assertionID", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "rootHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "assertionIssuer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "numberOfEpochs", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "assertionTimeToLive", + "type": "uint256" + } + ], + "name": "AssertionCreated", + "type": "event" + }, + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + "0xd82cad5fdc98633445b90f806f2e1a61a5409f92187ee9cd87f1da18c9069266": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "TokenAddressSet", + "type": "event" + }, + "0xce001fcd900079c312eaa96f5c1c389ffe207eb41e90197f5a011668b58ef598": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "assertionID", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "prover", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokensCollected", + "type": "event" + }, + "0x37d4188105d31e43e2177257c4e9cc2c8eda5c0783943eb00abe942ac687b03a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "assertionID", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "prover", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "name": "VerificationFailed", + "type": "event" + } + }, "links": {}, "address": "0xF21dD87cFC5cF5D073398833AFe5EFC543b78a00", - "transactionHash": "0xed915941e83e5624793faeaed1f0581b5be71bcdde709289eb6c4ed6a043fd0a" + "transactionHash": "0x40a53672d00490972d444552be6eba8c4a68ce5ecad3d3acaad9228ba9a4e35b" }, "80001": { "events": { @@ -9511,14 +9094,15 @@ } }, "links": {}, - "address": "0xFA421f2b10FBebaAeC281eb6734b0fA9Cc8dbbD7", - "transactionHash": "0x2dbb7b757b489a838946b9be4f817dc491f23464cc297e94acbfc4cf84de5649" + "address": "0xEd8ecA1917F586B67D2fB88930002E60828958a6", + "transactionHash": "0x130e35fb264aec93b34330b463b8bcc846c5f926a9df3326a6a7ca3fe0fd0831" } }, "schemaVersion": "3.4.3", - "updatedAt": "2021-12-23T09:55:43.111Z", + "updatedAt": "2022-02-11T10:13:46.687Z", "networkType": "ethereum", "devdoc": { + "kind": "dev", "methods": { "owner()": { "details": "Returns the address of the current owner." @@ -9529,9 +9113,12 @@ "transferOwnership(address)": { "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." } - } + }, + "version": 1 }, "userdoc": { - "methods": {} + "kind": "user", + "methods": {}, + "version": 1 } } \ No newline at end of file diff --git a/build/contracts/Migrations.json b/build/contracts/Migrations.json index 6727ae351b..9c21cdc643 100644 --- a/build/contracts/Migrations.json +++ b/build/contracts/Migrations.json @@ -943,11 +943,17 @@ "events": {}, "links": {}, "address": "0x209679fA3B658Cd0fC74473aF28243bfe78a9b12", - "transactionHash": "0xeaba4bcbd537b92540ba3d06eb9daa0a16cc2fedc6d64ef90a273d5f3fd5586a" + "transactionHash": "0x1b799766152a61bbf51ae5bdb6db5133b01f841d163789462be37a3109ad0eea" + }, + "80001": { + "events": {}, + "links": {}, + "address": "0xB0d4300e8376F3d9c58eF8edD534A8b42cf964aE", + "transactionHash": "0xf8ad7ba3a442068ff480d9d70bf65320a5cf92073592d52f953ab16b560e699b" } }, "schemaVersion": "3.4.3", - "updatedAt": "2021-10-13T16:08:56.529Z", + "updatedAt": "2022-02-11T10:13:46.713Z", "networkType": "ethereum", "devdoc": { "methods": {} diff --git a/build/contracts/OwnershipManager.json b/build/contracts/OwnershipManager.json new file mode 100644 index 0000000000..cec7335175 --- /dev/null +++ b/build/contracts/OwnershipManager.json @@ -0,0 +1,336 @@ +{ + "contractName": "OwnershipManager", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/OwnershipManager.sol\":\"OwnershipManager\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"openzeppelin-solidity/contracts/access/Ownable.sol\":{\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://90faf5851c02f9bd42c5bfb54d4f0421a2612f50ab80b2c4fa24fa3792071cc2\",\"dweb:/ipfs/QmRGM4F2PcGVF85aTfaA9YBhCHHDqrMhRjyp6fGeBTtirb\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://526dc85e1f9b9b45830e202568d267d93dde7a4fcccf4ad7798dadcd92304d3c\",\"dweb:/ipfs/QmaoXMB972J3cSDLtBq3xBo4jLwqD2uzXTwujtSPqkYVhR\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://24427744bd3e6cb73c17010119af12a318289c0253a4d9acb8576c9fb3797b08\",\"dweb:/ipfs/QmTLDqpKRBuxGxRAmjgXt9AkXyACW3MtKzi7PYjm5iMfGC\"]},\"openzeppelin-solidity/contracts/utils/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]},\"project:/contracts/OwnershipManager.sol\":{\"keccak256\":\"0x570d800b1b8776b23b77d321fdab6039bf6de5fc3a6de0bb50219a377628d938\",\"urls\":[\"bzz-raw://2cf952585eb410131dc12194b0b1d723e58460e21771b467cf194625944893b9\",\"dweb:/ipfs/QmSn4qPACeesyUfmX62PRxPybT9BpDkfZYZURRes9Tk3W7\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060006100216100c460201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506100cc565b600033905090565b6104b4806100db6000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063715018a6146100465780638da5cb5b14610050578063f2fde38b14610084575b600080fd5b61004e6100c8565b005b610058610235565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100c66004803603602081101561009a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061025e565b005b6100d0610450565b73ffffffffffffffffffffffffffffffffffffffff166100ee610235565b73ffffffffffffffffffffffffffffffffffffffff1614610177576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610266610450565b73ffffffffffffffffffffffffffffffffffffffff16610284610235565b73ffffffffffffffffffffffffffffffffffffffff161461030d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610393576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806104596026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60003390509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a2646970667358221220141485366582a37247111ce5b44ad760103bfb49b7dce80602b04f6fd51dade664736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c8063715018a6146100465780638da5cb5b14610050578063f2fde38b14610084575b600080fd5b61004e6100c8565b005b610058610235565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100c66004803603602081101561009a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061025e565b005b6100d0610450565b73ffffffffffffffffffffffffffffffffffffffff166100ee610235565b73ffffffffffffffffffffffffffffffffffffffff1614610177576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610266610450565b73ffffffffffffffffffffffffffffffffffffffff16610284610235565b73ffffffffffffffffffffffffffffffffffffffff161461030d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610393576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806104596026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60003390509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a2646970667358221220141485366582a37247111ce5b44ad760103bfb49b7dce80602b04f6fd51dade664736f6c63430007060033", + "immutableReferences": {}, + "generatedSources": [], + "deployedGeneratedSources": [], + "sourceMap": "220:41:8:-:0;;;;;;;;;;;;;884:17:0;904:12;:10;;;:12;;:::i;:::-;884:32;;935:9;926:6;;:18;;;;;;;;;;;;;;;;;;992:9;959:43;;988:1;959:43;;;;;;;;;;;;850:159;220:41:8;;598:104:6;651:15;685:10;678:17;;598:104;:::o;220:41:8:-;;;;;;;", + "deployedSourceMap": "220:41:8:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1717:145:0;;;:::i;:::-;;1085:85;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;2011:240;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1717:145;1308:12;:10;:12::i;:::-;1297:23;;:7;:5;:7::i;:::-;:23;;;1289:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1823:1:::1;1786:40;;1807:6;::::0;::::1;;;;;;;;1786:40;;;;;;;;;;;;1853:1;1836:6:::0;::::1;:19;;;;;;;;;;;;;;;;;;1717:145::o:0;1085:85::-;1131:7;1157:6;;;;;;;;;;;1150:13;;1085:85;:::o;2011:240::-;1308:12;:10;:12::i;:::-;1297:23;;:7;:5;:7::i;:::-;:23;;;1289:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2119:1:::1;2099:22;;:8;:22;;;;2091:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2208:8;2179:38;;2200:6;::::0;::::1;;;;;;;;2179:38;;;;;;;;;;;;2236:8;2227:6;::::0;:17:::1;;;;;;;;;;;;;;;;;;2011:240:::0;:::o;598:104:6:-;651:15;685:10;678:17;;598:104;:::o", + "source": "pragma solidity >=0.6.0 <0.8.0;\n\nimport \"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\";\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"openzeppelin-solidity/contracts/access/Ownable.sol\";\n\ncontract OwnershipManager is Ownable {\n\n}", + "sourcePath": "/Users/miloskotlar/dkg-onchain-module-v6/contracts/OwnershipManager.sol", + "ast": { + "absolutePath": "project:/contracts/OwnershipManager.sol", + "exportedSymbols": { + "Context": [ + 815 + ], + "IERC20": [ + 676 + ], + "Ownable": [ + 109 + ], + "OwnershipManager": [ + 1147 + ], + "SafeMath": [ + 476 + ] + }, + "id": 1148, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1141, + "literals": [ + "solidity", + ">=", + "0.6", + ".0", + "<", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:31:8" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "id": 1142, + "nodeType": "ImportDirective", + "scope": 1148, + "sourceUnit": 677, + "src": "33:64:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "file": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "id": 1143, + "nodeType": "ImportDirective", + "scope": 1148, + "sourceUnit": 477, + "src": "98:59:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/access/Ownable.sol", + "file": "openzeppelin-solidity/contracts/access/Ownable.sol", + "id": 1144, + "nodeType": "ImportDirective", + "scope": 1148, + "sourceUnit": 110, + "src": "158:60:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 1145, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 109, + "src": "249:7:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$109", + "typeString": "contract Ownable" + } + }, + "id": 1146, + "nodeType": "InheritanceSpecifier", + "src": "249:7:8" + } + ], + "contractDependencies": [ + 109, + 815 + ], + "contractKind": "contract", + "fullyImplemented": true, + "id": 1147, + "linearizedBaseContracts": [ + 1147, + 109, + 815 + ], + "name": "OwnershipManager", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 1148, + "src": "220:41:8" + } + ], + "src": "0:261:8" + }, + "legacyAST": { + "attributes": { + "absolutePath": "project:/contracts/OwnershipManager.sol", + "exportedSymbols": { + "Context": [ + 815 + ], + "IERC20": [ + 676 + ], + "Ownable": [ + 109 + ], + "OwnershipManager": [ + 1147 + ], + "SafeMath": [ + 476 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + ">=", + "0.6", + ".0", + "<", + "0.8", + ".0" + ] + }, + "id": 1141, + "name": "PragmaDirective", + "src": "0:31:8" + }, + { + "attributes": { + "SourceUnit": 677, + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "scope": 1148, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 1142, + "name": "ImportDirective", + "src": "33:64:8" + }, + { + "attributes": { + "SourceUnit": 477, + "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "file": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "scope": 1148, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 1143, + "name": "ImportDirective", + "src": "98:59:8" + }, + { + "attributes": { + "SourceUnit": 110, + "absolutePath": "openzeppelin-solidity/contracts/access/Ownable.sol", + "file": "openzeppelin-solidity/contracts/access/Ownable.sol", + "scope": 1148, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 1144, + "name": "ImportDirective", + "src": "158:60:8" + }, + { + "attributes": { + "abstract": false, + "contractDependencies": [ + 109, + 815 + ], + "contractKind": "contract", + "fullyImplemented": true, + "linearizedBaseContracts": [ + 1147, + 109, + 815 + ], + "name": "OwnershipManager", + "nodes": [ + null + ], + "scope": 1148 + }, + "children": [ + { + "attributes": {}, + "children": [ + { + "attributes": { + "name": "Ownable", + "referencedDeclaration": 109, + "type": "contract Ownable" + }, + "id": 1145, + "name": "UserDefinedTypeName", + "src": "249:7:8" + } + ], + "id": 1146, + "name": "InheritanceSpecifier", + "src": "249:7:8" + } + ], + "id": 1147, + "name": "ContractDefinition", + "src": "220:41:8" + } + ], + "id": 1148, + "name": "SourceUnit", + "src": "0:261:8" + }, + "compiler": { + "name": "solc", + "version": "0.7.6+commit.7338295f.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.4.3", + "updatedAt": "2022-02-10T14:48:30.729Z", + "devdoc": { + "kind": "dev", + "methods": { + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/build/contracts/UAIRegistry.json b/build/contracts/UAIRegistry.json new file mode 100644 index 0000000000..19077cca02 --- /dev/null +++ b/build/contracts/UAIRegistry.json @@ -0,0 +1,13284 @@ +{ + "contractName": "UAIRegistry", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "assertionRegistryAddress", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "UAI", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "depositor", + "type": "address" + } + ], + "name": "TokensDepositedToAsset", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "UAI", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "stateCommitHash", + "type": "bytes32" + } + ], + "name": "UAICreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "assertionRegistryAddress", + "type": "address" + } + ], + "name": "UAIRegistryInit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "UAI", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "stateCommitHash", + "type": "bytes32" + } + ], + "name": "UAIUpdatedState", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "UAIstatus", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "assetRecords", + "outputs": [ + { + "internalType": "uint256", + "name": "creationTimestamp", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "alsoKnownAs", + "type": "bytes32" + }, + { + "internalType": "uint8", + "name": "_type", + "type": "uint8" + }, + { + "internalType": "address", + "name": "controller", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "stateCommitHash", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "assetStake", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "UAI", + "type": "bytes32" + }, + { + "internalType": "uint8", + "name": "_type", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "alsoKnownAs", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "stateCommitHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "rootHash", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "tokenAmount", + "type": "uint256" + } + ], + "name": "registerAsset", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "UAI", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "newStateCommitHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "rootHash", + "type": "bytes32" + } + ], + "name": "updateAssetState", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "UAI", + "type": "bytes32" + } + ], + "name": "getAssetStateCommitHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "stateCommitHash", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "UAI", + "type": "bytes32" + } + ], + "name": "getAssetController", + "outputs": [ + { + "internalType": "address", + "name": "controller", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "UAI", + "type": "bytes32" + } + ], + "name": "getAssetAKA", + "outputs": [ + { + "internalType": "bytes32", + "name": "alsoKnownAs", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "UAI", + "type": "bytes32" + } + ], + "name": "getAssetCreationTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "creationTimestamp", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getAssertionRegistry", + "outputs": [ + { + "internalType": "address", + "name": "assertionRegistry", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "UAI", + "type": "bytes32" + } + ], + "name": "depositTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"assertionRegistryAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"depositor\",\"type\":\"address\"}],\"name\":\"TokensDepositedToAsset\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"stateCommitHash\",\"type\":\"bytes32\"}],\"name\":\"UAICreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assertionRegistryAddress\",\"type\":\"address\"}],\"name\":\"UAIRegistryInit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"stateCommitHash\",\"type\":\"bytes32\"}],\"name\":\"UAIUpdatedState\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"UAIstatus\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"assetRecords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"creationTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"alsoKnownAs\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"_type\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"controller\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"stateCommitHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"assetStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"}],\"name\":\"depositTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAssertionRegistry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"assertionRegistry\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"}],\"name\":\"getAssetAKA\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"alsoKnownAs\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"}],\"name\":\"getAssetController\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"controller\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"}],\"name\":\"getAssetCreationTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"creationTimestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"}],\"name\":\"getAssetStateCommitHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"stateCommitHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"_type\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"alsoKnownAs\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"stateCommitHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"tokenAmount\",\"type\":\"uint256\"}],\"name\":\"registerAsset\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"newStateCommitHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"}],\"name\":\"updateAssetState\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"depositTokens(uint256,bytes32)\":{\"details\":\"Deposits tokens in ``amount`` to specific ``UAI``\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/UAIRegistry.sol\":\"UAIRegistry\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"openzeppelin-solidity/contracts/access/Ownable.sol\":{\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://90faf5851c02f9bd42c5bfb54d4f0421a2612f50ab80b2c4fa24fa3792071cc2\",\"dweb:/ipfs/QmRGM4F2PcGVF85aTfaA9YBhCHHDqrMhRjyp6fGeBTtirb\"]},\"openzeppelin-solidity/contracts/introspection/IERC165.sol\":{\"keccak256\":\"0xf70bc25d981e4ec9673a995ad2995d5d493ea188d3d8f388bba9c227ce09fb82\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bd970f51e3a77790c2f02b5b1759827c3b897c3d98c407b3631e8af32e3dc93c\",\"dweb:/ipfs/QmPF85Amgbqjk3SNZKsPCsqCw8JfwYEPMnnhvMJUyX58je\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://526dc85e1f9b9b45830e202568d267d93dde7a4fcccf4ad7798dadcd92304d3c\",\"dweb:/ipfs/QmaoXMB972J3cSDLtBq3xBo4jLwqD2uzXTwujtSPqkYVhR\"]},\"openzeppelin-solidity/contracts/token/ERC1155/IERC1155.sol\":{\"keccak256\":\"0x61321d2c86346045bf394885ee3afeecc65f9daad2694bc19110967588fd7b5d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1703b877203e0447ede72dcf73f1c4f2089b415bd1c44877904128a64fafed5b\",\"dweb:/ipfs/QmaZoYDo2FWtKcwCc9zuabU6zri8KV9xJrhU614d93sLid\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://24427744bd3e6cb73c17010119af12a318289c0253a4d9acb8576c9fb3797b08\",\"dweb:/ipfs/QmTLDqpKRBuxGxRAmjgXt9AkXyACW3MtKzi7PYjm5iMfGC\"]},\"openzeppelin-solidity/contracts/token/ERC721/IERC721.sol\":{\"keccak256\":\"0x2d99a0deb6648c34fbc66d6ac4a2d64798d7a5321b45624f6736fadc63da1962\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2dcdce5ede1e5e650d174ec0b35be7d47b6a50f30bc895ef0d9e59fb75052e45\",\"dweb:/ipfs/QmQ2XFsDLTYqfEdw7pYzHiGtFRY11yQm4b6ynYgKqDxeB8\"]},\"openzeppelin-solidity/contracts/utils/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]},\"project:/contracts/DKGcontract.sol\":{\"keccak256\":\"0xea0c3c1edba3277ff8a18e50b054ab4d2e1f9434b2554270a4cccb3edb0d9ef3\",\"urls\":[\"bzz-raw://259759777c8a56dae6f5980dd9b6a27725636643e6cc54b0fd6e6f3e997176c6\",\"dweb:/ipfs/QmWzcVDUJ8ymwT6dYd15VhpyZsB9WeCs9BeomSVxr5Cer7\"]},\"project:/contracts/UAIRegistry.sol\":{\"keccak256\":\"0xc1f3db75475a1fab7aef0b5cf05e3b51cd88da6650d8c86f2c407f6c233e4c1e\",\"urls\":[\"bzz-raw://e9d01a85357bf1630109d13100a7d162e2ebd0c600db5180c83d8d3bb2428ab8\",\"dweb:/ipfs/QmZh1YAkw9K9TjUAvPpZYuTLeEt7qfuTNy2KgHR7kzq5aj\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506040516119af3803806119af8339818101604052604081101561003357600080fd5b810190808051906020019092919080519060200190929190505050600061005e61027d60201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561013657600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561017057600080fd5b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f52db5c2cb9235be3e8a3fe47f4ec4bc55b5e28aa119b750b0e766b1cb00c9aa760405160405180910390a25050610285565b600033905090565b61171b806102946000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806377636d1d1161008c5780638da5cb5b116100665780638da5cb5b146103bf578063a9cd6a2d146103f3578063d15b223e14610449578063f2fde38b14610481576100ea565b806377636d1d146102ae57806378e98392146103065780637f58afc81461037d576100ea565b806334e5197b116100c857806334e5197b146101de57806352569b9d146102205780636f3a922914610262578063715018a6146102a4576100ea565b806309600fa6146100ef57806309added7146101665780632f1704bc146101aa575b600080fd5b61011b6004803603602081101561010557600080fd5b81019080803590602001909291905050506104c5565b604051808681526020018581526020018460ff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019550505050505060405180910390f35b6101926004803603602081101561017c57600080fd5b8101908080359060200190929190505050610528565b60405180821515815260200191505060405180910390f35b6101b2610548565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61020a600480360360208110156101f457600080fd5b8101908080359060200190929190505050610572565b6040518082815260200191505060405180910390f35b61024c6004803603602081101561023657600080fd5b810190808035906020019092919050505061058a565b6040518082815260200191505060405180910390f35b61028e6004803603602081101561027857600080fd5b81019080803590602001909291905050506105aa565b6040518082815260200191505060405180910390f35b6102ac6105ca565b005b6102da600480360360208110156102c457600080fd5b8101908080359060200190929190505050610737565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610367600480360360c081101561031c57600080fd5b8101908080359060200190929190803560ff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190505050610777565b6040518082815260200191505060405180910390f35b6103a96004803603602081101561039357600080fd5b8101908080359060200190929190505050610b71565b6040518082815260200191505060405180910390f35b6103c7610b91565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104336004803603606081101561040957600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050610bba565b6040518082815260200191505060405180910390f35b61047f6004803603604081101561045f57600080fd5b810190808035906020019092919080359060200190929190505050610e55565b005b6104c36004803603602081101561049757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112ee565b005b60046020528060005260406000206000915090508060000154908060010154908060020160009054906101000a900460ff16908060020160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030154905085565b60056020528060005260406000206000915054906101000a900460ff1681565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60066020528060005260406000206000915090505481565b600060046000838152602001908152602001600020600301549050919050565b600060046000838152602001908152602001600020600101549050919050565b6105d26114e0565b73ffffffffffffffffffffffffffffffffffffffff166105f0610b91565b73ffffffffffffffffffffffffffffffffffffffff1614610679576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60006004600083815260200190815260200160002060020160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60008060001b8714156107f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f5541492063616e6e6f74206265207a65726f000000000000000000000000000081525060200191505060405180910390fd5b60038660ff161061084e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806116a46021913960400191505060405180910390fd5b6000801b8514156108c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f616c736f4b6e6f776e41732063616e6e6f74206265207a65726f00000000000081525060200191505060405180910390fd5b6000801b841415610940576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f7374617465436f6d6d6974486173682063616e6e6f74206265207a65726f000081525060200191505060405180910390fd5b600015156005600089815260200190815260200160002060009054906101000a900460ff1615151461097157600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f164c4368585336001806040518663ffffffff1660e01b8152600401808681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182815260200195505050505050600060405180830381600087803b158015610a1d57600080fd5b505af1158015610a31573d6000803e3d6000fd5b50505050836004600089815260200190815260200160002060030181905550856004600089815260200190815260200160002060020160006101000a81548160ff021916908360ff160217905550846004600089815260200190815260200160002060010181905550336004600089815260200190815260200160002060020160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555042600460008981526020019081526020016000206000018190555060016005600089815260200190815260200160002060006101000a81548160ff02191690831515021790555083877f2f87578a4aeec4a0b61bbcea1767fec00fa79a35cf600b258509e25acdaba8e760405160405180910390a38690509695505050505050565b600060046000838152602001908152602001600020600001549050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060001b841415610c35576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f5541492063616e6e6f74206265207a65726f000000000000000000000000000081525060200191505060405180910390fd5b600115156005600086815260200190815260200160002060009054906101000a900460ff16151514610ccf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4173736574206d7573742065786973740000000000000000000000000000000081525060200191505060405180910390fd5b6000801b831415610d2b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806116c56021913960400191505060405180910390fd5b610d3584336114e8565b610d3e57600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f164c4368484336001806040518663ffffffff1660e01b8152600401808681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182815260200195505050505050600060405180830381600087803b158015610dea57600080fd5b505af1158015610dfe573d6000803e3d6000fd5b5050505082600460008681526020019081526020016000206003018190555082847fa83f066abfa07a77196c29bd4b7aab88f194feaa03d9769ec2ceccf6701d06de60405160405180910390a38390509392505050565b60008211610ecb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f416d6f756e742063616e6e6f74206265207a65726f000000000000000000000081525060200191505060405180910390fd5b81600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e33306040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610f7357600080fd5b505afa158015610f87573d6000803e3d6000fd5b505050506040513d6020811015610f9d57600080fd5b81019080805190602001909291905050501015611005576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603e815260200180611643603e913960400191505060405180910390fd5b81600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561108f57600080fd5b505afa1580156110a3573d6000803e3d6000fd5b505050506040513d60208110156110b957600080fd5b81019080805190602001909291905050501015611121576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180611606603d913960400191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330866040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156111d457600080fd5b505af11580156111e8573d6000803e3d6000fd5b505050506040513d60208110156111fe57600080fd5b8101908080519060200190929190505050905080611267576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806116816023913960400191505060405180910390fd5b61128d83600660008581526020019081526020016000205461155790919063ffffffff16565b60066000848152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff1683837f2460c4e801cd784222555963fc8a1f1497f9ce3b23446fa14da62d317098933360405160405180910390a4505050565b6112f66114e0565b73ffffffffffffffffffffffffffffffffffffffff16611314610b91565b73ffffffffffffffffffffffffffffffffffffffff161461139d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611423576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806115e06026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b60006004600084815260200190815260200160002060020160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614905092915050565b6000808284019050838110156115d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737353656e6465722062616c616e6365206d75737420626520657175616c20746f206f7220686967686572207468616e2063686f73656e20616d6f756e742153656e64657220616c6c6f77616e6365206d75737420626520657175616c20746f206f7220686967686572207468616e2063686f73656e20616d6f756e74546f6b656e207472616e73616374696f6e20657865637574696f6e206661696c6564215f7479706520616c6c6f7765642076616c7565733a20302c312c322028574950296e65775374617465436f6d6d6974486173682063616e6e6f74206265207a65726fa2646970667358221220b378009612cd1f68ed8ba5b39d8c4663c4577bff6db30499a5ca911b102a86b664736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c806377636d1d1161008c5780638da5cb5b116100665780638da5cb5b146103bf578063a9cd6a2d146103f3578063d15b223e14610449578063f2fde38b14610481576100ea565b806377636d1d146102ae57806378e98392146103065780637f58afc81461037d576100ea565b806334e5197b116100c857806334e5197b146101de57806352569b9d146102205780636f3a922914610262578063715018a6146102a4576100ea565b806309600fa6146100ef57806309added7146101665780632f1704bc146101aa575b600080fd5b61011b6004803603602081101561010557600080fd5b81019080803590602001909291905050506104c5565b604051808681526020018581526020018460ff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019550505050505060405180910390f35b6101926004803603602081101561017c57600080fd5b8101908080359060200190929190505050610528565b60405180821515815260200191505060405180910390f35b6101b2610548565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61020a600480360360208110156101f457600080fd5b8101908080359060200190929190505050610572565b6040518082815260200191505060405180910390f35b61024c6004803603602081101561023657600080fd5b810190808035906020019092919050505061058a565b6040518082815260200191505060405180910390f35b61028e6004803603602081101561027857600080fd5b81019080803590602001909291905050506105aa565b6040518082815260200191505060405180910390f35b6102ac6105ca565b005b6102da600480360360208110156102c457600080fd5b8101908080359060200190929190505050610737565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610367600480360360c081101561031c57600080fd5b8101908080359060200190929190803560ff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190505050610777565b6040518082815260200191505060405180910390f35b6103a96004803603602081101561039357600080fd5b8101908080359060200190929190505050610b71565b6040518082815260200191505060405180910390f35b6103c7610b91565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104336004803603606081101561040957600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050610bba565b6040518082815260200191505060405180910390f35b61047f6004803603604081101561045f57600080fd5b810190808035906020019092919080359060200190929190505050610e55565b005b6104c36004803603602081101561049757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112ee565b005b60046020528060005260406000206000915090508060000154908060010154908060020160009054906101000a900460ff16908060020160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030154905085565b60056020528060005260406000206000915054906101000a900460ff1681565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60066020528060005260406000206000915090505481565b600060046000838152602001908152602001600020600301549050919050565b600060046000838152602001908152602001600020600101549050919050565b6105d26114e0565b73ffffffffffffffffffffffffffffffffffffffff166105f0610b91565b73ffffffffffffffffffffffffffffffffffffffff1614610679576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60006004600083815260200190815260200160002060020160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60008060001b8714156107f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f5541492063616e6e6f74206265207a65726f000000000000000000000000000081525060200191505060405180910390fd5b60038660ff161061084e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806116a46021913960400191505060405180910390fd5b6000801b8514156108c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f616c736f4b6e6f776e41732063616e6e6f74206265207a65726f00000000000081525060200191505060405180910390fd5b6000801b841415610940576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f7374617465436f6d6d6974486173682063616e6e6f74206265207a65726f000081525060200191505060405180910390fd5b600015156005600089815260200190815260200160002060009054906101000a900460ff1615151461097157600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f164c4368585336001806040518663ffffffff1660e01b8152600401808681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182815260200195505050505050600060405180830381600087803b158015610a1d57600080fd5b505af1158015610a31573d6000803e3d6000fd5b50505050836004600089815260200190815260200160002060030181905550856004600089815260200190815260200160002060020160006101000a81548160ff021916908360ff160217905550846004600089815260200190815260200160002060010181905550336004600089815260200190815260200160002060020160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555042600460008981526020019081526020016000206000018190555060016005600089815260200190815260200160002060006101000a81548160ff02191690831515021790555083877f2f87578a4aeec4a0b61bbcea1767fec00fa79a35cf600b258509e25acdaba8e760405160405180910390a38690509695505050505050565b600060046000838152602001908152602001600020600001549050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060001b841415610c35576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f5541492063616e6e6f74206265207a65726f000000000000000000000000000081525060200191505060405180910390fd5b600115156005600086815260200190815260200160002060009054906101000a900460ff16151514610ccf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4173736574206d7573742065786973740000000000000000000000000000000081525060200191505060405180910390fd5b6000801b831415610d2b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806116c56021913960400191505060405180910390fd5b610d3584336114e8565b610d3e57600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f164c4368484336001806040518663ffffffff1660e01b8152600401808681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182815260200195505050505050600060405180830381600087803b158015610dea57600080fd5b505af1158015610dfe573d6000803e3d6000fd5b5050505082600460008681526020019081526020016000206003018190555082847fa83f066abfa07a77196c29bd4b7aab88f194feaa03d9769ec2ceccf6701d06de60405160405180910390a38390509392505050565b60008211610ecb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f416d6f756e742063616e6e6f74206265207a65726f000000000000000000000081525060200191505060405180910390fd5b81600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e33306040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610f7357600080fd5b505afa158015610f87573d6000803e3d6000fd5b505050506040513d6020811015610f9d57600080fd5b81019080805190602001909291905050501015611005576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603e815260200180611643603e913960400191505060405180910390fd5b81600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561108f57600080fd5b505afa1580156110a3573d6000803e3d6000fd5b505050506040513d60208110156110b957600080fd5b81019080805190602001909291905050501015611121576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180611606603d913960400191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330866040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156111d457600080fd5b505af11580156111e8573d6000803e3d6000fd5b505050506040513d60208110156111fe57600080fd5b8101908080519060200190929190505050905080611267576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806116816023913960400191505060405180910390fd5b61128d83600660008581526020019081526020016000205461155790919063ffffffff16565b60066000848152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff1683837f2460c4e801cd784222555963fc8a1f1497f9ce3b23446fa14da62d317098933360405160405180910390a4505050565b6112f66114e0565b73ffffffffffffffffffffffffffffffffffffffff16611314610b91565b73ffffffffffffffffffffffffffffffffffffffff161461139d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611423576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806115e06026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b60006004600084815260200190815260200160002060020160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614905092915050565b6000808284019050838110156115d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737353656e6465722062616c616e6365206d75737420626520657175616c20746f206f7220686967686572207468616e2063686f73656e20616d6f756e742153656e64657220616c6c6f77616e6365206d75737420626520657175616c20746f206f7220686967686572207468616e2063686f73656e20616d6f756e74546f6b656e207472616e73616374696f6e20657865637574696f6e206661696c6564215f7479706520616c6c6f7765642076616c7565733a20302c312c322028574950296e65775374617465436f6d6d6974486173682063616e6e6f74206265207a65726fa2646970667358221220b378009612cd1f68ed8ba5b39d8c4663c4577bff6db30499a5ca911b102a86b664736f6c63430007060033", + "immutableReferences": {}, + "generatedSources": [], + "deployedGeneratedSources": [], + "sourceMap": "623:4983:8:-:0;;;1526:365;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;884:17:0;904:12;:10;;;:12;;:::i;:::-;884:32;;935:9;926:6;;:18;;;;;;;;;;;;;;;;;;992:9;959:43;;988:1;959:43;;;;;;;;;;;;850:159;1636:1:8;1614:24;;:12;:24;;;;1606:33;;;;;;1685:1;1651:36;;:24;:36;;;;1643:45;;;;;;1708:12;1693:5;;:28;;;;;;;;;;;;;;;;;;1752:24;1725;;:51;;;;;;;;;;;;;;;;;;1812:24;1780:17;;:57;;;;;;;;;;;;;;;;;;1862:24;1846:41;;;;;;;;;;;;1526:365;;623:4983;;598:104:6;651:15;685:10;678:17;;598:104;:::o;623:4983:8:-;;;;;;;", + "deployedSourceMap": "623:4983:8:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1042:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1096:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;4128:117;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;1141:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3593:138;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3860:118;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1717:145:0;;;:::i;:::-;;3734:123:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;1894:1092;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3981:144;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1085:85:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;2991:586:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;4825:776;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;2011:240:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1042:51:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1096:41::-;;;;;;;;;;;;;;;;;;;;;;:::o;4128:117::-;4180:25;4217:24;;;;;;;;;;;4210:31;;4128:117;:::o;1141:45::-;;;;;;;;;;;;;;;;;:::o;3593:138::-;3659:23;3694:12;:17;3707:3;3694:17;;;;;;;;;;;:33;;;3687:40;;3593:138;;;:::o;3860:118::-;3914:19;3945:12;:17;3958:3;3945:17;;;;;;;;;;;:29;;;3938:36;;3860:118;;;:::o;1717:145:0:-;1308:12;:10;:12::i;:::-;1297:23;;:7;:5;:7::i;:::-;:23;;;1289:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1823:1:::1;1786:40;;1807:6;::::0;::::1;;;;;;;;1786:40;;;;;;;;;;;;1853:1;1836:6:::0;::::1;:19;;;;;;;;;;;;;;;;;;1717:145::o:0;3734:123:8:-;3795:18;3825:12;:17;3838:3;3825:17;;;;;;;;;;;:28;;;;;;;;;;;;3818:35;;3734:123;;;:::o;1894:1092::-;2044:7;2070:1;2065:6;;:3;:6;;2057:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2114:1;2106:5;:9;;;2098:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2178:1;2165:14;;:11;:14;;2157:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2239:1;2222:18;;:15;:18;;2214:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2305:5;2287:23;;:9;:14;2297:3;2287:14;;;;;;;;;;;;;;;;;;;;;:23;;;2279:33;;;;;;2472:17;;;;;;;;;;;:39;;;2512:15;2529:8;2547:10;2560:1;2563;2472:93;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2649:15;2613:12;:17;2626:3;2613:17;;;;;;;;;;;:33;;:51;;;;2694:5;2668:12;:17;2681:3;2668:17;;;;;;;;;;;:23;;;:31;;;;;;;;;;;;;;;;;;2735:11;2703:12;:17;2716:3;2703:17;;;;;;;;;;;:29;;:43;;;;2781:10;2750:12;:17;2763:3;2750:17;;;;;;;;;;;:28;;;:41;;;;;;;;;;;;;;;;;;2885:15;2847:12;:17;2860:3;2847:17;;;;;;;;;;;:35;;:53;;;;2921:4;2904:9;:14;2914:3;2904:14;;;;;;;;;;;;:21;;;;;;;;;;;;;;;;;;2951:15;2946:3;2935:32;;;;;;;;;;2979:3;2972:10;;1894:1092;;;;;;;;:::o;3981:144::-;4049:25;4086:12;:17;4099:3;4086:17;;;;;;;;;;;:35;;;4079:42;;3981:144;;;:::o;1085:85:0:-;1131:7;1157:6;;;;;;;;;;;1150:13;;1085:85;:::o;2991:586:8:-;3092:7;3119:1;3114:6;;:3;:6;;3106:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3173:4;3155:22;;:9;:14;3165:3;3155:14;;;;;;;;;;;;;;;;;;;;;:22;;;3147:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3231:1;3211:21;;:18;:21;;3203:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3282:23;3290:3;3294:10;3282:7;:23::i;:::-;3274:32;;;;;;3313:17;;;;;;;;;;;:39;;;3353:18;3373:8;3383:10;3395:1;3398;3313:87;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3451:18;3414:12;:17;3427:3;3414:17;;;;;;;;;;;:33;;:55;;;;3539:18;3534:3;3518:40;;;;;;;;;;3570:3;3563:10;;2991:586;;;;;:::o;4825:776::-;4908:1;4901:6;:8;4893:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4997:6;4951:5;;;;;;;;;;;:15;;;4967:10;4987:4;4951:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:52;;4943:127;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5117:6;5086:5;;;;;;;;;;;:15;;;5102:10;5086:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:37;;5078:111;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5198:23;5224:5;;;;;;;;;;;:18;;;5243:10;5263:4;5270:6;5224:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5198:79;;5293:18;5285:66;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5514:27;5534:6;5514:10;:15;5525:3;5514:15;;;;;;;;;;;;:19;;:27;;;;:::i;:::-;5496:10;:15;5507:3;5496:15;;;;;;;;;;;:45;;;;5585:10;5550:46;;5578:6;5573:3;5550:46;;;;;;;;;;4825:776;;;:::o;2011:240:0:-;1308:12;:10;:12::i;:::-;1297:23;;:7;:5;:7::i;:::-;:23;;;1289:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2119:1:::1;2099:22;;:8;:22;;;;2091:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2208:8;2179:38;;2200:6;::::0;::::1;;;;;;;;2179:38;;;;;;;;;;;;2236:8;2227:6;::::0;:17:::1;;;;;;;;;;;;;;;;;;2011:240:::0;:::o;598:104:6:-;651:15;685:10;678:17;;598:104;:::o;4614:129:8:-;4677:4;4707:12;:17;4720:3;4707:17;;;;;;;;;;;:28;;;;;;;;;;;;4698:37;;:5;:37;;;4691:44;;4614:129;;;;:::o;2690:175:2:-;2748:7;2767:9;2783:1;2779;:5;2767:17;;2807:1;2802;:6;;2794:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2857:1;2850:8;;;2690:175;;;;:::o", + "source": "pragma solidity >=0.6.0 <0.8.0;\n\nimport \"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\";\nimport \"openzeppelin-solidity/contracts/token/ERC721/IERC721.sol\";\nimport \"openzeppelin-solidity/contracts/token/ERC1155/IERC1155.sol\";\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"openzeppelin-solidity/contracts/access/Ownable.sol\";\nimport \"./DKGcontract.sol\";\n\n/*\n\nUAI/UALs essentially are:\n\n- DID/DID URLs native to the OriginTrail DKG\n- uniquely identify physical or digital assets (DID subjects)\n- have one or more \"owners\" (DID controllers)\n\nThe specification for UAI/UALs is currently WIP.\n\n*/\n\ncontract UAIRegistry is Ownable {\n\n\tenum AssetType{\n\t\tNative,\n\t\tERC721,\n\t\tERC1155\n\t}\n\n\tusing SafeMath for uint256;\n\tIERC20 token;\n\tDKGcontract AssertionRegistry;\n\taddress AssertionRegistryAddress;\n\n\tstruct AssetRecord{\n\t\tuint256 creationTimestamp;\n\t\tbytes32 alsoKnownAs; // alternative ID, as defined in DID-core spec, PoC address + tokenURI\n\t\tuint8 _type;\n\t\taddress controller; // tbd \n\t\tbytes32 stateCommitHash;\n\t}\n\n\tmapping(bytes32 => AssetRecord) public assetRecords;\n\tmapping(bytes32 => bool) public UAIstatus; \n\tmapping(bytes32 => uint256) public assetStake; \n\t\n\n\t// events\n\tevent UAIRegistryInit(address indexed assertionRegistryAddress);\n\tevent UAICreated(bytes32 indexed UAI, bytes32 indexed stateCommitHash);\n\tevent UAIUpdatedState(bytes32 indexed UAI, bytes32 indexed stateCommitHash );\n\tevent TokensDepositedToAsset(bytes32 indexed UAI, uint256 indexed amount, address indexed depositor);\n\n\tconstructor(address tokenAddress, address assertionRegistryAddress) public {\n\t\trequire(tokenAddress!=address(0));\n\t\trequire(assertionRegistryAddress!=address(0));\n\n\t\ttoken = IERC20(tokenAddress);\n\t\tAssertionRegistryAddress = assertionRegistryAddress;\n\t\tAssertionRegistry = DKGcontract(assertionRegistryAddress);\n\t\temit UAIRegistryInit(assertionRegistryAddress);\n\t}\n\n\tfunction registerAsset(bytes32 UAI, uint8 _type, bytes32 alsoKnownAs, bytes32 stateCommitHash, bytes32 rootHash, uint256 tokenAmount) public returns (bytes32){\n\n\t\trequire(UAI!=0, \"UAI cannot be zero\");\n\t\trequire(_type < 3, \"_type allowed values: 0,1,2 (WIP)\");\n\t\trequire(alsoKnownAs!=0, \"alsoKnownAs cannot be zero\");\n\t\trequire(stateCommitHash!=0, \"stateCommitHash cannot be zero\");\n\t\trequire(UAIstatus[UAI] == false ); // should not be possible to register existing asset again\n\n\t\t//bytes32 UAI = createUAI(_type,alsoKnownAs);\n\n\t\t// depositTokens(tokenAmount, UAI); // todo\n\n\t\tAssertionRegistry.createAssertionRecord(stateCommitHash, rootHash, address(msg.sender), 1, 1); // todo: update when DKGcontract is updated\n\t\tassetRecords[UAI].stateCommitHash = stateCommitHash;\n\t\tassetRecords[UAI]._type = _type;\n\t\tassetRecords[UAI].alsoKnownAs = alsoKnownAs;\n\t\tassetRecords[UAI].controller = msg.sender; // should update with AssetControllerProxy contract\n\t\tassetRecords[UAI].creationTimestamp = block.timestamp;\n\t\tUAIstatus[UAI] = true;\n\n\t\temit UAICreated(UAI, stateCommitHash);\n\n\t\treturn UAI;\n\t}\t\n\n\n\tfunction updateAssetState(bytes32 UAI, bytes32 newStateCommitHash, bytes32 rootHash) public returns (bytes32) {\n\n\t\trequire(UAI!=0, \"UAI cannot be zero\");\n\t\trequire(UAIstatus[UAI] == true, \"Asset must exist\" );\n\t\trequire(newStateCommitHash!=0, \"newStateCommitHash cannot be zero\");\n\t\trequire(isOwner(UAI,msg.sender));\n\t\t\n\t\tAssertionRegistry.createAssertionRecord(newStateCommitHash, rootHash, msg.sender, 1, 1); // UPDATE\n\t\tassetRecords[UAI].stateCommitHash = newStateCommitHash;\n\t\t// todo: store old commits somewhere\n\n\t\temit UAIUpdatedState(UAI, newStateCommitHash);\n\n\t\treturn UAI;\n\t}\n\n\n\t// getters\n\tfunction getAssetStateCommitHash(bytes32 UAI) public view returns(bytes32 stateCommitHash){\n\t\treturn assetRecords[UAI].stateCommitHash;\n\t}\n\n\tfunction getAssetController(bytes32 UAI) public view returns(address controller){\n\t\treturn assetRecords[UAI].controller;\n\t}\n\n\tfunction getAssetAKA(bytes32 UAI) public view returns(bytes32 alsoKnownAs){\n\t\treturn assetRecords[UAI].alsoKnownAs;\n\t}\n\n\tfunction getAssetCreationTimestamp(bytes32 UAI) public view returns(uint256 creationTimestamp){\n\t\treturn assetRecords[UAI].creationTimestamp;\n\t}\n\n\tfunction getAssertionRegistry() public view returns(address assertionRegistry){\n\t\treturn AssertionRegistryAddress;\n\t}\n\n\t// internal\n\n\n\t/**\n * @dev Should determine type of ``contractAddress``, if possible, returning enum AssetType\n */\n function determineType(address contractAddress, bytes32 id) internal returns (uint8){\n\t\treturn 0; // todo: implement detection of contract type\n\t}\n\n\t/**\n * @dev Returns bool checking if ``owner`` is controller of ``UAI``\n */\n function isOwner(bytes32 UAI, address owner) internal returns (bool) {\n \treturn owner == assetRecords[UAI].controller;\n }\n\n\t/**\n * @dev Deposits tokens in ``amount`` to specific ``UAI``\n */\n function depositTokens(uint256 amount, bytes32 UAI) public {\n\n \trequire(amount>0, \"Amount cannot be zero\");\n \trequire(token.allowance(msg.sender, address(this)) >= amount, \"Sender allowance must be equal to or higher than chosen amount\");\n \trequire(token.balanceOf(msg.sender) >= amount, \"Sender balance must be equal to or higher than chosen amount!\");\n\n \tbool transaction_result = token.transferFrom(msg.sender, address(this), amount);\n \trequire(transaction_result, \"Token transaction execution failed!\");\n\n\t\t// if (stake[msg.sender] == 0){\n\t\t// \tparticipant_indexes[msg.sender] = participants.length;\n\t\t// \tparticipants.push(msg.sender);\n\t\t// }\n\n\t\tassetStake[UAI] = assetStake[UAI].add(amount);\n\t\temit TokensDepositedToAsset(UAI, amount,msg.sender);\n\n\t}\t\n\n\n}", + "sourcePath": "/Users/miloskotlar/dkg-onchain-module-v6/contracts/UAIRegistry.sol", + "ast": { + "absolutePath": "project:/contracts/UAIRegistry.sol", + "exportedSymbols": { + "Context": [ + 815 + ], + "DKGcontract": [ + 1138 + ], + "IERC1155": [ + 598 + ], + "IERC165": [ + 121 + ], + "IERC20": [ + 676 + ], + "IERC721": [ + 792 + ], + "Ownable": [ + 109 + ], + "SafeMath": [ + 476 + ], + "UAIRegistry": [ + 1610 + ] + }, + "id": 1611, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1140, + "literals": [ + "solidity", + ">=", + "0.6", + ".0", + "<", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:31:8" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "id": 1141, + "nodeType": "ImportDirective", + "scope": 1611, + "sourceUnit": 677, + "src": "33:64:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC721/IERC721.sol", + "file": "openzeppelin-solidity/contracts/token/ERC721/IERC721.sol", + "id": 1142, + "nodeType": "ImportDirective", + "scope": 1611, + "sourceUnit": 793, + "src": "98:66:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC1155/IERC1155.sol", + "file": "openzeppelin-solidity/contracts/token/ERC1155/IERC1155.sol", + "id": 1143, + "nodeType": "ImportDirective", + "scope": 1611, + "sourceUnit": 599, + "src": "165:68:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "file": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "id": 1144, + "nodeType": "ImportDirective", + "scope": 1611, + "sourceUnit": 477, + "src": "234:59:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/access/Ownable.sol", + "file": "openzeppelin-solidity/contracts/access/Ownable.sol", + "id": 1145, + "nodeType": "ImportDirective", + "scope": 1611, + "sourceUnit": 110, + "src": "294:60:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "project:/contracts/DKGcontract.sol", + "file": "./DKGcontract.sol", + "id": 1146, + "nodeType": "ImportDirective", + "scope": 1611, + "sourceUnit": 1139, + "src": "355:27:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 1147, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 109, + "src": "647:7:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$109", + "typeString": "contract Ownable" + } + }, + "id": 1148, + "nodeType": "InheritanceSpecifier", + "src": "647:7:8" + } + ], + "contractDependencies": [ + 109, + 815 + ], + "contractKind": "contract", + "fullyImplemented": true, + "id": 1610, + "linearizedBaseContracts": [ + 1610, + 109, + 815 + ], + "name": "UAIRegistry", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "UAIRegistry.AssetType", + "id": 1152, + "members": [ + { + "id": 1149, + "name": "Native", + "nodeType": "EnumValue", + "src": "677:6:8" + }, + { + "id": 1150, + "name": "ERC721", + "nodeType": "EnumValue", + "src": "687:6:8" + }, + { + "id": 1151, + "name": "ERC1155", + "nodeType": "EnumValue", + "src": "697:7:8" + } + ], + "name": "AssetType", + "nodeType": "EnumDefinition", + "src": "659:48:8" + }, + { + "id": 1155, + "libraryName": { + "id": 1153, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 476, + "src": "716:8:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$476", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "710:27:8", + "typeName": { + "id": 1154, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "729:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 1157, + "mutability": "mutable", + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1610, + "src": "739:12:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$676", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 1156, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 676, + "src": "739:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$676", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1159, + "mutability": "mutable", + "name": "AssertionRegistry", + "nodeType": "VariableDeclaration", + "scope": 1610, + "src": "754:29:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DKGcontract_$1138", + "typeString": "contract DKGcontract" + }, + "typeName": { + "id": 1158, + "name": "DKGcontract", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1138, + "src": "754:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DKGcontract_$1138", + "typeString": "contract DKGcontract" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1161, + "mutability": "mutable", + "name": "AssertionRegistryAddress", + "nodeType": "VariableDeclaration", + "scope": 1610, + "src": "786:32:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1160, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "786:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "canonicalName": "UAIRegistry.AssetRecord", + "id": 1172, + "members": [ + { + "constant": false, + "id": 1163, + "mutability": "mutable", + "name": "creationTimestamp", + "nodeType": "VariableDeclaration", + "scope": 1172, + "src": "844:25:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1162, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "844:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1165, + "mutability": "mutable", + "name": "alsoKnownAs", + "nodeType": "VariableDeclaration", + "scope": 1172, + "src": "873:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1164, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "873:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1167, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "scope": 1172, + "src": "967:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1166, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "967:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1169, + "mutability": "mutable", + "name": "controller", + "nodeType": "VariableDeclaration", + "scope": 1172, + "src": "982:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1168, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "982:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1171, + "mutability": "mutable", + "name": "stateCommitHash", + "nodeType": "VariableDeclaration", + "scope": 1172, + "src": "1012:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1170, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1012:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "name": "AssetRecord", + "nodeType": "StructDefinition", + "scope": 1610, + "src": "822:217:8", + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "09600fa6", + "id": 1176, + "mutability": "mutable", + "name": "assetRecords", + "nodeType": "VariableDeclaration", + "scope": 1610, + "src": "1042:51:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1172_storage_$", + "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord)" + }, + "typeName": { + "id": 1175, + "keyType": { + "id": 1173, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1050:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "1042:31:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1172_storage_$", + "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord)" + }, + "valueType": { + "id": 1174, + "name": "AssetRecord", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1172, + "src": "1061:11:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetRecord_$1172_storage_ptr", + "typeString": "struct UAIRegistry.AssetRecord" + } + } + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "09added7", + "id": 1180, + "mutability": "mutable", + "name": "UAIstatus", + "nodeType": "VariableDeclaration", + "scope": 1610, + "src": "1096:41:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + }, + "typeName": { + "id": 1179, + "keyType": { + "id": 1177, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1104:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "1096:24:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + }, + "valueType": { + "id": 1178, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1115:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "34e5197b", + "id": 1184, + "mutability": "mutable", + "name": "assetStake", + "nodeType": "VariableDeclaration", + "scope": 1610, + "src": "1141:45:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + }, + "typeName": { + "id": 1183, + "keyType": { + "id": 1181, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1149:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "1141:27:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + }, + "valueType": { + "id": 1182, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1160:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "public" + }, + { + "anonymous": false, + "id": 1188, + "name": "UAIRegistryInit", + "nodeType": "EventDefinition", + "parameters": { + "id": 1187, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1186, + "indexed": true, + "mutability": "mutable", + "name": "assertionRegistryAddress", + "nodeType": "VariableDeclaration", + "scope": 1188, + "src": "1226:40:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1185, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1226:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1225:42:8" + }, + "src": "1204:64:8" + }, + { + "anonymous": false, + "id": 1194, + "name": "UAICreated", + "nodeType": "EventDefinition", + "parameters": { + "id": 1193, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1190, + "indexed": true, + "mutability": "mutable", + "name": "UAI", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1287:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1189, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1287:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1192, + "indexed": true, + "mutability": "mutable", + "name": "stateCommitHash", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1308:31:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1191, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1308:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1286:54:8" + }, + "src": "1270:71:8" + }, + { + "anonymous": false, + "id": 1200, + "name": "UAIUpdatedState", + "nodeType": "EventDefinition", + "parameters": { + "id": 1199, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1196, + "indexed": true, + "mutability": "mutable", + "name": "UAI", + "nodeType": "VariableDeclaration", + "scope": 1200, + "src": "1365:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1195, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1365:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1198, + "indexed": true, + "mutability": "mutable", + "name": "stateCommitHash", + "nodeType": "VariableDeclaration", + "scope": 1200, + "src": "1386:31:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1197, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1386:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1364:55:8" + }, + "src": "1343:77:8" + }, + { + "anonymous": false, + "id": 1208, + "name": "TokensDepositedToAsset", + "nodeType": "EventDefinition", + "parameters": { + "id": 1207, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1202, + "indexed": true, + "mutability": "mutable", + "name": "UAI", + "nodeType": "VariableDeclaration", + "scope": 1208, + "src": "1451:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1201, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1451:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1204, + "indexed": true, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1208, + "src": "1472:22:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1203, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1472:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1206, + "indexed": true, + "mutability": "mutable", + "name": "depositor", + "nodeType": "VariableDeclaration", + "scope": 1208, + "src": "1496:25:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1205, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1496:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1450:72:8" + }, + "src": "1422:101:8" + }, + { + "body": { + "id": 1253, + "nodeType": "Block", + "src": "1602:289:8", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1216, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1210, + "src": "1614:12:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 1219, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1636:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1218, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1628:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1217, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1628:7:8", + "typeDescriptions": {} + } + }, + "id": 1220, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1628:10:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "1614:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1215, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1606:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1222, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1606:33:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1223, + "nodeType": "ExpressionStatement", + "src": "1606:33:8" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1225, + "name": "assertionRegistryAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1212, + "src": "1651:24:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 1228, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1685:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1227, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1677:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1226, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1677:7:8", + "typeDescriptions": {} + } + }, + "id": 1229, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1677:10:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "1651:36:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1224, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1643:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1643:45:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1232, + "nodeType": "ExpressionStatement", + "src": "1643:45:8" + }, + { + "expression": { + "id": 1237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1233, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1157, + "src": "1693:5:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$676", + "typeString": "contract IERC20" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 1235, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1210, + "src": "1708:12:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1234, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 676, + "src": "1701:6:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$676_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 1236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1701:20:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$676", + "typeString": "contract IERC20" + } + }, + "src": "1693:28:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$676", + "typeString": "contract IERC20" + } + }, + "id": 1238, + "nodeType": "ExpressionStatement", + "src": "1693:28:8" + }, + { + "expression": { + "id": 1241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1239, + "name": "AssertionRegistryAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1161, + "src": "1725:24:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1240, + "name": "assertionRegistryAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1212, + "src": "1752:24:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1725:51:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1242, + "nodeType": "ExpressionStatement", + "src": "1725:51:8" + }, + { + "expression": { + "id": 1247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1243, + "name": "AssertionRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1159, + "src": "1780:17:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DKGcontract_$1138", + "typeString": "contract DKGcontract" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 1245, + "name": "assertionRegistryAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1212, + "src": "1812:24:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1244, + "name": "DKGcontract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1138, + "src": "1800:11:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_DKGcontract_$1138_$", + "typeString": "type(contract DKGcontract)" + } + }, + "id": 1246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1800:37:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_DKGcontract_$1138", + "typeString": "contract DKGcontract" + } + }, + "src": "1780:57:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DKGcontract_$1138", + "typeString": "contract DKGcontract" + } + }, + "id": 1248, + "nodeType": "ExpressionStatement", + "src": "1780:57:8" + }, + { + "eventCall": { + "arguments": [ + { + "id": 1250, + "name": "assertionRegistryAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1212, + "src": "1862:24:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1249, + "name": "UAIRegistryInit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1188, + "src": "1846:15:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 1251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1846:41:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1252, + "nodeType": "EmitStatement", + "src": "1841:46:8" + } + ] + }, + "id": 1254, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1213, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1210, + "mutability": "mutable", + "name": "tokenAddress", + "nodeType": "VariableDeclaration", + "scope": 1254, + "src": "1538:20:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1209, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1538:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1212, + "mutability": "mutable", + "name": "assertionRegistryAddress", + "nodeType": "VariableDeclaration", + "scope": 1254, + "src": "1560:32:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1211, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1560:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1537:56:8" + }, + "returnParameters": { + "id": 1214, + "nodeType": "ParameterList", + "parameters": [], + "src": "1602:0:8" + }, + "scope": 1610, + "src": "1526:365:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1371, + "nodeType": "Block", + "src": "2052:934:8", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1272, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1256, + "src": "2065:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 1273, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2070:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2065:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "5541492063616e6e6f74206265207a65726f", + "id": 1275, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2073:20:8", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8113bcaef69ad64d629f9f9842e44c0195bbec12498295833c352197bdf09d1b", + "typeString": "literal_string \"UAI cannot be zero\"" + }, + "value": "UAI cannot be zero" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8113bcaef69ad64d629f9f9842e44c0195bbec12498295833c352197bdf09d1b", + "typeString": "literal_string \"UAI cannot be zero\"" + } + ], + "id": 1271, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "2057:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2057:37:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1277, + "nodeType": "ExpressionStatement", + "src": "2057:37:8" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 1281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1279, + "name": "_type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1258, + "src": "2106:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "hexValue": "33", + "id": 1280, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2114:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "2106:9:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "5f7479706520616c6c6f7765642076616c7565733a20302c312c32202857495029", + "id": 1282, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2117:35:8", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cf25b7c40ac58b98472d8ae4b6b8703daef3920dd8a8c2b2556b411059eb30d4", + "typeString": "literal_string \"_type allowed values: 0,1,2 (WIP)\"" + }, + "value": "_type allowed values: 0,1,2 (WIP)" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_cf25b7c40ac58b98472d8ae4b6b8703daef3920dd8a8c2b2556b411059eb30d4", + "typeString": "literal_string \"_type allowed values: 0,1,2 (WIP)\"" + } + ], + "id": 1278, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "2098:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2098:55:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1284, + "nodeType": "ExpressionStatement", + "src": "2098:55:8" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1288, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1286, + "name": "alsoKnownAs", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1260, + "src": "2165:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 1287, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2178:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2165:14:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "616c736f4b6e6f776e41732063616e6e6f74206265207a65726f", + "id": 1289, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2181:28:8", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_889a93080df6c407ecf58a36aecc1ba986f5889f8941567948da9184911b568f", + "typeString": "literal_string \"alsoKnownAs cannot be zero\"" + }, + "value": "alsoKnownAs cannot be zero" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_889a93080df6c407ecf58a36aecc1ba986f5889f8941567948da9184911b568f", + "typeString": "literal_string \"alsoKnownAs cannot be zero\"" + } + ], + "id": 1285, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "2157:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2157:53:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1291, + "nodeType": "ExpressionStatement", + "src": "2157:53:8" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1293, + "name": "stateCommitHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1262, + "src": "2222:15:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 1294, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2239:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2222:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "7374617465436f6d6d6974486173682063616e6e6f74206265207a65726f", + "id": 1296, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2242:32:8", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f0caaefff46a6fa6373daf0acae33c6a0d7f130841550573dc0a5b0fb9ec40cc", + "typeString": "literal_string \"stateCommitHash cannot be zero\"" + }, + "value": "stateCommitHash cannot be zero" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f0caaefff46a6fa6373daf0acae33c6a0d7f130841550573dc0a5b0fb9ec40cc", + "typeString": "literal_string \"stateCommitHash cannot be zero\"" + } + ], + "id": 1292, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "2214:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1297, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2214:61:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1298, + "nodeType": "ExpressionStatement", + "src": "2214:61:8" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 1300, + "name": "UAIstatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1180, + "src": "2287:9:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + } + }, + "id": 1302, + "indexExpression": { + "id": 1301, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1256, + "src": "2297:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2287:14:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "66616c7365", + "id": 1303, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2305:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "2287:23:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1299, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "2279:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2279:33:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1306, + "nodeType": "ExpressionStatement", + "src": "2279:33:8" + }, + { + "expression": { + "arguments": [ + { + "id": 1310, + "name": "stateCommitHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1262, + "src": "2512:15:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 1311, + "name": "rootHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1264, + "src": "2529:8:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "arguments": [ + { + "expression": { + "id": 1314, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "2547:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "2547:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 1313, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2539:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1312, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2539:7:8", + "typeDescriptions": {} + } + }, + "id": 1316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2539:19:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "31", + "id": 1317, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2560:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + { + "hexValue": "31", + "id": 1318, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2563:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "id": 1307, + "name": "AssertionRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1159, + "src": "2472:17:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DKGcontract_$1138", + "typeString": "contract DKGcontract" + } + }, + "id": 1309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createAssertionRecord", + "nodeType": "MemberAccess", + "referencedDeclaration": 1015, + "src": "2472:39:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bytes32_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (bytes32,bytes32,address,uint256,uint256) external" + } + }, + "id": 1319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2472:93:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1320, + "nodeType": "ExpressionStatement", + "src": "2472:93:8" + }, + { + "expression": { + "id": 1326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 1321, + "name": "assetRecords", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1176, + "src": "2613:12:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1172_storage_$", + "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" + } + }, + "id": 1323, + "indexExpression": { + "id": 1322, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1256, + "src": "2626:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2613:17:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetRecord_$1172_storage", + "typeString": "struct UAIRegistry.AssetRecord storage ref" + } + }, + "id": 1324, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "stateCommitHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 1171, + "src": "2613:33:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1325, + "name": "stateCommitHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1262, + "src": "2649:15:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "2613:51:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1327, + "nodeType": "ExpressionStatement", + "src": "2613:51:8" + }, + { + "expression": { + "id": 1333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 1328, + "name": "assetRecords", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1176, + "src": "2668:12:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1172_storage_$", + "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" + } + }, + "id": 1330, + "indexExpression": { + "id": 1329, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1256, + "src": "2681:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2668:17:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetRecord_$1172_storage", + "typeString": "struct UAIRegistry.AssetRecord storage ref" + } + }, + "id": 1331, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "_type", + "nodeType": "MemberAccess", + "referencedDeclaration": 1167, + "src": "2668:23:8", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1332, + "name": "_type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1258, + "src": "2694:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "2668:31:8", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 1334, + "nodeType": "ExpressionStatement", + "src": "2668:31:8" + }, + { + "expression": { + "id": 1340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 1335, + "name": "assetRecords", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1176, + "src": "2703:12:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1172_storage_$", + "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" + } + }, + "id": 1337, + "indexExpression": { + "id": 1336, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1256, + "src": "2716:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2703:17:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetRecord_$1172_storage", + "typeString": "struct UAIRegistry.AssetRecord storage ref" + } + }, + "id": 1338, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "alsoKnownAs", + "nodeType": "MemberAccess", + "referencedDeclaration": 1165, + "src": "2703:29:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1339, + "name": "alsoKnownAs", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1260, + "src": "2735:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "2703:43:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1341, + "nodeType": "ExpressionStatement", + "src": "2703:43:8" + }, + { + "expression": { + "id": 1348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 1342, + "name": "assetRecords", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1176, + "src": "2750:12:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1172_storage_$", + "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" + } + }, + "id": 1344, + "indexExpression": { + "id": 1343, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1256, + "src": "2763:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2750:17:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetRecord_$1172_storage", + "typeString": "struct UAIRegistry.AssetRecord storage ref" + } + }, + "id": 1345, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "controller", + "nodeType": "MemberAccess", + "referencedDeclaration": 1169, + "src": "2750:28:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 1346, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "2781:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "2781:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2750:41:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1349, + "nodeType": "ExpressionStatement", + "src": "2750:41:8" + }, + { + "expression": { + "id": 1356, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 1350, + "name": "assetRecords", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1176, + "src": "2847:12:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1172_storage_$", + "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" + } + }, + "id": 1352, + "indexExpression": { + "id": 1351, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1256, + "src": "2860:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2847:17:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetRecord_$1172_storage", + "typeString": "struct UAIRegistry.AssetRecord storage ref" + } + }, + "id": 1353, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "creationTimestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": 1163, + "src": "2847:35:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 1354, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967292, + "src": "2885:5:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 1355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "2885:15:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2847:53:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1357, + "nodeType": "ExpressionStatement", + "src": "2847:53:8" + }, + { + "expression": { + "id": 1362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 1358, + "name": "UAIstatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1180, + "src": "2904:9:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + } + }, + "id": 1360, + "indexExpression": { + "id": 1359, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1256, + "src": "2914:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2904:14:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 1361, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2921:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2904:21:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1363, + "nodeType": "ExpressionStatement", + "src": "2904:21:8" + }, + { + "eventCall": { + "arguments": [ + { + "id": 1365, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1256, + "src": "2946:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 1366, + "name": "stateCommitHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1262, + "src": "2951:15:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1364, + "name": "UAICreated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1194, + "src": "2935:10:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (bytes32,bytes32)" + } + }, + "id": 1367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2935:32:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1368, + "nodeType": "EmitStatement", + "src": "2930:37:8" + }, + { + "expression": { + "id": 1369, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1256, + "src": "2979:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 1270, + "id": 1370, + "nodeType": "Return", + "src": "2972:10:8" + } + ] + }, + "functionSelector": "78e98392", + "id": 1372, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "registerAsset", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1267, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1256, + "mutability": "mutable", + "name": "UAI", + "nodeType": "VariableDeclaration", + "scope": 1372, + "src": "1917:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1255, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1917:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1258, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "scope": 1372, + "src": "1930:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1257, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1930:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1260, + "mutability": "mutable", + "name": "alsoKnownAs", + "nodeType": "VariableDeclaration", + "scope": 1372, + "src": "1943:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1259, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1943:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1262, + "mutability": "mutable", + "name": "stateCommitHash", + "nodeType": "VariableDeclaration", + "scope": 1372, + "src": "1964:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1261, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1964:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1264, + "mutability": "mutable", + "name": "rootHash", + "nodeType": "VariableDeclaration", + "scope": 1372, + "src": "1989:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1263, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1989:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1266, + "mutability": "mutable", + "name": "tokenAmount", + "nodeType": "VariableDeclaration", + "scope": 1372, + "src": "2007:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1265, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2007:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1916:111:8" + }, + "returnParameters": { + "id": 1270, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1269, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1372, + "src": "2044:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1268, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2044:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2043:9:8" + }, + "scope": 1610, + "src": "1894:1092:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1439, + "nodeType": "Block", + "src": "3101:476:8", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1384, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1374, + "src": "3114:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 1385, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3119:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3114:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "5541492063616e6e6f74206265207a65726f", + "id": 1387, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3122:20:8", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8113bcaef69ad64d629f9f9842e44c0195bbec12498295833c352197bdf09d1b", + "typeString": "literal_string \"UAI cannot be zero\"" + }, + "value": "UAI cannot be zero" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8113bcaef69ad64d629f9f9842e44c0195bbec12498295833c352197bdf09d1b", + "typeString": "literal_string \"UAI cannot be zero\"" + } + ], + "id": 1383, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "3106:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3106:37:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1389, + "nodeType": "ExpressionStatement", + "src": "3106:37:8" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1395, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 1391, + "name": "UAIstatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1180, + "src": "3155:9:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + } + }, + "id": 1393, + "indexExpression": { + "id": 1392, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1374, + "src": "3165:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3155:14:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "74727565", + "id": 1394, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3173:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "3155:22:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4173736574206d757374206578697374", + "id": 1396, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3179:18:8", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1288ba10f0c0a9fa84e2f581ad61c72d898b048e206b52821e5663686f23ff37", + "typeString": "literal_string \"Asset must exist\"" + }, + "value": "Asset must exist" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_1288ba10f0c0a9fa84e2f581ad61c72d898b048e206b52821e5663686f23ff37", + "typeString": "literal_string \"Asset must exist\"" + } + ], + "id": 1390, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "3147:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3147:52:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1398, + "nodeType": "ExpressionStatement", + "src": "3147:52:8" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1400, + "name": "newStateCommitHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1376, + "src": "3211:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 1401, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3231:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3211:21:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "6e65775374617465436f6d6d6974486173682063616e6e6f74206265207a65726f", + "id": 1403, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3234:35:8", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_fa287c795401a9447e9af39b3f60c2649bae99888868237daa5c7cc28744941b", + "typeString": "literal_string \"newStateCommitHash cannot be zero\"" + }, + "value": "newStateCommitHash cannot be zero" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_fa287c795401a9447e9af39b3f60c2649bae99888868237daa5c7cc28744941b", + "typeString": "literal_string \"newStateCommitHash cannot be zero\"" + } + ], + "id": 1399, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "3203:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1404, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3203:67:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1405, + "nodeType": "ExpressionStatement", + "src": "3203:67:8" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 1408, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1374, + "src": "3290:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "expression": { + "id": 1409, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "3294:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1410, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3294:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 1407, + "name": "isOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1531, + "src": "3282:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) returns (bool)" + } + }, + "id": 1411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3282:23:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1406, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "3274:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3274:32:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1413, + "nodeType": "ExpressionStatement", + "src": "3274:32:8" + }, + { + "expression": { + "arguments": [ + { + "id": 1417, + "name": "newStateCommitHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1376, + "src": "3353:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 1418, + "name": "rootHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1378, + "src": "3373:8:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "expression": { + "id": 1419, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "3383:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3383:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "hexValue": "31", + "id": 1421, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3395:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + { + "hexValue": "31", + "id": 1422, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3398:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "id": 1414, + "name": "AssertionRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1159, + "src": "3313:17:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DKGcontract_$1138", + "typeString": "contract DKGcontract" + } + }, + "id": 1416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createAssertionRecord", + "nodeType": "MemberAccess", + "referencedDeclaration": 1015, + "src": "3313:39:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bytes32_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (bytes32,bytes32,address,uint256,uint256) external" + } + }, + "id": 1423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3313:87:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1424, + "nodeType": "ExpressionStatement", + "src": "3313:87:8" + }, + { + "expression": { + "id": 1430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 1425, + "name": "assetRecords", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1176, + "src": "3414:12:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1172_storage_$", + "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" + } + }, + "id": 1427, + "indexExpression": { + "id": 1426, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1374, + "src": "3427:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3414:17:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetRecord_$1172_storage", + "typeString": "struct UAIRegistry.AssetRecord storage ref" + } + }, + "id": 1428, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "stateCommitHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 1171, + "src": "3414:33:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1429, + "name": "newStateCommitHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1376, + "src": "3451:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "3414:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1431, + "nodeType": "ExpressionStatement", + "src": "3414:55:8" + }, + { + "eventCall": { + "arguments": [ + { + "id": 1433, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1374, + "src": "3534:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 1434, + "name": "newStateCommitHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1376, + "src": "3539:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1432, + "name": "UAIUpdatedState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1200, + "src": "3518:15:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (bytes32,bytes32)" + } + }, + "id": 1435, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3518:40:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1436, + "nodeType": "EmitStatement", + "src": "3513:45:8" + }, + { + "expression": { + "id": 1437, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1374, + "src": "3570:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 1382, + "id": 1438, + "nodeType": "Return", + "src": "3563:10:8" + } + ] + }, + "functionSelector": "a9cd6a2d", + "id": 1440, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "updateAssetState", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1379, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1374, + "mutability": "mutable", + "name": "UAI", + "nodeType": "VariableDeclaration", + "scope": 1440, + "src": "3017:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1373, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3017:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1376, + "mutability": "mutable", + "name": "newStateCommitHash", + "nodeType": "VariableDeclaration", + "scope": 1440, + "src": "3030:26:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1375, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3030:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1378, + "mutability": "mutable", + "name": "rootHash", + "nodeType": "VariableDeclaration", + "scope": 1440, + "src": "3058:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1377, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3058:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3016:59:8" + }, + "returnParameters": { + "id": 1382, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1381, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1440, + "src": "3092:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1380, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3092:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3091:9:8" + }, + "scope": 1610, + "src": "2991:586:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1452, + "nodeType": "Block", + "src": "3683:48:8", + "statements": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 1447, + "name": "assetRecords", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1176, + "src": "3694:12:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1172_storage_$", + "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" + } + }, + "id": 1449, + "indexExpression": { + "id": 1448, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1442, + "src": "3707:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3694:17:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetRecord_$1172_storage", + "typeString": "struct UAIRegistry.AssetRecord storage ref" + } + }, + "id": 1450, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "stateCommitHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 1171, + "src": "3694:33:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 1446, + "id": 1451, + "nodeType": "Return", + "src": "3687:40:8" + } + ] + }, + "functionSelector": "52569b9d", + "id": 1453, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getAssetStateCommitHash", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1443, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1442, + "mutability": "mutable", + "name": "UAI", + "nodeType": "VariableDeclaration", + "scope": 1453, + "src": "3626:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1441, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3626:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3625:13:8" + }, + "returnParameters": { + "id": 1446, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1445, + "mutability": "mutable", + "name": "stateCommitHash", + "nodeType": "VariableDeclaration", + "scope": 1453, + "src": "3659:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1444, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3659:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3658:25:8" + }, + "scope": 1610, + "src": "3593:138:8", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1465, + "nodeType": "Block", + "src": "3814:43:8", + "statements": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 1460, + "name": "assetRecords", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1176, + "src": "3825:12:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1172_storage_$", + "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" + } + }, + "id": 1462, + "indexExpression": { + "id": 1461, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1455, + "src": "3838:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3825:17:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetRecord_$1172_storage", + "typeString": "struct UAIRegistry.AssetRecord storage ref" + } + }, + "id": 1463, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "controller", + "nodeType": "MemberAccess", + "referencedDeclaration": 1169, + "src": "3825:28:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 1459, + "id": 1464, + "nodeType": "Return", + "src": "3818:35:8" + } + ] + }, + "functionSelector": "77636d1d", + "id": 1466, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getAssetController", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1456, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1455, + "mutability": "mutable", + "name": "UAI", + "nodeType": "VariableDeclaration", + "scope": 1466, + "src": "3762:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1454, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3762:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3761:13:8" + }, + "returnParameters": { + "id": 1459, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1458, + "mutability": "mutable", + "name": "controller", + "nodeType": "VariableDeclaration", + "scope": 1466, + "src": "3795:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1457, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3795:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3794:20:8" + }, + "scope": 1610, + "src": "3734:123:8", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1478, + "nodeType": "Block", + "src": "3934:44:8", + "statements": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 1473, + "name": "assetRecords", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1176, + "src": "3945:12:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1172_storage_$", + "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" + } + }, + "id": 1475, + "indexExpression": { + "id": 1474, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1468, + "src": "3958:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3945:17:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetRecord_$1172_storage", + "typeString": "struct UAIRegistry.AssetRecord storage ref" + } + }, + "id": 1476, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "alsoKnownAs", + "nodeType": "MemberAccess", + "referencedDeclaration": 1165, + "src": "3945:29:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 1472, + "id": 1477, + "nodeType": "Return", + "src": "3938:36:8" + } + ] + }, + "functionSelector": "6f3a9229", + "id": 1479, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getAssetAKA", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1469, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1468, + "mutability": "mutable", + "name": "UAI", + "nodeType": "VariableDeclaration", + "scope": 1479, + "src": "3881:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1467, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3881:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3880:13:8" + }, + "returnParameters": { + "id": 1472, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1471, + "mutability": "mutable", + "name": "alsoKnownAs", + "nodeType": "VariableDeclaration", + "scope": 1479, + "src": "3914:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1470, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3914:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3913:21:8" + }, + "scope": 1610, + "src": "3860:118:8", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1491, + "nodeType": "Block", + "src": "4075:50:8", + "statements": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 1486, + "name": "assetRecords", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1176, + "src": "4086:12:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1172_storage_$", + "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" + } + }, + "id": 1488, + "indexExpression": { + "id": 1487, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1481, + "src": "4099:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4086:17:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetRecord_$1172_storage", + "typeString": "struct UAIRegistry.AssetRecord storage ref" + } + }, + "id": 1489, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "creationTimestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": 1163, + "src": "4086:35:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1485, + "id": 1490, + "nodeType": "Return", + "src": "4079:42:8" + } + ] + }, + "functionSelector": "7f58afc8", + "id": 1492, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getAssetCreationTimestamp", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1482, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1481, + "mutability": "mutable", + "name": "UAI", + "nodeType": "VariableDeclaration", + "scope": 1492, + "src": "4016:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1480, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4016:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4015:13:8" + }, + "returnParameters": { + "id": 1485, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1484, + "mutability": "mutable", + "name": "creationTimestamp", + "nodeType": "VariableDeclaration", + "scope": 1492, + "src": "4049:25:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1483, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4049:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4048:27:8" + }, + "scope": 1610, + "src": "3981:144:8", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1499, + "nodeType": "Block", + "src": "4206:39:8", + "statements": [ + { + "expression": { + "id": 1497, + "name": "AssertionRegistryAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1161, + "src": "4217:24:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 1496, + "id": 1498, + "nodeType": "Return", + "src": "4210:31:8" + } + ] + }, + "functionSelector": "2f1704bc", + "id": 1500, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getAssertionRegistry", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1493, + "nodeType": "ParameterList", + "parameters": [], + "src": "4157:2:8" + }, + "returnParameters": { + "id": 1496, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1495, + "mutability": "mutable", + "name": "assertionRegistry", + "nodeType": "VariableDeclaration", + "scope": 1500, + "src": "4180:25:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1494, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4180:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "4179:27:8" + }, + "scope": 1610, + "src": "4128:117:8", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1512, + "nodeType": "Block", + "src": "4460:62:8", + "statements": [ + { + "expression": { + "hexValue": "30", + "id": 1510, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4471:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 1509, + "id": 1511, + "nodeType": "Return", + "src": "4464:8:8" + } + ] + }, + "documentation": { + "id": 1501, + "nodeType": "StructuredDocumentation", + "src": "4263:107:8", + "text": " @dev Should determine type of ``contractAddress``, if possible, returning enum AssetType" + }, + "id": 1513, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "determineType", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1506, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1503, + "mutability": "mutable", + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 1513, + "src": "4399:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1502, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4399:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1505, + "mutability": "mutable", + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 1513, + "src": "4424:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1504, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4424:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4398:37:8" + }, + "returnParameters": { + "id": 1509, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1508, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1513, + "src": "4454:5:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1507, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "4454:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "4453:7:8" + }, + "scope": 1610, + "src": "4376:146:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1530, + "nodeType": "Block", + "src": "4683:60:8", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1528, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1523, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1518, + "src": "4698:5:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "baseExpression": { + "id": 1524, + "name": "assetRecords", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1176, + "src": "4707:12:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1172_storage_$", + "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" + } + }, + "id": 1526, + "indexExpression": { + "id": 1525, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1516, + "src": "4720:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4707:17:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetRecord_$1172_storage", + "typeString": "struct UAIRegistry.AssetRecord storage ref" + } + }, + "id": 1527, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "controller", + "nodeType": "MemberAccess", + "referencedDeclaration": 1169, + "src": "4707:28:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4698:37:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1522, + "id": 1529, + "nodeType": "Return", + "src": "4691:44:8" + } + ] + }, + "documentation": { + "id": 1514, + "nodeType": "StructuredDocumentation", + "src": "4525:83:8", + "text": " @dev Returns bool checking if ``owner`` is controller of ``UAI``" + }, + "id": 1531, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isOwner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1519, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1516, + "mutability": "mutable", + "name": "UAI", + "nodeType": "VariableDeclaration", + "scope": 1531, + "src": "4631:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1515, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4631:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1518, + "mutability": "mutable", + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1531, + "src": "4644:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1517, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4644:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "4630:28:8" + }, + "returnParameters": { + "id": 1522, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1521, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1531, + "src": "4677:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1520, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4677:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "4676:6:8" + }, + "scope": 1610, + "src": "4614:129:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1608, + "nodeType": "Block", + "src": "4884:717:8", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1542, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1540, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1534, + "src": "4901:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 1541, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4908:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4901:8:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "416d6f756e742063616e6e6f74206265207a65726f", + "id": 1543, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4911:23:8", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8beea76deddeff1012d90e1e8da369393f885b0575eb094a33da9912cc4bbb8b", + "typeString": "literal_string \"Amount cannot be zero\"" + }, + "value": "Amount cannot be zero" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8beea76deddeff1012d90e1e8da369393f885b0575eb094a33da9912cc4bbb8b", + "typeString": "literal_string \"Amount cannot be zero\"" + } + ], + "id": 1539, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "4893:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4893:42:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1545, + "nodeType": "ExpressionStatement", + "src": "4893:42:8" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "expression": { + "id": 1549, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "4967:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1550, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4967:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [ + { + "id": 1553, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967268, + "src": "4987:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UAIRegistry_$1610", + "typeString": "contract UAIRegistry" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_UAIRegistry_$1610", + "typeString": "contract UAIRegistry" + } + ], + "id": 1552, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4979:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1551, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4979:7:8", + "typeDescriptions": {} + } + }, + "id": 1554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4979:13:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 1547, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1157, + "src": "4951:5:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$676", + "typeString": "contract IERC20" + } + }, + "id": 1548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 635, + "src": "4951:15:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 1555, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4951:42:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 1556, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1534, + "src": "4997:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4951:52:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "53656e64657220616c6c6f77616e6365206d75737420626520657175616c20746f206f7220686967686572207468616e2063686f73656e20616d6f756e74", + "id": 1558, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5005:64:8", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3bc5ac98536c45d410bf37692b674d7f6ad3249fabf29eadc142b2e562988389", + "typeString": "literal_string \"Sender allowance must be equal to or higher than chosen amount\"" + }, + "value": "Sender allowance must be equal to or higher than chosen amount" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3bc5ac98536c45d410bf37692b674d7f6ad3249fabf29eadc142b2e562988389", + "typeString": "literal_string \"Sender allowance must be equal to or higher than chosen amount\"" + } + ], + "id": 1546, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "4943:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1559, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4943:127:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1560, + "nodeType": "ExpressionStatement", + "src": "4943:127:8" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "expression": { + "id": 1564, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "5102:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "5102:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "id": 1562, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1157, + "src": "5086:5:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$676", + "typeString": "contract IERC20" + } + }, + "id": 1563, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 615, + "src": "5086:15:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 1566, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5086:27:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 1567, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1534, + "src": "5117:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5086:37:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "53656e6465722062616c616e6365206d75737420626520657175616c20746f206f7220686967686572207468616e2063686f73656e20616d6f756e7421", + "id": 1569, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5125:63:8", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_262e509abce0ea4c77b39344642b82be870ee6d03e35d57d1dee69295a1e383b", + "typeString": "literal_string \"Sender balance must be equal to or higher than chosen amount!\"" + }, + "value": "Sender balance must be equal to or higher than chosen amount!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_262e509abce0ea4c77b39344642b82be870ee6d03e35d57d1dee69295a1e383b", + "typeString": "literal_string \"Sender balance must be equal to or higher than chosen amount!\"" + } + ], + "id": 1561, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "5078:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1570, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5078:111:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1571, + "nodeType": "ExpressionStatement", + "src": "5078:111:8" + }, + { + "assignments": [ + 1573 + ], + "declarations": [ + { + "constant": false, + "id": 1573, + "mutability": "mutable", + "name": "transaction_result", + "nodeType": "VariableDeclaration", + "scope": 1608, + "src": "5198:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1572, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5198:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "id": 1584, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 1576, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "5243:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "5243:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [ + { + "id": 1580, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967268, + "src": "5263:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UAIRegistry_$1610", + "typeString": "contract UAIRegistry" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_UAIRegistry_$1610", + "typeString": "contract UAIRegistry" + } + ], + "id": 1579, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5255:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1578, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5255:7:8", + "typeDescriptions": {} + } + }, + "id": 1581, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5255:13:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1582, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1534, + "src": "5270:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 1574, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1157, + "src": "5224:5:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$676", + "typeString": "contract IERC20" + } + }, + "id": 1575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 657, + "src": "5224:18:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 1583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5224:53:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5198:79:8" + }, + { + "expression": { + "arguments": [ + { + "id": 1586, + "name": "transaction_result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1573, + "src": "5293:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "546f6b656e207472616e73616374696f6e20657865637574696f6e206661696c656421", + "id": 1587, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5313:37:8", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c60aa67373380e582a977ce48d7156e19a6358c471790919f2371ebd75aaf7c7", + "typeString": "literal_string \"Token transaction execution failed!\"" + }, + "value": "Token transaction execution failed!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c60aa67373380e582a977ce48d7156e19a6358c471790919f2371ebd75aaf7c7", + "typeString": "literal_string \"Token transaction execution failed!\"" + } + ], + "id": 1585, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "5285:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5285:66:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1589, + "nodeType": "ExpressionStatement", + "src": "5285:66:8" + }, + { + "expression": { + "id": 1599, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 1590, + "name": "assetStake", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1184, + "src": "5496:10:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 1592, + "indexExpression": { + "id": 1591, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1536, + "src": "5507:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5496:15:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 1597, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1534, + "src": "5534:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 1593, + "name": "assetStake", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1184, + "src": "5514:10:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 1595, + "indexExpression": { + "id": 1594, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1536, + "src": "5525:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5514:15:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 303, + "src": "5514:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1598, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5514:27:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5496:45:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1600, + "nodeType": "ExpressionStatement", + "src": "5496:45:8" + }, + { + "eventCall": { + "arguments": [ + { + "id": 1602, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1536, + "src": "5573:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 1603, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1534, + "src": "5578:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 1604, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "5585:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "5585:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 1601, + "name": "TokensDepositedToAsset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1208, + "src": "5550:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (bytes32,uint256,address)" + } + }, + "id": 1606, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5550:46:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1607, + "nodeType": "EmitStatement", + "src": "5545:51:8" + } + ] + }, + "documentation": { + "id": 1532, + "nodeType": "StructuredDocumentation", + "src": "4746:73:8", + "text": " @dev Deposits tokens in ``amount`` to specific ``UAI``" + }, + "functionSelector": "d15b223e", + "id": 1609, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "depositTokens", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1537, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1534, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1609, + "src": "4848:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1533, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4848:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1536, + "mutability": "mutable", + "name": "UAI", + "nodeType": "VariableDeclaration", + "scope": 1609, + "src": "4864:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1535, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4864:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4847:29:8" + }, + "returnParameters": { + "id": 1538, + "nodeType": "ParameterList", + "parameters": [], + "src": "4884:0:8" + }, + "scope": 1610, + "src": "4825:776:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 1611, + "src": "623:4983:8" + } + ], + "src": "0:5606:8" + }, + "legacyAST": { + "attributes": { + "absolutePath": "project:/contracts/UAIRegistry.sol", + "exportedSymbols": { + "Context": [ + 815 + ], + "DKGcontract": [ + 1138 + ], + "IERC1155": [ + 598 + ], + "IERC165": [ + 121 + ], + "IERC20": [ + 676 + ], + "IERC721": [ + 792 + ], + "Ownable": [ + 109 + ], + "SafeMath": [ + 476 + ], + "UAIRegistry": [ + 1610 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + ">=", + "0.6", + ".0", + "<", + "0.8", + ".0" + ] + }, + "id": 1140, + "name": "PragmaDirective", + "src": "0:31:8" + }, + { + "attributes": { + "SourceUnit": 677, + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "scope": 1611, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 1141, + "name": "ImportDirective", + "src": "33:64:8" + }, + { + "attributes": { + "SourceUnit": 793, + "absolutePath": "openzeppelin-solidity/contracts/token/ERC721/IERC721.sol", + "file": "openzeppelin-solidity/contracts/token/ERC721/IERC721.sol", + "scope": 1611, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 1142, + "name": "ImportDirective", + "src": "98:66:8" + }, + { + "attributes": { + "SourceUnit": 599, + "absolutePath": "openzeppelin-solidity/contracts/token/ERC1155/IERC1155.sol", + "file": "openzeppelin-solidity/contracts/token/ERC1155/IERC1155.sol", + "scope": 1611, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 1143, + "name": "ImportDirective", + "src": "165:68:8" + }, + { + "attributes": { + "SourceUnit": 477, + "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "file": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "scope": 1611, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 1144, + "name": "ImportDirective", + "src": "234:59:8" + }, + { + "attributes": { + "SourceUnit": 110, + "absolutePath": "openzeppelin-solidity/contracts/access/Ownable.sol", + "file": "openzeppelin-solidity/contracts/access/Ownable.sol", + "scope": 1611, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 1145, + "name": "ImportDirective", + "src": "294:60:8" + }, + { + "attributes": { + "SourceUnit": 1139, + "absolutePath": "project:/contracts/DKGcontract.sol", + "file": "./DKGcontract.sol", + "scope": 1611, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 1146, + "name": "ImportDirective", + "src": "355:27:8" + }, + { + "attributes": { + "abstract": false, + "contractDependencies": [ + 109, + 815 + ], + "contractKind": "contract", + "fullyImplemented": true, + "linearizedBaseContracts": [ + 1610, + 109, + 815 + ], + "name": "UAIRegistry", + "scope": 1611 + }, + "children": [ + { + "attributes": {}, + "children": [ + { + "attributes": { + "name": "Ownable", + "referencedDeclaration": 109, + "type": "contract Ownable" + }, + "id": 1147, + "name": "UserDefinedTypeName", + "src": "647:7:8" + } + ], + "id": 1148, + "name": "InheritanceSpecifier", + "src": "647:7:8" + }, + { + "attributes": { + "canonicalName": "UAIRegistry.AssetType", + "name": "AssetType" + }, + "children": [ + { + "attributes": { + "name": "Native" + }, + "id": 1149, + "name": "EnumValue", + "src": "677:6:8" + }, + { + "attributes": { + "name": "ERC721" + }, + "id": 1150, + "name": "EnumValue", + "src": "687:6:8" + }, + { + "attributes": { + "name": "ERC1155" + }, + "id": 1151, + "name": "EnumValue", + "src": "697:7:8" + } + ], + "id": 1152, + "name": "EnumDefinition", + "src": "659:48:8" + }, + { + "children": [ + { + "attributes": { + "name": "SafeMath", + "referencedDeclaration": 476, + "type": "library SafeMath" + }, + "id": 1153, + "name": "UserDefinedTypeName", + "src": "716:8:8" + }, + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 1154, + "name": "ElementaryTypeName", + "src": "729:7:8" + } + ], + "id": 1155, + "name": "UsingForDirective", + "src": "710:27:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "token", + "scope": 1610, + "stateVariable": true, + "storageLocation": "default", + "type": "contract IERC20", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "IERC20", + "referencedDeclaration": 676, + "type": "contract IERC20" + }, + "id": 1156, + "name": "UserDefinedTypeName", + "src": "739:6:8" + } + ], + "id": 1157, + "name": "VariableDeclaration", + "src": "739:12:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "AssertionRegistry", + "scope": 1610, + "stateVariable": true, + "storageLocation": "default", + "type": "contract DKGcontract", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "DKGcontract", + "referencedDeclaration": 1138, + "type": "contract DKGcontract" + }, + "id": 1158, + "name": "UserDefinedTypeName", + "src": "754:11:8" + } + ], + "id": 1159, + "name": "VariableDeclaration", + "src": "754:29:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "AssertionRegistryAddress", + "scope": 1610, + "stateVariable": true, + "storageLocation": "default", + "type": "address", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1160, + "name": "ElementaryTypeName", + "src": "786:7:8" + } + ], + "id": 1161, + "name": "VariableDeclaration", + "src": "786:32:8" + }, + { + "attributes": { + "canonicalName": "UAIRegistry.AssetRecord", + "name": "AssetRecord", + "scope": 1610, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "creationTimestamp", + "scope": 1172, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 1162, + "name": "ElementaryTypeName", + "src": "844:7:8" + } + ], + "id": 1163, + "name": "VariableDeclaration", + "src": "844:25:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "alsoKnownAs", + "scope": 1172, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1164, + "name": "ElementaryTypeName", + "src": "873:7:8" + } + ], + "id": 1165, + "name": "VariableDeclaration", + "src": "873:19:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "_type", + "scope": 1172, + "stateVariable": false, + "storageLocation": "default", + "type": "uint8", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint8", + "type": "uint8" + }, + "id": 1166, + "name": "ElementaryTypeName", + "src": "967:5:8" + } + ], + "id": 1167, + "name": "VariableDeclaration", + "src": "967:11:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "controller", + "scope": 1172, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1168, + "name": "ElementaryTypeName", + "src": "982:7:8" + } + ], + "id": 1169, + "name": "VariableDeclaration", + "src": "982:18:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "stateCommitHash", + "scope": 1172, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1170, + "name": "ElementaryTypeName", + "src": "1012:7:8" + } + ], + "id": 1171, + "name": "VariableDeclaration", + "src": "1012:23:8" + } + ], + "id": 1172, + "name": "StructDefinition", + "src": "822:217:8" + }, + { + "attributes": { + "constant": false, + "functionSelector": "09600fa6", + "mutability": "mutable", + "name": "assetRecords", + "scope": 1610, + "stateVariable": true, + "storageLocation": "default", + "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord)", + "visibility": "public" + }, + "children": [ + { + "attributes": { + "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord)" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1173, + "name": "ElementaryTypeName", + "src": "1050:7:8" + }, + { + "attributes": { + "name": "AssetRecord", + "referencedDeclaration": 1172, + "type": "struct UAIRegistry.AssetRecord" + }, + "id": 1174, + "name": "UserDefinedTypeName", + "src": "1061:11:8" + } + ], + "id": 1175, + "name": "Mapping", + "src": "1042:31:8" + } + ], + "id": 1176, + "name": "VariableDeclaration", + "src": "1042:51:8" + }, + { + "attributes": { + "constant": false, + "functionSelector": "09added7", + "mutability": "mutable", + "name": "UAIstatus", + "scope": 1610, + "stateVariable": true, + "storageLocation": "default", + "type": "mapping(bytes32 => bool)", + "visibility": "public" + }, + "children": [ + { + "attributes": { + "type": "mapping(bytes32 => bool)" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1177, + "name": "ElementaryTypeName", + "src": "1104:7:8" + }, + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 1178, + "name": "ElementaryTypeName", + "src": "1115:4:8" + } + ], + "id": 1179, + "name": "Mapping", + "src": "1096:24:8" + } + ], + "id": 1180, + "name": "VariableDeclaration", + "src": "1096:41:8" + }, + { + "attributes": { + "constant": false, + "functionSelector": "34e5197b", + "mutability": "mutable", + "name": "assetStake", + "scope": 1610, + "stateVariable": true, + "storageLocation": "default", + "type": "mapping(bytes32 => uint256)", + "visibility": "public" + }, + "children": [ + { + "attributes": { + "type": "mapping(bytes32 => uint256)" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1181, + "name": "ElementaryTypeName", + "src": "1149:7:8" + }, + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 1182, + "name": "ElementaryTypeName", + "src": "1160:7:8" + } + ], + "id": 1183, + "name": "Mapping", + "src": "1141:27:8" + } + ], + "id": 1184, + "name": "VariableDeclaration", + "src": "1141:45:8" + }, + { + "attributes": { + "anonymous": false, + "name": "UAIRegistryInit" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "mutability": "mutable", + "name": "assertionRegistryAddress", + "scope": 1188, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1185, + "name": "ElementaryTypeName", + "src": "1226:7:8" + } + ], + "id": 1186, + "name": "VariableDeclaration", + "src": "1226:40:8" + } + ], + "id": 1187, + "name": "ParameterList", + "src": "1225:42:8" + } + ], + "id": 1188, + "name": "EventDefinition", + "src": "1204:64:8" + }, + { + "attributes": { + "anonymous": false, + "name": "UAICreated" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "mutability": "mutable", + "name": "UAI", + "scope": 1194, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1189, + "name": "ElementaryTypeName", + "src": "1287:7:8" + } + ], + "id": 1190, + "name": "VariableDeclaration", + "src": "1287:19:8" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "mutability": "mutable", + "name": "stateCommitHash", + "scope": 1194, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1191, + "name": "ElementaryTypeName", + "src": "1308:7:8" + } + ], + "id": 1192, + "name": "VariableDeclaration", + "src": "1308:31:8" + } + ], + "id": 1193, + "name": "ParameterList", + "src": "1286:54:8" + } + ], + "id": 1194, + "name": "EventDefinition", + "src": "1270:71:8" + }, + { + "attributes": { + "anonymous": false, + "name": "UAIUpdatedState" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "mutability": "mutable", + "name": "UAI", + "scope": 1200, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1195, + "name": "ElementaryTypeName", + "src": "1365:7:8" + } + ], + "id": 1196, + "name": "VariableDeclaration", + "src": "1365:19:8" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "mutability": "mutable", + "name": "stateCommitHash", + "scope": 1200, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1197, + "name": "ElementaryTypeName", + "src": "1386:7:8" + } + ], + "id": 1198, + "name": "VariableDeclaration", + "src": "1386:31:8" + } + ], + "id": 1199, + "name": "ParameterList", + "src": "1364:55:8" + } + ], + "id": 1200, + "name": "EventDefinition", + "src": "1343:77:8" + }, + { + "attributes": { + "anonymous": false, + "name": "TokensDepositedToAsset" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "mutability": "mutable", + "name": "UAI", + "scope": 1208, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1201, + "name": "ElementaryTypeName", + "src": "1451:7:8" + } + ], + "id": 1202, + "name": "VariableDeclaration", + "src": "1451:19:8" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "mutability": "mutable", + "name": "amount", + "scope": 1208, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 1203, + "name": "ElementaryTypeName", + "src": "1472:7:8" + } + ], + "id": 1204, + "name": "VariableDeclaration", + "src": "1472:22:8" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "mutability": "mutable", + "name": "depositor", + "scope": 1208, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1205, + "name": "ElementaryTypeName", + "src": "1496:7:8" + } + ], + "id": 1206, + "name": "VariableDeclaration", + "src": "1496:25:8" + } + ], + "id": 1207, + "name": "ParameterList", + "src": "1450:72:8" + } + ], + "id": 1208, + "name": "EventDefinition", + "src": "1422:101:8" + }, + { + "attributes": { + "implemented": true, + "isConstructor": true, + "kind": "constructor", + "modifiers": [ + null + ], + "name": "", + "scope": 1610, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "tokenAddress", + "scope": 1254, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1209, + "name": "ElementaryTypeName", + "src": "1538:7:8" + } + ], + "id": 1210, + "name": "VariableDeclaration", + "src": "1538:20:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "assertionRegistryAddress", + "scope": 1254, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1211, + "name": "ElementaryTypeName", + "src": "1560:7:8" + } + ], + "id": 1212, + "name": "VariableDeclaration", + "src": "1560:32:8" + } + ], + "id": 1213, + "name": "ParameterList", + "src": "1537:56:8" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 1214, + "name": "ParameterList", + "src": "1602:0:8" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "type": "function (bool) pure", + "value": "require" + }, + "id": 1215, + "name": "Identifier", + "src": "1606:7:8" + }, + { + "attributes": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1210, + "type": "address", + "value": "tokenAddress" + }, + "id": 1216, + "name": "Identifier", + "src": "1614:12:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)" + }, + "children": [ + { + "attributes": { + "name": "address" + }, + "id": 1217, + "name": "ElementaryTypeName", + "src": "1628:7:8" + } + ], + "id": 1218, + "name": "ElementaryTypeNameExpression", + "src": "1628:7:8" + }, + { + "attributes": { + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 1219, + "name": "Literal", + "src": "1636:1:8" + } + ], + "id": 1220, + "name": "FunctionCall", + "src": "1628:10:8" + } + ], + "id": 1221, + "name": "BinaryOperation", + "src": "1614:24:8" + } + ], + "id": 1222, + "name": "FunctionCall", + "src": "1606:33:8" + } + ], + "id": 1223, + "name": "ExpressionStatement", + "src": "1606:33:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "type": "function (bool) pure", + "value": "require" + }, + "id": 1224, + "name": "Identifier", + "src": "1643:7:8" + }, + { + "attributes": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1212, + "type": "address", + "value": "assertionRegistryAddress" + }, + "id": 1225, + "name": "Identifier", + "src": "1651:24:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)" + }, + "children": [ + { + "attributes": { + "name": "address" + }, + "id": 1226, + "name": "ElementaryTypeName", + "src": "1677:7:8" + } + ], + "id": 1227, + "name": "ElementaryTypeNameExpression", + "src": "1677:7:8" + }, + { + "attributes": { + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 1228, + "name": "Literal", + "src": "1685:1:8" + } + ], + "id": 1229, + "name": "FunctionCall", + "src": "1677:10:8" + } + ], + "id": 1230, + "name": "BinaryOperation", + "src": "1651:36:8" + } + ], + "id": 1231, + "name": "FunctionCall", + "src": "1643:45:8" + } + ], + "id": 1232, + "name": "ExpressionStatement", + "src": "1643:45:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "contract IERC20" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1157, + "type": "contract IERC20", + "value": "token" + }, + "id": 1233, + "name": "Identifier", + "src": "1693:5:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "contract IERC20", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 676, + "type": "type(contract IERC20)", + "value": "IERC20" + }, + "id": 1234, + "name": "Identifier", + "src": "1701:6:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1210, + "type": "address", + "value": "tokenAddress" + }, + "id": 1235, + "name": "Identifier", + "src": "1708:12:8" + } + ], + "id": 1236, + "name": "FunctionCall", + "src": "1701:20:8" + } + ], + "id": 1237, + "name": "Assignment", + "src": "1693:28:8" + } + ], + "id": 1238, + "name": "ExpressionStatement", + "src": "1693:28:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1161, + "type": "address", + "value": "AssertionRegistryAddress" + }, + "id": 1239, + "name": "Identifier", + "src": "1725:24:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1212, + "type": "address", + "value": "assertionRegistryAddress" + }, + "id": 1240, + "name": "Identifier", + "src": "1752:24:8" + } + ], + "id": 1241, + "name": "Assignment", + "src": "1725:51:8" + } + ], + "id": 1242, + "name": "ExpressionStatement", + "src": "1725:51:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "contract DKGcontract" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1159, + "type": "contract DKGcontract", + "value": "AssertionRegistry" + }, + "id": 1243, + "name": "Identifier", + "src": "1780:17:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "contract DKGcontract", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1138, + "type": "type(contract DKGcontract)", + "value": "DKGcontract" + }, + "id": 1244, + "name": "Identifier", + "src": "1800:11:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1212, + "type": "address", + "value": "assertionRegistryAddress" + }, + "id": 1245, + "name": "Identifier", + "src": "1812:24:8" + } + ], + "id": 1246, + "name": "FunctionCall", + "src": "1800:37:8" + } + ], + "id": 1247, + "name": "Assignment", + "src": "1780:57:8" + } + ], + "id": 1248, + "name": "ExpressionStatement", + "src": "1780:57:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1188, + "type": "function (address)", + "value": "UAIRegistryInit" + }, + "id": 1249, + "name": "Identifier", + "src": "1846:15:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1212, + "type": "address", + "value": "assertionRegistryAddress" + }, + "id": 1250, + "name": "Identifier", + "src": "1862:24:8" + } + ], + "id": 1251, + "name": "FunctionCall", + "src": "1846:41:8" + } + ], + "id": 1252, + "name": "EmitStatement", + "src": "1841:46:8" + } + ], + "id": 1253, + "name": "Block", + "src": "1602:289:8" + } + ], + "id": 1254, + "name": "FunctionDefinition", + "src": "1526:365:8" + }, + { + "attributes": { + "functionSelector": "78e98392", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "registerAsset", + "scope": 1610, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "UAI", + "scope": 1372, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1255, + "name": "ElementaryTypeName", + "src": "1917:7:8" + } + ], + "id": 1256, + "name": "VariableDeclaration", + "src": "1917:11:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "_type", + "scope": 1372, + "stateVariable": false, + "storageLocation": "default", + "type": "uint8", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint8", + "type": "uint8" + }, + "id": 1257, + "name": "ElementaryTypeName", + "src": "1930:5:8" + } + ], + "id": 1258, + "name": "VariableDeclaration", + "src": "1930:11:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "alsoKnownAs", + "scope": 1372, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1259, + "name": "ElementaryTypeName", + "src": "1943:7:8" + } + ], + "id": 1260, + "name": "VariableDeclaration", + "src": "1943:19:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "stateCommitHash", + "scope": 1372, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1261, + "name": "ElementaryTypeName", + "src": "1964:7:8" + } + ], + "id": 1262, + "name": "VariableDeclaration", + "src": "1964:23:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "rootHash", + "scope": 1372, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1263, + "name": "ElementaryTypeName", + "src": "1989:7:8" + } + ], + "id": 1264, + "name": "VariableDeclaration", + "src": "1989:16:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "tokenAmount", + "scope": 1372, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 1265, + "name": "ElementaryTypeName", + "src": "2007:7:8" + } + ], + "id": 1266, + "name": "VariableDeclaration", + "src": "2007:19:8" + } + ], + "id": 1267, + "name": "ParameterList", + "src": "1916:111:8" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "", + "scope": 1372, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1268, + "name": "ElementaryTypeName", + "src": "2044:7:8" + } + ], + "id": 1269, + "name": "VariableDeclaration", + "src": "2044:7:8" + } + ], + "id": 1270, + "name": "ParameterList", + "src": "2043:9:8" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8113bcaef69ad64d629f9f9842e44c0195bbec12498295833c352197bdf09d1b", + "typeString": "literal_string \"UAI cannot be zero\"" + } + ], + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1271, + "name": "Identifier", + "src": "2057:7:8" + }, + { + "attributes": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1256, + "type": "bytes32", + "value": "UAI" + }, + "id": 1272, + "name": "Identifier", + "src": "2065:3:8" + }, + { + "attributes": { + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 1273, + "name": "Literal", + "src": "2070:1:8" + } + ], + "id": 1274, + "name": "BinaryOperation", + "src": "2065:6:8" + }, + { + "attributes": { + "hexvalue": "5541492063616e6e6f74206265207a65726f", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "string", + "type": "literal_string \"UAI cannot be zero\"", + "value": "UAI cannot be zero" + }, + "id": 1275, + "name": "Literal", + "src": "2073:20:8" + } + ], + "id": 1276, + "name": "FunctionCall", + "src": "2057:37:8" + } + ], + "id": 1277, + "name": "ExpressionStatement", + "src": "2057:37:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_cf25b7c40ac58b98472d8ae4b6b8703daef3920dd8a8c2b2556b411059eb30d4", + "typeString": "literal_string \"_type allowed values: 0,1,2 (WIP)\"" + } + ], + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1278, + "name": "Identifier", + "src": "2098:7:8" + }, + { + "attributes": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<", + "type": "bool" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1258, + "type": "uint8", + "value": "_type" + }, + "id": 1279, + "name": "Identifier", + "src": "2106:5:8" + }, + { + "attributes": { + "hexvalue": "33", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "number", + "type": "int_const 3", + "value": "3" + }, + "id": 1280, + "name": "Literal", + "src": "2114:1:8" + } + ], + "id": 1281, + "name": "BinaryOperation", + "src": "2106:9:8" + }, + { + "attributes": { + "hexvalue": "5f7479706520616c6c6f7765642076616c7565733a20302c312c32202857495029", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "string", + "type": "literal_string \"_type allowed values: 0,1,2 (WIP)\"", + "value": "_type allowed values: 0,1,2 (WIP)" + }, + "id": 1282, + "name": "Literal", + "src": "2117:35:8" + } + ], + "id": 1283, + "name": "FunctionCall", + "src": "2098:55:8" + } + ], + "id": 1284, + "name": "ExpressionStatement", + "src": "2098:55:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_889a93080df6c407ecf58a36aecc1ba986f5889f8941567948da9184911b568f", + "typeString": "literal_string \"alsoKnownAs cannot be zero\"" + } + ], + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1285, + "name": "Identifier", + "src": "2157:7:8" + }, + { + "attributes": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1260, + "type": "bytes32", + "value": "alsoKnownAs" + }, + "id": 1286, + "name": "Identifier", + "src": "2165:11:8" + }, + { + "attributes": { + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 1287, + "name": "Literal", + "src": "2178:1:8" + } + ], + "id": 1288, + "name": "BinaryOperation", + "src": "2165:14:8" + }, + { + "attributes": { + "hexvalue": "616c736f4b6e6f776e41732063616e6e6f74206265207a65726f", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "string", + "type": "literal_string \"alsoKnownAs cannot be zero\"", + "value": "alsoKnownAs cannot be zero" + }, + "id": 1289, + "name": "Literal", + "src": "2181:28:8" + } + ], + "id": 1290, + "name": "FunctionCall", + "src": "2157:53:8" + } + ], + "id": 1291, + "name": "ExpressionStatement", + "src": "2157:53:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f0caaefff46a6fa6373daf0acae33c6a0d7f130841550573dc0a5b0fb9ec40cc", + "typeString": "literal_string \"stateCommitHash cannot be zero\"" + } + ], + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1292, + "name": "Identifier", + "src": "2214:7:8" + }, + { + "attributes": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1262, + "type": "bytes32", + "value": "stateCommitHash" + }, + "id": 1293, + "name": "Identifier", + "src": "2222:15:8" + }, + { + "attributes": { + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 1294, + "name": "Literal", + "src": "2239:1:8" + } + ], + "id": 1295, + "name": "BinaryOperation", + "src": "2222:18:8" + }, + { + "attributes": { + "hexvalue": "7374617465436f6d6d6974486173682063616e6e6f74206265207a65726f", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "string", + "type": "literal_string \"stateCommitHash cannot be zero\"", + "value": "stateCommitHash cannot be zero" + }, + "id": 1296, + "name": "Literal", + "src": "2242:32:8" + } + ], + "id": 1297, + "name": "FunctionCall", + "src": "2214:61:8" + } + ], + "id": 1298, + "name": "ExpressionStatement", + "src": "2214:61:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "type": "function (bool) pure", + "value": "require" + }, + "id": 1299, + "name": "Identifier", + "src": "2279:7:8" + }, + { + "attributes": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "bool" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1180, + "type": "mapping(bytes32 => bool)", + "value": "UAIstatus" + }, + "id": 1300, + "name": "Identifier", + "src": "2287:9:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1256, + "type": "bytes32", + "value": "UAI" + }, + "id": 1301, + "name": "Identifier", + "src": "2297:3:8" + } + ], + "id": 1302, + "name": "IndexAccess", + "src": "2287:14:8" + }, + { + "attributes": { + "hexvalue": "66616c7365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "bool", + "type": "bool", + "value": "false" + }, + "id": 1303, + "name": "Literal", + "src": "2305:5:8" + } + ], + "id": 1304, + "name": "BinaryOperation", + "src": "2287:23:8" + } + ], + "id": 1305, + "name": "FunctionCall", + "src": "2279:33:8" + } + ], + "id": 1306, + "name": "ExpressionStatement", + "src": "2279:33:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "createAssertionRecord", + "referencedDeclaration": 1015, + "type": "function (bytes32,bytes32,address,uint256,uint256) external" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1159, + "type": "contract DKGcontract", + "value": "AssertionRegistry" + }, + "id": 1307, + "name": "Identifier", + "src": "2472:17:8" + } + ], + "id": 1309, + "name": "MemberAccess", + "src": "2472:39:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1262, + "type": "bytes32", + "value": "stateCommitHash" + }, + "id": 1310, + "name": "Identifier", + "src": "2512:15:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1264, + "type": "bytes32", + "value": "rootHash" + }, + "id": 1311, + "name": "Identifier", + "src": "2529:8:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)" + }, + "children": [ + { + "attributes": { + "name": "address" + }, + "id": 1312, + "name": "ElementaryTypeName", + "src": "2539:7:8" + } + ], + "id": 1313, + "name": "ElementaryTypeNameExpression", + "src": "2539:7:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "type": "address payable" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4294967281, + "type": "msg", + "value": "msg" + }, + "id": 1314, + "name": "Identifier", + "src": "2547:3:8" + } + ], + "id": 1315, + "name": "MemberAccess", + "src": "2547:10:8" + } + ], + "id": 1316, + "name": "FunctionCall", + "src": "2539:19:8" + }, + { + "attributes": { + "hexvalue": "31", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "number", + "type": "int_const 1", + "value": "1" + }, + "id": 1317, + "name": "Literal", + "src": "2560:1:8" + }, + { + "attributes": { + "hexvalue": "31", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "number", + "type": "int_const 1", + "value": "1" + }, + "id": 1318, + "name": "Literal", + "src": "2563:1:8" + } + ], + "id": 1319, + "name": "FunctionCall", + "src": "2472:93:8" + } + ], + "id": 1320, + "name": "ExpressionStatement", + "src": "2472:93:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bytes32" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "stateCommitHash", + "referencedDeclaration": 1171, + "type": "bytes32" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct UAIRegistry.AssetRecord storage ref" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1176, + "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", + "value": "assetRecords" + }, + "id": 1321, + "name": "Identifier", + "src": "2613:12:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1256, + "type": "bytes32", + "value": "UAI" + }, + "id": 1322, + "name": "Identifier", + "src": "2626:3:8" + } + ], + "id": 1323, + "name": "IndexAccess", + "src": "2613:17:8" + } + ], + "id": 1324, + "name": "MemberAccess", + "src": "2613:33:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1262, + "type": "bytes32", + "value": "stateCommitHash" + }, + "id": 1325, + "name": "Identifier", + "src": "2649:15:8" + } + ], + "id": 1326, + "name": "Assignment", + "src": "2613:51:8" + } + ], + "id": 1327, + "name": "ExpressionStatement", + "src": "2613:51:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint8" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "_type", + "referencedDeclaration": 1167, + "type": "uint8" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct UAIRegistry.AssetRecord storage ref" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1176, + "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", + "value": "assetRecords" + }, + "id": 1328, + "name": "Identifier", + "src": "2668:12:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1256, + "type": "bytes32", + "value": "UAI" + }, + "id": 1329, + "name": "Identifier", + "src": "2681:3:8" + } + ], + "id": 1330, + "name": "IndexAccess", + "src": "2668:17:8" + } + ], + "id": 1331, + "name": "MemberAccess", + "src": "2668:23:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1258, + "type": "uint8", + "value": "_type" + }, + "id": 1332, + "name": "Identifier", + "src": "2694:5:8" + } + ], + "id": 1333, + "name": "Assignment", + "src": "2668:31:8" + } + ], + "id": 1334, + "name": "ExpressionStatement", + "src": "2668:31:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bytes32" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "alsoKnownAs", + "referencedDeclaration": 1165, + "type": "bytes32" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct UAIRegistry.AssetRecord storage ref" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1176, + "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", + "value": "assetRecords" + }, + "id": 1335, + "name": "Identifier", + "src": "2703:12:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1256, + "type": "bytes32", + "value": "UAI" + }, + "id": 1336, + "name": "Identifier", + "src": "2716:3:8" + } + ], + "id": 1337, + "name": "IndexAccess", + "src": "2703:17:8" + } + ], + "id": 1338, + "name": "MemberAccess", + "src": "2703:29:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1260, + "type": "bytes32", + "value": "alsoKnownAs" + }, + "id": 1339, + "name": "Identifier", + "src": "2735:11:8" + } + ], + "id": 1340, + "name": "Assignment", + "src": "2703:43:8" + } + ], + "id": 1341, + "name": "ExpressionStatement", + "src": "2703:43:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "controller", + "referencedDeclaration": 1169, + "type": "address" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct UAIRegistry.AssetRecord storage ref" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1176, + "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", + "value": "assetRecords" + }, + "id": 1342, + "name": "Identifier", + "src": "2750:12:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1256, + "type": "bytes32", + "value": "UAI" + }, + "id": 1343, + "name": "Identifier", + "src": "2763:3:8" + } + ], + "id": 1344, + "name": "IndexAccess", + "src": "2750:17:8" + } + ], + "id": 1345, + "name": "MemberAccess", + "src": "2750:28:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "type": "address payable" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4294967281, + "type": "msg", + "value": "msg" + }, + "id": 1346, + "name": "Identifier", + "src": "2781:3:8" + } + ], + "id": 1347, + "name": "MemberAccess", + "src": "2781:10:8" + } + ], + "id": 1348, + "name": "Assignment", + "src": "2750:41:8" + } + ], + "id": 1349, + "name": "ExpressionStatement", + "src": "2750:41:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "creationTimestamp", + "referencedDeclaration": 1163, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct UAIRegistry.AssetRecord storage ref" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1176, + "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", + "value": "assetRecords" + }, + "id": 1350, + "name": "Identifier", + "src": "2847:12:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1256, + "type": "bytes32", + "value": "UAI" + }, + "id": 1351, + "name": "Identifier", + "src": "2860:3:8" + } + ], + "id": 1352, + "name": "IndexAccess", + "src": "2847:17:8" + } + ], + "id": 1353, + "name": "MemberAccess", + "src": "2847:35:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "timestamp", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4294967292, + "type": "block", + "value": "block" + }, + "id": 1354, + "name": "Identifier", + "src": "2885:5:8" + } + ], + "id": 1355, + "name": "MemberAccess", + "src": "2885:15:8" + } + ], + "id": 1356, + "name": "Assignment", + "src": "2847:53:8" + } + ], + "id": 1357, + "name": "ExpressionStatement", + "src": "2847:53:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1180, + "type": "mapping(bytes32 => bool)", + "value": "UAIstatus" + }, + "id": 1358, + "name": "Identifier", + "src": "2904:9:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1256, + "type": "bytes32", + "value": "UAI" + }, + "id": 1359, + "name": "Identifier", + "src": "2914:3:8" + } + ], + "id": 1360, + "name": "IndexAccess", + "src": "2904:14:8" + }, + { + "attributes": { + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 1361, + "name": "Literal", + "src": "2921:4:8" + } + ], + "id": 1362, + "name": "Assignment", + "src": "2904:21:8" + } + ], + "id": 1363, + "name": "ExpressionStatement", + "src": "2904:21:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1194, + "type": "function (bytes32,bytes32)", + "value": "UAICreated" + }, + "id": 1364, + "name": "Identifier", + "src": "2935:10:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1256, + "type": "bytes32", + "value": "UAI" + }, + "id": 1365, + "name": "Identifier", + "src": "2946:3:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1262, + "type": "bytes32", + "value": "stateCommitHash" + }, + "id": 1366, + "name": "Identifier", + "src": "2951:15:8" + } + ], + "id": 1367, + "name": "FunctionCall", + "src": "2935:32:8" + } + ], + "id": 1368, + "name": "EmitStatement", + "src": "2930:37:8" + }, + { + "attributes": { + "functionReturnParameters": 1270 + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1256, + "type": "bytes32", + "value": "UAI" + }, + "id": 1369, + "name": "Identifier", + "src": "2979:3:8" + } + ], + "id": 1370, + "name": "Return", + "src": "2972:10:8" + } + ], + "id": 1371, + "name": "Block", + "src": "2052:934:8" + } + ], + "id": 1372, + "name": "FunctionDefinition", + "src": "1894:1092:8" + }, + { + "attributes": { + "functionSelector": "a9cd6a2d", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "updateAssetState", + "scope": 1610, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "UAI", + "scope": 1440, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1373, + "name": "ElementaryTypeName", + "src": "3017:7:8" + } + ], + "id": 1374, + "name": "VariableDeclaration", + "src": "3017:11:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "newStateCommitHash", + "scope": 1440, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1375, + "name": "ElementaryTypeName", + "src": "3030:7:8" + } + ], + "id": 1376, + "name": "VariableDeclaration", + "src": "3030:26:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "rootHash", + "scope": 1440, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1377, + "name": "ElementaryTypeName", + "src": "3058:7:8" + } + ], + "id": 1378, + "name": "VariableDeclaration", + "src": "3058:16:8" + } + ], + "id": 1379, + "name": "ParameterList", + "src": "3016:59:8" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "", + "scope": 1440, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1380, + "name": "ElementaryTypeName", + "src": "3092:7:8" + } + ], + "id": 1381, + "name": "VariableDeclaration", + "src": "3092:7:8" + } + ], + "id": 1382, + "name": "ParameterList", + "src": "3091:9:8" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8113bcaef69ad64d629f9f9842e44c0195bbec12498295833c352197bdf09d1b", + "typeString": "literal_string \"UAI cannot be zero\"" + } + ], + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1383, + "name": "Identifier", + "src": "3106:7:8" + }, + { + "attributes": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1374, + "type": "bytes32", + "value": "UAI" + }, + "id": 1384, + "name": "Identifier", + "src": "3114:3:8" + }, + { + "attributes": { + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 1385, + "name": "Literal", + "src": "3119:1:8" + } + ], + "id": 1386, + "name": "BinaryOperation", + "src": "3114:6:8" + }, + { + "attributes": { + "hexvalue": "5541492063616e6e6f74206265207a65726f", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "string", + "type": "literal_string \"UAI cannot be zero\"", + "value": "UAI cannot be zero" + }, + "id": 1387, + "name": "Literal", + "src": "3122:20:8" + } + ], + "id": 1388, + "name": "FunctionCall", + "src": "3106:37:8" + } + ], + "id": 1389, + "name": "ExpressionStatement", + "src": "3106:37:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_1288ba10f0c0a9fa84e2f581ad61c72d898b048e206b52821e5663686f23ff37", + "typeString": "literal_string \"Asset must exist\"" + } + ], + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1390, + "name": "Identifier", + "src": "3147:7:8" + }, + { + "attributes": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "bool" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1180, + "type": "mapping(bytes32 => bool)", + "value": "UAIstatus" + }, + "id": 1391, + "name": "Identifier", + "src": "3155:9:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1374, + "type": "bytes32", + "value": "UAI" + }, + "id": 1392, + "name": "Identifier", + "src": "3165:3:8" + } + ], + "id": 1393, + "name": "IndexAccess", + "src": "3155:14:8" + }, + { + "attributes": { + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 1394, + "name": "Literal", + "src": "3173:4:8" + } + ], + "id": 1395, + "name": "BinaryOperation", + "src": "3155:22:8" + }, + { + "attributes": { + "hexvalue": "4173736574206d757374206578697374", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "string", + "type": "literal_string \"Asset must exist\"", + "value": "Asset must exist" + }, + "id": 1396, + "name": "Literal", + "src": "3179:18:8" + } + ], + "id": 1397, + "name": "FunctionCall", + "src": "3147:52:8" + } + ], + "id": 1398, + "name": "ExpressionStatement", + "src": "3147:52:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_fa287c795401a9447e9af39b3f60c2649bae99888868237daa5c7cc28744941b", + "typeString": "literal_string \"newStateCommitHash cannot be zero\"" + } + ], + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1399, + "name": "Identifier", + "src": "3203:7:8" + }, + { + "attributes": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1376, + "type": "bytes32", + "value": "newStateCommitHash" + }, + "id": 1400, + "name": "Identifier", + "src": "3211:18:8" + }, + { + "attributes": { + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 1401, + "name": "Literal", + "src": "3231:1:8" + } + ], + "id": 1402, + "name": "BinaryOperation", + "src": "3211:21:8" + }, + { + "attributes": { + "hexvalue": "6e65775374617465436f6d6d6974486173682063616e6e6f74206265207a65726f", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "string", + "type": "literal_string \"newStateCommitHash cannot be zero\"", + "value": "newStateCommitHash cannot be zero" + }, + "id": 1403, + "name": "Literal", + "src": "3234:35:8" + } + ], + "id": 1404, + "name": "FunctionCall", + "src": "3203:67:8" + } + ], + "id": 1405, + "name": "ExpressionStatement", + "src": "3203:67:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "type": "function (bool) pure", + "value": "require" + }, + "id": 1406, + "name": "Identifier", + "src": "3274:7:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1531, + "type": "function (bytes32,address) returns (bool)", + "value": "isOwner" + }, + "id": 1407, + "name": "Identifier", + "src": "3282:7:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1374, + "type": "bytes32", + "value": "UAI" + }, + "id": 1408, + "name": "Identifier", + "src": "3290:3:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "type": "address payable" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4294967281, + "type": "msg", + "value": "msg" + }, + "id": 1409, + "name": "Identifier", + "src": "3294:3:8" + } + ], + "id": 1410, + "name": "MemberAccess", + "src": "3294:10:8" + } + ], + "id": 1411, + "name": "FunctionCall", + "src": "3282:23:8" + } + ], + "id": 1412, + "name": "FunctionCall", + "src": "3274:32:8" + } + ], + "id": 1413, + "name": "ExpressionStatement", + "src": "3274:32:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "createAssertionRecord", + "referencedDeclaration": 1015, + "type": "function (bytes32,bytes32,address,uint256,uint256) external" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1159, + "type": "contract DKGcontract", + "value": "AssertionRegistry" + }, + "id": 1414, + "name": "Identifier", + "src": "3313:17:8" + } + ], + "id": 1416, + "name": "MemberAccess", + "src": "3313:39:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1376, + "type": "bytes32", + "value": "newStateCommitHash" + }, + "id": 1417, + "name": "Identifier", + "src": "3353:18:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1378, + "type": "bytes32", + "value": "rootHash" + }, + "id": 1418, + "name": "Identifier", + "src": "3373:8:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "type": "address payable" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4294967281, + "type": "msg", + "value": "msg" + }, + "id": 1419, + "name": "Identifier", + "src": "3383:3:8" + } + ], + "id": 1420, + "name": "MemberAccess", + "src": "3383:10:8" + }, + { + "attributes": { + "hexvalue": "31", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "number", + "type": "int_const 1", + "value": "1" + }, + "id": 1421, + "name": "Literal", + "src": "3395:1:8" + }, + { + "attributes": { + "hexvalue": "31", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "number", + "type": "int_const 1", + "value": "1" + }, + "id": 1422, + "name": "Literal", + "src": "3398:1:8" + } + ], + "id": 1423, + "name": "FunctionCall", + "src": "3313:87:8" + } + ], + "id": 1424, + "name": "ExpressionStatement", + "src": "3313:87:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bytes32" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "stateCommitHash", + "referencedDeclaration": 1171, + "type": "bytes32" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct UAIRegistry.AssetRecord storage ref" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1176, + "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", + "value": "assetRecords" + }, + "id": 1425, + "name": "Identifier", + "src": "3414:12:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1374, + "type": "bytes32", + "value": "UAI" + }, + "id": 1426, + "name": "Identifier", + "src": "3427:3:8" + } + ], + "id": 1427, + "name": "IndexAccess", + "src": "3414:17:8" + } + ], + "id": 1428, + "name": "MemberAccess", + "src": "3414:33:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1376, + "type": "bytes32", + "value": "newStateCommitHash" + }, + "id": 1429, + "name": "Identifier", + "src": "3451:18:8" + } + ], + "id": 1430, + "name": "Assignment", + "src": "3414:55:8" + } + ], + "id": 1431, + "name": "ExpressionStatement", + "src": "3414:55:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1200, + "type": "function (bytes32,bytes32)", + "value": "UAIUpdatedState" + }, + "id": 1432, + "name": "Identifier", + "src": "3518:15:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1374, + "type": "bytes32", + "value": "UAI" + }, + "id": 1433, + "name": "Identifier", + "src": "3534:3:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1376, + "type": "bytes32", + "value": "newStateCommitHash" + }, + "id": 1434, + "name": "Identifier", + "src": "3539:18:8" + } + ], + "id": 1435, + "name": "FunctionCall", + "src": "3518:40:8" + } + ], + "id": 1436, + "name": "EmitStatement", + "src": "3513:45:8" + }, + { + "attributes": { + "functionReturnParameters": 1382 + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1374, + "type": "bytes32", + "value": "UAI" + }, + "id": 1437, + "name": "Identifier", + "src": "3570:3:8" + } + ], + "id": 1438, + "name": "Return", + "src": "3563:10:8" + } + ], + "id": 1439, + "name": "Block", + "src": "3101:476:8" + } + ], + "id": 1440, + "name": "FunctionDefinition", + "src": "2991:586:8" + }, + { + "attributes": { + "functionSelector": "52569b9d", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "getAssetStateCommitHash", + "scope": 1610, + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "UAI", + "scope": 1453, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1441, + "name": "ElementaryTypeName", + "src": "3626:7:8" + } + ], + "id": 1442, + "name": "VariableDeclaration", + "src": "3626:11:8" + } + ], + "id": 1443, + "name": "ParameterList", + "src": "3625:13:8" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "stateCommitHash", + "scope": 1453, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1444, + "name": "ElementaryTypeName", + "src": "3659:7:8" + } + ], + "id": 1445, + "name": "VariableDeclaration", + "src": "3659:23:8" + } + ], + "id": 1446, + "name": "ParameterList", + "src": "3658:25:8" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 1446 + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "stateCommitHash", + "referencedDeclaration": 1171, + "type": "bytes32" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct UAIRegistry.AssetRecord storage ref" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1176, + "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", + "value": "assetRecords" + }, + "id": 1447, + "name": "Identifier", + "src": "3694:12:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1442, + "type": "bytes32", + "value": "UAI" + }, + "id": 1448, + "name": "Identifier", + "src": "3707:3:8" + } + ], + "id": 1449, + "name": "IndexAccess", + "src": "3694:17:8" + } + ], + "id": 1450, + "name": "MemberAccess", + "src": "3694:33:8" + } + ], + "id": 1451, + "name": "Return", + "src": "3687:40:8" + } + ], + "id": 1452, + "name": "Block", + "src": "3683:48:8" + } + ], + "id": 1453, + "name": "FunctionDefinition", + "src": "3593:138:8" + }, + { + "attributes": { + "functionSelector": "77636d1d", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "getAssetController", + "scope": 1610, + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "UAI", + "scope": 1466, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1454, + "name": "ElementaryTypeName", + "src": "3762:7:8" + } + ], + "id": 1455, + "name": "VariableDeclaration", + "src": "3762:11:8" + } + ], + "id": 1456, + "name": "ParameterList", + "src": "3761:13:8" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "controller", + "scope": 1466, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1457, + "name": "ElementaryTypeName", + "src": "3795:7:8" + } + ], + "id": 1458, + "name": "VariableDeclaration", + "src": "3795:18:8" + } + ], + "id": 1459, + "name": "ParameterList", + "src": "3794:20:8" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 1459 + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "controller", + "referencedDeclaration": 1169, + "type": "address" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct UAIRegistry.AssetRecord storage ref" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1176, + "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", + "value": "assetRecords" + }, + "id": 1460, + "name": "Identifier", + "src": "3825:12:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1455, + "type": "bytes32", + "value": "UAI" + }, + "id": 1461, + "name": "Identifier", + "src": "3838:3:8" + } + ], + "id": 1462, + "name": "IndexAccess", + "src": "3825:17:8" + } + ], + "id": 1463, + "name": "MemberAccess", + "src": "3825:28:8" + } + ], + "id": 1464, + "name": "Return", + "src": "3818:35:8" + } + ], + "id": 1465, + "name": "Block", + "src": "3814:43:8" + } + ], + "id": 1466, + "name": "FunctionDefinition", + "src": "3734:123:8" + }, + { + "attributes": { + "functionSelector": "6f3a9229", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "getAssetAKA", + "scope": 1610, + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "UAI", + "scope": 1479, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1467, + "name": "ElementaryTypeName", + "src": "3881:7:8" + } + ], + "id": 1468, + "name": "VariableDeclaration", + "src": "3881:11:8" + } + ], + "id": 1469, + "name": "ParameterList", + "src": "3880:13:8" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "alsoKnownAs", + "scope": 1479, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1470, + "name": "ElementaryTypeName", + "src": "3914:7:8" + } + ], + "id": 1471, + "name": "VariableDeclaration", + "src": "3914:19:8" + } + ], + "id": 1472, + "name": "ParameterList", + "src": "3913:21:8" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 1472 + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "alsoKnownAs", + "referencedDeclaration": 1165, + "type": "bytes32" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct UAIRegistry.AssetRecord storage ref" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1176, + "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", + "value": "assetRecords" + }, + "id": 1473, + "name": "Identifier", + "src": "3945:12:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1468, + "type": "bytes32", + "value": "UAI" + }, + "id": 1474, + "name": "Identifier", + "src": "3958:3:8" + } + ], + "id": 1475, + "name": "IndexAccess", + "src": "3945:17:8" + } + ], + "id": 1476, + "name": "MemberAccess", + "src": "3945:29:8" + } + ], + "id": 1477, + "name": "Return", + "src": "3938:36:8" + } + ], + "id": 1478, + "name": "Block", + "src": "3934:44:8" + } + ], + "id": 1479, + "name": "FunctionDefinition", + "src": "3860:118:8" + }, + { + "attributes": { + "functionSelector": "7f58afc8", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "getAssetCreationTimestamp", + "scope": 1610, + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "UAI", + "scope": 1492, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1480, + "name": "ElementaryTypeName", + "src": "4016:7:8" + } + ], + "id": 1481, + "name": "VariableDeclaration", + "src": "4016:11:8" + } + ], + "id": 1482, + "name": "ParameterList", + "src": "4015:13:8" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "creationTimestamp", + "scope": 1492, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 1483, + "name": "ElementaryTypeName", + "src": "4049:7:8" + } + ], + "id": 1484, + "name": "VariableDeclaration", + "src": "4049:25:8" + } + ], + "id": 1485, + "name": "ParameterList", + "src": "4048:27:8" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 1485 + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "creationTimestamp", + "referencedDeclaration": 1163, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct UAIRegistry.AssetRecord storage ref" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1176, + "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", + "value": "assetRecords" + }, + "id": 1486, + "name": "Identifier", + "src": "4086:12:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1481, + "type": "bytes32", + "value": "UAI" + }, + "id": 1487, + "name": "Identifier", + "src": "4099:3:8" + } + ], + "id": 1488, + "name": "IndexAccess", + "src": "4086:17:8" + } + ], + "id": 1489, + "name": "MemberAccess", + "src": "4086:35:8" + } + ], + "id": 1490, + "name": "Return", + "src": "4079:42:8" + } + ], + "id": 1491, + "name": "Block", + "src": "4075:50:8" + } + ], + "id": 1492, + "name": "FunctionDefinition", + "src": "3981:144:8" + }, + { + "attributes": { + "functionSelector": "2f1704bc", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "getAssertionRegistry", + "scope": 1610, + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 1493, + "name": "ParameterList", + "src": "4157:2:8" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "assertionRegistry", + "scope": 1500, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1494, + "name": "ElementaryTypeName", + "src": "4180:7:8" + } + ], + "id": 1495, + "name": "VariableDeclaration", + "src": "4180:25:8" + } + ], + "id": 1496, + "name": "ParameterList", + "src": "4179:27:8" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 1496 + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1161, + "type": "address", + "value": "AssertionRegistryAddress" + }, + "id": 1497, + "name": "Identifier", + "src": "4217:24:8" + } + ], + "id": 1498, + "name": "Return", + "src": "4210:31:8" + } + ], + "id": 1499, + "name": "Block", + "src": "4206:39:8" + } + ], + "id": 1500, + "name": "FunctionDefinition", + "src": "4128:117:8" + }, + { + "attributes": { + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "determineType", + "scope": 1610, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "text": " @dev Should determine type of ``contractAddress``, if possible, returning enum AssetType" + }, + "id": 1501, + "name": "StructuredDocumentation", + "src": "4263:107:8" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "contractAddress", + "scope": 1513, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1502, + "name": "ElementaryTypeName", + "src": "4399:7:8" + } + ], + "id": 1503, + "name": "VariableDeclaration", + "src": "4399:23:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "id", + "scope": 1513, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1504, + "name": "ElementaryTypeName", + "src": "4424:7:8" + } + ], + "id": 1505, + "name": "VariableDeclaration", + "src": "4424:10:8" + } + ], + "id": 1506, + "name": "ParameterList", + "src": "4398:37:8" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "", + "scope": 1513, + "stateVariable": false, + "storageLocation": "default", + "type": "uint8", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint8", + "type": "uint8" + }, + "id": 1507, + "name": "ElementaryTypeName", + "src": "4454:5:8" + } + ], + "id": 1508, + "name": "VariableDeclaration", + "src": "4454:5:8" + } + ], + "id": 1509, + "name": "ParameterList", + "src": "4453:7:8" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 1509 + }, + "children": [ + { + "attributes": { + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 1510, + "name": "Literal", + "src": "4471:1:8" + } + ], + "id": 1511, + "name": "Return", + "src": "4464:8:8" + } + ], + "id": 1512, + "name": "Block", + "src": "4460:62:8" + } + ], + "id": 1513, + "name": "FunctionDefinition", + "src": "4376:146:8" + }, + { + "attributes": { + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "isOwner", + "scope": 1610, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "text": " @dev Returns bool checking if ``owner`` is controller of ``UAI``" + }, + "id": 1514, + "name": "StructuredDocumentation", + "src": "4525:83:8" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "UAI", + "scope": 1531, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1515, + "name": "ElementaryTypeName", + "src": "4631:7:8" + } + ], + "id": 1516, + "name": "VariableDeclaration", + "src": "4631:11:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "owner", + "scope": 1531, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1517, + "name": "ElementaryTypeName", + "src": "4644:7:8" + } + ], + "id": 1518, + "name": "VariableDeclaration", + "src": "4644:13:8" + } + ], + "id": 1519, + "name": "ParameterList", + "src": "4630:28:8" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "", + "scope": 1531, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 1520, + "name": "ElementaryTypeName", + "src": "4677:4:8" + } + ], + "id": 1521, + "name": "VariableDeclaration", + "src": "4677:4:8" + } + ], + "id": 1522, + "name": "ParameterList", + "src": "4676:6:8" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 1522 + }, + "children": [ + { + "attributes": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1518, + "type": "address", + "value": "owner" + }, + "id": 1523, + "name": "Identifier", + "src": "4698:5:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "controller", + "referencedDeclaration": 1169, + "type": "address" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct UAIRegistry.AssetRecord storage ref" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1176, + "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", + "value": "assetRecords" + }, + "id": 1524, + "name": "Identifier", + "src": "4707:12:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1516, + "type": "bytes32", + "value": "UAI" + }, + "id": 1525, + "name": "Identifier", + "src": "4720:3:8" + } + ], + "id": 1526, + "name": "IndexAccess", + "src": "4707:17:8" + } + ], + "id": 1527, + "name": "MemberAccess", + "src": "4707:28:8" + } + ], + "id": 1528, + "name": "BinaryOperation", + "src": "4698:37:8" + } + ], + "id": 1529, + "name": "Return", + "src": "4691:44:8" + } + ], + "id": 1530, + "name": "Block", + "src": "4683:60:8" + } + ], + "id": 1531, + "name": "FunctionDefinition", + "src": "4614:129:8" + }, + { + "attributes": { + "functionSelector": "d15b223e", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "depositTokens", + "scope": 1610, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "text": " @dev Deposits tokens in ``amount`` to specific ``UAI``" + }, + "id": 1532, + "name": "StructuredDocumentation", + "src": "4746:73:8" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "amount", + "scope": 1609, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 1533, + "name": "ElementaryTypeName", + "src": "4848:7:8" + } + ], + "id": 1534, + "name": "VariableDeclaration", + "src": "4848:14:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "UAI", + "scope": 1609, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1535, + "name": "ElementaryTypeName", + "src": "4864:7:8" + } + ], + "id": 1536, + "name": "VariableDeclaration", + "src": "4864:11:8" + } + ], + "id": 1537, + "name": "ParameterList", + "src": "4847:29:8" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 1538, + "name": "ParameterList", + "src": "4884:0:8" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8beea76deddeff1012d90e1e8da369393f885b0575eb094a33da9912cc4bbb8b", + "typeString": "literal_string \"Amount cannot be zero\"" + } + ], + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1539, + "name": "Identifier", + "src": "4893:7:8" + }, + { + "attributes": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">", + "type": "bool" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1534, + "type": "uint256", + "value": "amount" + }, + "id": 1540, + "name": "Identifier", + "src": "4901:6:8" + }, + { + "attributes": { + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 1541, + "name": "Literal", + "src": "4908:1:8" + } + ], + "id": 1542, + "name": "BinaryOperation", + "src": "4901:8:8" + }, + { + "attributes": { + "hexvalue": "416d6f756e742063616e6e6f74206265207a65726f", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "string", + "type": "literal_string \"Amount cannot be zero\"", + "value": "Amount cannot be zero" + }, + "id": 1543, + "name": "Literal", + "src": "4911:23:8" + } + ], + "id": 1544, + "name": "FunctionCall", + "src": "4893:42:8" + } + ], + "id": 1545, + "name": "ExpressionStatement", + "src": "4893:42:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3bc5ac98536c45d410bf37692b674d7f6ad3249fabf29eadc142b2e562988389", + "typeString": "literal_string \"Sender allowance must be equal to or higher than chosen amount\"" + } + ], + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1546, + "name": "Identifier", + "src": "4943:7:8" + }, + { + "attributes": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "allowance", + "referencedDeclaration": 635, + "type": "function (address,address) view external returns (uint256)" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1157, + "type": "contract IERC20", + "value": "token" + }, + "id": 1547, + "name": "Identifier", + "src": "4951:5:8" + } + ], + "id": 1548, + "name": "MemberAccess", + "src": "4951:15:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "type": "address payable" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4294967281, + "type": "msg", + "value": "msg" + }, + "id": 1549, + "name": "Identifier", + "src": "4967:3:8" + } + ], + "id": 1550, + "name": "MemberAccess", + "src": "4967:10:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_UAIRegistry_$1610", + "typeString": "contract UAIRegistry" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)" + }, + "children": [ + { + "attributes": { + "name": "address" + }, + "id": 1551, + "name": "ElementaryTypeName", + "src": "4979:7:8" + } + ], + "id": 1552, + "name": "ElementaryTypeNameExpression", + "src": "4979:7:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4294967268, + "type": "contract UAIRegistry", + "value": "this" + }, + "id": 1553, + "name": "Identifier", + "src": "4987:4:8" + } + ], + "id": 1554, + "name": "FunctionCall", + "src": "4979:13:8" + } + ], + "id": 1555, + "name": "FunctionCall", + "src": "4951:42:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1534, + "type": "uint256", + "value": "amount" + }, + "id": 1556, + "name": "Identifier", + "src": "4997:6:8" + } + ], + "id": 1557, + "name": "BinaryOperation", + "src": "4951:52:8" + }, + { + "attributes": { + "hexvalue": "53656e64657220616c6c6f77616e6365206d75737420626520657175616c20746f206f7220686967686572207468616e2063686f73656e20616d6f756e74", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "string", + "type": "literal_string \"Sender allowance must be equal to or higher than chosen amount\"", + "value": "Sender allowance must be equal to or higher than chosen amount" + }, + "id": 1558, + "name": "Literal", + "src": "5005:64:8" + } + ], + "id": 1559, + "name": "FunctionCall", + "src": "4943:127:8" + } + ], + "id": 1560, + "name": "ExpressionStatement", + "src": "4943:127:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_262e509abce0ea4c77b39344642b82be870ee6d03e35d57d1dee69295a1e383b", + "typeString": "literal_string \"Sender balance must be equal to or higher than chosen amount!\"" + } + ], + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1561, + "name": "Identifier", + "src": "5078:7:8" + }, + { + "attributes": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "balanceOf", + "referencedDeclaration": 615, + "type": "function (address) view external returns (uint256)" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1157, + "type": "contract IERC20", + "value": "token" + }, + "id": 1562, + "name": "Identifier", + "src": "5086:5:8" + } + ], + "id": 1563, + "name": "MemberAccess", + "src": "5086:15:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "type": "address payable" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4294967281, + "type": "msg", + "value": "msg" + }, + "id": 1564, + "name": "Identifier", + "src": "5102:3:8" + } + ], + "id": 1565, + "name": "MemberAccess", + "src": "5102:10:8" + } + ], + "id": 1566, + "name": "FunctionCall", + "src": "5086:27:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1534, + "type": "uint256", + "value": "amount" + }, + "id": 1567, + "name": "Identifier", + "src": "5117:6:8" + } + ], + "id": 1568, + "name": "BinaryOperation", + "src": "5086:37:8" + }, + { + "attributes": { + "hexvalue": "53656e6465722062616c616e6365206d75737420626520657175616c20746f206f7220686967686572207468616e2063686f73656e20616d6f756e7421", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "string", + "type": "literal_string \"Sender balance must be equal to or higher than chosen amount!\"", + "value": "Sender balance must be equal to or higher than chosen amount!" + }, + "id": 1569, + "name": "Literal", + "src": "5125:63:8" + } + ], + "id": 1570, + "name": "FunctionCall", + "src": "5078:111:8" + } + ], + "id": 1571, + "name": "ExpressionStatement", + "src": "5078:111:8" + }, + { + "attributes": { + "assignments": [ + 1573 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "transaction_result", + "scope": 1608, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 1572, + "name": "ElementaryTypeName", + "src": "5198:4:8" + } + ], + "id": 1573, + "name": "VariableDeclaration", + "src": "5198:23:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "transferFrom", + "referencedDeclaration": 657, + "type": "function (address,address,uint256) external returns (bool)" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1157, + "type": "contract IERC20", + "value": "token" + }, + "id": 1574, + "name": "Identifier", + "src": "5224:5:8" + } + ], + "id": 1575, + "name": "MemberAccess", + "src": "5224:18:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "type": "address payable" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4294967281, + "type": "msg", + "value": "msg" + }, + "id": 1576, + "name": "Identifier", + "src": "5243:3:8" + } + ], + "id": 1577, + "name": "MemberAccess", + "src": "5243:10:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_UAIRegistry_$1610", + "typeString": "contract UAIRegistry" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)" + }, + "children": [ + { + "attributes": { + "name": "address" + }, + "id": 1578, + "name": "ElementaryTypeName", + "src": "5255:7:8" + } + ], + "id": 1579, + "name": "ElementaryTypeNameExpression", + "src": "5255:7:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4294967268, + "type": "contract UAIRegistry", + "value": "this" + }, + "id": 1580, + "name": "Identifier", + "src": "5263:4:8" + } + ], + "id": 1581, + "name": "FunctionCall", + "src": "5255:13:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1534, + "type": "uint256", + "value": "amount" + }, + "id": 1582, + "name": "Identifier", + "src": "5270:6:8" + } + ], + "id": 1583, + "name": "FunctionCall", + "src": "5224:53:8" + } + ], + "id": 1584, + "name": "VariableDeclarationStatement", + "src": "5198:79:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c60aa67373380e582a977ce48d7156e19a6358c471790919f2371ebd75aaf7c7", + "typeString": "literal_string \"Token transaction execution failed!\"" + } + ], + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1585, + "name": "Identifier", + "src": "5285:7:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1573, + "type": "bool", + "value": "transaction_result" + }, + "id": 1586, + "name": "Identifier", + "src": "5293:18:8" + }, + { + "attributes": { + "hexvalue": "546f6b656e207472616e73616374696f6e20657865637574696f6e206661696c656421", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "string", + "type": "literal_string \"Token transaction execution failed!\"", + "value": "Token transaction execution failed!" + }, + "id": 1587, + "name": "Literal", + "src": "5313:37:8" + } + ], + "id": 1588, + "name": "FunctionCall", + "src": "5285:66:8" + } + ], + "id": 1589, + "name": "ExpressionStatement", + "src": "5285:66:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1184, + "type": "mapping(bytes32 => uint256)", + "value": "assetStake" + }, + "id": 1590, + "name": "Identifier", + "src": "5496:10:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1536, + "type": "bytes32", + "value": "UAI" + }, + "id": 1591, + "name": "Identifier", + "src": "5507:3:8" + } + ], + "id": 1592, + "name": "IndexAccess", + "src": "5496:15:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "add", + "referencedDeclaration": 303, + "type": "function (uint256,uint256) pure returns (uint256)" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1184, + "type": "mapping(bytes32 => uint256)", + "value": "assetStake" + }, + "id": 1593, + "name": "Identifier", + "src": "5514:10:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1536, + "type": "bytes32", + "value": "UAI" + }, + "id": 1594, + "name": "Identifier", + "src": "5525:3:8" + } + ], + "id": 1595, + "name": "IndexAccess", + "src": "5514:15:8" + } + ], + "id": 1596, + "name": "MemberAccess", + "src": "5514:19:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1534, + "type": "uint256", + "value": "amount" + }, + "id": 1597, + "name": "Identifier", + "src": "5534:6:8" + } + ], + "id": 1598, + "name": "FunctionCall", + "src": "5514:27:8" + } + ], + "id": 1599, + "name": "Assignment", + "src": "5496:45:8" + } + ], + "id": 1600, + "name": "ExpressionStatement", + "src": "5496:45:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1208, + "type": "function (bytes32,uint256,address)", + "value": "TokensDepositedToAsset" + }, + "id": 1601, + "name": "Identifier", + "src": "5550:22:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1536, + "type": "bytes32", + "value": "UAI" + }, + "id": 1602, + "name": "Identifier", + "src": "5573:3:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1534, + "type": "uint256", + "value": "amount" + }, + "id": 1603, + "name": "Identifier", + "src": "5578:6:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "type": "address payable" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4294967281, + "type": "msg", + "value": "msg" + }, + "id": 1604, + "name": "Identifier", + "src": "5585:3:8" + } + ], + "id": 1605, + "name": "MemberAccess", + "src": "5585:10:8" + } + ], + "id": 1606, + "name": "FunctionCall", + "src": "5550:46:8" + } + ], + "id": 1607, + "name": "EmitStatement", + "src": "5545:51:8" + } + ], + "id": 1608, + "name": "Block", + "src": "4884:717:8" + } + ], + "id": 1609, + "name": "FunctionDefinition", + "src": "4825:776:8" + } + ], + "id": 1610, + "name": "ContractDefinition", + "src": "623:4983:8" + } + ], + "id": 1611, + "name": "SourceUnit", + "src": "0:5606:8" + }, + "compiler": { + "name": "solc", + "version": "0.7.6+commit.7338295f.Emscripten.clang" + }, + "networks": { + "5777": { + "events": { + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + "0x2460c4e801cd784222555963fc8a1f1497f9ce3b23446fa14da62d3170989333": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "UAI", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "depositor", + "type": "address" + } + ], + "name": "TokensDepositedToAsset", + "type": "event" + }, + "0x2f87578a4aeec4a0b61bbcea1767fec00fa79a35cf600b258509e25acdaba8e7": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "UAI", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "stateCommitHash", + "type": "bytes32" + } + ], + "name": "UAICreated", + "type": "event" + }, + "0x52db5c2cb9235be3e8a3fe47f4ec4bc55b5e28aa119b750b0e766b1cb00c9aa7": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "assertionRegistryAddress", + "type": "address" + } + ], + "name": "UAIRegistryInit", + "type": "event" + }, + "0xa83f066abfa07a77196c29bd4b7aab88f194feaa03d9769ec2ceccf6701d06de": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "UAI", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "stateCommitHash", + "type": "bytes32" + } + ], + "name": "UAIUpdatedState", + "type": "event" + } + }, + "links": {}, + "address": "0x04d5396358647Cd863293c156037D0AC02328c32", + "transactionHash": "0x8cbcb3d1bfbc3e4962586b5f0527de00742bd6ca92e8e91ceef4f3c87ecc10da" + }, + "80001": { + "events": { + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + "0x2460c4e801cd784222555963fc8a1f1497f9ce3b23446fa14da62d3170989333": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "UAI", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "depositor", + "type": "address" + } + ], + "name": "TokensDepositedToAsset", + "type": "event" + }, + "0x2f87578a4aeec4a0b61bbcea1767fec00fa79a35cf600b258509e25acdaba8e7": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "UAI", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "stateCommitHash", + "type": "bytes32" + } + ], + "name": "UAICreated", + "type": "event" + }, + "0x52db5c2cb9235be3e8a3fe47f4ec4bc55b5e28aa119b750b0e766b1cb00c9aa7": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "assertionRegistryAddress", + "type": "address" + } + ], + "name": "UAIRegistryInit", + "type": "event" + }, + "0xa83f066abfa07a77196c29bd4b7aab88f194feaa03d9769ec2ceccf6701d06de": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "UAI", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "stateCommitHash", + "type": "bytes32" + } + ], + "name": "UAIUpdatedState", + "type": "event" + } + }, + "links": {}, + "address": "0xFD6ECaed420aB70fb97eB2423780517dc425ef81", + "transactionHash": "0xf382f1e521d6a6c794bea0e3522669706b1afcf004e4c40876fe2e40214cab71" + } + }, + "schemaVersion": "3.4.3", + "updatedAt": "2022-02-11T10:13:46.703Z", + "networkType": "ethereum", + "devdoc": { + "kind": "dev", + "methods": { + "depositTokens(uint256,bytes32)": { + "details": "Deposits tokens in ``amount`` to specific ``UAI``" + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/config/config.json b/config/config.json index 88caefad2a..676cbf3572 100644 --- a/config/config.json +++ b/config/config.json @@ -10,13 +10,15 @@ { "blockchainTitle": "Polygon", "networkId": "polygon::mainnet", - "hubContractAddress": "0xFA421f2b10FBebaAeC281eb6734b0fA9Cc8dbbD7", + "hubContractAddress": "0xFD6ECaed420aB70fb97eB2423780517dc425ef81", "rpcEndpoints": [ "https://rpc-mumbai.maticvigil.com/" ] } ], "graphDatabase": { + "implementation": "GraphDB", + "url": "http://localhost:7200", "name": "node0", "username": "admin", "password": "" @@ -49,13 +51,15 @@ { "blockchainTitle": "Polygon", "networkId": "polygon::testnet", - "hubContractAddress": "0xFA421f2b10FBebaAeC281eb6734b0fA9Cc8dbbD7", + "hubContractAddress": "0xFD6ECaed420aB70fb97eB2423780517dc425ef81", "rpcEndpoints": [ "https://rpc-mumbai.maticvigil.com/" ] } ], "graphDatabase": { + "implementation": "GraphDB", + "url": "http://localhost:7200", "name": "node0", "username": "admin", "password": "" @@ -90,6 +94,8 @@ }, "blockchain": [], "graphDatabase": { + "implementation": "GraphDB", + "url": "http://localhost:7200", "name": "node0", "username": "admin", "password": "" diff --git a/external/blazegraph-service.js b/external/blazegraph-service.js new file mode 100644 index 0000000000..cddd77fdb5 --- /dev/null +++ b/external/blazegraph-service.js @@ -0,0 +1,215 @@ +const axios = require('axios'); +const qs = require('qs'); +const constants = require('../modules/constants'); + +class BlazegraphService { + constructor(config) { + this.config = config; + } + + async initialize(logger) { + this.logger = logger; + this.config.axios = { + method: 'post', + url: `${this.config.url}/sparql`, + }; + this.logger.info('Blazegraph module initialized successfully'); + } + + async insert(triples, rootHash) { + const askQuery = `ASK WHERE { GRAPH <${rootHash}> { ?s ?p ?o } }`; + const exists = await this.ask(askQuery); + if (!exists) { + this.config.axios = { + method: 'post', + url: `${this.config.url}/sparql?context-uri=${rootHash}`, + headers: { + 'Content-Type': 'text/x-nquads', + }, + data: triples, + }; + + await axios(this.config.axios).then((response) => true) + .catch((error) => { + this.logger.error(`Failed to write into Blazegraph: ${error} - ${error.stack}`); + return false; + }); + } + // TODO: else -> Should log if we already have data + } + + async execute(query) { + return new Promise(async (accept, reject) => { + const data = qs.stringify({ + query, + }); + this.config.axios = { + method: 'post', + url: `${this.config.url}/sparql`, + headers: { + Accept: 'application/sparql-results+json', + 'Content-Type': 'application/x-www-form-urlencoded', + }, + data, + }; + axios(this.config.axios).then((response) => { + accept(response.data); + }).catch((e) => reject(e)); + }); + } + + async construct(query) { + return new Promise(async (accept, reject) => { + const data = qs.stringify({ + query, + }); + this.config.axios = { + method: 'post', + url: `${this.config.url}/sparql`, + headers: { + Accept: 'text/x-nquads', + 'Content-Type': 'application/x-www-form-urlencoded', + }, + data, + }; + axios(this.config.axios).then((response) => { + accept(response.data); + }).catch((e) => reject(e)); + }); + } + + async ask(query) { + return new Promise(async (accept, reject) => { + const data = qs.stringify({ + query, + }); + this.config.axios = { + method: 'post', + url: `${this.config.url}/sparql`, + headers: { + Accept: 'application/json', + 'Content-Type': 'application/x-www-form-urlencoded', + }, + data, + }; + axios(this.config.axios).then((response) => { + accept(response.data.boolean); + }).catch((e) => reject(e)); + }); + } + + async resolve(uri) { + let isAsset = false; + const query = `PREFIX schema: + CONSTRUCT { ?s ?p ?o } + WHERE { + GRAPH <${constants.DID_PREFIX}:${uri}> { + ?s ?p ?o + } + }`; + let nquads = await this.construct(query); + + if (!nquads.length) { + const query = `PREFIX schema: + CONSTRUCT { ?s ?p ?o } + WHERE { + GRAPH ?g { ?s ?p ?o } + { + SELECT ?ng + WHERE { + ?ng schema:hasUALs "${uri}" ; + schema:hasTimestamp ?timestamp . + } + ORDER BY DESC(?timestamp) + LIMIT 1 + } + FILTER (?g = ?ng) . + }`; + nquads = await this.construct(query); + isAsset = true; + } + + if (nquads.length) { + nquads = nquads.toString(); + nquads = nquads.replace(/_:genid(.){37}/gm, '_:$1'); + nquads = nquads.split('\n'); + nquads = nquads.filter((x) => x !== ''); + } else { + nquads = null; + } + return { nquads, isAsset }; + } + + async findAssertions(nquads) { + const query = `SELECT ?g + WHERE { + GRAPH ?g { + ${nquads} + } + }`; + let graph = await this.execute(query); + graph = graph.results.bindings.map((x) => x.g.value.replace(`${constants.DID_PREFIX}:`, '')); + if (graph.length && graph[0] === 'http://www.bigdata.com/rdf#nullGraph') { + return []; + } + return graph; + } + + async findAssertionsByKeyword(query, options, localQuery) { + const sparqlQuery = `PREFIX schema: + SELECT distinct ?assertionId + WHERE { + ?assertionId schema:hasKeywords ?keyword . + ${!localQuery ? ' ?assertionId schema:hasVisibility "public" .' : ''} + ${options.prefix ? `FILTER contains(lcase(?keyword),'${query}')` : `FILTER (lcase(?keyword) = '${query}')`} + } + ${options.limit ? `LIMIT ${options.limit}` : ''}`; + const result = await this.execute(sparqlQuery); + return result.results.bindings; + } + + async findAssetsByKeyword(query, options, localQuery) { + const sparqlQuery = `PREFIX schema: + SELECT ?assertionId + WHERE { + ?assertionId schema:hasTimestamp ?latestTimestamp ; + ${!localQuery ? 'schema:hasVisibility "public" ;' : ''} + schema:hasUALs ?assetId . + { + SELECT ?assetId (MAX(?timestamp) AS ?latestTimestamp) + WHERE { + ?assertionId schema:hasKeywords ?keyword ; + schema:hasIssuer ?issuer ; + schema:hasType ?type ; + schema:hasTimestamp ?timestamp ; + schema:hasUALs ?assetId . + ${options.prefix ? `FILTER contains(lcase(?keyword),'${query}')` : `FILTER (lcase(?keyword) = '${query}')`} + ${options.issuers ? `FILTER (?issuer IN (${JSON.stringify(options.issuers).slice(1, -1)}))` : ''} + ${options.types ? `FILTER (?type IN (${JSON.stringify(options.types).slice(1, -1)}))` : ''} + } + GROUP BY ?assetId + ${options.limit ? `LIMIT ${options.limit}` : ''} + } + }`; + const result = await this.execute(sparqlQuery); + return result.results.bindings; + } + + async healthCheck() { + try { + const response = await axios.get(`${this.config.url}/status`, {}); + if (response.data !== null) { + return true; + } + return false; + } catch (e) { + return false; + } + } + + getName() { + return 'Blazegraph'; + } +} + +module.exports = BlazegraphService; diff --git a/external/graphdb-service.js b/external/graphdb-service.js index bb6641e88d..b471d4cb19 100644 --- a/external/graphdb-service.js +++ b/external/graphdb-service.js @@ -5,8 +5,6 @@ const { GetQueryPayload, QueryType } = require('graphdb').query; const { RDFMimeType } = require('graphdb').http; const axios = require('axios'); const { execSync } = require('child_process'); -const jsonld = require('jsonld'); -const N3 = require('n3'); const { BufferList } = require('bl'); const constants = require('../modules/constants'); @@ -18,7 +16,7 @@ class GraphdbService { async initialize(logger) { this.logger = logger; this.logger.info(`Data repository name: ${this.config.repositoryName}`); - const serverConfig = new ServerClientConfig('http://localhost:7200/') + const serverConfig = new ServerClientConfig(this.config.url) .setTimeout(40000) .setHeaders({ Accept: RDFMimeType.N_QUADS, @@ -35,8 +33,8 @@ class GraphdbService { const readTimeout = 30000; const writeTimeout = 30000; - const repositoryServerConfig = new RepositoryClientConfig('http://localhost:7200/') - .setEndpoints([`http://localhost:7200/repositories/${this.config.repositoryName}`]) + const repositoryServerConfig = new RepositoryClientConfig(this.config.url) + .setEndpoints([`${this.config.url}/repositories/${this.config.repositoryName}`]) .setHeaders({ Accept: RDFMimeType.N_QUADS, }) @@ -118,209 +116,96 @@ class GraphdbService { }); } - async toRDF(jsonContent) { - let canonized = await jsonld.canonize(jsonContent, { - algorithm: 'URDNA2015', - format: 'application/n-quads', - }); - - canonized = canonized.split('\n'); - canonized = canonized.filter((x) => x !== ''); - - return canonized; - } - - async fromRDF(assertion, context, frame) { - const copy = await jsonld.fromRDF(assertion.join('\n'), { - algorithm: 'URDNA2015', - format: 'application/n-quads', - }); - - const framed = await jsonld.frame(copy, frame); - - const compressed = await jsonld.compact(framed, context); - return compressed; - } - - async extractMetadata(rdf) { - return new Promise(async (accept, reject) => { - const parser = new N3.Parser({ format: 'N-Triples', baseIRI: 'http://schema.org/' }); - const result = { - metadata: { - - }, - blockchain: { - - }, - assets: [], - keywords: [], - }; - - const quads = []; - await parser.parse( - rdf.join('\n'), - (error, quad, prefixes) => { - if (error) { - reject(error); - } - if (quad) { - quads.push(quad); - } - }, - ); - - for (const quad of quads) { - try { - switch (quad._predicate.id) { - case 'http://schema.org/hasType': - result.metadata.type = JSON.parse(quad._object.id); - break; - case 'http://schema.org/hasTimestamp': - result.metadata.timestamp = JSON.parse(quad._object.id); - break; - case 'http://schema.org/hasIssuer': - result.metadata.issuer = JSON.parse(quad._object.id); - break; - case 'http://schema.org/hasVisibility': - result.metadata.visibility = !!quad._object.id.includes('true'); - break; - case 'http://schema.org/hasDataHash': - result.metadata.dataHash = JSON.parse(quad._object.id); - break; - case 'http://schema.org/hasAsset': - result.assets.push(JSON.parse(quad._object.id)); - break; - case 'http://schema.org/hasKeyword': - result.keywords.push(JSON.parse(quad._object.id)); - break; - case 'http://schema.org/hasSignature': - result.signature = JSON.parse(quad._object.id); - break; - case 'http://schema.org/hasRootHash': - result.rootHash = JSON.parse(quad._object.id); - break; - case 'http://schema.org/hasBlockchain': - result.blockchain.name = JSON.parse(quad._object.id); - break; - case 'http://schema.org/hasTransactionHash': - result.blockchain.transactionHash = JSON.parse(quad._object.id); - break; - default: - break; + async resolve(uri) { + let isAsset = false; + const query = `PREFIX schema: + CONSTRUCT { ?s ?p ?o } + WHERE { + GRAPH <${constants.DID_PREFIX}:${uri}> { + ?s ?p ?o + } + }`; + let nquads = await this.construct(query); + + if (!nquads.length) { + const query = `PREFIX schema: + CONSTRUCT { ?s ?p ?o } + WHERE { + GRAPH ?g { ?s ?p ?o } + { + SELECT ?ng + WHERE { + ?ng schema:hasUALs "${uri}" ; + schema:hasTimestamp ?timestamp . } - } catch (e) { - this.logger.error({ msg: `Error in extracting metadata: ${e}. ${e.stack}`, Event_name: constants.ERROR_TYPE.EXTRACT_METADATA_ERROR }); + ORDER BY DESC(?timestamp) + LIMIT 1 } - } - accept(result); - }); - } - - async createMetadata(assertion) { - const result = await this.toRDF({ - '@context': 'https://www.schema.org/', - hasType: assertion.metadata.type, - hasSignature: assertion.signature, - hasIssuer: assertion.metadata.issuer, - hasTimestamp: assertion.metadata.timestamp, - hasVisibility: assertion.metadata.visibility, - hasDataHash: assertion.metadata.dataHash, - }); - - return result.map((x) => x.replace('_:c14n0', ``)); - } - - async createBlockchainMetadata(assertion) { - const result = await this.toRDF({ - '@context': 'https://www.schema.org/', - hasBlockchain: assertion.blockchain.name, - hasTransactionHash: assertion.blockchain.transactionHash, - }); - - return result.map((x) => x.replace('_:c14n0', ``)); - } - - async createConnections(options) { - const { - assertionId, assets, keywords, rootHash, - } = options; - - const result = await this.toRDF({ - '@context': 'https://www.schema.org/', - hasAsset: assets, - hasKeyword: keywords, - hasRootHash: rootHash, - }); - - return result.map((x) => x.replace('_:c14n0', ``)); - } + FILTER (?g = ?ng) . + }`; + nquads = await this.construct(query); + isAsset = true; + } - async resolve(uri) { - const query = `CONSTRUCT { ?s ?p ?o } - WHERE { - GRAPH ?g { ?s ?p ?o } - FILTER (?g = ) . - }`; - let triples = await this.construct(query); - triples = triples.toString(); - if (triples) { - triples = triples.replace(/_:genid(.){37}/gm, '_:$1'); - triples = triples.split('\n'); - triples = triples.filter((x) => x !== ''); + if (nquads.length) { + nquads = nquads.toString(); + nquads = nquads.replace(/_:genid(.){37}/gm, '_:$1'); + nquads = nquads.split('\n'); + nquads = nquads.filter((x) => x !== ''); + } else { + nquads = null; } - return triples; + return { nquads, isAsset }; } async findAssertions(nquads) { const query = `SELECT ?g WHERE { - GRAPH ?g { + GRAPH ?g { ${nquads} } }`; - const g = await this.execute(query); - return JSON.parse(g).results.bindings.map((x) => x.g.value.replace('did:dkg:', '')); + const graph = await this.execute(query); + return JSON.parse(graph).results.bindings.map((x) => x.g.value.replace(`${constants.DID_PREFIX}:`, '')); } - async searchByQuery(query, options, localQuery) { + async findAssertionsByKeyword(query, options, localQuery) { const sparqlQuery = `PREFIX schema: - SELECT (?outerAssetId AS ?assetId) (GROUP_CONCAT(?assertionId; SEPARATOR=",") AS ?assertions) - WHERE { - ?assertionId schema:hasAsset ?outerAssetId ; - ${!localQuery ? 'schema:hasVisibility true .' : ''} - { SELECT distinct ?assertionId WHERE { - ?assertionId schema:hasKeyword ?keyword ; - schema:hasIssuer ?issuer ; - schema:hasType ?type . - ${options.prefix ? `FILTER contains(lcase(?keyword),'${query.toLowerCase()}')` : `FILTER (lcase(?keyword) = '${query.toLowerCase()}')`} - ${options.issuers ? `FILTER (?issuer IN (${JSON.stringify(options.issuers).slice(1, -1)}))` : ''} - ${options.types ? `FILTER (?type IN (${JSON.stringify(options.types).slice(1, -1)}))` : ''} - } + ?assertionId schema:hasKeywords ?keyword . + ${!localQuery ? ' ?assertionId schema:hasVisibility "public" .' : ''} + ${options.prefix ? `FILTER contains(lcase(?keyword),'${query}')` : `FILTER (lcase(?keyword) = '${query}')`} } - } - group by ?outerAssetId - ${options.limit ? `LIMIT ${options.limit}`: ''}`; + ${options.limit ? `LIMIT ${options.limit}` : ''}`; let result = await this.execute(sparqlQuery); result = JSON.parse(result).results.bindings; return result; } - async searchByIds(ids, options) { + async findAssetsByKeyword(query, options, localQuery) { const sparqlQuery = `PREFIX schema: - SELECT ?assetId (GROUP_CONCAT(?assertionId; SEPARATOR=",") AS ?assertions) + SELECT ?assertionId WHERE { - ?assertionId schema:hasAsset ?assetId ; - schema:hasIssuer ?issuer ; - schema:hasType ?type . - FILTER (?assetId IN (${JSON.stringify(ids).slice(1, -1)})) + ?assertionId schema:hasTimestamp ?latestTimestamp ; + ${!localQuery ? 'schema:hasVisibility "public" ;' : ''} + schema:hasUALs ?assetId . + { + SELECT ?assetId (MAX(?timestamp) AS ?latestTimestamp) + WHERE { + ?assertionId schema:hasKeywords ?keyword ; + schema:hasIssuer ?issuer ; + schema:hasType ?type ; + schema:hasTimestamp ?timestamp ; + schema:hasUALs ?assetId . + ${options.prefix ? `FILTER contains(lcase(?keyword),'${query}')` : `FILTER (lcase(?keyword) = '${query}')`} ${options.issuers ? `FILTER (?issuer IN (${JSON.stringify(options.issuers).slice(1, -1)}))` : ''} ${options.types ? `FILTER (?type IN (${JSON.stringify(options.types).slice(1, -1)}))` : ''} - } - group by ?assetId - LIMIT ${options.limit}`; - + } + GROUP BY ?assetId + ${options.limit ? `LIMIT ${options.limit}` : ''} + } + }`; let result = await this.execute(sparqlQuery); result = JSON.parse(result).results.bindings; return result; @@ -328,7 +213,7 @@ class GraphdbService { async healthCheck() { try { - const response = await axios.get(`http://localhost:7200/repositories/${this.config.repositoryName}/health`, {}, + const response = await axios.get(`${this.config.url}/repositories/${this.config.repositoryName}/health`, {}, { auth: { username: this.config.username, diff --git a/external/web3-blockchain-service.js b/external/web3-blockchain-service.js index bc569d174c..544addbcb0 100644 --- a/external/web3-blockchain-service.js +++ b/external/web3-blockchain-service.js @@ -1,6 +1,7 @@ const Web3 = require('web3'); const BigNumber = require('big-number'); const DKGContract = require('../build/contracts/DKGcontract.json').abi; +const UAIRegistry = require('../build/contracts/UAIRegistry.json').abi; const constants = require('../modules/constants'); class Web3BlockchainService { @@ -22,12 +23,12 @@ class Web3BlockchainService { return this.config.publicKey; } - async sendProofs(assertion) { - // const contractAddress = "0xF21dD87cFC5cF5D073398833AFe5EFC543b78a00"; - const contractAddress = this.config.hubContractAddress; + async createAssertionRecord(stateCommitHash, rootHash, issuer) { + const contractAddress = await this.getAssertionRegistryAddress(); const contractInstance = new this.web3.eth.Contract(DKGContract, contractAddress); - const encodedABI = contractInstance.methods.createAssertionRecord(`0x${assertion.id}`,`0x${assertion.rootHash}`, + + const encodedABI = contractInstance.methods.createAssertionRecord(`0x${stateCommitHash}`, `0x${rootHash}`, issuer, new BigNumber(1), new BigNumber(1)).encodeABI(); const tx = { @@ -43,13 +44,71 @@ class Web3BlockchainService { return {transactionHash: result.transactionHash, blockchain: this.config.networkId}; } - async getProofs(proofs) { - // const contractAddress = "0xF21dD87cFC5cF5D073398833AFe5EFC543b78a00"; + async registerAsset(uai, type, alsoKnownAs, stateCommitHash, rootHash, tokenAmount) { + const contractAddress = this.config.hubContractAddress; + const contractInstance = new this.web3.eth.Contract(UAIRegistry, contractAddress); + + const encodedABI = contractInstance.methods.registerAsset(`0x${uai}`, 0, `0x${uai}`, `0x${stateCommitHash}`, `0x${rootHash}`, 1).encodeABI(); + const tx = { + from: this.config.publicKey, + to: contractInstance.options.address, + data: encodedABI, + gasPrice: '2000000000', + gas: '900000', + }; + + const createdTransaction = await this.web3.eth.accounts.signTransaction(tx, this.config.privateKey); + const result = await this.web3.eth.sendSignedTransaction(createdTransaction.rawTransaction); + return {transactionHash: result.transactionHash, blockchain: this.config.networkId}; + } + + async updateAsset(UAI, newStateCommitHash, rootHash) { const contractAddress = this.config.hubContractAddress; + const contractInstance = new this.web3.eth.Contract(UAIRegistry, contractAddress); + + const encodedABI = contractInstance.methods.updateAssetState(`0x${UAI}`, `0x${newStateCommitHash}`, `0x${rootHash}`).encodeABI(); + const tx = { + from: this.config.publicKey, + to: contractInstance.options.address, + data: encodedABI, + gasPrice: '2000000000', + gas: '200000', + }; + + const createdTransaction = await this.web3.eth.accounts.signTransaction(tx, this.config.privateKey); + const result = await this.web3.eth.sendSignedTransaction(createdTransaction.rawTransaction); + return {transactionHash: result.transactionHash, blockchain: this.config.networkId}; + } + + async getAssertionProofs(assertionId) { + const contractAddress = await this.getAssertionRegistryAddress(); const contractInstance = new this.web3.eth.Contract(DKGContract, contractAddress); - const issuer = await contractInstance.methods.getAssertionIssuer(proofs).call(); - return issuer; + const issuer = await contractInstance.methods.getAssertionIssuer(`0x${assertionId}`).call(); + const rootHash = await contractInstance.methods.getAssertionRootHash(`0x${assertionId}`).call(); + return { issuer, rootHash }; + } + + async getAssetProofs(ual) { + const contractAddress = this.config.hubContractAddress; + const contractInstance = new this.web3.eth.Contract(UAIRegistry, contractAddress); + + const issuer = await contractInstance.methods.getAssetController(`0x${ual}`).call(); + let assertionId = await contractInstance.methods.getAssetStateCommitHash(`0x${ual}`).call(); + if (assertionId === '0x0000000000000000000000000000000000000000000000000000000000000000') + assertionId = undefined; + else + assertionId = assertionId.slice(2); + return {issuer, assertionId}; + } + + + async getAssertionRegistryAddress() { + const contractAddress = this.config.hubContractAddress; + const contractInstance = new this.web3.eth.Contract(UAIRegistry, contractAddress); + + const address = await contractInstance.methods.getAssertionRegistry().call(); + return address; } async healthCheck() { diff --git a/frameDocuments/nft.json b/frameDocuments/nft.json new file mode 100644 index 0000000000..dcdd86e1b5 --- /dev/null +++ b/frameDocuments/nft.json @@ -0,0 +1,6 @@ +{ + "context": { + "@context": ["https://www.schema.org/"] + }, + "frame": {} +} diff --git a/index.js b/index.js index b380fb8474..637a5dc461 100644 --- a/index.js +++ b/index.js @@ -21,7 +21,7 @@ config = rc(pjson.name, defaultConfig); const node = new OTNode(); await node.start(); } catch (e) { - console.error(`Error occurred while starting new version, error message: ${e}`); + console.error(`Error occurred while starting new version, error message: ${e}. ${e.stack}`); if (!config.autoUpdate.enabled) { console.log('Auto update is disabled. Shutting down the node...'); process.exit(1); diff --git a/installer/data/graphdb.service b/installer/data/graphdb.service index 2a3b25dcad..bd3482c90b 100755 --- a/installer/data/graphdb.service +++ b/installer/data/graphdb.service @@ -2,7 +2,7 @@ [Unit] Description=GraphDB - OriginTrail V6 Stage 1 Beta Node -Documentation=https://github.com/OriginTrail/ot-node/tree/v6/release%2Ftestnet +Documentation=https://github.com/OriginTrail/ot-node After=network.target [Service] @@ -13,4 +13,4 @@ ExecStart=/root/graphdb-free-9.10.1/bin/graphdb Restart=on-failure [Install] -WantedBy=multi-user.target \ No newline at end of file +WantedBy=multi-user.target diff --git a/installer/data/otnode.service b/installer/data/otnode.service new file mode 100755 index 0000000000..2bd9c99bd7 --- /dev/null +++ b/installer/data/otnode.service @@ -0,0 +1,16 @@ +#/lib/systemd/system/otnode.service + +[Unit] +Description=OriginTrail V6 Stage 1 Beta Node +Documentation=https://github.com/OriginTrail/ot-node/ +After=network.target graphdb.service + +[Service] +Type=simple +User=root +WorkingDirectory=/root/ot-node +ExecStart=/usr/bin/node /root/ot-node/index.js +Restart=on-failure + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/installer/installer.sh b/installer/installer.sh index 8f4e0fa25b..4170553401 100755 --- a/installer/installer.sh +++ b/installer/installer.sh @@ -1,7 +1,7 @@ #!/bin/bash OS_VERSION=$(lsb_release -sr) -GRAPHDB_FILE="/root/graphdb-free-9.10.1-dist.zip" +GRAPHDB_FILE=$(ls /root | grep graphdb-free | grep .zip) OTNODE_DIR="/root/ot-node" N1=$'\n' GREEN='\033[0;32m' @@ -10,25 +10,7 @@ NC='\033[0m' # No Color clear -echo -n "${N1}Checking that the OS is Ubuntu 20.04 ONLY: " - -if [[ $OS_VERSION != 20.04 ]]; then - echo -e "${RED}FAILED${NC}" - echo "This installer requires Ubuntu 20.04. Destroy this VPS and remake using Ubuntu 20.04." - exit 1 -else - echo -e "${GREEN}SUCCESS${NC}" -fi - -echo -n "Checking that we are in /root directory: " - -if [ $PWD != "$OTNODE_DIR" ]; then - echo -e "${RED}FAILED${NC}" - echo "${N1}This installer requires the user to be logged in as root (NOT a regular user using sudo) and in the root directory. Npm install will fail if using sudo.${N1}" - exit -else - echo -e "${GREEN}SUCCESS${NC}" -fi +cd /root echo -n "Checking that the GraphDB file is present in /root: " @@ -94,13 +76,13 @@ else echo -e "${GREEN}SUCCESS${NC}" fi -echo -n "Copying service file: " +echo -n "Copying graphdb service file: " OUTPUT=$(cp $OTNODE_DIR/installer/data/graphdb.service /lib/systemd/system/ >/dev/null 2>&1) if [[ $? -ne 0 ]]; then echo -e "${RED}FAILED${NC}" - echo "There was an error copying the service file." + echo "There was an error copying the graphdb service file." echo $OUTPUT exit 1 else @@ -109,6 +91,19 @@ fi systemctl daemon-reload +echo -n "Enable GraphDB service on boot: " + +OUTPUT=$(systemctl enable graphdb >/dev/null 2>&1) + +if [[ $? -ne 0 ]]; then + echo -e "${RED}FAILED${NC}" + echo "There was an error enabling the GraphDB service." + echo $OUTPUT + exit 1 +else + echo -e "${GREEN}SUCCESS${NC}" +fi + echo -n "Starting GraphDB: " OUTPUT=$(systemctl start graphdb >/dev/null 2>&1) @@ -185,9 +180,9 @@ else echo -e "${GREEN}SUCCESS${NC}" fi -echo -n "Installing nodejs and npm: " +echo -n "Installing nodejs: " -OUTPUT=$(aptitude install nodejs npm -y >/dev/null 2>&1) +OUTPUT=$(aptitude install nodejs -y >/dev/null 2>&1) if [[ $? -ne 0 ]]; then echo -e "${RED}FAILED${NC}" echo "There was an error installing nodejs/npm." @@ -197,18 +192,6 @@ else echo -e "${GREEN}SUCCESS${NC}" fi -echo -n "Installing forever: " - -OUTPUT=$(npm install forever -g >/dev/null 2>&1) -if [[ $? -ne 0 ]]; then - echo -e "${RED}FAILED${NC}" - echo "There was an error installing forever." - echo $OUTPUT - exit 1 -else - echo -e "${GREEN}SUCCESS${NC}" -fi - echo -n "Installing tcllib and mysql-server: " OUTPUT=$(apt install tcllib mysql-server -y >/dev/null 2>&1) @@ -364,9 +347,38 @@ else echo -e "${GREEN}SUCCESS${NC}" fi -echo -n "Starting the node: " +echo -n "Copying otnode service file: " + +OUTPUT=$(cp $OTNODE_DIR/installer/data/otnode.service /lib/systemd/system/ >/dev/null 2>&1) + +if [[ $? -ne 0 ]]; then + echo -e "${RED}FAILED${NC}" + echo "There was an error copying the otnode service file." + echo $OUTPUT + exit 1 +else + echo -e "${GREEN}SUCCESS${NC}" +fi + +systemctl daemon-reload + +echo -n "Enable otnode service on boot: " + +OUTPUT=$(systemctl enable otnode >/dev/null 2>&1) + +if [[ $? -ne 0 ]]; then + echo -e "${RED}FAILED${NC}" + echo "There was an error enabling the otnode service." + echo $OUTPUT + exit 1 +else + echo -e "${GREEN}SUCCESS${NC}" +fi + +echo -n "Starting otnode: " + +OUTPUT=$(systemctl start otnode >/dev/null 2>&1) -OUTPUT=$(forever start -a -o out.log -e out.log index.js >/dev/null 2>&1) if [[ $? -ne 0 ]]; then echo -e "${RED}FAILED${NC}" echo "There was an error starting the node." @@ -376,8 +388,21 @@ else echo -e "${GREEN}SUCCESS${NC}" fi +echo -n "Confirming the node has started: " + +IS_RUNNING=$(systemctl show -p ActiveState --value otnode) + +if [[ $IS_RUNNING == "active" ]]; then + echo -e "${GREEN}SUCCESS${NC}" +else + echo -e "${RED}FAILED${NC}" + echo "There was an error starting the node." + echo $OUTPUT + exit 1 +fi + echo -n "Logs will be displayed. Press ctrl+c to exit the logs. The node WILL stay running after you return to the command prompt." echo " " read -p "Press enter to continue..." -tail -f -n100 out.log +journalctl -u otnode --output cat -fn 100 diff --git a/modules/command/command-executor.js b/modules/command/command-executor.js index 19b9dcdbef..4b69cab2ff 100644 --- a/modules/command/command-executor.js +++ b/modules/command/command-executor.js @@ -214,7 +214,7 @@ class CommandExecutor { async _startDefaultCommand(name) { await CommandExecutor._delete(name); const handler = this.commandResolver.resolve(name); - await this.add(handler.default(), 0, true); + await this.add(handler.default(), constants.DEFAULT_COMMAND_DELAY_IN_MILLS, true); if (this.verboseLoggingEnabled) { this.logger.trace(`Permanent command ${name} created.`); } diff --git a/modules/command/common/send-telemetry-command.js b/modules/command/common/send-telemetry-command.js index 6f56b65e02..d831edebce 100644 --- a/modules/command/common/send-telemetry-command.js +++ b/modules/command/common/send-telemetry-command.js @@ -26,7 +26,7 @@ class SendTelemetryCommand extends Command { Models.handler_ids.create({ status: 'PENDING', }).then((insertedObject) => { - this.publishService.publish(JSON.stringify(jsonld), '.json', [], [`ot-telemetry-${Math.floor(new Date() / (60 * 1000))}`], true, insertedObject.dataValues.handler_id); + this.publishService.publish(JSON.stringify(jsonld), '.json', [`ot-telemetry-${Math.floor(new Date() / (60 * 1000))}`], 'public', undefined, insertedObject.dataValues.handler_id); }); } }) @@ -62,7 +62,7 @@ class SendTelemetryCommand extends Command { data: { message: '', }, - period: 60 * 60 * 1000, // 5 * 60 * 1000 + period: 60 * 60 * 1000, // 1 hour transactional: false, }; Object.assign(command, map); diff --git a/modules/command/publish/insert-assertion-command.js b/modules/command/publish/insert-assertion-command.js index c3d7b48701..9f20d6d085 100644 --- a/modules/command/publish/insert-assertion-command.js +++ b/modules/command/publish/insert-assertion-command.js @@ -15,31 +15,12 @@ class InsertAssertionCommand extends Command { * @param command */ async execute(command) { - const { - documentPath, keywords, assets, handlerId, operationId, - } = command.data; - - const { rdf, assertion } = await this.fileService.loadJsonFromFile(documentPath); + const { documentPath, handlerId } = command.data; + let { nquads, assertion } = await this.fileService.loadJsonFromFile(documentPath); try { - // Store to local graph database - await this.dataService.insert(rdf.join('\n'), `did:dkg:${assertion.id}`); - this.logger.info(`Assertion ${assertion.id} is successfully inserted`); - // await Models.assertions.create({ - // owner: '', - // hash: assertion.id, - // signature: '', - // topics: keywords.join(','), - // }); - await Models.handler_ids.update( - { - status: 'COMPLETED', - }, { - where: { - handler_id: handlerId, - }, - }, - ); + await this.dataService.insert(nquads.join('\n'), `${constants.DID_PREFIX}:${assertion.id}`); + this.logger.info(`Assertion ${assertion.id} has been successfully inserted`); } catch (e) { await this.handleError(handlerId, e, constants.ERROR_TYPE.INSERT_ASSERTION_ERROR, true); } diff --git a/modules/command/publish/send-assertion-command.js b/modules/command/publish/send-assertion-command.js index c2603043d3..57fbb5519a 100644 --- a/modules/command/publish/send-assertion-command.js +++ b/modules/command/publish/send-assertion-command.js @@ -18,14 +18,16 @@ class SendAssertionCommand extends Command { * @param command */ async execute(command) { - const { - assets, keywords, handlerId, documentPath, - } = command.data; + const { documentPath, handlerId } = command.data; - const { rdf, assertion } = await this.fileService.loadJsonFromFile(documentPath); + let { nquads, assertion } = await this.fileService.loadJsonFromFile(documentPath); + + if (!assertion.metadata.visibility) { + nquads = nquads.filter((x) => x.startsWith(`<${constants.DID_PREFIX}:`)); + } let nodes = []; - for (const keyword of keywords) { + for (const keyword of assertion.metadata.keywords.concat(assertion.id)) { this.logger.info( `Searching for closest ${this.config.replicationFactor} node(s) for keyword ${keyword}`, ); @@ -43,11 +45,21 @@ class SendAssertionCommand extends Command { nodes = [...new Set(nodes)]; for (const node of nodes) { - this.publishService.store({ rdf, id: assertion.id }, node).catch((e) => { + this.publishService.store({ id:assertion.id, nquads: nquads }, node).catch((e) => { this.handleError(handlerId, e, `Error while sending data with assertion id ${assertion.id} to node ${node._idB58String}. Error message: ${e.message}. ${e.stack}`); }); } + await Models.handler_ids.update( + { + status: 'COMPLETED', + }, { + where: { + handler_id: handlerId, + }, + }, + ); + return this.continueSequence(command.data, command.sequence); } diff --git a/modules/command/publish/submit-proofs-command.js b/modules/command/publish/submit-proofs-command.js index 3429c767e1..08b699947c 100644 --- a/modules/command/publish/submit-proofs-command.js +++ b/modules/command/publish/submit-proofs-command.js @@ -1,6 +1,7 @@ const Command = require('../command'); const Models = require('../../../models/index'); const constants = require('../../constants'); +const sortedStringify = require("json-stable-stringify"); class SubmitProofsCommand extends Command { constructor(ctx) { @@ -9,6 +10,7 @@ class SubmitProofsCommand extends Command { this.blockchainService = ctx.blockchainService; this.dataService = ctx.dataService; this.fileService = ctx.fileService; + this.workerPool = ctx.workerPool; } /** @@ -16,14 +18,25 @@ class SubmitProofsCommand extends Command { * @param command */ async execute(command) { - const { documentPath, handlerId, operationId } = command.data; + const { documentPath, handlerId, method } = command.data; try { - const { rdf, assertion } = await this.fileService.loadJsonFromFile(documentPath); - - this.logger.info(`Sending transaction to the blockchain: createAssertionRecord(${assertion.id},${assertion.rootHash})`); - const { transactionHash, blockchain } = await this.blockchainService - .sendProofs(assertion); + let { nquads, assertion } = await this.fileService.loadJsonFromFile(documentPath); + + this.logger.info(`Sending transaction to the blockchain`); + let result; + switch (method) { + case 'publish': + result = await this.blockchainService.createAssertionRecord(assertion.id, assertion.rootHash, assertion.metadata.issuer); + break; + case 'provision': + result = await this.blockchainService.registerAsset(assertion.metadata.UALs[0],assertion.metadata.type,assertion.metadata.UALs[0],assertion.id, assertion.rootHash, 1); + break; + case 'update': + result = await this.blockchainService.updateAsset(assertion.metadata.UALs[0],assertion.id, assertion.rootHash); + break; + } + const { transactionHash, blockchain } = result; this.logger.info(`Transaction hash is ${transactionHash} on ${blockchain}`); assertion.blockchain = { @@ -31,13 +44,12 @@ class SubmitProofsCommand extends Command { transactionHash, }; - const updatedRdf = await this.dataService.appendBlockchainMetadata(rdf, assertion); - + nquads = await this.dataService.appendBlockchainMetadata(nquads, assertion); const handlerIdCachePath = this.fileService.getHandlerIdCachePath(); await this.fileService - .writeContentsToFile(handlerIdCachePath, handlerId, JSON.stringify({ - rdf: updatedRdf, assertion, + .writeContentsToFile(handlerIdCachePath, handlerId, sortedStringify({ + nquads, assertion })); } catch (e) { diff --git a/modules/constants.js b/modules/constants.js index 58c1d6b58e..abf145c427 100644 --- a/modules/constants.js +++ b/modules/constants.js @@ -1,8 +1,21 @@ exports.GS1EPCIS = 'gs1-epcis'; +exports.NFT = 'nft'; exports.MERKLE_TREE = 'Merkle Tree'; exports.BASIC = 'Basic'; exports.DID = 'DID'; +/** + * @constant {number} MAX_FILE_SIZE + * - Max file size for publish + */ +exports.MAX_FILE_SIZE = 26214400; + +/** + * @constant {number} DID_PREFIX + * - DID prefix for graph database + */ +exports.DID_PREFIX = 'did:dkg'; + /** * @constant {number} DEFAULT_COMMAND_CLEANUP_TIME_MILLS - Command cleanup interval time */ @@ -32,6 +45,11 @@ exports.MAX_COMMAND_DELAY_IN_MILLS = 14400 * 60 * 1000; // 10 days */ exports.DEFAULT_COMMAND_REPEAT_INTERVAL_IN_MILLS = 5000; // 5 seconds +/** + * @constant {number} DEFAULT_COMMAND_DELAY_IN_MILLS - Delay for default commands + */ +exports.DEFAULT_COMMAND_DELAY_IN_MILLS = 60 * 1000; // 60 seconds + /** * @constant {number} TRIPLE_STORE_CONNECT_MAX_RETRIES * - Maximum retries for connecting to triple store @@ -44,6 +62,15 @@ exports.TRIPLE_STORE_CONNECT_MAX_RETRIES = 10; */ exports.TRIPLE_STORE_CONNECT_RETRY_FREQUENCY = 10; // 10 seconds +/** + * @constant {object} TRIPLE_STORE_IMPLEMENTATION - + * Names of available triple store implementations + */ +exports.TRIPLE_STORE_IMPLEMENTATION = { + BLAZEGRAPH: 'Blazegraph', + GRAPHDB: 'GraphDB', +}; + /** * @constant {object} ERROR_TYPE - * Types of errors supported diff --git a/modules/controller/rpc-controller.js b/modules/controller/rpc-controller.js index 3a5f0e4833..e37505d12b 100644 --- a/modules/controller/rpc-controller.js +++ b/modules/controller/rpc-controller.js @@ -3,15 +3,15 @@ const fileUpload = require('express-fileupload'); const ipfilter = require('express-ipfilter').IpFilter; const fs = require('fs'); const https = require('https'); -const {IpDeniedError} = require('express-ipfilter'); -const path = require('path') -const {v1: uuidv1, v4: uuidv4} = require('uuid'); +const { IpDeniedError } = require('express-ipfilter'); +const path = require('path'); +const { v1: uuidv1, v4: uuidv4 } = require('uuid'); +const sortedStringify = require('json-stable-stringify'); +const validator = require('validator'); const Models = require('../../models/index'); const constants = require('../constants'); const pjson = require('../../package.json'); -const sortedStringify = require('json-stable-stringify'); -const validator = require('validator'); - +const Utilities = require('../utilities'); class RpcController { constructor(ctx) { @@ -25,6 +25,7 @@ class RpcController { this.logger = ctx.logger; this.commandExecutor = ctx.commandExecutor; this.fileService = ctx.fileService; + this.workerPool = ctx.workerPool; this.app = express(); this.enableSSL(); @@ -35,18 +36,17 @@ class RpcController { } async initialize() { - this.startListeningForRpcNetworkCalls(); + //TODO add body-parser middleware + this.initializeNetworkApi(); this.initializeAuthenticationMiddleware(); - this.startListeningForRpcApiCalls(); + this.initializeServiceApi(); await this.initializeErrorMiddleware(); if (this.sslEnabled) { await this.httpsServer.listen(this.config.rpcPort); } else { await this.app.listen(this.config.rpcPort); } - - this.logger.info(`RPC module enabled, server running on port ${this.config.rpcPort}`); } initializeAuthenticationMiddleware() { @@ -91,14 +91,14 @@ class RpcController { default: return next(error) } - this.logger.error({ msg: message, Event_name: constants.ERROR_TYPE.API_ERROR_400 }); + this.logger.error({msg: message, Event_name: constants.ERROR_TYPE.API_ERROR_400}); return res.status(code).send(message); } return next(error) }) this.app.use((error, req, res, next) => { - this.logger.error({ msg: error, Event_name: constants.ERROR_TYPE.API_ERROR_500}); + this.logger.error({msg: error, Event_name: constants.ERROR_TYPE.API_ERROR_500}); return res.status(500).send(error) }) } @@ -114,7 +114,9 @@ class RpcController { } } - startListeningForRpcNetworkCalls() { + initializeNetworkApi() { + this.logger.info(`Network API module enabled on port ${this.config.network.port}`); + this.networkService.handleMessage('/store', (result) => this.publishService.handleStore(result)); this.networkService.handleMessage('/resolve', (result) => this.queryService.handleResolve(result)); @@ -137,84 +139,35 @@ class RpcController { // this.networkService.handleMessage('/query', (result) => this.queryService.handleQuery(result)); } - startListeningForRpcApiCalls() { + initializeServiceApi() { + this.logger.info(`Service API module enabled, server running on port ${this.config.rpcPort}`); this.app.post('/publish', async (req, res, next) => { - if (!req.files || !req.files.file || !req.body.assets) { - return next({code: 400, message: 'File, assets, and keywords are required fields.'}); - } else { - if(!this.isArrayOfStrings(req.body.assets)){ - return next({code: 400, message: `Assets must be a non-empty array of strings, all strings must have double quotes.`}); - } - if(req.body.keywords && !this.isArrayOfStrings(req.body.keywords)) { - return next({code: 400, message: `Keywords must be a non-empty array of strings, all strings must have double quotes.`}); - } - } - - const operationId = uuidv1(); - try { - this.logger.emit({ - msg: 'Started measuring execution of publish command', - Event_name: 'publish_start', - Operation_name: 'publish', - Id_operation: operationId - }); - - const inserted_object = await Models.handler_ids.create({ - status: 'PENDING', - }); - const handlerId = inserted_object.dataValues.handler_id; - res.status(200).send({ - handler_id: handlerId, - }); - - const fileContent = req.files.file.data; - const fileExtension = path.extname(req.files.file.name).toLowerCase(); - const assets = [...new Set(JSON.parse(req.body.assets.toLowerCase()))]; - let visibility = JSON.parse(!!req.body.visibility); - let keywords = req.body.keywords ? JSON.parse(req.body.keywords.toLowerCase()) : []; - - const assertion = await this.publishService.publish(fileContent, fileExtension, assets, keywords, visibility, handlerId); - - const handlerData = { - id: assertion.id, - rootHash: assertion.rootHash, - signature: assertion.signature, - metadata: assertion.metadata, - }; - - await Models.handler_ids.update( - { - data: JSON.stringify(handlerData) - }, { - where: { - handler_id: handlerId, - }, - }, - ); - - } catch (e) { - this.logger.error({ - msg: `Unexpected error at publish route: ${e.message}. ${e.stack}`, - Event_name: constants.ERROR_TYPE.PUBLISH_ROUTE_ERROR, - Event_value1: e.message, - Id_operation: operationId - }); - } finally { - this.logger.emit({ - msg: 'Finished measuring execution of publish command', - Event_name: 'publish_end', - Operation_name: 'publish', - Id_operation: operationId + await this.publish(req, res, next, {isAsset: false}); + }); + this.app.post('/provision', async (req, res, next) => { + await this.publish(req, res, next, {isAsset: true, ual: null}); + }); + this.app.post('/update', async (req, res, next) => { + if (!req.body.ual) { + return next({ + code: 400, + message: `UAL must be a string.` }); } + await this.publish(req, res, next, {isAsset: true, ual: req.body.ual}); }); this.app.get('/resolve', async (req, res, next) => { if (!req.query.ids) { return next({code: 400, message: 'Param ids is required.'}); } + + if (req.query.load === undefined) { + req.query.load = false; + } const operationId = uuidv1(); + let handlerId = null; try { this.logger.emit({ msg: 'Started measuring execution of resolve command', @@ -226,41 +179,78 @@ class RpcController { const inserted_object = await Models.handler_ids.create({ status: 'PENDING', }); - const handlerId = inserted_object.dataValues.handler_id; - res.status(200).send({ + handlerId = inserted_object.dataValues.handler_id; + res.status(202).send({ handler_id: handlerId, }); - let assertionIds = [req.query.ids]; + let ids = [req.query.ids]; if (req.query.ids instanceof Array) { - assertionIds = [...new Set(req.query.ids)]; + ids = [...new Set(req.query.ids)]; } - this.logger.info(`Resolve for assertions ids: ${assertionIds} with handler id ${handlerId} initiated.`); + this.logger.info(`Resolve for ${ids} with handler id ${handlerId} initiated.`); const response = []; - for (const assertionId of assertionIds) { - let namedGraph = await this.dataService.resolve(assertionId, true); - if (namedGraph) { - let {assertion, rdf} = await this.dataService.createAssertion(assertionId, namedGraph); - assertion.metadata = JSON.parse(sortedStringify(assertion.metadata)) - assertion.data = JSON.parse(sortedStringify(await this.dataService.fromRDF(assertion.data, assertion.metadata.type))) - response.push({ - [assertionId]: assertion - }); + for (let id of ids) { + let isAsset = false; + let {assertionId} = await this.blockchainService.getAssetProofs(id); + if (assertionId) { + isAsset = true; + id = assertionId; + } + const result = await this.dataService.resolve(id, true); + + if (result && result.nquads) { + let {nquads} = result; + let assertion = await this.dataService.createAssertion(nquads); + assertion.jsonld.metadata = JSON.parse(sortedStringify(assertion.jsonld.metadata)) + assertion.jsonld.data = JSON.parse(sortedStringify(await this.dataService.fromNQuads(assertion.jsonld.data, assertion.jsonld.metadata.type))) + response.push(isAsset ? { + type: 'asset', + id: assertion.jsonld.metadata.UALs[0], + result: { + metadata: { + type: assertion.jsonld.metadata.type, + issuer: assertion.jsonld.metadata.issuer, + latestState: assertion.jsonld.metadata.timestamp, + }, + data: assertion.jsonld.data + } + } : { + type: 'assertion', + id: id, + assertion: assertion.jsonld + } + ); } else { - this.logger.info(`Searching for closest ${this.config.replicationFactor} node(s) for keyword ${assertionId}`); - let nodes = await this.networkService.findNodes(assertionId, this.config.replicationFactor); + this.logger.info(`Searching for closest ${this.config.replicationFactor} node(s) for keyword ${id}`); + let nodes = await this.networkService.findNodes(id, this.config.replicationFactor); if (nodes.length < this.config.replicationFactor) - this.logger.warn(`Found only ${nodes.length} node(s) for keyword ${assertionId}`); + this.logger.warn(`Found only ${nodes.length} node(s) for keyword ${id}`); nodes = [...new Set(nodes)]; for (const node of nodes) { - let {assertion} = await this.queryService.resolve(assertionId, node); - if (assertion) { - assertion.metadata = JSON.parse(sortedStringify(assertion.metadata)); - assertion.data = JSON.parse(sortedStringify(await this.dataService.fromRDF(assertion.data, assertion.metadata.type))) - response.push({ - [assertionId]: assertion - }); + const result = await this.queryService.resolve(id, req.query.load, isAsset, node); + if (result) { + const {assertion} = result; + assertion.jsonld.metadata = JSON.parse(sortedStringify(assertion.jsonld.metadata)) + assertion.jsonld.data = JSON.parse(sortedStringify(await this.dataService.fromNQuads(assertion.jsonld.data, assertion.jsonld.metadata.type))) + response.push(isAsset ? { + type: 'asset', + id: assertion.jsonld.metadata.UALs[0], + result: { + metadata: { + type: assertion.jsonld.metadata.type, + issuer: assertion.jsonld.metadata.issuer, + latestState: assertion.jsonld.metadata.timestamp, + }, + data: assertion.jsonld.data + } + } : { + type: 'assertion', + id: id, + assertion: assertion.jsonld + } + ); break; } } @@ -281,7 +271,6 @@ class RpcController { }, }, ); - } catch (e) { this.logger.error({ msg: `Unexpected error at resolve route: ${e.message}. ${e.stack}`, @@ -289,6 +278,7 @@ class RpcController { Event_value1: e.message, Id_operation: operationId }); + this.updateFailedHandlerId(handlerId, e, next); } finally { this.logger.emit({ msg: 'Finished measuring execution of resolve command', @@ -303,7 +293,23 @@ class RpcController { if (!req.query.query || req.params.search !== 'search') { return next({code: 400, message: 'Params query is necessary.'}); } + + let prefix = req.query.prefix, + limit = req.query.limit, + query = req.query.query.toLowerCase(); + + if (!prefix) { + prefix = false; + } + + if (!limit || limit < 1 || !Number(limit)) { + limit = 20; + } else if (limit > 500) { + limit = 500; + } + const operationId = uuidv1(); + let handlerId = null; try { this.logger.emit({ msg: 'Started measuring execution of search command', @@ -311,24 +317,21 @@ class RpcController { Operation_name: 'search', Id_operation: operationId }); - req.query.query = escape(req.query.query); - const load = req.params.load ? req.params.load : false; - const inserted_object = await Models.handler_ids.create({ status: 'PENDING', }); - const handlerId = inserted_object.dataValues.handler_id; - res.status(200).send({ + handlerId = inserted_object.dataValues.handler_id; + res.status(202).send({ handler_id: handlerId, }); let response; let nodes = []; - response = await this.dataService.searchAssertions(req.query.query, { }, true); - this.logger.info(`Searching for closest ${this.config.replicationFactor} node(s) for keyword ${req.query.query}`); - let foundNodes = await this.networkService.findNodes(req.query.query, this.config.replicationFactor); + response = await this.dataService.searchAssertions(query, {limit, prefix}, true); + this.logger.info(`Searching for closest ${this.config.replicationFactor} node(s) for keyword ${query}`); + let foundNodes = await this.networkService.findNodes(query, this.config.replicationFactor); if (foundNodes.length < this.config.replicationFactor) - this.logger.warn(`Found only ${foundNodes.length} node(s) for keyword ${req.query.query}`); + this.logger.warn(`Found only ${foundNodes.length} node(s) for keyword ${query}`); nodes = nodes.concat(foundNodes); nodes = [...new Set(nodes)]; @@ -348,12 +351,11 @@ class RpcController { for (const node of nodes) { await this.queryService.searchAssertions({ - query: req.query.query, - load, + query, + options: {limit, prefix}, handlerId }, node); } - } catch (e) { this.logger.error({ msg: `Unexpected error at search assertions route: ${e.message}. ${e.stack}`, @@ -361,6 +363,7 @@ class RpcController { Event_value1: e.message, Id_operation: operationId }); + this.updateFailedHandlerId(handlerId, e, next); } finally { this.logger.emit({ msg: 'Finished measuring execution of search command', @@ -372,10 +375,11 @@ class RpcController { }); this.app.get('/entities::search', async (req, res, next) => { - if ((!req.query.query && !req.query.ids) || req.params.search !== 'search') { + if (!req.query.query || req.params.search !== 'search') { return next({code: 400, message: 'Params query or ids are necessary.'}); } const operationId = uuidv1(); + let handlerId = null; try { this.logger.emit({ msg: 'Started measuring execution of search command', @@ -384,16 +388,8 @@ class RpcController { Id_operation: operationId }); - let query = escape(req.query.query), ids, issuers, types, prefix = req.query.prefix, - limit = req.query.limit, - framingCriteria = req.query.framingCriteria; - - if (req.query.ids) { - ids = [req.query.ids]; - if (req.query.ids instanceof Array) { - ids = [...new Set(req.query.ids)]; - } - } + let query = req.query.query.toLowerCase(), issuers, types, prefix = req.query.prefix, + limit = req.query.limit; if (req.query.issuers) { issuers = [req.query.issuers]; @@ -422,7 +418,7 @@ class RpcController { const inserted_object = await Models.handler_ids.create({ status: 'PENDING', }); - const handlerId = inserted_object.dataValues.handler_id; + handlerId = inserted_object.dataValues.handler_id; res.status(200).send({ handler_id: handlerId, }); @@ -435,16 +431,6 @@ class RpcController { nodes = await this.networkService.findNodes(query, this.config.replicationFactor); if (nodes.length < this.config.replicationFactor) this.logger.warn(`Found only ${nodes.length} node(s) for keyword ${query}`); - } else { - response = await this.dataService.searchByIds(ids, {issuers, types, limit}, true); - for (const id of ids) { - this.logger.info(`Searching for closest ${this.config.replicationFactor} node(s) for keyword ${id}`); - let foundNodes = await this.networkService.findNodes(id, this.config.replicationFactor); - if (foundNodes.length < this.config.replicationFactor) - this.logger.warn(`Found only ${foundNodes.length} node(s) for keyword ${id}`); - nodes = nodes.concat(foundNodes); - } - nodes = [...new Set(nodes)]; } const handlerIdCachePath = this.fileService.getHandlerIdCachePath(); @@ -463,7 +449,6 @@ class RpcController { for (const node of nodes) { await this.queryService.search({ query, - ids, issuers, types, prefix, @@ -479,6 +464,7 @@ class RpcController { Event_value1: e.message, Id_operation: operationId }); + this.updateFailedHandlerId(handlerId, e, next); } finally { this.logger.emit({ msg: 'Finished measuring execution of search command', @@ -498,6 +484,7 @@ class RpcController { return next({code: 400, message: 'Unallowed query type, currently supported types: construct'}); } const operationId = uuidv1(); + let handlerId = null; try { this.logger.emit({ msg: 'Started measuring execution of query command', @@ -510,7 +497,7 @@ class RpcController { const inserted_object = await Models.handler_ids.create({ status: 'PENDING', }); - const handlerId = inserted_object.dataValues.handler_id; + handlerId = inserted_object.dataValues.handler_id; res.status(200).send({ handler_id: handlerId, }); @@ -518,7 +505,7 @@ class RpcController { let response = await this.dataService.runQuery(req.body.query, req.query.type.toUpperCase()); const handlerIdCachePath = this.fileService.getHandlerIdCachePath(); - if(response) { + if (response) { await this.fileService .writeContentsToFile(handlerIdCachePath, handlerId, JSON.stringify(response)); } @@ -533,16 +520,7 @@ class RpcController { }, ); } catch (e) { - await Models.handler_ids.update( - { - status: 'FAILED', - data: JSON.stringify({errorMessage: e.message}) - }, { - where: { - handler_id: handlerId, - }, - }, - ); + this.updateFailedHandlerId(handlerId, e, next); } } catch (e) { this.logger.error({ @@ -567,18 +545,20 @@ class RpcController { return next({code: 400, message: 'Params query and type are necessary.'}); } const operationId = uuidv1(); + const handlerIdCachePath = this.fileService.getHandlerIdCachePath(); + let handlerId = null; try { this.logger.emit({ msg: 'Started measuring execution of proofs command', Event_name: 'proofs_start', Operation_name: 'proofs', - Id_operation: operationId + Id_operation: operationId, }); const inserted_object = await Models.handler_ids.create({ status: 'PENDING', }); - const handlerId = inserted_object.dataValues.handler_id; + handlerId = inserted_object.dataValues.handler_id; res.status(200).send({ handler_id: handlerId, }); @@ -589,24 +569,21 @@ class RpcController { assertions = [...new Set(req.query.assertions)]; } } - - const nquads = JSON.parse(req.body.nquads); + const reqNquads = JSON.parse(req.body.nquads); const result = []; if (!assertions || assertions.length === 0) { - assertions = await this.dataService.findAssertions(nquads); + assertions = await this.dataService.findAssertions(reqNquads); } for (const assertionId of assertions) { - const content = await this.dataService.resolve(assertionId) + const content = await this.dataService.resolve(assertionId); if (content) { - const {rdf} = await this.dataService.createAssertion(assertionId, content); - const proofs = await this.validationService.getProofs(rdf, nquads); - result.push({assertionId, proofs}); + const { nquads } = await this.dataService.createAssertion(content.nquads); + const proofs = await this.validationService.getProofs(nquads, reqNquads); + result.push({ assertionId, proofs }); } } - const handlerIdCachePath = this.fileService.getHandlerIdCachePath(); - await this.fileService .writeContentsToFile(handlerIdCachePath, handlerId, JSON.stringify(result)); @@ -615,7 +592,7 @@ class RpcController { status: 'COMPLETED', }, { where: { - handler_id: handlerId + handler_id: handlerId, }, }, ); @@ -624,31 +601,32 @@ class RpcController { msg: `Unexpected error at proofs route: ${e.message}. ${e.stack}`, Event_name: constants.ERROR_TYPE.PROOFS_ROUTE_ERROR, Event_value1: e.message, - Id_operation: operationId + Id_operation: operationId, }); + this.updateFailedHandlerId(handlerId, e, next); } finally { this.logger.emit({ msg: 'Finished measuring execution of proofs command', Event_name: 'proofs_end', Operation_name: 'proofs', - Id_operation: operationId + Id_operation: operationId, }); } }); this.app.get('/:operation/result/:handler_id', async (req, res, next) => { - if (!['publish', 'resolve', 'query', 'entities:search', 'assertions:search', 'proofs:get'].includes(req.params.operation)) { + if (!['provision', 'update', 'publish', 'resolve', 'query', 'entities:search', 'assertions:search', 'proofs:get'].includes(req.params.operation)) { return next({ code: 400, - message: 'Unexisting operation, available operations are: publish, resolve, query, proofs and search' + message: 'Unexisting operation, available operations are: provision, update, publish, resolve, entities:search, assertions:search, query and proofs:get', }); } - const {handler_id, operation} = req.params; + const { handler_id, operation } = req.params; if (!validator.isUUID(handler_id)) { return next({ code: 400, - message: 'Handler id is in wrong format' + message: 'Handler id is in wrong format', }); } @@ -661,17 +639,20 @@ class RpcController { let response; if (handlerData) { + if (handlerData.status === 'FAILED') { + return res.status(200).send({ status: handlerData.status, data: JSON.parse(handlerData.data) }); + } const documentPath = this.fileService.getHandlerIdDocumentPath(handler_id); switch (req.params.operation) { case 'entities:search': - handlerData.data = await this.fileService.loadJsonFromFile(documentPath); + handlerData.data = await this.fileService.loadJsonFromFile(documentPath); - response = handlerData.data.map(async (x) => ({ + response = handlerData.data.map((x) => ({ "@type": "EntitySearchResult", "result": { "@id": x.id, "@type": x.type.toUpperCase(), - ...(await this.dataService.frameAsset(x.data, x.type)) + "timestamp": x.timestamp, }, "issuers": x.issuers, "assertions": x.assertions, @@ -679,8 +660,6 @@ class RpcController { "resultScore": 0 })); - response = await Promise.all(response); - res.send({ "@context": { "@vocab": "http://schema.org/", @@ -695,7 +674,7 @@ class RpcController { }); break; case 'assertions:search': - handlerData.data = await this.fileService.loadJsonFromFile(documentPath); + handlerData.data = await this.fileService.loadJsonFromFile(documentPath); response = handlerData.data.map(async (x) => ({ "@type": "AssertionSearchResult", @@ -724,23 +703,27 @@ class RpcController { "itemListElement": response }); break; + case 'resolve': + if (handlerData) { + handlerData.data = await this.fileService.loadJsonFromFile(documentPath); + } + res.status(200).send({status: handlerData.status, data: handlerData.data}); + break; + case 'provision': case 'publish': - const result = {}; - if (handlerData.data) { - const {rdf, assertion} = await this.fileService.loadJsonFromFile(documentPath); - result.data = JSON.parse(handlerData.data); - result.data.rdf = rdf; - result.data.assertion = assertion; + case 'update': + if (handlerData) { + const result = await this.fileService.loadJsonFromFile(documentPath); + delete result.assertion.data; + handlerData.data = result.assertion; } - res.status(200).send({status: handlerData.status, data: result.data}); + res.status(200).send({status: handlerData.status, data: handlerData.data}); break; default: - handlerData.data = await this.fileService.loadJsonFromFile(documentPath); - + handlerData.data = await this.fileService.loadJsonFromFile(documentPath); res.status(200).send({status: handlerData.status, data: handlerData.data}); break; } - } else { next({code: 404, message: `Handler with id: ${handler_id} does not exist.`}); } @@ -778,16 +761,112 @@ class RpcController { }); } - isArrayOfStrings(arr) { - try { - const bodyAssets = JSON.parse(arr.toLowerCase()); - if (!(Array.isArray(bodyAssets)) | !(bodyAssets.length > 0) | !bodyAssets.every(i => (typeof i === "string")) | bodyAssets[0] === "") { - return false; - } - } catch (e) { - return false; + async publish(req, res, next, options) { + if (!req.files || !req.files.file || path.extname(req.files.file.name).toLowerCase() !== '.json') { + return next({code: 400, message: 'Assertion file is required field and must be in JSON-LD format.'}); + //TODO determine file size limit + } else if (req.files.file.size > constants.MAX_FILE_SIZE) { + return next({ + code: 400, + message: `File size limit is 25MB.` + }); + } else if (req.body.keywords && !Utilities.isArrayOfStrings(req.body.keywords)) { + return next({ + code: 400, + message: `Keywords must be a non-empty array of strings, all strings must have double quotes.` + }); + } else if (req.body.visibility && !['public', 'private'].includes(req.body.visibility)) { + return next({ + code: 400, + message: `Visibility must be a string, value can be public or private.` + }); + } + + const operationId = uuidv1(); + this.logger.emit({ + msg: 'Started measuring execution of publish command', + Event_name: 'publish_start', + Operation_name: 'publish', + Id_operation: operationId + }); + + const handlerObject = await Models.handler_ids.create({ + status: 'PENDING', + }) + + const handlerId = handlerObject.dataValues.handler_id; + res.status(202).send({ + handler_id: handlerId, + }); + const fileContent = req.files.file.data; + const fileExtension = path.extname(req.files.file.name).toLowerCase(); + const visibility = req.body.visibility ? req.body.visibility.toLowerCase() : 'public'; + const ual = options.isAsset ? options.ual : undefined; + + let promise; + if (req.body.keywords) { + promise = this.workerPool.exec('JSONParse', [req.body.keywords.toLowerCase()]); + } else { + promise = new Promise((accept) => accept([])); + } + + promise + .then(keywords => this.publishService.publish(fileContent, fileExtension, keywords, visibility, ual, handlerId)) + .then(assertion => { + const handlerData = { + id: assertion.id, + rootHash: assertion.rootHash, + signature: assertion.signature, + metadata: assertion.metadata, + }; + + Models.handler_ids.update( + { + data: JSON.stringify(handlerData) + }, { + where: { + handler_id: handlerId, + }, + }, + ); + }) + .catch((e) => { + this.logger.error({ + msg: `Unexpected error at publish route: ${e.message}. ${e.stack}`, + Event_name: constants.ERROR_TYPE.PUBLISH_ROUTE_ERROR, + Event_value1: e.message, + Id_operation: operationId, + }); + this.updateFailedHandlerId(handlerId, e, next); + }) + .then(() => { + this.logger.emit({ + msg: 'Finished measuring execution of publish command', + Event_name: 'publish_end', + Operation_name: 'publish', + Id_operation: operationId + }); + }); + } + + updateFailedHandlerId(handlerId, error, next) { + if (handlerId !== null) { + Models.handler_ids.update( + { + status: 'FAILED', + data: JSON.stringify({ errorMessage: error.message }), + }, { + where: { + handler_id: handlerId, + }, + }, + ); + } else { + return next({ + code: 400, + message: 'Something went wrong with the requested operation, try again.', + }); } - return true; } } diff --git a/modules/logger/logger.js b/modules/logger/logger.js index e686b7e9ca..9bc1e9b165 100644 --- a/modules/logger/logger.js +++ b/modules/logger/logger.js @@ -38,7 +38,7 @@ class Logger { error(obj) { this.pinoLogger.error(obj.msg); this.pinoLogger.emit({ - msg: `Telemetry logging error: ${obj.Event_name}`, + msg: `Found error will be reported to Telemetry: ${obj.Event_name}`, Operation_name: 'Error', Event_name: obj.Event_name, Event_value1: obj.Event_value1 ? obj.Event_value1 : '', diff --git a/modules/service/blockchain-service.js b/modules/service/blockchain-service.js index 6b05e2fec2..5dff70d33a 100644 --- a/modules/service/blockchain-service.js +++ b/modules/service/blockchain-service.js @@ -29,12 +29,22 @@ class BlockchainService { return this.implementation.getPublicKey(); } - async sendProofs(assertion) { - return this.implementation.sendProofs(assertion); + async createAssertionRecord(stateCommitHash, rootHash, issuer) { + return this.implementation.createAssertionRecord(stateCommitHash, rootHash, issuer); + } + async registerAsset(uai, type, alsoKnownAs, stateCommitHash, rootHash, tokenAmount) { + return this.implementation.registerAsset(uai, type, alsoKnownAs, stateCommitHash, rootHash, tokenAmount); + } + async updateAsset(UAI, newStateCommitHash, rootHash) { + return this.implementation.updateAsset(UAI, newStateCommitHash, rootHash); + } + + async getAssertionProofs(assertionId) { + return this.implementation.getAssertionProofs(assertionId); } - async getProofs(proofs) { - return this.implementation.getProofs(proofs); + async getAssetProofs(ual) { + return this.implementation.getAssetProofs(ual); } async healthCheck() { diff --git a/modules/service/data-service.js b/modules/service/data-service.js index 996b6a96ba..135d5c0571 100644 --- a/modules/service/data-service.js +++ b/modules/service/data-service.js @@ -1,6 +1,9 @@ const { v1: uuidv1 } = require('uuid'); +const N3 = require('n3'); const constants = require('../constants'); const GraphDB = require('../../external/graphdb-service'); +const Blazegraph = require('../../external/blazegraph-service'); +const axios = require('axios'); class DataService { constructor(ctx) { @@ -10,6 +13,8 @@ class DataService { this.validationService = ctx.validationService; this.networkService = ctx.networkService; this.nodeService = ctx.nodeService; + this.workerPool = ctx.workerPool; + this.blockchainService = ctx.blockchainService; } getName() { @@ -17,11 +22,18 @@ class DataService { } async initialize() { - this.implementation = new GraphDB({ - repositoryName: this.config.graphDatabase.name, - username: this.config.graphDatabase.username, - password: this.config.graphDatabase.password, - }); + if (this.config.graphDatabase.implementation === constants.TRIPLE_STORE_IMPLEMENTATION.BLAZEGRAPH) { + this.implementation = new Blazegraph({ + url: this.config.graphDatabase.url, + }); + } else { + this.implementation = new GraphDB({ + repositoryName: this.config.graphDatabase.name, + username: this.config.graphDatabase.username, + password: this.config.graphDatabase.password, + url: this.config.graphDatabase.url, + }); + } let ready = await this.healthCheck(); let retries = 0; @@ -33,7 +45,7 @@ class DataService { } if (retries === constants.TRIPLE_STORE_CONNECT_MAX_RETRIES) { this.logger.error({ - msg: `Triple Store (${this.implementation.getName()}) not available, max retries reached.`, + msg: `Triple Store (${this.getName()}) not available, max retries reached.`, Event_name: constants.ERROR_TYPE.TRIPLE_STORE_UNAVAILABLE_ERROR, }); this.nodeService.stop(1); @@ -54,78 +66,77 @@ class DataService { async canonize(fileContent, fileExtension) { switch (fileExtension) { - case '.json': - let jsonContent = JSON.parse(fileContent); - - const timestamp = new Date().toISOString(); - const rdf = await this.implementation.toRDF(jsonContent); - - let type = jsonContent['@type']; - delete jsonContent['@type']; - if (!type) { - type = 'default'; - } - - jsonContent = await this.fromRDF(rdf, type); - return { - assertion: { - data: jsonContent, + case '.json': + const assertion = { metadata: { - type, - timestamp, + timestamp: new Date().toISOString() }, - }, - rdf, - }; - default: - throw new Error('File format is not supported.'); + data: await this.workerPool.exec('JSONParse', [fileContent.toString()]) + } + const nquads = await this.workerPool.exec('toNQuads', [assertion.data]) + if (nquads && nquads.length === 0) { + throw new Error(`File format is corrupted, no n-quads extracted.`); + } + + let type = assertion.data['@type']; + delete assertion.data['@type']; + if (!type) { + type = 'default'; + } + assertion.metadata.type = type; + assertion.data = await this.fromNQuads(nquads, type); + + return {assertion, nquads}; + default: + throw new Error(`File extension ${fileExtension} is not supported.`); } } - async insert(data, rootHash) { + async insert(data, assertionId) { try { - return this.implementation.insert(data, rootHash); + return this.implementation.insert(data, assertionId); } catch (e) { // TODO: Check situation when inserting data recieved from other node this.handleUnavailableTripleStoreError(e); } } - async resolve(assertionId, localQuery = false) { + async resolve(id, localQuery = false, metadataOnly = false) { try { - const rdf = await this.implementation.resolve(assertionId); - if (!localQuery && rdf && rdf.find((x) => x.includes(` "false"^^ .`))) { + let {nquads, isAsset} = await this.implementation.resolve(id); + if (!localQuery && nquads && nquads.find((x) => x.includes(`<${constants.DID_PREFIX}:${id}> "private" .`))) { return null; } - return rdf; + if (metadataOnly) { + nquads = nquads.filter((x) => x.startsWith(`<${constants.DID_PREFIX}:${id}>`)); + } + return {nquads, isAsset}; } catch (e) { this.handleUnavailableTripleStoreError(e); } } - async createAssertion(assertionId, rdf) { - const metadata = rdf.filter((x) => x.startsWith(' !x.startsWith(' !x.includes('hasKeyword') && !x.includes('hasAsset') && !x.includes('hasRootHash') && !x.includes('hasBlockchain') && !x.includes('hasTransactionHash')); - const assertion = await this.implementation.extractMetadata(metadata); - assertion.id = assertionId; - assertion.data = data; - return { assertion, rdf }; + async createAssertion(rawNQuads) { + const metadata = []; + const data = []; + const nquads = []; + rawNQuads.forEach((nquad)=>{ + if (nquad.startsWith(`<${constants.DID_PREFIX}:`)) + metadata.push(nquad); + else + data.push(nquad); + + if (!nquad.includes('hasRootHash') && !nquad.includes('hasBlockchain') && !nquad.includes('hasTransactionHash')) + nquads.push(nquad); + }); + const jsonld = await this.extractMetadata(metadata); + jsonld.data = data; + return {jsonld, nquads}; } - verifyAssertion(assertion, rdf) { + verifyAssertion(assertion, rdf, options = undefined) { return new Promise(async (resolve) => { try { - const array = rdf.join('\n').match(//gm) - if (array.find(x => !x.includes(``))) { - this.logger.error({ - msg: 'Invalid assertion in named graph', - Event_name: constants.ERROR_TYPE.VERIFY_ASSERTION_ERROR, - Event_value1: 'Invalid assertion in named graph', - }); - resolve(false); - } - // let dataHash; // if (assertion.metadata.visibility) { // const framedData = await this.fromRDF(assertion.data, assertion.metadata.type); @@ -133,7 +144,7 @@ class DataService { // } else { // dataHash = assertion.metadata.dataHash; // } - const { dataHash } = assertion.metadata; + const {dataHash} = assertion.metadata; const metadataHash = this.validationService.calculateHash(assertion.metadata); const calculatedAssertionId = this.validationService.calculateHash(metadataHash + dataHash); @@ -156,157 +167,100 @@ class DataService { } if (assertion.metadata.visibility) { - const calculateRootHash = this.validationService.calculateRootHash([...new Set(rdf)]); - if (assertion.rootHash !== calculateRootHash) { - this.logger.error({ - msg: `Root hash ${assertion.rootHash} doesn't match with calculated ${calculateRootHash}`, - Event_name: constants.ERROR_TYPE.VERIFY_ASSERTION_ERROR, - Event_value1: 'Root hash not matching calculated', - }); - return resolve(false); - } - } - return resolve(true); - } catch (e) { - return resolve(false); - } - }); - } - - async searchByQuery(query, options, localQuery = false) { - try { - const assets = await this.implementation.searchByQuery(query, options, localQuery); - if (!assets) return null; - - const result = []; - for (const asset of assets) { - const assertions = asset.assertions.value.split(',').filter((x) => x !== ''); - for (let assertionId of assertions) { - assertionId = assertionId.replace('did:dkg:', ''); - - const rawRdf = await this.resolve(assertionId, localQuery); - if (!rawRdf) continue; - - if (localQuery) { - const {assertion, rdf} = await this.createAssertion(assertionId, rawRdf); - - let object = result.find((x) => x.type === assertion.metadata.type && x.id === asset.assetId.value); - if (!object) { - object = { - type: assertion.metadata.type, - id: asset.assetId.value, - timestamp: assertion.metadata.timestamp, - data: [], - issuers: [], - assertions: [], - nodes: [this.networkService.getPeerId()], - }; - result.push(object); - } - - if (object.issuers.indexOf(assertion.metadata.issuer) === -1) { - object.issuers.push(assertion.metadata.issuer); - } - - if (object.assertions.indexOf(assertion.id) === -1) { - object.assertions.push(assertion.id); - object.data.push({ - id: assertion.id, - timestamp: assertion.metadata.timestamp, - data: assertion.data, + if (assertion.metadata.UALs && (!options || (options && options.isAsset))){ + const {issuer, assertionId} = await this.blockchainService.getAssetProofs(assertion.metadata.UALs[0]); + if (assertionId !== assertion.id) { + this.logger.error({ + msg: `Assertion ${assertion.id} doesn't match with calculated ${assertionId}`, + Event_name: constants.ERROR_TYPE.VERIFY_ASSERTION_ERROR, + Event_value1: 'AssertionId not matching calculated', }); + return resolve(false); } - if (new Date(object.timestamp) < new Date(assertion.metadata.timestamp)) { - object.timestamp = assertion.metadata.timestamp; + if (issuer.toLowerCase() !== assertion.metadata.issuer.toLowerCase()) { + this.logger.error({ + msg: `Issuer ${issuer} doesn't match with received ${assertion.metadata.issuer}`, + Event_name: constants.ERROR_TYPE.VERIFY_ASSERTION_ERROR, + Event_value1: 'Issuer not matching', + }); + return resolve(false); } - } else { - let object = result.find((x) => x.assetId === asset.assetId.value); - if (!object) { - object = { - assetId: asset.assetId.value, - assertions: [], - }; - result.push(object); + } else{ + const calculateRootHash = this.validationService.calculateRootHash([...new Set(rdf)]); + const {rootHash, issuer} = await this.blockchainService.getAssertionProofs(assertion.id); + if (rootHash !== `0x${calculateRootHash}`) { + this.logger.error({ + msg: `Root hash ${rootHash} doesn't match with calculated 0x${calculateRootHash}`, + Event_name: constants.ERROR_TYPE.VERIFY_ASSERTION_ERROR, + Event_value1: 'Root hash not matching calculated', + }); + return resolve(false); } - if (!object.assertions.find((x) => x.id === assertionId)) { - object.assertions.push({ - id: assertionId, - node: this.networkService.getPeerId(), - rdf: rawRdf, + if (issuer.toLowerCase() !== assertion.metadata.issuer.toLowerCase()) { + this.logger.error({ + msg: `Issuer ${issuer} doesn't match with received ${assertion.metadata.issuer}`, + Event_name: constants.ERROR_TYPE.VERIFY_ASSERTION_ERROR, + Event_value1: 'Issuer not matching', }); + return resolve(false); } } } + return resolve(true); + } catch (e) { + return resolve(false); } - - return result; - } catch (e) { - this.handleUnavailableTripleStoreError(e); - } + }); } - async searchByIds(ids, options, localQuery = false) { + async searchByQuery(query, options, localQuery = false) { try { - const assets = await this.implementation.searchByIds(ids, options, localQuery); - if (!assets) return null; + const assertions = await this.implementation.findAssetsByKeyword(query, options, localQuery); + if (!assertions) return null; const result = []; - for (const asset of assets) { - const assertions = asset.assertions.value.split(',').filter((x) => x !== ''); - for (let assertionId of assertions) { - assertionId = assertionId.replace('did:dkg:', ''); - - const rawRdf = await this.resolve(assertionId, localQuery); - if (!rawRdf) continue; - - if (localQuery) { - const { assertion, rdf } = await this.createAssertion(assertionId, rawRdf); - - let object = result.find((x) => x.type === assertion.metadata.type && x.id === asset.assetId.value); - if (!object) { - object = { - type: assertion.metadata.type, - id: asset.assetId.value, - timestamp: assertion.metadata.timestamp, - data: [], - issuers: [], - assertions: [], - nodes: [this.networkService.getPeerId()], - }; - result.push(object); - } + for (let assertion of assertions) { + const assertionId = assertion.assertionId = assertion.assertionId.value.replace(`${constants.DID_PREFIX}:`, ''); + + assertion = await this.resolve(assertion.assertionId, localQuery, true); + if (!assertion) continue; + + + if (localQuery) { + assertion = await this.createAssertion(assertion.nquads); + + let object = result.find((x) => x.type === assertion.jsonld.metadata.type && x.id === assertion.jsonld.metadata.UALs[0]); + if (!object) { + object = { + id: assertion.jsonld.metadata.UALs[0], + type: assertion.jsonld.metadata.type, + timestamp: assertion.jsonld.metadata.timestamp, + issuers: [], + assertions: [], + nodes: [this.networkService.getPeerId()], + }; + result.push(object); + } - if (object.issuers.indexOf(assertion.metadata.issuer) === -1) { - object.issuers.push(assertion.metadata.issuer); - } + if (object.issuers.indexOf(assertion.jsonld.metadata.issuer) === -1) { + object.issuers.push(assertion.jsonld.metadata.issuer); + } - if (object.assertions.indexOf(assertion.id) === -1) { - object.assertions.push(assertion.id); - object.data.push({ - id: assertion.id, - timestamp: assertion.metadata.timestamp, - data: assertion.data, - }); - } - if (new Date(object.timestamp) < new Date(assertion.metadata.timestamp)) { - object.timestamp = assertion.metadata.timestamp; - } - } else { - let object = result.find((x) => x.assetId === asset.assetId.value); - if (!object) { - object = { - assetId: asset.assetId.value, - assertions: [], - }; - result.push(object); - } - if (!object.assertions.find((x) => x.id === assertionId)) { - object.assertions.push({ - id: assertionId, - node: this.networkService.getPeerId(), - rdf: rawRdf, - }); - } + if (object.assertions.indexOf(assertion.jsonld.id) === -1) { + object.assertions.push(assertion.jsonld.id); + } + if (new Date(object.timestamp) < new Date(assertion.jsonld.metadata.timestamp)) { + object.timestamp = assertion.jsonld.metadata.timestamp; + } + } else { + let object = result.find((x) => x.id === assertionId); + if (!object) { + object = { + assertionId, + node: this.networkService.getPeerId(), + nquads: assertion.nquads, + }; + result.push(object); } } } @@ -319,41 +273,37 @@ class DataService { async searchAssertions(query, options, localQuery = false) { try { - const assets = await this.implementation.searchByQuery(query, options, localQuery); - if (!assets) return null; + const assertions = await this.implementation.findAssertionsByKeyword(query, options, localQuery); + if (!assertions) return null; const result = []; - for (const asset of assets) { - const assertions = asset.assertions.value.split(',').filter((x) => x !== ''); - for (let assertionId of assertions) { - assertionId = assertionId.replace('did:dkg:', ''); - - const rawRdf = await this.resolve(assertionId, localQuery); - if (!rawRdf) continue; - - if (localQuery) { - const {assertion, rdf} = await this.createAssertion(assertionId, rawRdf); - let object = result.find((x) => x.id === assertion.id); - if (!object) { - object = { - id: assertion.id, - metadata: assertion.metadata, - signature: assertion.signature, - rootHash: assertion.rootHash, - nodes: [this.networkService.getPeerId()], - }; - result.push(object); - } - } else { - let object = result.find((x) => x.id === assertionId); - if (!object) { - object = { - assertionId, - node: this.networkService.getPeerId(), - rdf: rawRdf, - }; - result.push(object); - } + for (let assertion of assertions) { + const assertionId = assertion.assertionId = assertion.assertionId.value.replace(`${constants.DID_PREFIX}:`, ''); + + assertion = await this.resolve(assertion.assertionId, localQuery, true); + if (!assertion) continue; + + if (localQuery) { + assertion = await this.createAssertion(assertion.nquads); + let object = result.find((x) => x.id === assertion.id); + if (!object) { + object = { + id: assertion.jsonld.id, + metadata: assertion.jsonld.metadata, + signature: assertion.jsonld.signature, + nodes: [this.networkService.getPeerId()], + }; + result.push(object); + } + } else { + let object = result.find((x) => x.id === assertionId); + if (!object) { + object = { + assertionId, + node: this.networkService.getPeerId(), + nquads: assertion.nquads, + }; + result.push(object); } } } @@ -389,23 +339,23 @@ class DataService { }); try { switch (type) { - // case 'SELECT': - // result = this.implementation.execute(query); - // break; - case 'CONSTRUCT': - result = await this.implementation.construct(query); - result = result.toString(); - if (result) { - result = result.split('\n').filter((x) => x !== ''); - } else { - result = []; - } - break; - // case 'ASK': - // result = this.implementation.ask(query); - // break; - default: - throw Error('Query type not supported'); + // case 'SELECT': + // result = this.implementation.execute(query); + // break; + case 'CONSTRUCT': + result = await this.implementation.construct(query); + result = result.toString(); + if (result) { + result = result.split('\n').filter((x) => x !== ''); + } else { + result = []; + } + break; + // case 'ASK': + // result = this.implementation.ask(query); + // break; + default: + throw Error('Query type not supported'); } return result; } catch (e) { @@ -420,7 +370,7 @@ class DataService { } } - async fromRDF(rdf, type) { + async fromNQuads(nquads, type) { const Id_operation = uuidv1(); this.logger.emit({ msg: 'Started measuring execution of fromRDF command', @@ -428,63 +378,52 @@ class DataService { Operation_name: 'fromrdf', Id_operation, }); - let context; let + let context; + let frame; switch (type) { - case this.constants.GS1EPCIS: - context = { - '@context': [ - 'https://gs1.github.io/EPCIS/epcis-context.jsonld', - { - example: 'http://ns.example.com/epcis/', - }, - ], - }; - - frame = { - '@context': [ - 'https://gs1.github.io/EPCIS/epcis-context.jsonld', - { - example: 'http://ns.example.com/epcis/', - }, - ], - isA: 'EPCISDocument', - }; - break; - default: - context = { - '@context': ['https://www.schema.org/'], - }; + case this.constants.GS1EPCIS: + context = { + '@context': [ + 'https://gs1.github.io/EPCIS/epcis-context.jsonld', + { + example: 'http://ns.example.com/epcis/', + }, + ], + }; + + frame = { + '@context': [ + 'https://gs1.github.io/EPCIS/epcis-context.jsonld', + { + example: 'http://ns.example.com/epcis/', + }, + ], + isA: 'EPCISDocument', + }; + break; + case this.constants.NFT: + const result = await axios.get(`https://raw.githubusercontent.com/OriginTrail/ot-node/v6/develop/frameDocuments/${this.constants.NFT}.json`); + context = result.data.context; + frame = result.data.frame; + break; + default: + context = { + '@context': ['https://www.schema.org/'], + }; - frame = {}; + frame = {}; } + const json = await this.workerPool.exec('fromNQuads', [nquads, context, frame]) - const data = await this.implementation.fromRDF(rdf, context, frame); this.logger.emit({ msg: 'Finished measuring execution of fromRDF command', Event_name: 'fromrdf_end', Operation_name: 'fromrdf', Id_operation, }); - return data; - // return sort(data).asc(); - } - - async frameAsset(data, type, framingCriteria) { - data.sort((a, b) => new Date(a.timestamp).getTime() - new Date(b.timestamp).getTime()); - let latest = data[0].data; - for (let i = 1; i < data.length; i += 1) { - const next = data[i].data; - - for (const row of latest) { - if (!next.find((x) => x.includes(row.split(' ')[1]))) next.push(row); - } - - latest = next; - } - const jsonld = await this.fromRDF(latest, type); - return jsonld; + return json; } healthCheck() { @@ -495,28 +434,131 @@ class DataService { return this.implementation.restartService(); } - async appendMetadata(rdf, assertion) { - const metadata = await this.implementation.createMetadata(assertion); - rdf = rdf.concat(metadata); - return rdf; + async appendMetadata(nquads, assertion) { + const metadata = await this.createMetadata(assertion); + nquads = nquads.concat(metadata); + return nquads; } - async appendBlockchainMetadata(rdf, assertion) { - const metadata = await this.implementation.createBlockchainMetadata(assertion); - rdf = rdf.concat(metadata); - return rdf; + async createMetadata(assertion) { + const metadata = { + '@context': 'https://www.schema.org/', + '@id': `${constants.DID_PREFIX}:${assertion.id}`, + hasType: assertion.metadata.type, + hasSignature: assertion.signature, + hasIssuer: assertion.metadata.issuer, + hasTimestamp: assertion.metadata.timestamp, + hasVisibility: assertion.metadata.visibility, + hasDataHash: assertion.metadata.dataHash, + hasKeywords: assertion.metadata.keywords, + }; + + if (assertion.metadata.UALs) + metadata.hasUALs = assertion.metadata.UALs; + + const result = await this.workerPool.exec('toNQuads', [metadata]); + return result; } - async appendConnections(rdf, options) { - const connections = await this.implementation.createConnections(options); - rdf = rdf.concat(connections); - return rdf; + async appendBlockchainMetadata(nquads, assertion) { + const blockchainMetadata = await this.workerPool.exec('toNQuads', [{ + '@context': 'https://www.schema.org/', + '@id': `${constants.DID_PREFIX}:${assertion.id}`, + hasBlockchain: assertion.blockchain.name, + hasTransactionHash: assertion.blockchain.transactionHash, + }]); + nquads = nquads.concat(blockchainMetadata); + return nquads; + } + + async extractMetadata(rdf) { + return new Promise(async (accept, reject) => { + const parser = new N3.Parser({ format: 'N-Triples', baseIRI: 'http://schema.org/' }); + const result = { + metadata: { + keywords: [], + UALs: [], + }, + blockchain: {}, + }; + + const quads = []; + await parser.parse( + rdf.join('\n'), + (error, quad, prefixes) => { + if (error) { + reject(error); + } + if (quad) { + quads.push(quad); + } + }, + ); + + + for (const quad of quads) { + try { + switch (quad._predicate.id) { + case 'http://schema.org/hasType': + result.metadata.type = JSON.parse(quad._object.id); + result.id = quad._subject.id.replace(`${constants.DID_PREFIX}:`, ''); + break; + case 'http://schema.org/hasTimestamp': + result.metadata.timestamp = JSON.parse(quad._object.id); + break; + case 'http://schema.org/hasUALs': + result.metadata.UALs.push(JSON.parse(quad._object.id)); + break; + case 'http://schema.org/hasIssuer': + result.metadata.issuer = JSON.parse(quad._object.id); + break; + case 'http://schema.org/hasVisibility': + result.metadata.visibility = JSON.parse(quad._object.id); + break; + case 'http://schema.org/hasDataHash': + result.metadata.dataHash = JSON.parse(quad._object.id); + break; + case 'http://schema.org/hasKeywords': + result.metadata.keywords.push(JSON.parse(quad._object.id)); + break; + case 'http://schema.org/hasSignature': + result.signature = JSON.parse(quad._object.id); + break; + case 'http://schema.org/hasRootHash': + result.rootHash = JSON.parse(quad._object.id); + break; + case 'http://schema.org/hasBlockchain': + result.blockchain.name = JSON.parse(quad._object.id); + break; + case 'http://schema.org/hasTransactionHash': + result.blockchain.transactionHash = JSON.parse(quad._object.id); + break; + default: + break; + } + } catch (e) { + this.logger.error({ + msg: `Error in extracting metadata: ${e}. ${e.stack}`, + Event_name: constants.ERROR_TYPE.EXTRACT_METADATA_ERROR, + }); + } + } + + result.metadata.keywords.sort(); + if (!result.metadata.UALs.length) { + delete result.metadata.UALs; + } else { + result.metadata.UALs.sort(); + } + + accept(result); + }); } handleUnavailableTripleStoreError(e) { if (e.code === 'ECONNREFUSED') { this.logger.error({ - msg: `Triple Store (${this.implementation.getName()}) not available: ${e.message}. ${e.stack}`, + msg: `Triple Store (${this.getName()}) not available: ${e.message}. ${e.stack}`, Event_name: constants.ERROR_TYPE.TRIPLE_STORE_UNAVAILABLE_ERROR, Event_value1: e.message, }); diff --git a/modules/service/dependency-injection.js b/modules/service/dependency-injection.js index 466d20fd74..3737578744 100644 --- a/modules/service/dependency-injection.js +++ b/modules/service/dependency-injection.js @@ -6,7 +6,7 @@ class DependencyInjection { injectionMode: awilix.InjectionMode.PROXY, }); - container.loadModules(['modules/controller/**/*.js', 'modules/service/**/*.js', 'modules/command/**/*.js', 'modules/manager/**/*.js'], { + container.loadModules(['modules/controller/**/*.js', 'modules/service/**/*.js', 'modules/command/**/*.js', 'modules/manager/**/*.js', 'modules/worker/worker-pool.js'], { formatName: 'camelCase', resolverOptions: { lifetime: awilix.Lifetime.SINGLETON, diff --git a/modules/service/publish-service.js b/modules/service/publish-service.js index 8f761d9693..9057f737d7 100644 --- a/modules/service/publish-service.js +++ b/modules/service/publish-service.js @@ -1,3 +1,5 @@ +const constants = require('../constants') + class PublishService { constructor(ctx) { this.networkService = ctx.networkService; @@ -7,63 +9,60 @@ class PublishService { this.logger = ctx.logger; this.commandExecutor = ctx.commandExecutor; this.fileService = ctx.fileService; + this.workerPool = ctx.workerPool; } - async publish(fileContent, fileExtension, rawAssets, keywords, visibility, handlerId) { + async publish(fileContent, fileExtension, keywords, visibility, ual, handlerId) { let { assertion, - rdf, + nquads, } = await this.dataService.canonize(fileContent, fileExtension); assertion.metadata.issuer = this.validationService.getIssuer(); assertion.metadata.visibility = visibility; + assertion.metadata.keywords = keywords; + assertion.metadata.keywords.sort(); + let method = 'publish'; + if (ual === null) { + method = 'provision'; + ual = this.validationService.calculateHash(assertion.metadata.timestamp + assertion.metadata.type + assertion.metadata.issuer); + assertion.metadata.UALs = [ual]; + } else if (ual !== undefined) { + method = 'update'; + assertion.metadata.UALs = [ual]; + } + assertion.metadata.dataHash = this.validationService.calculateHash(assertion.data); assertion.metadataHash = this.validationService.calculateHash(assertion.metadata); assertion.id = this.validationService.calculateHash(assertion.metadataHash + assertion.metadata.dataHash); assertion.signature = this.validationService.sign(assertion.id); - keywords = [...new Set(keywords.concat(rawAssets))]; - - const assets = []; - for (const asset of rawAssets) { - assets.push(this.validationService.calculateHash(asset + assertion.metadata.type + assertion.metadata.issuer)); - } - - rdf = await this.dataService.appendMetadata(rdf, assertion); - assertion.rootHash = this.validationService.calculateRootHash(rdf); - rdf = await this.dataService.appendConnections(rdf, { - assertionId: assertion.id, - assets, - keywords, - rootHash: assertion.rootHash, - }); + nquads = await this.dataService.appendMetadata(nquads, assertion); + assertion.rootHash = this.validationService.calculateRootHash(nquads); - if (!assertion.metadata.visibility) { - rdf = rdf.filter((x) => x.startsWith(' x.type === assertion.metadata.type && x.id === asset.assetId) - if (!object) { - object = { - type: assertion.metadata.type, - id: asset.assetId, - timestamp: assertion.metadata.timestamp, - data: [], - issuers: [], - assertions: [], - nodes: [rawAssertion.node] - } - handlerData.push(object) - } - - - if (object.nodes.indexOf(rawAssertion.node) === -1) { - object.nodes.push(rawAssertion.node); - } - - if (object.issuers.indexOf(assertion.metadata.issuer) === -1) { - object.issuers.push(assertion.metadata.issuer); - } - - if (object.assertions.indexOf(assertion.id) === -1) { - object.assertions.push(assertion.id); - object.data.push({ - id: assertion.id, - timestamp: assertion.metadata.timestamp, - data: assertion.data - }); - } - if (new Date(object.timestamp) < new Date(assertion.metadata.timestamp)) { - object.timestamp = assertion.metadata.timestamp; - } + for (const assertion of response) { + if (!assertion || !assertion.nquads) continue; + + const { jsonld, nquads } = await this.dataService.createAssertion(assertion.nquads); + let object = handlerData.find(x => x.type === jsonld.metadata.type && x.id === jsonld.metadata.UALs[0]) + if (!object) { + object = { + type: jsonld.metadata.type, + id: jsonld.metadata.UALs[0], + timestamp: jsonld.metadata.timestamp, + issuers: [], + assertions: [], + nodes: [assertion.node] } + handlerData.push(object) + } + + if (object.nodes.indexOf(assertion.node) === -1) { + object.nodes.push(assertion.node); + } + + if (object.issuers.indexOf(jsonld.metadata.issuer) === -1) { + object.issuers.push(jsonld.metadata.issuer); + } + + if (object.assertions.indexOf(jsonld.id) === -1) { + object.assertions.push(jsonld.id); + } + if (new Date(object.timestamp) < new Date(jsonld.metadata.timestamp)) { + object.timestamp = jsonld.metadata.timestamp; } } + await this.fileService.writeContentsToFile( this.fileService.getHandlerIdCachePath(), handlerId, @@ -128,14 +115,14 @@ class QueryService { } async handleSearchAssertions(request) { - const {query, handlerId, load } = request; - let response = await this.dataService.searchAssertions(query, { }); - return { response, handlerId, load }; + const {query, options, handlerId} = request; + let response = await this.dataService.searchAssertions(query, options); + return {response, handlerId}; } async handleSearchAssertionsResult(request) { // TODO: add mutex - const { handlerId, response, load } = request; + const {handlerId, response} = request; const documentPath = this.fileService.getHandlerIdDocumentPath(handlerId); const handlerData = await this.fileService.loadJsonFromFile(documentPath); @@ -146,29 +133,21 @@ class QueryService { if (assertion.nodes.indexOf(object.node) === -1) assertion.nodes = [...new Set(assertion.nodes.concat(object.node))] } else { - if (!object || !object.rdf) + if (!object || !object.nquads) continue - const {assertion, rdf} = await this.dataService.createAssertion(object.assertionId, object.rdf); - const status = await this.dataService.verifyAssertion(assertion, rdf); - //todo check root hash on the blockchain - if (status) { - handlerData.push({ - id: assertion.id, - metadata: assertion.metadata, - signature: assertion.signature, - rootHash: assertion.rootHash, - nodes: [object.node] - }) - - if (load) { - await this.dataService.insert(object.rdf, `did:dkg:${object.assertionId}`); - this.logger.info(`Assertion ${object.assertionId} is successfully inserted`); - } - } + const assertion = await this.dataService.createAssertion(object.nquads); + + handlerData.push({ + id: assertion.jsonld.id, + metadata: assertion.jsonld.metadata, + signature: assertion.jsonld.signature, + nodes: [object.node] + }) } } + await this.fileService.writeContentsToFile( this.fileService.getHandlerIdCachePath(), handlerId, diff --git a/modules/Utilities.js b/modules/utilities.js similarity index 64% rename from modules/Utilities.js rename to modules/utilities.js index 7e1983f429..3b8e327540 100644 --- a/modules/Utilities.js +++ b/modules/utilities.js @@ -23,6 +23,20 @@ exports.createPutRecord = (key, value) => { return rec.serialize(); }; + + +exports.isArrayOfStrings = (arr) => { + try { + const bodyAssets = JSON.parse(arr.toLowerCase()); + if (!(Array.isArray(bodyAssets)) | !(bodyAssets.length > 0) | !bodyAssets.every(i => (typeof i === "string")) | bodyAssets[0] === "") { + return false; + } + } catch (e) { + return false; + } + return true; +} + class Utilities { } diff --git a/modules/worker/l1-worker.js b/modules/worker/l1-worker.js new file mode 100644 index 0000000000..c45e8050e2 --- /dev/null +++ b/modules/worker/l1-worker.js @@ -0,0 +1,41 @@ +const workerpool = require('workerpool'); +const jsonld = require("jsonld"); + +function JSONParse(args) { + return JSON.parse(args); +} + +function JSONStringify(args) { + return JSON.stringify(args); +} + +async function toNQuads(json) { + let canonized = await jsonld.canonize(json, { + algorithm: 'URDNA2015', + format: 'application/n-quads', + }); + + return canonized.split('\n').filter((x) => x !== ''); +} + +function fromNQuads(nquads, context, frame) { + return new Promise((accept, reject) => { + jsonld.fromRDF(nquads.join('\n'), { + algorithm: 'URDNA2015', + format: 'application/n-quads', + }).then(json => + jsonld.frame(json, frame) + ).then((json) => + jsonld.compact(json, context) + ).then(result => { + accept(result); + }).catch(err => reject(err)) + }); +} + +workerpool.worker({ + JSONParse: JSONParse, + JSONStringify: JSONStringify, + toNQuads: toNQuads, + fromNQuads: fromNQuads +}); \ No newline at end of file diff --git a/modules/worker/worker-pool.js b/modules/worker/worker-pool.js new file mode 100644 index 0000000000..682feead81 --- /dev/null +++ b/modules/worker/worker-pool.js @@ -0,0 +1,29 @@ +const workerpool = require("workerpool"); +const jsonld = require("jsonld"); + + +class WorkerPool { + constructor() { + //TODO minWorkers and maxWorkers to be determined automatically by number of logical cores + //TODO is it necessary to terminate the pool? + this.pool = workerpool.pool(__dirname + '/l1-worker.js',{minWorkers: 2, maxWorkers: 4}); + } + + offload(fn, args) { + return new Promise((accept, reject) => { + this.pool.exec(fn, args) + .then(function (result) { + accept(result); + }) + .catch(function (err) { + reject(err); + }); + }) + } + + exec(name, args) { + return this.pool.exec(name, args) + } +} + +module.exports = WorkerPool; \ No newline at end of file diff --git a/ot-node.js b/ot-node.js index a2e626b8ee..2b431546b8 100644 --- a/ot-node.js +++ b/ot-node.js @@ -102,7 +102,7 @@ class OTNode { async initializeDataModule() { try { const dataService = this.container.resolve('dataService'); - dataService.initialize(); + await dataService.initialize(); this.logger.info(`Data module: ${dataService.getName()} implementation`); db.sequelize.sync(); } catch (e) { @@ -185,8 +185,9 @@ class OTNode { async initializeTelemetryHubModule() { try { const telemetryHubModuleManager = this.container.resolve('telemetryHubModuleManager'); - telemetryHubModuleManager.initialize(this.config.telemetryHub, this.logger); - this.logger.info(`Telemetry hub module initialized successfully, using ${telemetryHubModuleManager.config.telemetryHub.packages} package(s)`); + if (telemetryHubModuleManager.initialize(this.config.telemetryHub, this.logger)) { + this.logger.info(`Telemetry hub module initialized successfully, using ${telemetryHubModuleManager.config.telemetryHub.packages} package(s)`); + } } catch (e) { this.logger.error(`Telemetry hub module initialization failed. Error message: ${e.message}`); } diff --git a/package-lock.json b/package-lock.json index 38ec76f571..cc6bf7c665 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "origintrail_node", - "version": "6.0.0-beta.1.19", + "version": "6.0.0-beta.1.23", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1142,14 +1142,6 @@ "uri-js": "^4.2.2" } }, - "ansi-align": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", - "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", - "requires": { - "string-width": "^4.1.0" - } - }, "ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -1183,15 +1175,6 @@ "native-abort-controller": "^1.0.3" } }, - "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, "app-root-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-3.0.0.tgz", @@ -1338,9 +1321,9 @@ "dev": true }, "async": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.1.tgz", - "integrity": "sha512-XdD5lRO/87udXCMC9meWdYiR+Nq6ZjUfXidViUZGu2F1MO4T3XwZ1et0hb2++BgLfhyJwy44BGB/yx80ABx8hg==" + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.3.tgz", + "integrity": "sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g==" }, "async-limiter": { "version": "1.0.1", @@ -1470,11 +1453,6 @@ "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==" }, - "binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" - }, "bindings": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", @@ -1558,59 +1536,6 @@ } } }, - "boxen": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", - "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", - "requires": { - "ansi-align": "^3.0.0", - "camelcase": "^6.2.0", - "chalk": "^4.1.0", - "cli-boxes": "^2.2.1", - "string-width": "^4.2.2", - "type-fest": "^0.20.2", - "widest-line": "^3.1.0", - "wrap-ansi": "^7.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "camelcase": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.1.tgz", - "integrity": "sha512-tVI4q5jjFV5CavAU8DXfza/TJcZutVKo/5Foskmsqcm0MsL91moHvwiGNnqaa2o6PF/7yT5ikDRcVcl8Rj6LCA==" - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - } - } - }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1620,14 +1545,6 @@ "concat-map": "0.0.1" } }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "requires": { - "fill-range": "^7.0.1" - } - }, "brolog": { "version": "1.12.4", "resolved": "https://registry.npmjs.org/brolog/-/brolog-1.12.4.tgz", @@ -1882,6 +1799,7 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -1891,6 +1809,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, "requires": { "color-convert": "^2.0.1" } @@ -1899,6 +1818,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, "requires": { "color-name": "~1.1.4" } @@ -1906,17 +1826,20 @@ "color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, "requires": { "has-flag": "^4.0.0" } @@ -1931,31 +1854,11 @@ "rotating-file-stream": "^1.4.2" } }, - "chokidar": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", - "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", - "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "fsevents": "~2.3.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - } - }, "chownr": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" }, - "ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==" - }, "cids": { "version": "0.7.5", "resolved": "https://registry.npmjs.org/cids/-/cids-0.7.5.tgz", @@ -2018,11 +1921,6 @@ "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==" }, - "cli-boxes": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", - "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==" - }, "cli-color": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.1.tgz", @@ -2115,19 +2013,6 @@ "proto-list": "~1.2.1" } }, - "configstore": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", - "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", - "requires": { - "dot-prop": "^5.2.0", - "graceful-fs": "^4.1.2", - "make-dir": "^3.0.0", - "unique-string": "^2.0.0", - "write-file-atomic": "^3.0.0", - "xdg-basedir": "^4.0.0" - } - }, "confusing-browser-globals": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz", @@ -2245,17 +2130,20 @@ } }, "cross-fetch": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.4.tgz", - "integrity": "sha512-1eAtFWdIubi6T4XPy6ei9iUFoKpUkIF971QLN8lIvvvwueI65+Nw5haMNKUwfJxabqlIIDODJKGrQ66gxC0PbQ==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", + "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", "requires": { - "node-fetch": "2.6.1" + "node-fetch": "2.6.7" }, "dependencies": { "node-fetch": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", - "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "requires": { + "whatwg-url": "^5.0.0" + } } } }, @@ -2292,11 +2180,6 @@ "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz", "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==" }, - "crypto-random-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", - "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==" - }, "d": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", @@ -2475,14 +2358,6 @@ "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==" }, - "dot-prop": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", - "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", - "requires": { - "is-obj": "^2.0.0" - } - }, "dotenv": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", @@ -2704,9 +2579,9 @@ } }, "es6-promisify": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-6.1.1.tgz", - "integrity": "sha512-HBL8I3mIki5C1Cc9QjKUenHtnG0A5/xA8Q/AllRcfiwl2CZFXGK7ddBiCoRwAix4i2KxcQfjtIVcrVbB3vbmwg==" + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-7.0.0.tgz", + "integrity": "sha512-ginqzK3J90Rd4/Yz7qRrqUeIpe3TwSXTPPZtPne7tGBPeAaQiU8qt4fpKApnxHcq1AwtUdHVg5P77x/yrggG8Q==" }, "es6-symbol": { "version": "3.1.3", @@ -2734,11 +2609,6 @@ "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true }, - "escape-goat": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", - "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==" - }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -3447,14 +3317,6 @@ "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "requires": { - "to-regex-range": "^5.0.1" - } - }, "finalhandler": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", @@ -3588,12 +3450,6 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "optional": true - }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -3678,6 +3534,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, "requires": { "is-glob": "^4.0.1" } @@ -3691,21 +3548,6 @@ "process": "^0.11.10" } }, - "global-dirs": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", - "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", - "requires": { - "ini": "2.0.0" - }, - "dependencies": { - "ini": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", - "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==" - } - } - }, "globals": { "version": "13.11.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.11.0.tgz", @@ -3865,11 +3707,6 @@ "has-symbols": "^1.0.2" } }, - "has-yarn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", - "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==" - }, "hash-base": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", @@ -4005,11 +3842,6 @@ "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true }, - "ignore-by-default": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", - "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=" - }, "import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", @@ -4020,15 +3852,11 @@ "resolve-from": "^4.0.0" } }, - "import-lazy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", - "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=" - }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true }, "indent-string": { "version": "4.0.0", @@ -4177,14 +4005,6 @@ "has-bigints": "^1.0.1" } }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "requires": { - "binary-extensions": "^2.0.0" - } - }, "is-boolean-object": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", @@ -4204,14 +4024,6 @@ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==" }, - "is-ci": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", - "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", - "requires": { - "ci-info": "^2.0.0" - } - }, "is-core-module": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.6.0.tgz", @@ -4236,7 +4048,8 @@ "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true }, "is-fullwidth-code-point": { "version": "3.0.0", @@ -4260,6 +4073,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, "requires": { "is-extglob": "^2.1.1" } @@ -4269,15 +4083,6 @@ "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=" }, - "is-installed-globally": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", - "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", - "requires": { - "global-dirs": "^3.0.0", - "is-path-inside": "^3.0.2" - } - }, "is-ip": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/is-ip/-/is-ip-3.1.0.tgz", @@ -4296,16 +4101,6 @@ "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==" }, - "is-npm": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz", - "integrity": "sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==" - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" - }, "is-number-object": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", @@ -4314,21 +4109,11 @@ "has-tostringtag": "^1.0.0" } }, - "is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==" - }, "is-object": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==" }, - "is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==" - }, "is-plain-obj": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", @@ -4396,11 +4181,6 @@ "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" }, - "is-yarn-global": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", - "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==" - }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -4506,14 +4286,14 @@ } }, "it-map": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/it-map/-/it-map-1.0.5.tgz", - "integrity": "sha512-EElupuWhHVStUgUY+OfTJIS2MZed96lDrAXzJUuqiiqLnIKoBRqtX1ZG2oR0bGDsSppmz83MtzCeKLZ9TVAUxQ==" + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/it-map/-/it-map-1.0.6.tgz", + "integrity": "sha512-XT4/RM6UHIFG9IobGlQPFQUrlEKkU4eBUFG3qhWhfAdh1JfF2x11ShCrKCdmZ0OiZppPfoLuzcfA4cey6q3UAQ==" }, "it-merge": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/it-merge/-/it-merge-1.0.3.tgz", - "integrity": "sha512-FTIcv8VGOkSnq5WGoepN+ag/DVdSVZk7pALuduxyGlErH7uzcvZD3IXHXY47ViptHQFbga2rU9SPlFmC7ttRBA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/it-merge/-/it-merge-1.0.4.tgz", + "integrity": "sha512-DcL6GksTD2HQ7+5/q3JznXaLNfwjyG3/bObaF98da+oHfUiPmdo64oJlT9J8R8G5sJRU7thwaY5zxoAKCn7FJw==", "requires": { "it-pushable": "^1.4.0" } @@ -4845,14 +4625,6 @@ "language-subtag-registry": "~0.3.2" } }, - "latest-version": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", - "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", - "requires": { - "package-json": "^6.3.0" - } - }, "leven": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", @@ -4869,20 +4641,21 @@ } }, "libp2p": { - "version": "0.32.4", - "resolved": "https://registry.npmjs.org/libp2p/-/libp2p-0.32.4.tgz", - "integrity": "sha512-GSImpWJmjFqjXrv9sgJfwaWhMF+J07nNZJknobvgWXXki9W/1a5UsNVyw/1Z2licvsc+aUmCxDgV92lbUvTeSw==", + "version": "0.32.5", + "resolved": "https://registry.npmjs.org/libp2p/-/libp2p-0.32.5.tgz", + "integrity": "sha512-G21yQUdq4LaGDvjMi3ySmcx1cESl8ZsTG1BAfjzjx65DsZJKQ5GPZlamcv+Rwppk3OIplWoRnCu6gam/fI//bw==", "requires": { "@motrix/nat-api": "^0.3.1", "@vascosantos/moving-average": "^1.1.0", "abort-controller": "^3.0.0", + "abortable-iterator": "^3.0.0", "aggregate-error": "^3.1.0", "any-signal": "^2.1.1", "bignumber.js": "^9.0.1", "class-is": "^1.1.0", "debug": "^4.3.1", "err-code": "^3.0.0", - "es6-promisify": "^6.1.1", + "es6-promisify": "^7.0.0", "events": "^3.3.0", "hashlru": "^2.3.0", "interface-datastore": "^5.1.1", @@ -5186,21 +4959,6 @@ "multiaddr": "^10.0.0" } }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "requires": { - "semver": "^6.0.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" - } - } - }, "md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", @@ -5582,9 +5340,9 @@ "integrity": "sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18=" }, "nanoid": { - "version": "3.1.25", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.25.tgz", - "integrity": "sha512-rdwtIXaXCLFAQbnfqDRnI6jaRHp9fTcYBjtFKE8eezcZ7LuLjhUaQGNeMXf1HmRoCH32CLz6XwX0TtxEOS/A3Q==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.2.0.tgz", + "integrity": "sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==" }, "native-abort-controller": { "version": "1.0.3", @@ -5651,38 +5409,6 @@ "integrity": "sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw==", "dev": true }, - "nodemon": { - "version": "2.0.15", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.15.tgz", - "integrity": "sha512-gdHMNx47Gw7b3kWxJV64NI+Q5nfl0y5DgDbiVtShiwa7Z0IZ07Ll4RLFo6AjrhzMtoEZn5PDE3/c2AbVsiCkpA==", - "requires": { - "chokidar": "^3.5.2", - "debug": "^3.2.7", - "ignore-by-default": "^1.0.1", - "minimatch": "^3.0.4", - "pstree.remy": "^1.1.8", - "semver": "^5.7.1", - "supports-color": "^5.5.0", - "touch": "^3.1.0", - "undefsafe": "^2.0.5", - "update-notifier": "^5.1.0" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "requires": { - "ms": "^2.1.1" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - } - } - }, "nopt": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", @@ -5711,11 +5437,6 @@ } } }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" - }, "normalize-url": { "version": "4.5.1", "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", @@ -5862,9 +5583,9 @@ } }, "ot-telemetry-collector": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ot-telemetry-collector/-/ot-telemetry-collector-1.0.1.tgz", - "integrity": "sha512-EtEtixFzNGGODNi3zANoQGF1Tkh23MiSoR6Hi59kRCkh7MEhurcllXRRPg73TZwGq3yMbiCG4kcNHMynBrZQJg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ot-telemetry-collector/-/ot-telemetry-collector-1.0.3.tgz", + "integrity": "sha512-FGbqokUloapHOzZSEWp24l0aITwf2RXQuvQq9dLNbcmFu+MtX19nvcwenrL+qooZb0uXckQ2gKCfBT4Kaf9i9w==", "requires": { "axios": "^0.24.0", "form-data": "^4.0.0", @@ -6013,24 +5734,6 @@ "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", "dev": true }, - "package-json": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", - "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", - "requires": { - "got": "^9.6.0", - "registry-auth-token": "^4.0.0", - "registry-url": "^5.0.0", - "semver": "^6.2.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" - } - } - }, "pad-right": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/pad-right/-/pad-right-0.2.2.tgz", @@ -6163,11 +5866,6 @@ "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, - "picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==" - }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", @@ -6386,11 +6084,6 @@ "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" }, - "pstree.remy": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", - "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==" - }, "public-encrypt": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", @@ -6418,19 +6111,14 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, - "pupa": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", - "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", + "qs": { + "version": "6.10.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", + "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", "requires": { - "escape-goat": "^2.0.0" + "side-channel": "^1.0.4" } }, - "qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==" - }, "query-string": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", @@ -6600,14 +6288,6 @@ "util-deprecate": "^1.0.1" } }, - "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "requires": { - "picomatch": "^2.2.1" - } - }, "real-require": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/real-require/-/real-require-0.1.0.tgz", @@ -6664,22 +6344,6 @@ "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true }, - "registry-auth-token": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", - "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", - "requires": { - "rc": "^1.2.8" - } - }, - "registry-url": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", - "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", - "requires": { - "rc": "^1.2.8" - } - }, "relative-to-absolute-iri": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/relative-to-absolute-iri/-/relative-to-absolute-iri-1.0.6.tgz", @@ -6728,6 +6392,11 @@ "mime-types": "^2.1.12" } }, + "qs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==" + }, "uuid": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", @@ -6938,21 +6607,6 @@ "lru-cache": "^6.0.0" } }, - "semver-diff": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", - "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", - "requires": { - "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" - } - } - }, "send": { "version": "0.17.1", "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", @@ -7157,9 +6811,9 @@ "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==" }, "simple-get": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz", - "integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==", + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.2.tgz", + "integrity": "sha512-Ijd/rV5o+mSBBs4F/x9oDPtTx9Zb6X9brmnXvMW4J7IR15ngi9q5xxqWBKU744jTZiaXtxaPL7uHG6vtN8kUkw==", "requires": { "decompress-response": "^3.3.0", "once": "^1.3.1", @@ -7770,14 +7424,6 @@ "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==" }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "requires": { - "is-number": "^7.0.0" - } - }, "toidentifier": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", @@ -7788,24 +7434,6 @@ "resolved": "https://registry.npmjs.org/toposort-class/-/toposort-class-1.0.1.tgz", "integrity": "sha1-f/0feMi+KMO6Rc1OGj9e4ZO9mYg=" }, - "touch": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", - "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", - "requires": { - "nopt": "~1.0.10" - }, - "dependencies": { - "nopt": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", - "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", - "requires": { - "abbrev": "1" - } - } - } - }, "tough-cookie": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", @@ -7815,6 +7443,11 @@ "punycode": "^2.1.1" } }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + }, "truncate-utf8-bytes": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz", @@ -7870,7 +7503,8 @@ "type-fest": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==" + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true }, "type-is": { "version": "1.6.18", @@ -7921,24 +7555,11 @@ "which-boxed-primitive": "^1.0.2" } }, - "undefsafe": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", - "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==" - }, "underscore": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.1.tgz", "integrity": "sha512-hzSoAVtJF+3ZtiFX0VgfFPHEDRm7Y/QPjGyNo4TVdnDTdft3tr8hEkD25a1jC+TjTuE7tkHGKkhwCgs9dgBB2g==" }, - "unique-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", - "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", - "requires": { - "crypto-random-string": "^2.0.0" - } - }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -7954,27 +7575,6 @@ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" }, - "update-notifier": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", - "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", - "requires": { - "boxen": "^5.0.0", - "chalk": "^4.1.0", - "configstore": "^5.0.1", - "has-yarn": "^2.1.0", - "import-lazy": "^2.1.0", - "is-ci": "^2.0.0", - "is-installed-globally": "^0.4.0", - "is-npm": "^5.0.0", - "is-yarn-global": "^0.3.0", - "latest-version": "^5.1.0", - "pupa": "^2.1.1", - "semver": "^7.3.4", - "semver-diff": "^3.1.1", - "xdg-basedir": "^4.0.0" - } - }, "upper-case-first": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/upper-case-first/-/upper-case-first-2.0.2.tgz", @@ -8591,6 +8191,11 @@ "web3-net": "1.6.0" } }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + }, "websocket": { "version": "1.0.34", "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.34.tgz", @@ -8619,6 +8224,15 @@ } } }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "wherearewe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wherearewe/-/wherearewe-1.0.0.tgz", @@ -8665,14 +8279,6 @@ "is-typed-array": "^1.1.7" } }, - "widest-line": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", - "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", - "requires": { - "string-width": "^4.0.0" - } - }, "wkx": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/wkx/-/wkx-0.5.0.tgz", @@ -8687,6 +8293,11 @@ "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true }, + "workerpool": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", + "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==" + }, "wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", @@ -8725,17 +8336,6 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, - "write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", - "requires": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, "ws": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", @@ -8746,11 +8346,6 @@ "ultron": "~1.1.0" } }, - "xdg-basedir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", - "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==" - }, "xhr": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.6.0.tgz", @@ -8807,9 +8402,9 @@ "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==" }, "xsalsa20": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/xsalsa20/-/xsalsa20-1.1.0.tgz", - "integrity": "sha512-zd3ytX2cm+tcSndRU+krm0eL4TMMpZE7evs5hLRAoOy6gviqLfe3qOlkjF3i5SeAkQUCeJk0lJZrEU56kHRfWw==" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/xsalsa20/-/xsalsa20-1.2.0.tgz", + "integrity": "sha512-FIr/DEeoHfj7ftfylnoFt3rAIRoWXpx2AoDfrT2qD2wtp7Dp+COajvs/Icb7uHqRW9m60f5iXZwdsJJO3kvb7w==" }, "xtend": { "version": "4.0.2", diff --git a/package.json b/package.json index 2fb98df389..9cb74b004d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "origintrail_node", - "version": "6.0.0-beta.1.22", + "version": "6.0.0-beta.1.23", "description": "OTNode v6 Beta 1", "main": "index.js", "scripts": { @@ -75,13 +75,13 @@ "multiformats": "^9.4.7", "mysql2": "^2.3.3", "n3": "^1.12.2", - "nodemon": "^2.0.15", - "ot-telemetry-collector": "^1.0.2", + "ot-telemetry-collector": "^1.0.3", "p-iteration": "^1.1.8", "peer-id": "^0.15.3", "pino": "^7.5.1", "pino-multi-stream": "^6.0.0", "pino-pretty": "^7.2.0", + "qs": "^6.10.3", "rc": "^1.2.8", "semver": "^7.3.5", "sequelize": "^6.9.0", @@ -93,6 +93,7 @@ "uuid": "^8.3.2", "validator": "^13.7.0", "watchdog": "^0.8.17", - "web3": "^1.6.0" + "web3": "^1.6.0", + "workerpool": "^6.2.0" } } diff --git a/postman/DKGv6.postman_collection.json b/postman/DKGv6.postman_collection.json index dfeb62b6f8..0b358e7617 100644 --- a/postman/DKGv6.postman_collection.json +++ b/postman/DKGv6.postman_collection.json @@ -1,104 +1,228 @@ { "info": { - "_postman_id": "d88a8124-f950-4bb2-a9cf-f07512d63555", + "_postman_id": "de092a3d-311c-4c22-9fdb-1f1b777c8bbb", "name": "DKGv6", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ { - "name": "Info", - "protocolProfileBehavior": { - "disableBodyPruning": true - }, - "request": { - "method": "GET", - "header": [], - "body": { - "mode": "formdata", - "formdata": [] - }, - "url": { - "raw": "{{HOST}}/info", - "host": [ - "{{HOST}}" - ], - "path": [ - "info" - ] - } - }, - "response": [] - }, - { - "name": "Publish", - "request": { - "auth": { - "type": "noauth" + "name": "Asset API", + "item": [ + { + "name": "Provision", + "request": { + "auth": { + "type": "noauth" + }, + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "type": "file", + "src": "/Users/nikolatodorovic/v6/ot-node/demo-data/Feynman.json" + }, + { + "key": "keywords", + "value": "[\"Feynman\",\"Physics\", \"Scientist\"]", + "type": "text" + }, + { + "key": "visibility", + "value": "public", + "type": "text" + } + ] + }, + "url": { + "raw": "{{HOST}}:8900/provision", + "host": [ + "{{HOST}}" + ], + "port": "8900", + "path": [ + "provision" + ] + } + }, + "response": [] }, - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "file", - "type": "file", - "src": [] + { + "name": "Provision Result", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [], + "body": { + "mode": "formdata", + "formdata": [] }, - { - "key": "assets", - "value": "[\"ExampleAsset\"]", - "type": "text" + "url": { + "raw": "{{HOST}}:8900/provision/result/7f3c1fef-2588-45e6-b6f6-72f115da6553", + "host": [ + "{{HOST}}" + ], + "port": "8900", + "path": [ + "provision", + "result", + "7f3c1fef-2588-45e6-b6f6-72f115da6553" + ] + } + }, + "response": [] + }, + { + "name": "Update", + "request": { + "auth": { + "type": "noauth" }, - { - "key": "keywords", - "value": "[\"ExampleAsset\",\"NFT\"]", - "type": "text" + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "type": "file", + "src": "/Users/nikolatodorovic/v6/ot-node/demo-data/Feynman.json" + }, + { + "key": "keywords", + "value": "[\"Feynman\",\"Physics\", \"Scientist\"]", + "type": "text" + }, + { + "key": "visibility", + "value": "public", + "type": "text" + }, + { + "key": "ual", + "value": "c37c86b59ba64ab269850860621b634feaab9f500a73ef5620000b8b55dcb29a", + "type": "text" + } + ] }, - { - "key": "visibility", - "value": "true", - "type": "text" + "url": { + "raw": "{{HOST}}:8900/update", + "host": [ + "{{HOST}}" + ], + "port": "8900", + "path": [ + "update" + ] } - ] + }, + "response": [] }, - "url": { - "raw": "{{HOST}}/publish", - "host": [ - "{{HOST}}" - ], - "path": [ - "publish" - ] + { + "name": "Update Result", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [], + "body": { + "mode": "formdata", + "formdata": [] + }, + "url": { + "raw": "{{HOST}}:8900/update/result/36f9c131-130f-4d41-86e4-7cc6781bb51c", + "host": [ + "{{HOST}}" + ], + "port": "8900", + "path": [ + "update", + "result", + "36f9c131-130f-4d41-86e4-7cc6781bb51c" + ] + } + }, + "response": [] } - }, - "response": [] + ] }, { - "name": "Publish result", - "protocolProfileBehavior": { - "disableBodyPruning": true - }, - "request": { - "method": "GET", - "header": [], - "body": { - "mode": "formdata", - "formdata": [] + "name": "Low level API", + "item": [ + { + "name": "Publish", + "request": { + "auth": { + "type": "noauth" + }, + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "type": "file", + "src": "/Users/nikolatodorovic/v6/ot-node/demo-data/Galileo.json" + }, + { + "key": "keywords", + "value": "[\"Galileo\",\"Scientist\", \"Astronomer\"]", + "type": "text" + }, + { + "key": "visibility", + "value": "public", + "type": "text" + } + ] + }, + "url": { + "raw": "{{HOST}}:8900/publish", + "host": [ + "{{HOST}}" + ], + "port": "8900", + "path": [ + "publish" + ] + } + }, + "response": [] }, - "url": { - "raw": "{{HOST}}/publish/result/7478256a-36da-4450-adc3-db79cb2d95cc", - "host": [ - "{{HOST}}" - ], - "path": [ - "publish", - "result", - "7478256a-36da-4450-adc3-db79cb2d95cc" - ] + { + "name": "Publish Result", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [], + "body": { + "mode": "formdata", + "formdata": [] + }, + "url": { + "raw": "{{HOST}}:8900/publish/result/c6c3b9af-0f3c-4324-b5bf-0181d49baa04", + "host": [ + "{{HOST}}" + ], + "port": "8900", + "path": [ + "publish", + "result", + "c6c3b9af-0f3c-4324-b5bf-0181d49baa04" + ] + } + }, + "response": [] } - }, - "response": [] + ] }, { "name": "Resolve", @@ -113,17 +237,22 @@ "formdata": [] }, "url": { - "raw": "{{HOST}}/resolve?ids=da919440495228954b8d198ac2bffa121f41d1503c12124c3d764d5572e7ebfb", + "raw": "{{HOST}}:8900/resolve?ids=c37c86b59ba64ab269850860621b634feaab9f500a73ef5620000b8b55dcb29a&load=true", "host": [ "{{HOST}}" ], + "port": "8900", "path": [ "resolve" ], "query": [ { "key": "ids", - "value": "da919440495228954b8d198ac2bffa121f41d1503c12124c3d764d5572e7ebfb" + "value": "c37c86b59ba64ab269850860621b634feaab9f500a73ef5620000b8b55dcb29a" + }, + { + "key": "load", + "value": "true" } ] } @@ -131,7 +260,7 @@ "response": [] }, { - "name": "Resolve result", + "name": "Resolve Result", "protocolProfileBehavior": { "disableBodyPruning": true }, @@ -143,21 +272,22 @@ "formdata": [] }, "url": { - "raw": "{{HOST}}/resolve/result/bed771ec-e8a7-4ec3-9aa8-4df321062895", + "raw": "{{HOST}}:8900/resolve/result/22419c1a-d41d-4235-9849-e7e1a22edf4f", "host": [ "{{HOST}}" ], + "port": "8900", "path": [ "resolve", "result", - "bed771ec-e8a7-4ec3-9aa8-4df321062895" + "22419c1a-d41d-4235-9849-e7e1a22edf4f" ] } }, "response": [] }, { - "name": "Search Entities", + "name": "Assertions Search", "protocolProfileBehavior": { "disableBodyPruning": true }, @@ -188,35 +318,28 @@ ] }, "url": { - "raw": "{{HOST}}/entities:search?prefix=true&limit=20&query=exampleAsset", + "raw": "{{HOST}}:8900/assertions:search?query=scientist", "host": [ "{{HOST}}" ], + "port": "8900", "path": [ - "entities:search" + "assertions:search" ], "query": [ { - "key": "ids", - "value": "axie", - "disabled": true - }, - { - "key": "types", - "value": "gs1-epcis", - "disabled": true + "key": "query", + "value": "scientist" }, { "key": "prefix", - "value": "true" + "value": "true", + "disabled": true }, { "key": "limit", - "value": "20" - }, - { - "key": "query", - "value": "exampleAsset" + "value": "20", + "disabled": true } ] } @@ -224,7 +347,7 @@ "response": [] }, { - "name": "Search Entities Result", + "name": "Assertions Search Result", "protocolProfileBehavior": { "disableBodyPruning": true }, @@ -236,33 +359,22 @@ "formdata": [] }, "url": { - "raw": "{{HOST}}/entities:search/result/116cd013-62f9-4925-b6cc-e8dacea1e06c", + "raw": "{{HOST}}:8900/assertions:search/result/ccf90eba-4a45-4c47-81e0-1a2e1e679f70", "host": [ "{{HOST}}" ], + "port": "8900", "path": [ - "entities:search", + "assertions:search", "result", - "116cd013-62f9-4925-b6cc-e8dacea1e06c" - ], - "query": [ - { - "key": "ids", - "value": "axie", - "disabled": true - }, - { - "key": "types", - "value": "gs1-epcis", - "disabled": true - } + "ccf90eba-4a45-4c47-81e0-1a2e1e679f70" ] } }, "response": [] }, { - "name": "Search Assertions", + "name": "Search", "protocolProfileBehavior": { "disableBodyPruning": true }, @@ -293,17 +405,43 @@ ] }, "url": { - "raw": "{{HOST}}/assertions:search?query=exampleAsset", + "raw": "{{HOST}}:8900/entities:search?query=feynman", "host": [ "{{HOST}}" ], + "port": "8900", "path": [ - "assertions:search" + "entities:search" ], "query": [ + { + "key": "prefix", + "value": "true", + "disabled": true + }, + { + "key": "ids", + "value": "", + "disabled": true + }, + { + "key": "types", + "value": "gs1-epcis", + "disabled": true + }, + { + "key": "limit", + "value": "20", + "disabled": true + }, + { + "key": "issuers", + "value": null, + "disabled": true + }, { "key": "query", - "value": "exampleAsset" + "value": "feynman" } ] } @@ -311,7 +449,7 @@ "response": [] }, { - "name": "Search Assertions Result", + "name": "Search Result", "protocolProfileBehavior": { "disableBodyPruning": true }, @@ -320,36 +458,18 @@ "header": [], "body": { "mode": "formdata", - "formdata": [ - { - "key": "offset", - "value": "0", - "type": "text", - "disabled": true - } - ] + "formdata": [] }, "url": { - "raw": "{{HOST}}/assertions:search/result/39f8b937-5aba-42ad-929b-1fd39ca32122", + "raw": "{{HOST}}:8900/entities:search/result/b18a819d-d546-4bc2-95c1-242d78c094e7", "host": [ "{{HOST}}" ], + "port": "8900", "path": [ - "assertions:search", + "entities:search", "result", - "39f8b937-5aba-42ad-929b-1fd39ca32122" - ], - "query": [ - { - "key": "ids", - "value": "axie", - "disabled": true - }, - { - "key": "types", - "value": "gs1-epcis", - "disabled": true - } + "b18a819d-d546-4bc2-95c1-242d78c094e7" ] } }, @@ -365,16 +485,17 @@ "formdata": [ { "key": "query", - "value": "PREFIX schema: \n\nCONSTRUCT { ?s schema:hasRootHash ?o }\n\nWHERE {\n\nGRAPH ?g {\n\n?s schema:hasRootHash ?o .\n\n}\n\n}", + "value": "PREFIX schema: \nCONSTRUCT { ?s schema:name \"Richard Feynman\" }\nWHERE {\n GRAPH ?g { \n ?s schema:name \"Richard Feynman\" .\n }\n}", "type": "text" } ] }, "url": { - "raw": "{{HOST}}/query?type=construct", + "raw": "{{HOST}}:8900/query?type=construct", "host": [ "{{HOST}}" ], + "port": "8900", "path": [ "query" ], @@ -389,7 +510,7 @@ "response": [] }, { - "name": "Query result", + "name": "Query Result", "protocolProfileBehavior": { "disableBodyPruning": true }, @@ -401,14 +522,15 @@ "formdata": [] }, "url": { - "raw": "{{HOST}}/query/result/e14d68ee-be14-4c8d-9e38-5b0479dde03c", + "raw": "{{HOST}}:8900/query/result/d3480867-d5f7-4f10-9686-8c658c102dcf", "host": [ "{{HOST}}" ], + "port": "8900", "path": [ "query", "result", - "e14d68ee-be14-4c8d-9e38-5b0479dde03c" + "d3480867-d5f7-4f10-9686-8c658c102dcf" ] } }, @@ -424,31 +546,26 @@ "formdata": [ { "key": "nquads", - "value": "[\" \\\"4bf4a3428ef89d7ed3d35037a47c84c70f7b72281767a33f64263fb37e2cb624\\\" .\",\n \" \\\"94a87ed335c491a1332d58b69974ea94d0e28b3baa14a4f9d1505b8f36afa8ab\\\" .\",\n \" \\\"462cd1651821ac1786a5af58383e2b1ac91184f7cda46a083d3746d542f8bf67\\\" .\",\n \" \\\"7c167a73001faedb139103731e521b6cf76941221a0a1e1ffac9d2cb2c641902\\\" .\",\n \" \\\"270d0eac754ac95052c7f0d36476d4052acea0428617ea0f4f26f01dc659ba41\\\" .\"\n ]", + "value": "[ \"_:t1253 \\\"Richard Feynman\\\" .\"\n]", "type": "text" } ] }, "url": { - "raw": "{{HOST}}/proofs:get?assertions=da919440495228954b8d198ac2bffa121f41d1503c12124c3d764d5572e7ebfb", + "raw": "{{HOST}}:8900/proofs:get", "host": [ "{{HOST}}" ], + "port": "8900", "path": [ "proofs:get" - ], - "query": [ - { - "key": "assertions", - "value": "da919440495228954b8d198ac2bffa121f41d1503c12124c3d764d5572e7ebfb" - } ] } }, "response": [] }, { - "name": "Proofs result", + "name": "Proofs Result", "protocolProfileBehavior": { "disableBodyPruning": true }, @@ -460,14 +577,40 @@ "formdata": [] }, "url": { - "raw": "{{HOST}}/proofs:get/result/e145a028-5dea-4287-a65f-e1c2dda8c3f6", + "raw": "{{HOST}}:8900/proofs:get/result/72d7c0b3-a41e-4f90-91d5-082579f25b65", "host": [ "{{HOST}}" ], + "port": "8900", "path": [ "proofs:get", "result", - "e145a028-5dea-4287-a65f-e1c2dda8c3f6" + "72d7c0b3-a41e-4f90-91d5-082579f25b65" + ] + } + }, + "response": [] + }, + { + "name": "Info", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [], + "body": { + "mode": "formdata", + "formdata": [] + }, + "url": { + "raw": "{{HOST}}:8900/info", + "host": [ + "{{HOST}}" + ], + "port": "8900", + "path": [ + "info" ] } },