{
  "contractName": "AccountManager",
  "abi": [
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "name": "hedgeFundAccountRegistry",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "name": "marginAccountRegistry",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "accountId",
          "type": "uint256"
        }
      ],
      "name": "createNewAccount",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "accountId",
          "type": "uint256"
        },
        {
          "internalType": "address",
          "name": "accountAddress",
          "type": "address"
        }
      ],
      "name": "deleteAccount",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }
  ],
  "metadata": "{\"compiler\":{\"version\":\"0.8.11+commit.d7f03943\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"accountId\",\"type\":\"uint256\"}],\"name\":\"createNewAccount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"accountId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"accountAddress\",\"type\":\"address\"}],\"name\":\"deleteAccount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"hedgeFundAccountRegistry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"marginAccountRegistry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"createNewAccount(uint256)\":{\"notice\":\"Create new user account with type based on `accountId`\"},\"deleteAccount(uint256,address)\":{\"notice\":\"Delete an existing user account of `accountAddress`\"},\"marginAccountRegistry(address)\":{\"notice\":\"ACCOUNT REGISTRIES The registry variables is used to store users account information in mapping type - first address is for user address, e.g. msg.sender - second address is for account address (type: margin or hedge fund)\"}},\"notice\":\"THIS IS THE `AccountManager` contract Description: This contract will function as a manager + factory for the account contracts. Some of the main functionality for the `AccountManager` contract will be to: - Create a new user account - Delete an existing user account - Managing access control to protect user's account Currently there are two types of account: - Margin Account (accountId = 0) - Hedge Fund Account (accountId = 1)\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/account/AccountManager.sol\":\"AccountManager\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"project:/contracts/account/AccountManager.sol\":{\"keccak256\":\"0x3aba70c4ebb23e102a34b08c0bc6146bfc11ea575bc78ca03a38b9b18c32071c\",\"license\":\"AGPL-3.0\",\"urls\":[\"bzz-raw://88fdc2c9526f78c5ab7cb89b70e8acfb967de3e8ddf22e72248688be42f02425\",\"dweb:/ipfs/QmPAZWfpGJCSpt4sZtfhG5DyQWoUsP3Kr6Vznd9j8yZzG6\"]},\"project:/contracts/account/HedgeFundAccount.sol\":{\"keccak256\":\"0x6752ad6bd02dd20e9ec9b2cac8345d196c8ed87b41686352acb496706b1029c1\",\"license\":\"AGPL-3.0\",\"urls\":[\"bzz-raw://f8d18bb322ee8a54b281c6b79ff3831e66165586609b2a94edfe7a3323bbfc5b\",\"dweb:/ipfs/QmV1XjPDub8bG8erkYgBD6F9hYjtc5Dtidd2dpxrH81Fpa\"]},\"project:/contracts/account/MarginAccount.sol\":{\"keccak256\":\"0x010661f4b1de9bd01693bd6229e55c6c336fc6e69fe688cefb20b07b83109d67\",\"license\":\"AGPL-3.0\",\"urls\":[\"bzz-raw://a8e501f0531844960e3095c7800d121948cd4a084faf177d4a3e5793128fbcf4\",\"dweb:/ipfs/QmYcBWx3D5EEszAJcQpKhNiyARKBdpMEDpHx8HHR5picYm\"]}},\"version\":1}",
  "bytecode": "0x608060405234801561001057600080fd5b506105b8806100206000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806341596f081461005157806385a237a914610096578063a7a368fe146100ab578063c787c924146100be575b600080fd5b61007a61005f366004610463565b6000602081905290815260409020546001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b6100a96100a4366004610485565b6100e7565b005b6100a96100b936600461049e565b61027c565b61007a6100cc366004610463565b6001602052600090815260409020546001600160a01b031681565b8060006100f8565b60405180910390fd5b600061010483336103d3565b6001600160a01b03161461016a5760405162461bcd60e51b815260206004820152602760248201527f416e206578697374696e67206163636f756e7420666f756e6420666f722074686044820152666520757365722160c81b60648201526084016100ef565b826101cd57600060405161017d9061042f565b604051809103906000f080158015610199573d6000803e3d6000fd5b5033600090815260208190526040902080546001600160a01b0319166001600160a01b039290921691909117905550505050565b82600114156102345760006040516101e49061043b565b604051809103906000f080158015610200573d6000803e3d6000fd5b5033600090815260016020526040902080546001600160a01b0319166001600160a01b039290921691909117905550505050565b60405162461bcd60e51b815260206004820152601c60248201527f4e6f7420612076616c6964206163636f756e74496420676976656e210000000060448201526064016100ef565b816001600061028b83336103d3565b6001600160a01b031614156102f25760405162461bcd60e51b815260206004820152602760248201527f4e6f206578697374696e67206163636f756e7420666f756e6420666f722074686044820152666520757365722160c81b60648201526084016100ef565b8383806001600160a01b031661030883336103d3565b6001600160a01b03161461037d5760405162461bcd60e51b815260206004820152603660248201527f596f7520617265206e6f7420746865206163636f756e74206f776e6572206f666044820152752074686973206163636f756e7420616464726573732160501b60648201526084016100ef565b856103a45733600090815260208190526040902080546001600160a01b03191690556103cb565b85600114156103cb5733600090815260016020526040902080546001600160a01b03191690555b505050505050565b6000826103fb57506001600160a01b0380821660009081526020819052604090205416610429565b826001141561042557506001600160a01b0380821660009081526001602052604090205416610429565b5060005b92915050565b605c806104cb83390190565b605c8061052783390190565b80356001600160a01b038116811461045e57600080fd5b919050565b60006020828403121561047557600080fd5b61047e82610447565b9392505050565b60006020828403121561049757600080fd5b5035919050565b600080604083850312156104b157600080fd5b823591506104c160208401610447565b9050925092905056fe6080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea264697066735822122024691ad3b39668e7fe5d1eb35e84fb02a09a7f911004a85cb45bc27b61da4d2764736f6c634300080b00336080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea2646970667358221220b00f0803c7be2ee89cb3617f40a29fd6c5a43d088888963e3a8a9eaf7da8fbc764736f6c634300080b0033a2646970667358221220fa34ac00ad052cdca7212523055d79a7c688065065c064d1140659f70274b93f64736f6c634300080b0033",
  "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c806341596f081461005157806385a237a914610096578063a7a368fe146100ab578063c787c924146100be575b600080fd5b61007a61005f366004610463565b6000602081905290815260409020546001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b6100a96100a4366004610485565b6100e7565b005b6100a96100b936600461049e565b61027c565b61007a6100cc366004610463565b6001602052600090815260409020546001600160a01b031681565b8060006100f8565b60405180910390fd5b600061010483336103d3565b6001600160a01b03161461016a5760405162461bcd60e51b815260206004820152602760248201527f416e206578697374696e67206163636f756e7420666f756e6420666f722074686044820152666520757365722160c81b60648201526084016100ef565b826101cd57600060405161017d9061042f565b604051809103906000f080158015610199573d6000803e3d6000fd5b5033600090815260208190526040902080546001600160a01b0319166001600160a01b039290921691909117905550505050565b82600114156102345760006040516101e49061043b565b604051809103906000f080158015610200573d6000803e3d6000fd5b5033600090815260016020526040902080546001600160a01b0319166001600160a01b039290921691909117905550505050565b60405162461bcd60e51b815260206004820152601c60248201527f4e6f7420612076616c6964206163636f756e74496420676976656e210000000060448201526064016100ef565b816001600061028b83336103d3565b6001600160a01b031614156102f25760405162461bcd60e51b815260206004820152602760248201527f4e6f206578697374696e67206163636f756e7420666f756e6420666f722074686044820152666520757365722160c81b60648201526084016100ef565b8383806001600160a01b031661030883336103d3565b6001600160a01b03161461037d5760405162461bcd60e51b815260206004820152603660248201527f596f7520617265206e6f7420746865206163636f756e74206f776e6572206f666044820152752074686973206163636f756e7420616464726573732160501b60648201526084016100ef565b856103a45733600090815260208190526040902080546001600160a01b03191690556103cb565b85600114156103cb5733600090815260016020526040902080546001600160a01b03191690555b505050505050565b6000826103fb57506001600160a01b0380821660009081526020819052604090205416610429565b826001141561042557506001600160a01b0380821660009081526001602052604090205416610429565b5060005b92915050565b605c806104cb83390190565b605c8061052783390190565b80356001600160a01b038116811461045e57600080fd5b919050565b60006020828403121561047557600080fd5b61047e82610447565b9392505050565b60006020828403121561049757600080fd5b5035919050565b600080604083850312156104b157600080fd5b823591506104c160208401610447565b9050925092905056fe6080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea264697066735822122024691ad3b39668e7fe5d1eb35e84fb02a09a7f911004a85cb45bc27b61da4d2764736f6c634300080b00336080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea2646970667358221220b00f0803c7be2ee89cb3617f40a29fd6c5a43d088888963e3a8a9eaf7da8fbc764736f6c634300080b0033a2646970667358221220fa34ac00ad052cdca7212523055d79a7c688065065c064d1140659f70274b93f64736f6c634300080b0033",
  "immutableReferences": {},
  "generatedSources": [],
  "deployedGeneratedSources": [
    {
      "ast": {
        "nodeType": "YulBlock",
        "src": "0:2628:56",
        "statements": [
          {
            "nodeType": "YulBlock",
            "src": "6:3:56",
            "statements": []
          },
          {
            "body": {
              "nodeType": "YulBlock",
              "src": "63:124:56",
              "statements": [
                {
                  "nodeType": "YulAssignment",
                  "src": "73:29:56",
                  "value": {
                    "arguments": [
                      {
                        "name": "offset",
                        "nodeType": "YulIdentifier",
                        "src": "95:6:56"
                      }
                    ],
                    "functionName": {
                      "name": "calldataload",
                      "nodeType": "YulIdentifier",
                      "src": "82:12:56"
                    },
                    "nodeType": "YulFunctionCall",
                    "src": "82:20:56"
                  },
                  "variableNames": [
                    {
                      "name": "value",
                      "nodeType": "YulIdentifier",
                      "src": "73:5:56"
                    }
                  ]
                },
                {
                  "body": {
                    "nodeType": "YulBlock",
                    "src": "165:16:56",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "kind": "number",
                              "nodeType": "YulLiteral",
                              "src": "174:1:56",
                              "type": "",
                              "value": "0"
                            },
                            {
                              "kind": "number",
                              "nodeType": "YulLiteral",
                              "src": "177:1:56",
                              "type": "",
                              "value": "0"
                            }
                          ],
                          "functionName": {
                            "name": "revert",
                            "nodeType": "YulIdentifier",
                            "src": "167:6:56"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "167:12:56"
                        },
                        "nodeType": "YulExpressionStatement",
                        "src": "167:12:56"
                      }
                    ]
                  },
                  "condition": {
                    "arguments": [
                      {
                        "arguments": [
                          {
                            "name": "value",
                            "nodeType": "YulIdentifier",
                            "src": "124:5:56"
                          },
                          {
                            "arguments": [
                              {
                                "name": "value",
                                "nodeType": "YulIdentifier",
                                "src": "135:5:56"
                              },
                              {
                                "arguments": [
                                  {
                                    "arguments": [
                                      {
                                        "kind": "number",
                                        "nodeType": "YulLiteral",
                                        "src": "150:3:56",
                                        "type": "",
                                        "value": "160"
                                      },
                                      {
                                        "kind": "number",
                                        "nodeType": "YulLiteral",
                                        "src": "155:1:56",
                                        "type": "",
                                        "value": "1"
                                      }
                                    ],
                                    "functionName": {
                                      "name": "shl",
                                      "nodeType": "YulIdentifier",
                                      "src": "146:3:56"
                                    },
                                    "nodeType": "YulFunctionCall",
                                    "src": "146:11:56"
                                  },
                                  {
                                    "kind": "number",
                                    "nodeType": "YulLiteral",
                                    "src": "159:1:56",
                                    "type": "",
                                    "value": "1"
                                  }
                                ],
                                "functionName": {
                                  "name": "sub",
                                  "nodeType": "YulIdentifier",
                                  "src": "142:3:56"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "142:19:56"
                              }
                            ],
                            "functionName": {
                              "name": "and",
                              "nodeType": "YulIdentifier",
                              "src": "131:3:56"
                            },
                            "nodeType": "YulFunctionCall",
                            "src": "131:31:56"
                          }
                        ],
                        "functionName": {
                          "name": "eq",
                          "nodeType": "YulIdentifier",
                          "src": "121:2:56"
                        },
                        "nodeType": "YulFunctionCall",
                        "src": "121:42:56"
                      }
                    ],
                    "functionName": {
                      "name": "iszero",
                      "nodeType": "YulIdentifier",
                      "src": "114:6:56"
                    },
                    "nodeType": "YulFunctionCall",
                    "src": "114:50:56"
                  },
                  "nodeType": "YulIf",
                  "src": "111:70:56"
                }
              ]
            },
            "name": "abi_decode_address",
            "nodeType": "YulFunctionDefinition",
            "parameters": [
              {
                "name": "offset",
                "nodeType": "YulTypedName",
                "src": "42:6:56",
                "type": ""
              }
            ],
            "returnVariables": [
              {
                "name": "value",
                "nodeType": "YulTypedName",
                "src": "53:5:56",
                "type": ""
              }
            ],
            "src": "14:173:56"
          },
          {
            "body": {
              "nodeType": "YulBlock",
              "src": "262:116:56",
              "statements": [
                {
                  "body": {
                    "nodeType": "YulBlock",
                    "src": "308:16:56",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "kind": "number",
                              "nodeType": "YulLiteral",
                              "src": "317:1:56",
                              "type": "",
                              "value": "0"
                            },
                            {
                              "kind": "number",
                              "nodeType": "YulLiteral",
                              "src": "320:1:56",
                              "type": "",
                              "value": "0"
                            }
                          ],
                          "functionName": {
                            "name": "revert",
                            "nodeType": "YulIdentifier",
                            "src": "310:6:56"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "310:12:56"
                        },
                        "nodeType": "YulExpressionStatement",
                        "src": "310:12:56"
                      }
                    ]
                  },
                  "condition": {
                    "arguments": [
                      {
                        "arguments": [
                          {
                            "name": "dataEnd",
                            "nodeType": "YulIdentifier",
                            "src": "283:7:56"
                          },
                          {
                            "name": "headStart",
                            "nodeType": "YulIdentifier",
                            "src": "292:9:56"
                          }
                        ],
                        "functionName": {
                          "name": "sub",
                          "nodeType": "YulIdentifier",
                          "src": "279:3:56"
                        },
                        "nodeType": "YulFunctionCall",
                        "src": "279:23:56"
                      },
                      {
                        "kind": "number",
                        "nodeType": "YulLiteral",
                        "src": "304:2:56",
                        "type": "",
                        "value": "32"
                      }
                    ],
                    "functionName": {
                      "name": "slt",
                      "nodeType": "YulIdentifier",
                      "src": "275:3:56"
                    },
                    "nodeType": "YulFunctionCall",
                    "src": "275:32:56"
                  },
                  "nodeType": "YulIf",
                  "src": "272:52:56"
                },
                {
                  "nodeType": "YulAssignment",
                  "src": "333:39:56",
                  "value": {
                    "arguments": [
                      {
                        "name": "headStart",
                        "nodeType": "YulIdentifier",
                        "src": "362:9:56"
                      }
                    ],
                    "functionName": {
                      "name": "abi_decode_address",
                      "nodeType": "YulIdentifier",
                      "src": "343:18:56"
                    },
                    "nodeType": "YulFunctionCall",
                    "src": "343:29:56"
                  },
                  "variableNames": [
                    {
                      "name": "value0",
                      "nodeType": "YulIdentifier",
                      "src": "333:6:56"
                    }
                  ]
                }
              ]
            },
            "name": "abi_decode_tuple_t_address",
            "nodeType": "YulFunctionDefinition",
            "parameters": [
              {
                "name": "headStart",
                "nodeType": "YulTypedName",
                "src": "228:9:56",
                "type": ""
              },
              {
                "name": "dataEnd",
                "nodeType": "YulTypedName",
                "src": "239:7:56",
                "type": ""
              }
            ],
            "returnVariables": [
              {
                "name": "value0",
                "nodeType": "YulTypedName",
                "src": "251:6:56",
                "type": ""
              }
            ],
            "src": "192:186:56"
          },
          {
            "body": {
              "nodeType": "YulBlock",
              "src": "484:102:56",
              "statements": [
                {
                  "nodeType": "YulAssignment",
                  "src": "494:26:56",
                  "value": {
                    "arguments": [
                      {
                        "name": "headStart",
                        "nodeType": "YulIdentifier",
                        "src": "506:9:56"
                      },
                      {
                        "kind": "number",
                        "nodeType": "YulLiteral",
                        "src": "517:2:56",
                        "type": "",
                        "value": "32"
                      }
                    ],
                    "functionName": {
                      "name": "add",
                      "nodeType": "YulIdentifier",
                      "src": "502:3:56"
                    },
                    "nodeType": "YulFunctionCall",
                    "src": "502:18:56"
                  },
                  "variableNames": [
                    {
                      "name": "tail",
                      "nodeType": "YulIdentifier",
                      "src": "494:4:56"
                    }
                  ]
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "name": "headStart",
                        "nodeType": "YulIdentifier",
                        "src": "536:9:56"
                      },
                      {
                        "arguments": [
                          {
                            "name": "value0",
                            "nodeType": "YulIdentifier",
                            "src": "551:6:56"
                          },
                          {
                            "arguments": [
                              {
                                "arguments": [
                                  {
                                    "kind": "number",
                                    "nodeType": "YulLiteral",
                                    "src": "567:3:56",
                                    "type": "",
                                    "value": "160"
                                  },
                                  {
                                    "kind": "number",
                                    "nodeType": "YulLiteral",
                                    "src": "572:1:56",
                                    "type": "",
                                    "value": "1"
                                  }
                                ],
                                "functionName": {
                                  "name": "shl",
                                  "nodeType": "YulIdentifier",
                                  "src": "563:3:56"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "563:11:56"
                              },
                              {
                                "kind": "number",
                                "nodeType": "YulLiteral",
                                "src": "576:1:56",
                                "type": "",
                                "value": "1"
                              }
                            ],
                            "functionName": {
                              "name": "sub",
                              "nodeType": "YulIdentifier",
                              "src": "559:3:56"
                            },
                            "nodeType": "YulFunctionCall",
                            "src": "559:19:56"
                          }
                        ],
                        "functionName": {
                          "name": "and",
                          "nodeType": "YulIdentifier",
                          "src": "547:3:56"
                        },
                        "nodeType": "YulFunctionCall",
                        "src": "547:32:56"
                      }
                    ],
                    "functionName": {
                      "name": "mstore",
                      "nodeType": "YulIdentifier",
                      "src": "529:6:56"
                    },
                    "nodeType": "YulFunctionCall",
                    "src": "529:51:56"
                  },
                  "nodeType": "YulExpressionStatement",
                  "src": "529:51:56"
                }
              ]
            },
            "name": "abi_encode_tuple_t_address__to_t_address__fromStack_reversed",
            "nodeType": "YulFunctionDefinition",
            "parameters": [
              {
                "name": "headStart",
                "nodeType": "YulTypedName",
                "src": "453:9:56",
                "type": ""
              },
              {
                "name": "value0",
                "nodeType": "YulTypedName",
                "src": "464:6:56",
                "type": ""
              }
            ],
            "returnVariables": [
              {
                "name": "tail",
                "nodeType": "YulTypedName",
                "src": "475:4:56",
                "type": ""
              }
            ],
            "src": "383:203:56"
          },
          {
            "body": {
              "nodeType": "YulBlock",
              "src": "661:110:56",
              "statements": [
                {
                  "body": {
                    "nodeType": "YulBlock",
                    "src": "707:16:56",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "kind": "number",
                              "nodeType": "YulLiteral",
                              "src": "716:1:56",
                              "type": "",
                              "value": "0"
                            },
                            {
                              "kind": "number",
                              "nodeType": "YulLiteral",
                              "src": "719:1:56",
                              "type": "",
                              "value": "0"
                            }
                          ],
                          "functionName": {
                            "name": "revert",
                            "nodeType": "YulIdentifier",
                            "src": "709:6:56"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "709:12:56"
                        },
                        "nodeType": "YulExpressionStatement",
                        "src": "709:12:56"
                      }
                    ]
                  },
                  "condition": {
                    "arguments": [
                      {
                        "arguments": [
                          {
                            "name": "dataEnd",
                            "nodeType": "YulIdentifier",
                            "src": "682:7:56"
                          },
                          {
                            "name": "headStart",
                            "nodeType": "YulIdentifier",
                            "src": "691:9:56"
                          }
                        ],
                        "functionName": {
                          "name": "sub",
                          "nodeType": "YulIdentifier",
                          "src": "678:3:56"
                        },
                        "nodeType": "YulFunctionCall",
                        "src": "678:23:56"
                      },
                      {
                        "kind": "number",
                        "nodeType": "YulLiteral",
                        "src": "703:2:56",
                        "type": "",
                        "value": "32"
                      }
                    ],
                    "functionName": {
                      "name": "slt",
                      "nodeType": "YulIdentifier",
                      "src": "674:3:56"
                    },
                    "nodeType": "YulFunctionCall",
                    "src": "674:32:56"
                  },
                  "nodeType": "YulIf",
                  "src": "671:52:56"
                },
                {
                  "nodeType": "YulAssignment",
                  "src": "732:33:56",
                  "value": {
                    "arguments": [
                      {
                        "name": "headStart",
                        "nodeType": "YulIdentifier",
                        "src": "755:9:56"
                      }
                    ],
                    "functionName": {
                      "name": "calldataload",
                      "nodeType": "YulIdentifier",
                      "src": "742:12:56"
                    },
                    "nodeType": "YulFunctionCall",
                    "src": "742:23:56"
                  },
                  "variableNames": [
                    {
                      "name": "value0",
                      "nodeType": "YulIdentifier",
                      "src": "732:6:56"
                    }
                  ]
                }
              ]
            },
            "name": "abi_decode_tuple_t_uint256",
            "nodeType": "YulFunctionDefinition",
            "parameters": [
              {
                "name": "headStart",
                "nodeType": "YulTypedName",
                "src": "627:9:56",
                "type": ""
              },
              {
                "name": "dataEnd",
                "nodeType": "YulTypedName",
                "src": "638:7:56",
                "type": ""
              }
            ],
            "returnVariables": [
              {
                "name": "value0",
                "nodeType": "YulTypedName",
                "src": "650:6:56",
                "type": ""
              }
            ],
            "src": "591:180:56"
          },
          {
            "body": {
              "nodeType": "YulBlock",
              "src": "863:167:56",
              "statements": [
                {
                  "body": {
                    "nodeType": "YulBlock",
                    "src": "909:16:56",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "kind": "number",
                              "nodeType": "YulLiteral",
                              "src": "918:1:56",
                              "type": "",
                              "value": "0"
                            },
                            {
                              "kind": "number",
                              "nodeType": "YulLiteral",
                              "src": "921:1:56",
                              "type": "",
                              "value": "0"
                            }
                          ],
                          "functionName": {
                            "name": "revert",
                            "nodeType": "YulIdentifier",
                            "src": "911:6:56"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "911:12:56"
                        },
                        "nodeType": "YulExpressionStatement",
                        "src": "911:12:56"
                      }
                    ]
                  },
                  "condition": {
                    "arguments": [
                      {
                        "arguments": [
                          {
                            "name": "dataEnd",
                            "nodeType": "YulIdentifier",
                            "src": "884:7:56"
                          },
                          {
                            "name": "headStart",
                            "nodeType": "YulIdentifier",
                            "src": "893:9:56"
                          }
                        ],
                        "functionName": {
                          "name": "sub",
                          "nodeType": "YulIdentifier",
                          "src": "880:3:56"
                        },
                        "nodeType": "YulFunctionCall",
                        "src": "880:23:56"
                      },
                      {
                        "kind": "number",
                        "nodeType": "YulLiteral",
                        "src": "905:2:56",
                        "type": "",
                        "value": "64"
                      }
                    ],
                    "functionName": {
                      "name": "slt",
                      "nodeType": "YulIdentifier",
                      "src": "876:3:56"
                    },
                    "nodeType": "YulFunctionCall",
                    "src": "876:32:56"
                  },
                  "nodeType": "YulIf",
                  "src": "873:52:56"
                },
                {
                  "nodeType": "YulAssignment",
                  "src": "934:33:56",
                  "value": {
                    "arguments": [
                      {
                        "name": "headStart",
                        "nodeType": "YulIdentifier",
                        "src": "957:9:56"
                      }
                    ],
                    "functionName": {
                      "name": "calldataload",
                      "nodeType": "YulIdentifier",
                      "src": "944:12:56"
                    },
                    "nodeType": "YulFunctionCall",
                    "src": "944:23:56"
                  },
                  "variableNames": [
                    {
                      "name": "value0",
                      "nodeType": "YulIdentifier",
                      "src": "934:6:56"
                    }
                  ]
                },
                {
                  "nodeType": "YulAssignment",
                  "src": "976:48:56",
                  "value": {
                    "arguments": [
                      {
                        "arguments": [
                          {
                            "name": "headStart",
                            "nodeType": "YulIdentifier",
                            "src": "1009:9:56"
                          },
                          {
                            "kind": "number",
                            "nodeType": "YulLiteral",
                            "src": "1020:2:56",
                            "type": "",
                            "value": "32"
                          }
                        ],
                        "functionName": {
                          "name": "add",
                          "nodeType": "YulIdentifier",
                          "src": "1005:3:56"
                        },
                        "nodeType": "YulFunctionCall",
                        "src": "1005:18:56"
                      }
                    ],
                    "functionName": {
                      "name": "abi_decode_address",
                      "nodeType": "YulIdentifier",
                      "src": "986:18:56"
                    },
                    "nodeType": "YulFunctionCall",
                    "src": "986:38:56"
                  },
                  "variableNames": [
                    {
                      "name": "value1",
                      "nodeType": "YulIdentifier",
                      "src": "976:6:56"
                    }
                  ]
                }
              ]
            },
            "name": "abi_decode_tuple_t_uint256t_address",
            "nodeType": "YulFunctionDefinition",
            "parameters": [
              {
                "name": "headStart",
                "nodeType": "YulTypedName",
                "src": "821:9:56",
                "type": ""
              },
              {
                "name": "dataEnd",
                "nodeType": "YulTypedName",
                "src": "832:7:56",
                "type": ""
              }
            ],
            "returnVariables": [
              {
                "name": "value0",
                "nodeType": "YulTypedName",
                "src": "844:6:56",
                "type": ""
              },
              {
                "name": "value1",
                "nodeType": "YulTypedName",
                "src": "852:6:56",
                "type": ""
              }
            ],
            "src": "776:254:56"
          },
          {
            "body": {
              "nodeType": "YulBlock",
              "src": "1209:229:56",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "name": "headStart",
                        "nodeType": "YulIdentifier",
                        "src": "1226:9:56"
                      },
                      {
                        "kind": "number",
                        "nodeType": "YulLiteral",
                        "src": "1237:2:56",
                        "type": "",
                        "value": "32"
                      }
                    ],
                    "functionName": {
                      "name": "mstore",
                      "nodeType": "YulIdentifier",
                      "src": "1219:6:56"
                    },
                    "nodeType": "YulFunctionCall",
                    "src": "1219:21:56"
                  },
                  "nodeType": "YulExpressionStatement",
                  "src": "1219:21:56"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "arguments": [
                          {
                            "name": "headStart",
                            "nodeType": "YulIdentifier",
                            "src": "1260:9:56"
                          },
                          {
                            "kind": "number",
                            "nodeType": "YulLiteral",
                            "src": "1271:2:56",
                            "type": "",
                            "value": "32"
                          }
                        ],
                        "functionName": {
                          "name": "add",
                          "nodeType": "YulIdentifier",
                          "src": "1256:3:56"
                        },
                        "nodeType": "YulFunctionCall",
                        "src": "1256:18:56"
                      },
                      {
                        "kind": "number",
                        "nodeType": "YulLiteral",
                        "src": "1276:2:56",
                        "type": "",
                        "value": "39"
                      }
                    ],
                    "functionName": {
                      "name": "mstore",
                      "nodeType": "YulIdentifier",
                      "src": "1249:6:56"
                    },
                    "nodeType": "YulFunctionCall",
                    "src": "1249:30:56"
                  },
                  "nodeType": "YulExpressionStatement",
                  "src": "1249:30:56"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "arguments": [
                          {
                            "name": "headStart",
                            "nodeType": "YulIdentifier",
                            "src": "1299:9:56"
                          },
                          {
                            "kind": "number",
                            "nodeType": "YulLiteral",
                            "src": "1310:2:56",
                            "type": "",
                            "value": "64"
                          }
                        ],
                        "functionName": {
                          "name": "add",
                          "nodeType": "YulIdentifier",
                          "src": "1295:3:56"
                        },
                        "nodeType": "YulFunctionCall",
                        "src": "1295:18:56"
                      },
                      {
                        "hexValue": "4e6f206578697374696e67206163636f756e7420666f756e6420666f72207468",
                        "kind": "string",
                        "nodeType": "YulLiteral",
                        "src": "1315:34:56",
                        "type": "",
                        "value": "No existing account found for th"
                      }
                    ],
                    "functionName": {
                      "name": "mstore",
                      "nodeType": "YulIdentifier",
                      "src": "1288:6:56"
                    },
                    "nodeType": "YulFunctionCall",
                    "src": "1288:62:56"
                  },
                  "nodeType": "YulExpressionStatement",
                  "src": "1288:62:56"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "arguments": [
                          {
                            "name": "headStart",
                            "nodeType": "YulIdentifier",
                            "src": "1370:9:56"
                          },
                          {
                            "kind": "number",
                            "nodeType": "YulLiteral",
                            "src": "1381:2:56",
                            "type": "",
                            "value": "96"
                          }
                        ],
                        "functionName": {
                          "name": "add",
                          "nodeType": "YulIdentifier",
                          "src": "1366:3:56"
                        },
                        "nodeType": "YulFunctionCall",
                        "src": "1366:18:56"
                      },
                      {
                        "hexValue": "65207573657221",
                        "kind": "string",
                        "nodeType": "YulLiteral",
                        "src": "1386:9:56",
                        "type": "",
                        "value": "e user!"
                      }
                    ],
                    "functionName": {
                      "name": "mstore",
                      "nodeType": "YulIdentifier",
                      "src": "1359:6:56"
                    },
                    "nodeType": "YulFunctionCall",
                    "src": "1359:37:56"
                  },
                  "nodeType": "YulExpressionStatement",
                  "src": "1359:37:56"
                },
                {
                  "nodeType": "YulAssignment",
                  "src": "1405:27:56",
                  "value": {
                    "arguments": [
                      {
                        "name": "headStart",
                        "nodeType": "YulIdentifier",
                        "src": "1417:9:56"
                      },
                      {
                        "kind": "number",
                        "nodeType": "YulLiteral",
                        "src": "1428:3:56",
                        "type": "",
                        "value": "128"
                      }
                    ],
                    "functionName": {
                      "name": "add",
                      "nodeType": "YulIdentifier",
                      "src": "1413:3:56"
                    },
                    "nodeType": "YulFunctionCall",
                    "src": "1413:19:56"
                  },
                  "variableNames": [
                    {
                      "name": "tail",
                      "nodeType": "YulIdentifier",
                      "src": "1405:4:56"
                    }
                  ]
                }
              ]
            },
            "name": "abi_encode_tuple_t_stringliteral_46ff4170890dba931d86a0f349a11b3c83a9006cb94de9299cf8e82fd2c10cb5__to_t_string_memory_ptr__fromStack_reversed",
            "nodeType": "YulFunctionDefinition",
            "parameters": [
              {
                "name": "headStart",
                "nodeType": "YulTypedName",
                "src": "1186:9:56",
                "type": ""
              }
            ],
            "returnVariables": [
              {
                "name": "tail",
                "nodeType": "YulTypedName",
                "src": "1200:4:56",
                "type": ""
              }
            ],
            "src": "1035:403:56"
          },
          {
            "body": {
              "nodeType": "YulBlock",
              "src": "1617:229:56",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "name": "headStart",
                        "nodeType": "YulIdentifier",
                        "src": "1634:9:56"
                      },
                      {
                        "kind": "number",
                        "nodeType": "YulLiteral",
                        "src": "1645:2:56",
                        "type": "",
                        "value": "32"
                      }
                    ],
                    "functionName": {
                      "name": "mstore",
                      "nodeType": "YulIdentifier",
                      "src": "1627:6:56"
                    },
                    "nodeType": "YulFunctionCall",
                    "src": "1627:21:56"
                  },
                  "nodeType": "YulExpressionStatement",
                  "src": "1627:21:56"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "arguments": [
                          {
                            "name": "headStart",
                            "nodeType": "YulIdentifier",
                            "src": "1668:9:56"
                          },
                          {
                            "kind": "number",
                            "nodeType": "YulLiteral",
                            "src": "1679:2:56",
                            "type": "",
                            "value": "32"
                          }
                        ],
                        "functionName": {
                          "name": "add",
                          "nodeType": "YulIdentifier",
                          "src": "1664:3:56"
                        },
                        "nodeType": "YulFunctionCall",
                        "src": "1664:18:56"
                      },
                      {
                        "kind": "number",
                        "nodeType": "YulLiteral",
                        "src": "1684:2:56",
                        "type": "",
                        "value": "39"
                      }
                    ],
                    "functionName": {
                      "name": "mstore",
                      "nodeType": "YulIdentifier",
                      "src": "1657:6:56"
                    },
                    "nodeType": "YulFunctionCall",
                    "src": "1657:30:56"
                  },
                  "nodeType": "YulExpressionStatement",
                  "src": "1657:30:56"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "arguments": [
                          {
                            "name": "headStart",
                            "nodeType": "YulIdentifier",
                            "src": "1707:9:56"
                          },
                          {
                            "kind": "number",
                            "nodeType": "YulLiteral",
                            "src": "1718:2:56",
                            "type": "",
                            "value": "64"
                          }
                        ],
                        "functionName": {
                          "name": "add",
                          "nodeType": "YulIdentifier",
                          "src": "1703:3:56"
                        },
                        "nodeType": "YulFunctionCall",
                        "src": "1703:18:56"
                      },
                      {
                        "hexValue": "416e206578697374696e67206163636f756e7420666f756e6420666f72207468",
                        "kind": "string",
                        "nodeType": "YulLiteral",
                        "src": "1723:34:56",
                        "type": "",
                        "value": "An existing account found for th"
                      }
                    ],
                    "functionName": {
                      "name": "mstore",
                      "nodeType": "YulIdentifier",
                      "src": "1696:6:56"
                    },
                    "nodeType": "YulFunctionCall",
                    "src": "1696:62:56"
                  },
                  "nodeType": "YulExpressionStatement",
                  "src": "1696:62:56"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "arguments": [
                          {
                            "name": "headStart",
                            "nodeType": "YulIdentifier",
                            "src": "1778:9:56"
                          },
                          {
                            "kind": "number",
                            "nodeType": "YulLiteral",
                            "src": "1789:2:56",
                            "type": "",
                            "value": "96"
                          }
                        ],
                        "functionName": {
                          "name": "add",
                          "nodeType": "YulIdentifier",
                          "src": "1774:3:56"
                        },
                        "nodeType": "YulFunctionCall",
                        "src": "1774:18:56"
                      },
                      {
                        "hexValue": "65207573657221",
                        "kind": "string",
                        "nodeType": "YulLiteral",
                        "src": "1794:9:56",
                        "type": "",
                        "value": "e user!"
                      }
                    ],
                    "functionName": {
                      "name": "mstore",
                      "nodeType": "YulIdentifier",
                      "src": "1767:6:56"
                    },
                    "nodeType": "YulFunctionCall",
                    "src": "1767:37:56"
                  },
                  "nodeType": "YulExpressionStatement",
                  "src": "1767:37:56"
                },
                {
                  "nodeType": "YulAssignment",
                  "src": "1813:27:56",
                  "value": {
                    "arguments": [
                      {
                        "name": "headStart",
                        "nodeType": "YulIdentifier",
                        "src": "1825:9:56"
                      },
                      {
                        "kind": "number",
                        "nodeType": "YulLiteral",
                        "src": "1836:3:56",
                        "type": "",
                        "value": "128"
                      }
                    ],
                    "functionName": {
                      "name": "add",
                      "nodeType": "YulIdentifier",
                      "src": "1821:3:56"
                    },
                    "nodeType": "YulFunctionCall",
                    "src": "1821:19:56"
                  },
                  "variableNames": [
                    {
                      "name": "tail",
                      "nodeType": "YulIdentifier",
                      "src": "1813:4:56"
                    }
                  ]
                }
              ]
            },
            "name": "abi_encode_tuple_t_stringliteral_27d1d6a062508ad4ef9c01f7c8415ee8f68b0c03924ead359caa5fb3c46607bb__to_t_string_memory_ptr__fromStack_reversed",
            "nodeType": "YulFunctionDefinition",
            "parameters": [
              {
                "name": "headStart",
                "nodeType": "YulTypedName",
                "src": "1594:9:56",
                "type": ""
              }
            ],
            "returnVariables": [
              {
                "name": "tail",
                "nodeType": "YulTypedName",
                "src": "1608:4:56",
                "type": ""
              }
            ],
            "src": "1443:403:56"
          },
          {
            "body": {
              "nodeType": "YulBlock",
              "src": "2025:178:56",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "name": "headStart",
                        "nodeType": "YulIdentifier",
                        "src": "2042:9:56"
                      },
                      {
                        "kind": "number",
                        "nodeType": "YulLiteral",
                        "src": "2053:2:56",
                        "type": "",
                        "value": "32"
                      }
                    ],
                    "functionName": {
                      "name": "mstore",
                      "nodeType": "YulIdentifier",
                      "src": "2035:6:56"
                    },
                    "nodeType": "YulFunctionCall",
                    "src": "2035:21:56"
                  },
                  "nodeType": "YulExpressionStatement",
                  "src": "2035:21:56"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "arguments": [
                          {
                            "name": "headStart",
                            "nodeType": "YulIdentifier",
                            "src": "2076:9:56"
                          },
                          {
                            "kind": "number",
                            "nodeType": "YulLiteral",
                            "src": "2087:2:56",
                            "type": "",
                            "value": "32"
                          }
                        ],
                        "functionName": {
                          "name": "add",
                          "nodeType": "YulIdentifier",
                          "src": "2072:3:56"
                        },
                        "nodeType": "YulFunctionCall",
                        "src": "2072:18:56"
                      },
                      {
                        "kind": "number",
                        "nodeType": "YulLiteral",
                        "src": "2092:2:56",
                        "type": "",
                        "value": "28"
                      }
                    ],
                    "functionName": {
                      "name": "mstore",
                      "nodeType": "YulIdentifier",
                      "src": "2065:6:56"
                    },
                    "nodeType": "YulFunctionCall",
                    "src": "2065:30:56"
                  },
                  "nodeType": "YulExpressionStatement",
                  "src": "2065:30:56"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "arguments": [
                          {
                            "name": "headStart",
                            "nodeType": "YulIdentifier",
                            "src": "2115:9:56"
                          },
                          {
                            "kind": "number",
                            "nodeType": "YulLiteral",
                            "src": "2126:2:56",
                            "type": "",
                            "value": "64"
                          }
                        ],
                        "functionName": {
                          "name": "add",
                          "nodeType": "YulIdentifier",
                          "src": "2111:3:56"
                        },
                        "nodeType": "YulFunctionCall",
                        "src": "2111:18:56"
                      },
                      {
                        "hexValue": "4e6f7420612076616c6964206163636f756e74496420676976656e21",
                        "kind": "string",
                        "nodeType": "YulLiteral",
                        "src": "2131:30:56",
                        "type": "",
                        "value": "Not a valid accountId given!"
                      }
                    ],
                    "functionName": {
                      "name": "mstore",
                      "nodeType": "YulIdentifier",
                      "src": "2104:6:56"
                    },
                    "nodeType": "YulFunctionCall",
                    "src": "2104:58:56"
                  },
                  "nodeType": "YulExpressionStatement",
                  "src": "2104:58:56"
                },
                {
                  "nodeType": "YulAssignment",
                  "src": "2171:26:56",
                  "value": {
                    "arguments": [
                      {
                        "name": "headStart",
                        "nodeType": "YulIdentifier",
                        "src": "2183:9:56"
                      },
                      {
                        "kind": "number",
                        "nodeType": "YulLiteral",
                        "src": "2194:2:56",
                        "type": "",
                        "value": "96"
                      }
                    ],
                    "functionName": {
                      "name": "add",
                      "nodeType": "YulIdentifier",
                      "src": "2179:3:56"
                    },
                    "nodeType": "YulFunctionCall",
                    "src": "2179:18:56"
                  },
                  "variableNames": [
                    {
                      "name": "tail",
                      "nodeType": "YulIdentifier",
                      "src": "2171:4:56"
                    }
                  ]
                }
              ]
            },
            "name": "abi_encode_tuple_t_stringliteral_15f7cccdd529e230fa3f5cde8f5e4708c0979762d555cc2f8991d383cd98b14c__to_t_string_memory_ptr__fromStack_reversed",
            "nodeType": "YulFunctionDefinition",
            "parameters": [
              {
                "name": "headStart",
                "nodeType": "YulTypedName",
                "src": "2002:9:56",
                "type": ""
              }
            ],
            "returnVariables": [
              {
                "name": "tail",
                "nodeType": "YulTypedName",
                "src": "2016:4:56",
                "type": ""
              }
            ],
            "src": "1851:352:56"
          },
          {
            "body": {
              "nodeType": "YulBlock",
              "src": "2382:244:56",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "name": "headStart",
                        "nodeType": "YulIdentifier",
                        "src": "2399:9:56"
                      },
                      {
                        "kind": "number",
                        "nodeType": "YulLiteral",
                        "src": "2410:2:56",
                        "type": "",
                        "value": "32"
                      }
                    ],
                    "functionName": {
                      "name": "mstore",
                      "nodeType": "YulIdentifier",
                      "src": "2392:6:56"
                    },
                    "nodeType": "YulFunctionCall",
                    "src": "2392:21:56"
                  },
                  "nodeType": "YulExpressionStatement",
                  "src": "2392:21:56"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "arguments": [
                          {
                            "name": "headStart",
                            "nodeType": "YulIdentifier",
                            "src": "2433:9:56"
                          },
                          {
                            "kind": "number",
                            "nodeType": "YulLiteral",
                            "src": "2444:2:56",
                            "type": "",
                            "value": "32"
                          }
                        ],
                        "functionName": {
                          "name": "add",
                          "nodeType": "YulIdentifier",
                          "src": "2429:3:56"
                        },
                        "nodeType": "YulFunctionCall",
                        "src": "2429:18:56"
                      },
                      {
                        "kind": "number",
                        "nodeType": "YulLiteral",
                        "src": "2449:2:56",
                        "type": "",
                        "value": "54"
                      }
                    ],
                    "functionName": {
                      "name": "mstore",
                      "nodeType": "YulIdentifier",
                      "src": "2422:6:56"
                    },
                    "nodeType": "YulFunctionCall",
                    "src": "2422:30:56"
                  },
                  "nodeType": "YulExpressionStatement",
                  "src": "2422:30:56"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "arguments": [
                          {
                            "name": "headStart",
                            "nodeType": "YulIdentifier",
                            "src": "2472:9:56"
                          },
                          {
                            "kind": "number",
                            "nodeType": "YulLiteral",
                            "src": "2483:2:56",
                            "type": "",
                            "value": "64"
                          }
                        ],
                        "functionName": {
                          "name": "add",
                          "nodeType": "YulIdentifier",
                          "src": "2468:3:56"
                        },
                        "nodeType": "YulFunctionCall",
                        "src": "2468:18:56"
                      },
                      {
                        "hexValue": "596f7520617265206e6f7420746865206163636f756e74206f776e6572206f66",
                        "kind": "string",
                        "nodeType": "YulLiteral",
                        "src": "2488:34:56",
                        "type": "",
                        "value": "You are not the account owner of"
                      }
                    ],
                    "functionName": {
                      "name": "mstore",
                      "nodeType": "YulIdentifier",
                      "src": "2461:6:56"
                    },
                    "nodeType": "YulFunctionCall",
                    "src": "2461:62:56"
                  },
                  "nodeType": "YulExpressionStatement",
                  "src": "2461:62:56"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "arguments": [
                          {
                            "name": "headStart",
                            "nodeType": "YulIdentifier",
                            "src": "2543:9:56"
                          },
                          {
                            "kind": "number",
                            "nodeType": "YulLiteral",
                            "src": "2554:2:56",
                            "type": "",
                            "value": "96"
                          }
                        ],
                        "functionName": {
                          "name": "add",
                          "nodeType": "YulIdentifier",
                          "src": "2539:3:56"
                        },
                        "nodeType": "YulFunctionCall",
                        "src": "2539:18:56"
                      },
                      {
                        "hexValue": "2074686973206163636f756e74206164647265737321",
                        "kind": "string",
                        "nodeType": "YulLiteral",
                        "src": "2559:24:56",
                        "type": "",
                        "value": " this account address!"
                      }
                    ],
                    "functionName": {
                      "name": "mstore",
                      "nodeType": "YulIdentifier",
                      "src": "2532:6:56"
                    },
                    "nodeType": "YulFunctionCall",
                    "src": "2532:52:56"
                  },
                  "nodeType": "YulExpressionStatement",
                  "src": "2532:52:56"
                },
                {
                  "nodeType": "YulAssignment",
                  "src": "2593:27:56",
                  "value": {
                    "arguments": [
                      {
                        "name": "headStart",
                        "nodeType": "YulIdentifier",
                        "src": "2605:9:56"
                      },
                      {
                        "kind": "number",
                        "nodeType": "YulLiteral",
                        "src": "2616:3:56",
                        "type": "",
                        "value": "128"
                      }
                    ],
                    "functionName": {
                      "name": "add",
                      "nodeType": "YulIdentifier",
                      "src": "2601:3:56"
                    },
                    "nodeType": "YulFunctionCall",
                    "src": "2601:19:56"
                  },
                  "variableNames": [
                    {
                      "name": "tail",
                      "nodeType": "YulIdentifier",
                      "src": "2593:4:56"
                    }
                  ]
                }
              ]
            },
            "name": "abi_encode_tuple_t_stringliteral_618531ce49e1580eb7546fba5da436232be0a2d19444432fb69404fd555f1936__to_t_string_memory_ptr__fromStack_reversed",
            "nodeType": "YulFunctionDefinition",
            "parameters": [
              {
                "name": "headStart",
                "nodeType": "YulTypedName",
                "src": "2359:9:56",
                "type": ""
              }
            ],
            "returnVariables": [
              {
                "name": "tail",
                "nodeType": "YulTypedName",
                "src": "2373:4:56",
                "type": ""
              }
            ],
            "src": "2208:418:56"
          }
        ]
      },
      "contents": "{\n    { }\n    function abi_decode_address(offset) -> value\n    {\n        value := calldataload(offset)\n        if iszero(eq(value, and(value, sub(shl(160, 1), 1)))) { revert(0, 0) }\n    }\n    function abi_decode_tuple_t_address(headStart, dataEnd) -> value0\n    {\n        if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n        value0 := abi_decode_address(headStart)\n    }\n    function abi_encode_tuple_t_address__to_t_address__fromStack_reversed(headStart, value0) -> tail\n    {\n        tail := add(headStart, 32)\n        mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n    }\n    function abi_decode_tuple_t_uint256(headStart, dataEnd) -> value0\n    {\n        if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n        value0 := calldataload(headStart)\n    }\n    function abi_decode_tuple_t_uint256t_address(headStart, dataEnd) -> value0, value1\n    {\n        if slt(sub(dataEnd, headStart), 64) { revert(0, 0) }\n        value0 := calldataload(headStart)\n        value1 := abi_decode_address(add(headStart, 32))\n    }\n    function abi_encode_tuple_t_stringliteral_46ff4170890dba931d86a0f349a11b3c83a9006cb94de9299cf8e82fd2c10cb5__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n    {\n        mstore(headStart, 32)\n        mstore(add(headStart, 32), 39)\n        mstore(add(headStart, 64), \"No existing account found for th\")\n        mstore(add(headStart, 96), \"e user!\")\n        tail := add(headStart, 128)\n    }\n    function abi_encode_tuple_t_stringliteral_27d1d6a062508ad4ef9c01f7c8415ee8f68b0c03924ead359caa5fb3c46607bb__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n    {\n        mstore(headStart, 32)\n        mstore(add(headStart, 32), 39)\n        mstore(add(headStart, 64), \"An existing account found for th\")\n        mstore(add(headStart, 96), \"e user!\")\n        tail := add(headStart, 128)\n    }\n    function abi_encode_tuple_t_stringliteral_15f7cccdd529e230fa3f5cde8f5e4708c0979762d555cc2f8991d383cd98b14c__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n    {\n        mstore(headStart, 32)\n        mstore(add(headStart, 32), 28)\n        mstore(add(headStart, 64), \"Not a valid accountId given!\")\n        tail := add(headStart, 96)\n    }\n    function abi_encode_tuple_t_stringliteral_618531ce49e1580eb7546fba5da436232be0a2d19444432fb69404fd555f1936__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n    {\n        mstore(headStart, 32)\n        mstore(add(headStart, 32), 54)\n        mstore(add(headStart, 64), \"You are not the account owner of\")\n        mstore(add(headStart, 96), \" this account address!\")\n        tail := add(headStart, 128)\n    }\n}",
      "id": 56,
      "language": "Yul",
      "name": "#utility.yul"
    }
  ],
  "sourceMap": "607:2902:39:-:0;;;;;;;;;;;;;;;;;;;",
  "deployedSourceMap": "607:2902:39:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;911:56;;;;;;:::i;:::-;;;;;;;;;;;;;-1:-1:-1;;;;;911:56:39;;;;;;-1:-1:-1;;;;;547:32:56;;;529:51;;517:2;502:18;911:56:39;;;;;;;2473:559;;;;;;:::i;:::-;;:::i;:::-;;3113:394;;;;;;:::i;:::-;;:::i;973:59::-;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;;;;;973:59:39;;;2473:559;2560:9;2571:5;1557:381;;1584:156;;;;;;;;1557:381;1852:1;1796:44;1818:9;1829:10;1796:21;:44::i;:::-;-1:-1:-1;;;;;1796:58:39;;1771:156;;;;-1:-1:-1;;;1771:156:39;;1645:2:56;1771:156:39;;;1627:21:56;1684:2;1664:18;;;1657:30;1723:34;1703:18;;;1696:62;-1:-1:-1;;;1774:18:56;;;1767:37;1821:19;;1771:156:39;1443:403:56;1771:156:39;2596:14;2592:434:::1;;2626:30;2659:19;;;;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;2714:10:39::1;2692:21;:33:::0;;;::::1;::::0;;;;;;:61;;-1:-1:-1;;;;;;2692:61:39::1;-1:-1:-1::0;;;;;2692:61:39;;;::::1;::::0;;;::::1;::::0;;-1:-1:-1;2473:559:39;;;:::o;2592:434::-:1;2774:9;2787:1;2774:14;2770:256;;;2804:36;2843:22;;;;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;2904:10:39::1;2879:36;::::0;;;:24:::1;:36;::::0;;;;:67;;-1:-1:-1;;;;;;2879:67:39::1;-1:-1:-1::0;;;;;2879:67:39;;;::::1;::::0;;;::::1;::::0;;-1:-1:-1;2473:559:39;;;:::o;2770:256::-:1;2977:38;::::0;-1:-1:-1;;;2977:38:39;;2053:2:56;2977:38:39::1;::::0;::::1;2035:21:56::0;2092:2;2072:18;;;2065:30;2131;2111:18;;;2104:58;2179:18;;2977:38:39::1;1851:352:56::0;3113:394:39;3219:9;3230:4;1665:1;1609:44;1631:9;1642:10;1609:21;:44::i;:::-;-1:-1:-1;;;;;1609:58:39;;;1584:156;;;;-1:-1:-1;;;1584:156:39;;1237:2:56;1584:156:39;;;1219:21:56;1276:2;1256:18;;;1249:30;1315:34;1295:18;;;1288:62;-1:-1:-1;;;1366:18:56;;;1359:37;1413:19;;1584:156:39;1035:403:56;1584:156:39;3261:9:::1;3272:14;1278;-1:-1:-1::0;;;;;1230:62:39::1;:44;1252:9;1263:10;1230:21;:44::i;:::-;-1:-1:-1::0;;;;;1230:62:39::1;;1209:163;;;::::0;-1:-1:-1;;;1209:163:39;;2410:2:56;1209:163:39::1;::::0;::::1;2392:21:56::0;2449:2;2429:18;;;2422:30;2488:34;2468:18;;;2461:62;-1:-1:-1;;;2539:18:56;;;2532:52;2601:19;;1209:163:39::1;2208:418:56::0;1209:163:39::1;3306:14:::0;3302:199:::2;;3358:10;3380:1;3336:33:::0;;;::::2;::::0;;;;;;:46;;-1:-1:-1;;;;;;3336:46:39::2;::::0;;3302:199:::2;;;3403:9;3416:1;3403:14;3399:102;;;3458:10;3480:1;3433:36:::0;;;:24:::2;:36;::::0;;;;:49;;-1:-1:-1;;;;;;3433:49:39::2;::::0;;3399:102:::2;1947:1:::1;;3113:394:::0;;;;:::o;2019:370::-;2135:7;2162:14;2158:225;;-1:-1:-1;;;;;;2199:32:39;;;:21;:32;;;;;;;;;;;;2192:39;;2158:225;2252:9;2265:1;2252:14;2248:135;;;-1:-1:-1;;;;;;2289:35:39;;;;;;;:24;:35;;;;;;;2282:42;;2248:135;-1:-1:-1;2370:1:39;2248:135;2019:370;;;;:::o;-1:-1:-1:-;;;;;;;;:::o;:::-;;;;;;;;:::o;14:173:56:-;82:20;;-1:-1:-1;;;;;131:31:56;;121:42;;111:70;;177:1;174;167:12;111:70;14:173;;;:::o;192:186::-;251:6;304:2;292:9;283:7;279:23;275:32;272:52;;;320:1;317;310:12;272:52;343:29;362:9;343:29;:::i;:::-;333:39;192:186;-1:-1:-1;;;192:186:56:o;591:180::-;650:6;703:2;691:9;682:7;678:23;674:32;671:52;;;719:1;716;709:12;671:52;-1:-1:-1;742:23:56;;591:180;-1:-1:-1;591:180:56:o;776:254::-;844:6;852;905:2;893:9;884:7;880:23;876:32;873:52;;;921:1;918;911:12;873:52;957:9;944:23;934:33;;986:38;1020:2;1009:9;1005:18;986:38;:::i;:::-;976:48;;776:254;;;;;:::o",
  "source": "// SPDX-License-Identifier: AGPL-3.0\n\npragma solidity ^0.8.11;\n\nimport \"./MarginAccount.sol\";\nimport \"./HedgeFundAccount.sol\";\n\n/**\n * THIS IS THE `AccountManager` contract\n *\n * Description:\n *\n * This contract will function as a manager + factory for the account contracts.\n * Some of the main functionality for the `AccountManager` contract will be to:\n * - Create a new user account\n * - Delete an existing user account\n * - Managing access control to protect user's account\n *\n * Currently there are two types of account:\n * - Margin Account (accountId = 0)\n * - Hedge Fund Account (accountId = 1)\n */\ncontract AccountManager {\n    /**\n     * ACCOUNT REGISTRIES\n     *\n     * The registry variables is used to store users account information in mapping type\n     * - first address is for user address, e.g. msg.sender\n     * - second address is for account address (type: margin or hedge fund)\n     */\n    mapping(address => address) public marginAccountRegistry;\n    mapping(address => address) public hedgeFundAccountRegistry;\n\n    /**\n     * Check whether `msg.sender` is the account owner of `accountAddress`\n     */\n    modifier onlyAccountOwner(uint256 accountId, address accountAddress) {\n        require(\n            getAccountAddressById(accountId, msg.sender) == accountAddress,\n            \"You are not the account owner of this account address!\"\n        );\n        _;\n    }\n\n    /**\n     * To check whether the user has an existing account based on `isExist`\n     */\n    modifier onlyAccountExist(uint256 accountId, bool isExist) {\n        if (isExist) {\n            require(\n                getAccountAddressById(accountId, msg.sender) != address(0),\n                \"No existing account found for the user!\"\n            );\n        } else {\n            require(\n                getAccountAddressById(accountId, msg.sender) == address(0),\n                \"An existing account found for the user!\"\n            );\n        }\n        _;\n    }\n\n    /**\n     * Get Account address by `accountId`\n     */\n    function getAccountAddressById(uint256 accountId, address msgSender)\n        internal\n        view\n        returns (address)\n    {\n        if (accountId == 0) {\n            return marginAccountRegistry[msgSender];\n        } else if (accountId == 1) {\n            return hedgeFundAccountRegistry[msgSender];\n        } else {\n            return address(0);\n        }\n    }\n\n    /**\n     * Create new user account with type based on `accountId`\n     */\n    function createNewAccount(uint256 accountId)\n        external\n        onlyAccountExist(accountId, false)\n    {\n        if (accountId == 0) {\n            MarginAccount newMarginAccount = new MarginAccount();\n            marginAccountRegistry[msg.sender] = address(newMarginAccount);\n        } else if (accountId == 1) {\n            HedgeFundAccount newHedgeFundAccount = new HedgeFundAccount();\n            hedgeFundAccountRegistry[msg.sender] = address(newHedgeFundAccount);\n        } else {\n            revert(\"Not a valid accountId given!\");\n        }\n    }\n\n    /**\n     * Delete an existing user account of `accountAddress`\n     */\n    function deleteAccount(uint256 accountId, address accountAddress)\n        public\n        onlyAccountExist(accountId, true)\n        onlyAccountOwner(accountId, accountAddress)\n    {\n        if (accountId == 0) {\n            marginAccountRegistry[msg.sender] = address(0);\n        } else if (accountId == 1) {\n            hedgeFundAccountRegistry[msg.sender] = address(0);\n        } else {}\n    }\n}\n",
  "sourcePath": "/Users/yosephks/Documents/GitHub/alpsfinance-smart-contracts/contracts/account/AccountManager.sol",
  "ast": {
    "absolutePath": "project:/contracts/account/AccountManager.sol",
    "exportedSymbols": {
      "AccountManager": [
        7311
      ],
      "HedgeFundAccount": [
        7314
      ],
      "MarginAccount": [
        7317
      ]
    },
    "id": 7312,
    "license": "AGPL-3.0",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 7092,
        "literals": [
          "solidity",
          "^",
          "0.8",
          ".11"
        ],
        "nodeType": "PragmaDirective",
        "src": "38:24:39"
      },
      {
        "absolutePath": "project:/contracts/account/MarginAccount.sol",
        "file": "./MarginAccount.sol",
        "id": 7093,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 7312,
        "sourceUnit": 7318,
        "src": "64:29:39",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "project:/contracts/account/HedgeFundAccount.sol",
        "file": "./HedgeFundAccount.sol",
        "id": 7094,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 7312,
        "sourceUnit": 7315,
        "src": "94:32:39",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "abstract": false,
        "baseContracts": [],
        "canonicalName": "AccountManager",
        "contractDependencies": [
          7314,
          7317
        ],
        "contractKind": "contract",
        "documentation": {
          "id": 7095,
          "nodeType": "StructuredDocumentation",
          "src": "128:478:39",
          "text": " THIS IS THE `AccountManager` contract\n Description:\n This contract will function as a manager + factory for the account contracts.\n Some of the main functionality for the `AccountManager` contract will be to:\n - Create a new user account\n - Delete an existing user account\n - Managing access control to protect user's account\n Currently there are two types of account:\n - Margin Account (accountId = 0)\n - Hedge Fund Account (accountId = 1)"
        },
        "fullyImplemented": true,
        "id": 7311,
        "linearizedBaseContracts": [
          7311
        ],
        "name": "AccountManager",
        "nameLocation": "616:14:39",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "constant": false,
            "documentation": {
              "id": 7096,
              "nodeType": "StructuredDocumentation",
              "src": "637:269:39",
              "text": " ACCOUNT REGISTRIES\n The registry variables is used to store users account information in mapping type\n - first address is for user address, e.g. msg.sender\n - second address is for account address (type: margin or hedge fund)"
            },
            "functionSelector": "41596f08",
            "id": 7100,
            "mutability": "mutable",
            "name": "marginAccountRegistry",
            "nameLocation": "946:21:39",
            "nodeType": "VariableDeclaration",
            "scope": 7311,
            "src": "911:56:39",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_mapping$_t_address_$_t_address_$",
              "typeString": "mapping(address => address)"
            },
            "typeName": {
              "id": 7099,
              "keyType": {
                "id": 7097,
                "name": "address",
                "nodeType": "ElementaryTypeName",
                "src": "919:7:39",
                "typeDescriptions": {
                  "typeIdentifier": "t_address",
                  "typeString": "address"
                }
              },
              "nodeType": "Mapping",
              "src": "911:27:39",
              "typeDescriptions": {
                "typeIdentifier": "t_mapping$_t_address_$_t_address_$",
                "typeString": "mapping(address => address)"
              },
              "valueType": {
                "id": 7098,
                "name": "address",
                "nodeType": "ElementaryTypeName",
                "src": "930:7:39",
                "stateMutability": "nonpayable",
                "typeDescriptions": {
                  "typeIdentifier": "t_address",
                  "typeString": "address"
                }
              }
            },
            "visibility": "public"
          },
          {
            "constant": false,
            "functionSelector": "c787c924",
            "id": 7104,
            "mutability": "mutable",
            "name": "hedgeFundAccountRegistry",
            "nameLocation": "1008:24:39",
            "nodeType": "VariableDeclaration",
            "scope": 7311,
            "src": "973:59:39",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_mapping$_t_address_$_t_address_$",
              "typeString": "mapping(address => address)"
            },
            "typeName": {
              "id": 7103,
              "keyType": {
                "id": 7101,
                "name": "address",
                "nodeType": "ElementaryTypeName",
                "src": "981:7:39",
                "typeDescriptions": {
                  "typeIdentifier": "t_address",
                  "typeString": "address"
                }
              },
              "nodeType": "Mapping",
              "src": "973:27:39",
              "typeDescriptions": {
                "typeIdentifier": "t_mapping$_t_address_$_t_address_$",
                "typeString": "mapping(address => address)"
              },
              "valueType": {
                "id": 7102,
                "name": "address",
                "nodeType": "ElementaryTypeName",
                "src": "992:7:39",
                "stateMutability": "nonpayable",
                "typeDescriptions": {
                  "typeIdentifier": "t_address",
                  "typeString": "address"
                }
              }
            },
            "visibility": "public"
          },
          {
            "body": {
              "id": 7123,
              "nodeType": "Block",
              "src": "1199:191:39",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "id": 7118,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "arguments": [
                            {
                              "id": 7113,
                              "name": "accountId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7107,
                              "src": "1252:9:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "expression": {
                                "id": 7114,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4294967281,
                                "src": "1263:3:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 7115,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "src": "1263:10:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            ],
                            "id": 7112,
                            "name": "getAccountAddressById",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7200,
                            "src": "1230:21:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_address_$returns$_t_address_$",
                              "typeString": "function (uint256,address) view returns (address)"
                            }
                          },
                          "id": 7116,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1230:44:39",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "id": 7117,
                          "name": "accountAddress",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 7109,
                          "src": "1278:14:39",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "src": "1230:62:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "596f7520617265206e6f7420746865206163636f756e74206f776e6572206f662074686973206163636f756e74206164647265737321",
                        "id": 7119,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1306:56:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_618531ce49e1580eb7546fba5da436232be0a2d19444432fb69404fd555f1936",
                          "typeString": "literal_string \"You are not the account owner of this account address!\""
                        },
                        "value": "You are not the account owner of this account address!"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_618531ce49e1580eb7546fba5da436232be0a2d19444432fb69404fd555f1936",
                          "typeString": "literal_string \"You are not the account owner of this account address!\""
                        }
                      ],
                      "id": 7111,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4294967278,
                        4294967278
                      ],
                      "referencedDeclaration": 4294967278,
                      "src": "1209:7:39",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 7120,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1209:163:39",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 7121,
                  "nodeType": "ExpressionStatement",
                  "src": "1209:163:39"
                },
                {
                  "id": 7122,
                  "nodeType": "PlaceholderStatement",
                  "src": "1382:1:39"
                }
              ]
            },
            "documentation": {
              "id": 7105,
              "nodeType": "StructuredDocumentation",
              "src": "1039:86:39",
              "text": " Check whether `msg.sender` is the account owner of `accountAddress`"
            },
            "id": 7124,
            "name": "onlyAccountOwner",
            "nameLocation": "1139:16:39",
            "nodeType": "ModifierDefinition",
            "parameters": {
              "id": 7110,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 7107,
                  "mutability": "mutable",
                  "name": "accountId",
                  "nameLocation": "1164:9:39",
                  "nodeType": "VariableDeclaration",
                  "scope": 7124,
                  "src": "1156:17:39",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 7106,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1156:7:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 7109,
                  "mutability": "mutable",
                  "name": "accountAddress",
                  "nameLocation": "1183:14:39",
                  "nodeType": "VariableDeclaration",
                  "scope": 7124,
                  "src": "1175:22:39",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 7108,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1175:7:39",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1155:43:39"
            },
            "src": "1130:260:39",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 7164,
              "nodeType": "Block",
              "src": "1547:408:39",
              "statements": [
                {
                  "condition": {
                    "id": 7131,
                    "name": "isExist",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 7129,
                    "src": "1561:7:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 7161,
                    "nodeType": "Block",
                    "src": "1757:181:39",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              "id": 7157,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "arguments": [
                                  {
                                    "id": 7149,
                                    "name": "accountId",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7127,
                                    "src": "1818:9:39",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 7150,
                                      "name": "msg",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4294967281,
                                      "src": "1829:3:39",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_magic_message",
                                        "typeString": "msg"
                                      }
                                    },
                                    "id": 7151,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "sender",
                                    "nodeType": "MemberAccess",
                                    "src": "1829:10:39",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  ],
                                  "id": 7148,
                                  "name": "getAccountAddressById",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 7200,
                                  "src": "1796:21:39",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_address_$returns$_t_address_$",
                                    "typeString": "function (uint256,address) view returns (address)"
                                  }
                                },
                                "id": 7152,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "1796:44:39",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "==",
                              "rightExpression": {
                                "arguments": [
                                  {
                                    "hexValue": "30",
                                    "id": 7155,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "1852:1:39",
                                    "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": 7154,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "1844:7:39",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_address_$",
                                    "typeString": "type(address)"
                                  },
                                  "typeName": {
                                    "id": 7153,
                                    "name": "address",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "1844:7:39",
                                    "typeDescriptions": {}
                                  }
                                },
                                "id": 7156,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "1844:10:39",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "src": "1796:58:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "hexValue": "416e206578697374696e67206163636f756e7420666f756e6420666f7220746865207573657221",
                              "id": 7158,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "string",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1872:41:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_stringliteral_27d1d6a062508ad4ef9c01f7c8415ee8f68b0c03924ead359caa5fb3c46607bb",
                                "typeString": "literal_string \"An existing account found for the user!\""
                              },
                              "value": "An existing account found for the user!"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_stringliteral_27d1d6a062508ad4ef9c01f7c8415ee8f68b0c03924ead359caa5fb3c46607bb",
                                "typeString": "literal_string \"An existing account found for the user!\""
                              }
                            ],
                            "id": 7147,
                            "name": "require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              4294967278,
                              4294967278
                            ],
                            "referencedDeclaration": 4294967278,
                            "src": "1771:7:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                              "typeString": "function (bool,string memory) pure"
                            }
                          },
                          "id": 7159,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1771:156:39",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 7160,
                        "nodeType": "ExpressionStatement",
                        "src": "1771:156:39"
                      }
                    ]
                  },
                  "id": 7162,
                  "nodeType": "IfStatement",
                  "src": "1557:381:39",
                  "trueBody": {
                    "id": 7146,
                    "nodeType": "Block",
                    "src": "1570:181:39",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              "id": 7142,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "arguments": [
                                  {
                                    "id": 7134,
                                    "name": "accountId",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7127,
                                    "src": "1631:9:39",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 7135,
                                      "name": "msg",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4294967281,
                                      "src": "1642:3:39",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_magic_message",
                                        "typeString": "msg"
                                      }
                                    },
                                    "id": 7136,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "sender",
                                    "nodeType": "MemberAccess",
                                    "src": "1642:10:39",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  ],
                                  "id": 7133,
                                  "name": "getAccountAddressById",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 7200,
                                  "src": "1609:21:39",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_address_$returns$_t_address_$",
                                    "typeString": "function (uint256,address) view returns (address)"
                                  }
                                },
                                "id": 7137,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "1609:44:39",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "!=",
                              "rightExpression": {
                                "arguments": [
                                  {
                                    "hexValue": "30",
                                    "id": 7140,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "1665:1:39",
                                    "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": 7139,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "1657:7:39",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_address_$",
                                    "typeString": "type(address)"
                                  },
                                  "typeName": {
                                    "id": 7138,
                                    "name": "address",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "1657:7:39",
                                    "typeDescriptions": {}
                                  }
                                },
                                "id": 7141,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "1657:10:39",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "src": "1609:58:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "hexValue": "4e6f206578697374696e67206163636f756e7420666f756e6420666f7220746865207573657221",
                              "id": 7143,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "string",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1685:41:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_stringliteral_46ff4170890dba931d86a0f349a11b3c83a9006cb94de9299cf8e82fd2c10cb5",
                                "typeString": "literal_string \"No existing account found for the user!\""
                              },
                              "value": "No existing account found for the user!"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_stringliteral_46ff4170890dba931d86a0f349a11b3c83a9006cb94de9299cf8e82fd2c10cb5",
                                "typeString": "literal_string \"No existing account found for the user!\""
                              }
                            ],
                            "id": 7132,
                            "name": "require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              4294967278,
                              4294967278
                            ],
                            "referencedDeclaration": 4294967278,
                            "src": "1584:7:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                              "typeString": "function (bool,string memory) pure"
                            }
                          },
                          "id": 7144,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1584:156:39",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 7145,
                        "nodeType": "ExpressionStatement",
                        "src": "1584:156:39"
                      }
                    ]
                  }
                },
                {
                  "id": 7163,
                  "nodeType": "PlaceholderStatement",
                  "src": "1947:1:39"
                }
              ]
            },
            "documentation": {
              "id": 7125,
              "nodeType": "StructuredDocumentation",
              "src": "1396:87:39",
              "text": " To check whether the user has an existing account based on `isExist`"
            },
            "id": 7165,
            "name": "onlyAccountExist",
            "nameLocation": "1497:16:39",
            "nodeType": "ModifierDefinition",
            "parameters": {
              "id": 7130,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 7127,
                  "mutability": "mutable",
                  "name": "accountId",
                  "nameLocation": "1522:9:39",
                  "nodeType": "VariableDeclaration",
                  "scope": 7165,
                  "src": "1514:17:39",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 7126,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1514:7:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 7129,
                  "mutability": "mutable",
                  "name": "isExist",
                  "nameLocation": "1538:7:39",
                  "nodeType": "VariableDeclaration",
                  "scope": 7165,
                  "src": "1533:12:39",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 7128,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "1533:4:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1513:33:39"
            },
            "src": "1488:467:39",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 7199,
              "nodeType": "Block",
              "src": "2148:241:39",
              "statements": [
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 7177,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 7175,
                      "name": "accountId",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 7168,
                      "src": "2162:9:39",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "hexValue": "30",
                      "id": 7176,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "2175:1:39",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "2162:14:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "condition": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 7185,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 7183,
                        "name": "accountId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 7168,
                        "src": "2252:9:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "==",
                      "rightExpression": {
                        "hexValue": "31",
                        "id": 7184,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2265:1:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_1_by_1",
                          "typeString": "int_const 1"
                        },
                        "value": "1"
                      },
                      "src": "2252:14:39",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "falseBody": {
                      "id": 7196,
                      "nodeType": "Block",
                      "src": "2341:42:39",
                      "statements": [
                        {
                          "expression": {
                            "arguments": [
                              {
                                "hexValue": "30",
                                "id": 7193,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "2370:1:39",
                                "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": 7192,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "2362:7:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_address_$",
                                "typeString": "type(address)"
                              },
                              "typeName": {
                                "id": 7191,
                                "name": "address",
                                "nodeType": "ElementaryTypeName",
                                "src": "2362:7:39",
                                "typeDescriptions": {}
                              }
                            },
                            "id": 7194,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2362:10:39",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "functionReturnParameters": 7174,
                          "id": 7195,
                          "nodeType": "Return",
                          "src": "2355:17:39"
                        }
                      ]
                    },
                    "id": 7197,
                    "nodeType": "IfStatement",
                    "src": "2248:135:39",
                    "trueBody": {
                      "id": 7190,
                      "nodeType": "Block",
                      "src": "2268:67:39",
                      "statements": [
                        {
                          "expression": {
                            "baseExpression": {
                              "id": 7186,
                              "name": "hedgeFundAccountRegistry",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7104,
                              "src": "2289:24:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_address_$_t_address_$",
                                "typeString": "mapping(address => address)"
                              }
                            },
                            "id": 7188,
                            "indexExpression": {
                              "id": 7187,
                              "name": "msgSender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7170,
                              "src": "2314:9:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "IndexAccess",
                            "src": "2289:35:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "functionReturnParameters": 7174,
                          "id": 7189,
                          "nodeType": "Return",
                          "src": "2282:42:39"
                        }
                      ]
                    }
                  },
                  "id": 7198,
                  "nodeType": "IfStatement",
                  "src": "2158:225:39",
                  "trueBody": {
                    "id": 7182,
                    "nodeType": "Block",
                    "src": "2178:64:39",
                    "statements": [
                      {
                        "expression": {
                          "baseExpression": {
                            "id": 7178,
                            "name": "marginAccountRegistry",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7100,
                            "src": "2199:21:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_address_$_t_address_$",
                              "typeString": "mapping(address => address)"
                            }
                          },
                          "id": 7180,
                          "indexExpression": {
                            "id": 7179,
                            "name": "msgSender",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7170,
                            "src": "2221:9:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "2199:32:39",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "functionReturnParameters": 7174,
                        "id": 7181,
                        "nodeType": "Return",
                        "src": "2192:39:39"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": {
              "id": 7166,
              "nodeType": "StructuredDocumentation",
              "src": "1961:53:39",
              "text": " Get Account address by `accountId`"
            },
            "id": 7200,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "getAccountAddressById",
            "nameLocation": "2028:21:39",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 7171,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 7168,
                  "mutability": "mutable",
                  "name": "accountId",
                  "nameLocation": "2058:9:39",
                  "nodeType": "VariableDeclaration",
                  "scope": 7200,
                  "src": "2050:17:39",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 7167,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2050:7:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 7170,
                  "mutability": "mutable",
                  "name": "msgSender",
                  "nameLocation": "2077:9:39",
                  "nodeType": "VariableDeclaration",
                  "scope": 7200,
                  "src": "2069:17:39",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 7169,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "2069:7:39",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2049:38:39"
            },
            "returnParameters": {
              "id": 7174,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 7173,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 7200,
                  "src": "2135:7:39",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 7172,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "2135:7:39",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2134:9:39"
            },
            "scope": 7311,
            "src": "2019:370:39",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 7261,
              "nodeType": "Block",
              "src": "2582:450:39",
              "statements": [
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 7212,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 7210,
                      "name": "accountId",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 7203,
                      "src": "2596:9:39",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "hexValue": "30",
                      "id": 7211,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "2609:1:39",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "2596:14:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "condition": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 7234,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 7232,
                        "name": "accountId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 7203,
                        "src": "2774:9:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "==",
                      "rightExpression": {
                        "hexValue": "31",
                        "id": 7233,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2787:1:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_1_by_1",
                          "typeString": "int_const 1"
                        },
                        "value": "1"
                      },
                      "src": "2774:14:39",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "falseBody": {
                      "id": 7258,
                      "nodeType": "Block",
                      "src": "2963:63:39",
                      "statements": [
                        {
                          "expression": {
                            "arguments": [
                              {
                                "hexValue": "4e6f7420612076616c6964206163636f756e74496420676976656e21",
                                "id": 7255,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "string",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "2984:30:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_stringliteral_15f7cccdd529e230fa3f5cde8f5e4708c0979762d555cc2f8991d383cd98b14c",
                                  "typeString": "literal_string \"Not a valid accountId given!\""
                                },
                                "value": "Not a valid accountId given!"
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_stringliteral_15f7cccdd529e230fa3f5cde8f5e4708c0979762d555cc2f8991d383cd98b14c",
                                  "typeString": "literal_string \"Not a valid accountId given!\""
                                }
                              ],
                              "id": 7254,
                              "name": "revert",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [
                                4294967277,
                                4294967277
                              ],
                              "referencedDeclaration": 4294967277,
                              "src": "2977:6:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$",
                                "typeString": "function (string memory) pure"
                              }
                            },
                            "id": 7256,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2977:38:39",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$__$",
                              "typeString": "tuple()"
                            }
                          },
                          "id": 7257,
                          "nodeType": "ExpressionStatement",
                          "src": "2977:38:39"
                        }
                      ]
                    },
                    "id": 7259,
                    "nodeType": "IfStatement",
                    "src": "2770:256:39",
                    "trueBody": {
                      "id": 7253,
                      "nodeType": "Block",
                      "src": "2790:167:39",
                      "statements": [
                        {
                          "assignments": [
                            7237
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 7237,
                              "mutability": "mutable",
                              "name": "newHedgeFundAccount",
                              "nameLocation": "2821:19:39",
                              "nodeType": "VariableDeclaration",
                              "scope": 7253,
                              "src": "2804:36:39",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_HedgeFundAccount_$7314",
                                "typeString": "contract HedgeFundAccount"
                              },
                              "typeName": {
                                "id": 7236,
                                "nodeType": "UserDefinedTypeName",
                                "pathNode": {
                                  "id": 7235,
                                  "name": "HedgeFundAccount",
                                  "nodeType": "IdentifierPath",
                                  "referencedDeclaration": 7314,
                                  "src": "2804:16:39"
                                },
                                "referencedDeclaration": 7314,
                                "src": "2804:16:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_HedgeFundAccount_$7314",
                                  "typeString": "contract HedgeFundAccount"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 7242,
                          "initialValue": {
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "id": 7240,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "NewExpression",
                              "src": "2843:20:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_HedgeFundAccount_$7314_$",
                                "typeString": "function () returns (contract HedgeFundAccount)"
                              },
                              "typeName": {
                                "id": 7239,
                                "nodeType": "UserDefinedTypeName",
                                "pathNode": {
                                  "id": 7238,
                                  "name": "HedgeFundAccount",
                                  "nodeType": "IdentifierPath",
                                  "referencedDeclaration": 7314,
                                  "src": "2847:16:39"
                                },
                                "referencedDeclaration": 7314,
                                "src": "2847:16:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_HedgeFundAccount_$7314",
                                  "typeString": "contract HedgeFundAccount"
                                }
                              }
                            },
                            "id": 7241,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2843:22:39",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_HedgeFundAccount_$7314",
                              "typeString": "contract HedgeFundAccount"
                            }
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "2804:61:39"
                        },
                        {
                          "expression": {
                            "id": 7251,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftHandSide": {
                              "baseExpression": {
                                "id": 7243,
                                "name": "hedgeFundAccountRegistry",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7104,
                                "src": "2879:24:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_mapping$_t_address_$_t_address_$",
                                  "typeString": "mapping(address => address)"
                                }
                              },
                              "id": 7246,
                              "indexExpression": {
                                "expression": {
                                  "id": 7244,
                                  "name": "msg",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4294967281,
                                  "src": "2904:3:39",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_message",
                                    "typeString": "msg"
                                  }
                                },
                                "id": 7245,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "sender",
                                "nodeType": "MemberAccess",
                                "src": "2904:10:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": true,
                              "nodeType": "IndexAccess",
                              "src": "2879:36:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "nodeType": "Assignment",
                            "operator": "=",
                            "rightHandSide": {
                              "arguments": [
                                {
                                  "id": 7249,
                                  "name": "newHedgeFundAccount",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 7237,
                                  "src": "2926:19:39",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_HedgeFundAccount_$7314",
                                    "typeString": "contract HedgeFundAccount"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_HedgeFundAccount_$7314",
                                    "typeString": "contract HedgeFundAccount"
                                  }
                                ],
                                "id": 7248,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "2918:7:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": {
                                  "id": 7247,
                                  "name": "address",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "2918:7:39",
                                  "typeDescriptions": {}
                                }
                              },
                              "id": 7250,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2918:28:39",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "src": "2879:67:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "id": 7252,
                          "nodeType": "ExpressionStatement",
                          "src": "2879:67:39"
                        }
                      ]
                    }
                  },
                  "id": 7260,
                  "nodeType": "IfStatement",
                  "src": "2592:434:39",
                  "trueBody": {
                    "id": 7231,
                    "nodeType": "Block",
                    "src": "2612:152:39",
                    "statements": [
                      {
                        "assignments": [
                          7215
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 7215,
                            "mutability": "mutable",
                            "name": "newMarginAccount",
                            "nameLocation": "2640:16:39",
                            "nodeType": "VariableDeclaration",
                            "scope": 7231,
                            "src": "2626:30:39",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_MarginAccount_$7317",
                              "typeString": "contract MarginAccount"
                            },
                            "typeName": {
                              "id": 7214,
                              "nodeType": "UserDefinedTypeName",
                              "pathNode": {
                                "id": 7213,
                                "name": "MarginAccount",
                                "nodeType": "IdentifierPath",
                                "referencedDeclaration": 7317,
                                "src": "2626:13:39"
                              },
                              "referencedDeclaration": 7317,
                              "src": "2626:13:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_MarginAccount_$7317",
                                "typeString": "contract MarginAccount"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 7220,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 7218,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "NewExpression",
                            "src": "2659:17:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_MarginAccount_$7317_$",
                              "typeString": "function () returns (contract MarginAccount)"
                            },
                            "typeName": {
                              "id": 7217,
                              "nodeType": "UserDefinedTypeName",
                              "pathNode": {
                                "id": 7216,
                                "name": "MarginAccount",
                                "nodeType": "IdentifierPath",
                                "referencedDeclaration": 7317,
                                "src": "2663:13:39"
                              },
                              "referencedDeclaration": 7317,
                              "src": "2663:13:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_MarginAccount_$7317",
                                "typeString": "contract MarginAccount"
                              }
                            }
                          },
                          "id": 7219,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2659:19:39",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_MarginAccount_$7317",
                            "typeString": "contract MarginAccount"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2626:52:39"
                      },
                      {
                        "expression": {
                          "id": 7229,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "id": 7221,
                              "name": "marginAccountRegistry",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7100,
                              "src": "2692:21:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_address_$_t_address_$",
                                "typeString": "mapping(address => address)"
                              }
                            },
                            "id": 7224,
                            "indexExpression": {
                              "expression": {
                                "id": 7222,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4294967281,
                                "src": "2714:3:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 7223,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "src": "2714:10:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "2692:33:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 7227,
                                "name": "newMarginAccount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7215,
                                "src": "2736:16:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_MarginAccount_$7317",
                                  "typeString": "contract MarginAccount"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_contract$_MarginAccount_$7317",
                                  "typeString": "contract MarginAccount"
                                }
                              ],
                              "id": 7226,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "2728:7:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_address_$",
                                "typeString": "type(address)"
                              },
                              "typeName": {
                                "id": 7225,
                                "name": "address",
                                "nodeType": "ElementaryTypeName",
                                "src": "2728:7:39",
                                "typeDescriptions": {}
                              }
                            },
                            "id": 7228,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2728:25:39",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "src": "2692:61:39",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "id": 7230,
                        "nodeType": "ExpressionStatement",
                        "src": "2692:61:39"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": {
              "id": 7201,
              "nodeType": "StructuredDocumentation",
              "src": "2395:73:39",
              "text": " Create new user account with type based on `accountId`"
            },
            "functionSelector": "85a237a9",
            "id": 7262,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": [
                  {
                    "id": 7206,
                    "name": "accountId",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 7203,
                    "src": "2560:9:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  {
                    "hexValue": "66616c7365",
                    "id": 7207,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "bool",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "2571:5:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "value": "false"
                  }
                ],
                "id": 7208,
                "kind": "modifierInvocation",
                "modifierName": {
                  "id": 7205,
                  "name": "onlyAccountExist",
                  "nodeType": "IdentifierPath",
                  "referencedDeclaration": 7165,
                  "src": "2543:16:39"
                },
                "nodeType": "ModifierInvocation",
                "src": "2543:34:39"
              }
            ],
            "name": "createNewAccount",
            "nameLocation": "2482:16:39",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 7204,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 7203,
                  "mutability": "mutable",
                  "name": "accountId",
                  "nameLocation": "2507:9:39",
                  "nodeType": "VariableDeclaration",
                  "scope": 7262,
                  "src": "2499:17:39",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 7202,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2499:7:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2498:19:39"
            },
            "returnParameters": {
              "id": 7209,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2582:0:39"
            },
            "scope": 7311,
            "src": "2473:559:39",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": {
              "id": 7309,
              "nodeType": "Block",
              "src": "3292:215:39",
              "statements": [
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 7280,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 7278,
                      "name": "accountId",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 7265,
                      "src": "3306:9:39",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "hexValue": "30",
                      "id": 7279,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "3319:1:39",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "3306:14:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "condition": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 7294,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 7292,
                        "name": "accountId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 7265,
                        "src": "3403:9:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "==",
                      "rightExpression": {
                        "hexValue": "31",
                        "id": 7293,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3416:1:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_1_by_1",
                          "typeString": "int_const 1"
                        },
                        "value": "1"
                      },
                      "src": "3403:14:39",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "falseBody": {
                      "id": 7306,
                      "nodeType": "Block",
                      "src": "3499:2:39",
                      "statements": []
                    },
                    "id": 7307,
                    "nodeType": "IfStatement",
                    "src": "3399:102:39",
                    "trueBody": {
                      "id": 7305,
                      "nodeType": "Block",
                      "src": "3419:74:39",
                      "statements": [
                        {
                          "expression": {
                            "id": 7303,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftHandSide": {
                              "baseExpression": {
                                "id": 7295,
                                "name": "hedgeFundAccountRegistry",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7104,
                                "src": "3433:24:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_mapping$_t_address_$_t_address_$",
                                  "typeString": "mapping(address => address)"
                                }
                              },
                              "id": 7298,
                              "indexExpression": {
                                "expression": {
                                  "id": 7296,
                                  "name": "msg",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4294967281,
                                  "src": "3458:3:39",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_message",
                                    "typeString": "msg"
                                  }
                                },
                                "id": 7297,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "sender",
                                "nodeType": "MemberAccess",
                                "src": "3458:10:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": true,
                              "nodeType": "IndexAccess",
                              "src": "3433:36:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "nodeType": "Assignment",
                            "operator": "=",
                            "rightHandSide": {
                              "arguments": [
                                {
                                  "hexValue": "30",
                                  "id": 7301,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "3480:1:39",
                                  "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": 7300,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "3472:7:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": {
                                  "id": 7299,
                                  "name": "address",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "3472:7:39",
                                  "typeDescriptions": {}
                                }
                              },
                              "id": 7302,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "3472:10:39",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "src": "3433:49:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "id": 7304,
                          "nodeType": "ExpressionStatement",
                          "src": "3433:49:39"
                        }
                      ]
                    }
                  },
                  "id": 7308,
                  "nodeType": "IfStatement",
                  "src": "3302:199:39",
                  "trueBody": {
                    "id": 7291,
                    "nodeType": "Block",
                    "src": "3322:71:39",
                    "statements": [
                      {
                        "expression": {
                          "id": 7289,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "id": 7281,
                              "name": "marginAccountRegistry",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7100,
                              "src": "3336:21:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_address_$_t_address_$",
                                "typeString": "mapping(address => address)"
                              }
                            },
                            "id": 7284,
                            "indexExpression": {
                              "expression": {
                                "id": 7282,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4294967281,
                                "src": "3358:3:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 7283,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "src": "3358:10:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "3336:33:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "hexValue": "30",
                                "id": 7287,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "3380:1:39",
                                "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": 7286,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "3372:7:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_address_$",
                                "typeString": "type(address)"
                              },
                              "typeName": {
                                "id": 7285,
                                "name": "address",
                                "nodeType": "ElementaryTypeName",
                                "src": "3372:7:39",
                                "typeDescriptions": {}
                              }
                            },
                            "id": 7288,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3372:10:39",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "src": "3336:46:39",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "id": 7290,
                        "nodeType": "ExpressionStatement",
                        "src": "3336:46:39"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": {
              "id": 7263,
              "nodeType": "StructuredDocumentation",
              "src": "3038:70:39",
              "text": " Delete an existing user account of `accountAddress`"
            },
            "functionSelector": "a7a368fe",
            "id": 7310,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": [
                  {
                    "id": 7270,
                    "name": "accountId",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 7265,
                    "src": "3219:9:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  {
                    "hexValue": "74727565",
                    "id": 7271,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "bool",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "3230:4:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "value": "true"
                  }
                ],
                "id": 7272,
                "kind": "modifierInvocation",
                "modifierName": {
                  "id": 7269,
                  "name": "onlyAccountExist",
                  "nodeType": "IdentifierPath",
                  "referencedDeclaration": 7165,
                  "src": "3202:16:39"
                },
                "nodeType": "ModifierInvocation",
                "src": "3202:33:39"
              },
              {
                "arguments": [
                  {
                    "id": 7274,
                    "name": "accountId",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 7265,
                    "src": "3261:9:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  {
                    "id": 7275,
                    "name": "accountAddress",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 7267,
                    "src": "3272:14:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  }
                ],
                "id": 7276,
                "kind": "modifierInvocation",
                "modifierName": {
                  "id": 7273,
                  "name": "onlyAccountOwner",
                  "nodeType": "IdentifierPath",
                  "referencedDeclaration": 7124,
                  "src": "3244:16:39"
                },
                "nodeType": "ModifierInvocation",
                "src": "3244:43:39"
              }
            ],
            "name": "deleteAccount",
            "nameLocation": "3122:13:39",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 7268,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 7265,
                  "mutability": "mutable",
                  "name": "accountId",
                  "nameLocation": "3144:9:39",
                  "nodeType": "VariableDeclaration",
                  "scope": 7310,
                  "src": "3136:17:39",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 7264,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3136:7:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 7267,
                  "mutability": "mutable",
                  "name": "accountAddress",
                  "nameLocation": "3163:14:39",
                  "nodeType": "VariableDeclaration",
                  "scope": 7310,
                  "src": "3155:22:39",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 7266,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3155:7:39",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3135:43:39"
            },
            "returnParameters": {
              "id": 7277,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3292:0:39"
            },
            "scope": 7311,
            "src": "3113:394:39",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "public"
          }
        ],
        "scope": 7312,
        "src": "607:2902:39",
        "usedErrors": []
      }
    ],
    "src": "38:3472:39"
  },
  "legacyAST": {
    "absolutePath": "project:/contracts/account/AccountManager.sol",
    "exportedSymbols": {
      "AccountManager": [
        7311
      ],
      "HedgeFundAccount": [
        7314
      ],
      "MarginAccount": [
        7317
      ]
    },
    "id": 7312,
    "license": "AGPL-3.0",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 7092,
        "literals": [
          "solidity",
          "^",
          "0.8",
          ".11"
        ],
        "nodeType": "PragmaDirective",
        "src": "38:24:39"
      },
      {
        "absolutePath": "project:/contracts/account/MarginAccount.sol",
        "file": "./MarginAccount.sol",
        "id": 7093,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 7312,
        "sourceUnit": 7318,
        "src": "64:29:39",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "project:/contracts/account/HedgeFundAccount.sol",
        "file": "./HedgeFundAccount.sol",
        "id": 7094,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 7312,
        "sourceUnit": 7315,
        "src": "94:32:39",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "abstract": false,
        "baseContracts": [],
        "canonicalName": "AccountManager",
        "contractDependencies": [
          7314,
          7317
        ],
        "contractKind": "contract",
        "documentation": {
          "id": 7095,
          "nodeType": "StructuredDocumentation",
          "src": "128:478:39",
          "text": " THIS IS THE `AccountManager` contract\n Description:\n This contract will function as a manager + factory for the account contracts.\n Some of the main functionality for the `AccountManager` contract will be to:\n - Create a new user account\n - Delete an existing user account\n - Managing access control to protect user's account\n Currently there are two types of account:\n - Margin Account (accountId = 0)\n - Hedge Fund Account (accountId = 1)"
        },
        "fullyImplemented": true,
        "id": 7311,
        "linearizedBaseContracts": [
          7311
        ],
        "name": "AccountManager",
        "nameLocation": "616:14:39",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "constant": false,
            "documentation": {
              "id": 7096,
              "nodeType": "StructuredDocumentation",
              "src": "637:269:39",
              "text": " ACCOUNT REGISTRIES\n The registry variables is used to store users account information in mapping type\n - first address is for user address, e.g. msg.sender\n - second address is for account address (type: margin or hedge fund)"
            },
            "functionSelector": "41596f08",
            "id": 7100,
            "mutability": "mutable",
            "name": "marginAccountRegistry",
            "nameLocation": "946:21:39",
            "nodeType": "VariableDeclaration",
            "scope": 7311,
            "src": "911:56:39",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_mapping$_t_address_$_t_address_$",
              "typeString": "mapping(address => address)"
            },
            "typeName": {
              "id": 7099,
              "keyType": {
                "id": 7097,
                "name": "address",
                "nodeType": "ElementaryTypeName",
                "src": "919:7:39",
                "typeDescriptions": {
                  "typeIdentifier": "t_address",
                  "typeString": "address"
                }
              },
              "nodeType": "Mapping",
              "src": "911:27:39",
              "typeDescriptions": {
                "typeIdentifier": "t_mapping$_t_address_$_t_address_$",
                "typeString": "mapping(address => address)"
              },
              "valueType": {
                "id": 7098,
                "name": "address",
                "nodeType": "ElementaryTypeName",
                "src": "930:7:39",
                "stateMutability": "nonpayable",
                "typeDescriptions": {
                  "typeIdentifier": "t_address",
                  "typeString": "address"
                }
              }
            },
            "visibility": "public"
          },
          {
            "constant": false,
            "functionSelector": "c787c924",
            "id": 7104,
            "mutability": "mutable",
            "name": "hedgeFundAccountRegistry",
            "nameLocation": "1008:24:39",
            "nodeType": "VariableDeclaration",
            "scope": 7311,
            "src": "973:59:39",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_mapping$_t_address_$_t_address_$",
              "typeString": "mapping(address => address)"
            },
            "typeName": {
              "id": 7103,
              "keyType": {
                "id": 7101,
                "name": "address",
                "nodeType": "ElementaryTypeName",
                "src": "981:7:39",
                "typeDescriptions": {
                  "typeIdentifier": "t_address",
                  "typeString": "address"
                }
              },
              "nodeType": "Mapping",
              "src": "973:27:39",
              "typeDescriptions": {
                "typeIdentifier": "t_mapping$_t_address_$_t_address_$",
                "typeString": "mapping(address => address)"
              },
              "valueType": {
                "id": 7102,
                "name": "address",
                "nodeType": "ElementaryTypeName",
                "src": "992:7:39",
                "stateMutability": "nonpayable",
                "typeDescriptions": {
                  "typeIdentifier": "t_address",
                  "typeString": "address"
                }
              }
            },
            "visibility": "public"
          },
          {
            "body": {
              "id": 7123,
              "nodeType": "Block",
              "src": "1199:191:39",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "id": 7118,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "arguments": [
                            {
                              "id": 7113,
                              "name": "accountId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7107,
                              "src": "1252:9:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "expression": {
                                "id": 7114,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4294967281,
                                "src": "1263:3:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 7115,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "src": "1263:10:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            ],
                            "id": 7112,
                            "name": "getAccountAddressById",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7200,
                            "src": "1230:21:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_address_$returns$_t_address_$",
                              "typeString": "function (uint256,address) view returns (address)"
                            }
                          },
                          "id": 7116,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1230:44:39",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "id": 7117,
                          "name": "accountAddress",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 7109,
                          "src": "1278:14:39",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "src": "1230:62:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "596f7520617265206e6f7420746865206163636f756e74206f776e6572206f662074686973206163636f756e74206164647265737321",
                        "id": 7119,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1306:56:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_618531ce49e1580eb7546fba5da436232be0a2d19444432fb69404fd555f1936",
                          "typeString": "literal_string \"You are not the account owner of this account address!\""
                        },
                        "value": "You are not the account owner of this account address!"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_618531ce49e1580eb7546fba5da436232be0a2d19444432fb69404fd555f1936",
                          "typeString": "literal_string \"You are not the account owner of this account address!\""
                        }
                      ],
                      "id": 7111,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4294967278,
                        4294967278
                      ],
                      "referencedDeclaration": 4294967278,
                      "src": "1209:7:39",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 7120,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1209:163:39",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 7121,
                  "nodeType": "ExpressionStatement",
                  "src": "1209:163:39"
                },
                {
                  "id": 7122,
                  "nodeType": "PlaceholderStatement",
                  "src": "1382:1:39"
                }
              ]
            },
            "documentation": {
              "id": 7105,
              "nodeType": "StructuredDocumentation",
              "src": "1039:86:39",
              "text": " Check whether `msg.sender` is the account owner of `accountAddress`"
            },
            "id": 7124,
            "name": "onlyAccountOwner",
            "nameLocation": "1139:16:39",
            "nodeType": "ModifierDefinition",
            "parameters": {
              "id": 7110,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 7107,
                  "mutability": "mutable",
                  "name": "accountId",
                  "nameLocation": "1164:9:39",
                  "nodeType": "VariableDeclaration",
                  "scope": 7124,
                  "src": "1156:17:39",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 7106,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1156:7:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 7109,
                  "mutability": "mutable",
                  "name": "accountAddress",
                  "nameLocation": "1183:14:39",
                  "nodeType": "VariableDeclaration",
                  "scope": 7124,
                  "src": "1175:22:39",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 7108,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1175:7:39",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1155:43:39"
            },
            "src": "1130:260:39",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 7164,
              "nodeType": "Block",
              "src": "1547:408:39",
              "statements": [
                {
                  "condition": {
                    "id": 7131,
                    "name": "isExist",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 7129,
                    "src": "1561:7:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 7161,
                    "nodeType": "Block",
                    "src": "1757:181:39",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              "id": 7157,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "arguments": [
                                  {
                                    "id": 7149,
                                    "name": "accountId",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7127,
                                    "src": "1818:9:39",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 7150,
                                      "name": "msg",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4294967281,
                                      "src": "1829:3:39",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_magic_message",
                                        "typeString": "msg"
                                      }
                                    },
                                    "id": 7151,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "sender",
                                    "nodeType": "MemberAccess",
                                    "src": "1829:10:39",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  ],
                                  "id": 7148,
                                  "name": "getAccountAddressById",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 7200,
                                  "src": "1796:21:39",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_address_$returns$_t_address_$",
                                    "typeString": "function (uint256,address) view returns (address)"
                                  }
                                },
                                "id": 7152,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "1796:44:39",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "==",
                              "rightExpression": {
                                "arguments": [
                                  {
                                    "hexValue": "30",
                                    "id": 7155,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "1852:1:39",
                                    "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": 7154,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "1844:7:39",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_address_$",
                                    "typeString": "type(address)"
                                  },
                                  "typeName": {
                                    "id": 7153,
                                    "name": "address",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "1844:7:39",
                                    "typeDescriptions": {}
                                  }
                                },
                                "id": 7156,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "1844:10:39",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "src": "1796:58:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "hexValue": "416e206578697374696e67206163636f756e7420666f756e6420666f7220746865207573657221",
                              "id": 7158,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "string",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1872:41:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_stringliteral_27d1d6a062508ad4ef9c01f7c8415ee8f68b0c03924ead359caa5fb3c46607bb",
                                "typeString": "literal_string \"An existing account found for the user!\""
                              },
                              "value": "An existing account found for the user!"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_stringliteral_27d1d6a062508ad4ef9c01f7c8415ee8f68b0c03924ead359caa5fb3c46607bb",
                                "typeString": "literal_string \"An existing account found for the user!\""
                              }
                            ],
                            "id": 7147,
                            "name": "require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              4294967278,
                              4294967278
                            ],
                            "referencedDeclaration": 4294967278,
                            "src": "1771:7:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                              "typeString": "function (bool,string memory) pure"
                            }
                          },
                          "id": 7159,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1771:156:39",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 7160,
                        "nodeType": "ExpressionStatement",
                        "src": "1771:156:39"
                      }
                    ]
                  },
                  "id": 7162,
                  "nodeType": "IfStatement",
                  "src": "1557:381:39",
                  "trueBody": {
                    "id": 7146,
                    "nodeType": "Block",
                    "src": "1570:181:39",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              "id": 7142,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "arguments": [
                                  {
                                    "id": 7134,
                                    "name": "accountId",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7127,
                                    "src": "1631:9:39",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 7135,
                                      "name": "msg",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4294967281,
                                      "src": "1642:3:39",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_magic_message",
                                        "typeString": "msg"
                                      }
                                    },
                                    "id": 7136,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "sender",
                                    "nodeType": "MemberAccess",
                                    "src": "1642:10:39",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  ],
                                  "id": 7133,
                                  "name": "getAccountAddressById",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 7200,
                                  "src": "1609:21:39",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_address_$returns$_t_address_$",
                                    "typeString": "function (uint256,address) view returns (address)"
                                  }
                                },
                                "id": 7137,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "1609:44:39",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "!=",
                              "rightExpression": {
                                "arguments": [
                                  {
                                    "hexValue": "30",
                                    "id": 7140,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "1665:1:39",
                                    "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": 7139,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "1657:7:39",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_address_$",
                                    "typeString": "type(address)"
                                  },
                                  "typeName": {
                                    "id": 7138,
                                    "name": "address",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "1657:7:39",
                                    "typeDescriptions": {}
                                  }
                                },
                                "id": 7141,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "1657:10:39",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "src": "1609:58:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "hexValue": "4e6f206578697374696e67206163636f756e7420666f756e6420666f7220746865207573657221",
                              "id": 7143,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "string",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1685:41:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_stringliteral_46ff4170890dba931d86a0f349a11b3c83a9006cb94de9299cf8e82fd2c10cb5",
                                "typeString": "literal_string \"No existing account found for the user!\""
                              },
                              "value": "No existing account found for the user!"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_stringliteral_46ff4170890dba931d86a0f349a11b3c83a9006cb94de9299cf8e82fd2c10cb5",
                                "typeString": "literal_string \"No existing account found for the user!\""
                              }
                            ],
                            "id": 7132,
                            "name": "require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              4294967278,
                              4294967278
                            ],
                            "referencedDeclaration": 4294967278,
                            "src": "1584:7:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                              "typeString": "function (bool,string memory) pure"
                            }
                          },
                          "id": 7144,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1584:156:39",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 7145,
                        "nodeType": "ExpressionStatement",
                        "src": "1584:156:39"
                      }
                    ]
                  }
                },
                {
                  "id": 7163,
                  "nodeType": "PlaceholderStatement",
                  "src": "1947:1:39"
                }
              ]
            },
            "documentation": {
              "id": 7125,
              "nodeType": "StructuredDocumentation",
              "src": "1396:87:39",
              "text": " To check whether the user has an existing account based on `isExist`"
            },
            "id": 7165,
            "name": "onlyAccountExist",
            "nameLocation": "1497:16:39",
            "nodeType": "ModifierDefinition",
            "parameters": {
              "id": 7130,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 7127,
                  "mutability": "mutable",
                  "name": "accountId",
                  "nameLocation": "1522:9:39",
                  "nodeType": "VariableDeclaration",
                  "scope": 7165,
                  "src": "1514:17:39",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 7126,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1514:7:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 7129,
                  "mutability": "mutable",
                  "name": "isExist",
                  "nameLocation": "1538:7:39",
                  "nodeType": "VariableDeclaration",
                  "scope": 7165,
                  "src": "1533:12:39",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 7128,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "1533:4:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1513:33:39"
            },
            "src": "1488:467:39",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 7199,
              "nodeType": "Block",
              "src": "2148:241:39",
              "statements": [
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 7177,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 7175,
                      "name": "accountId",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 7168,
                      "src": "2162:9:39",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "hexValue": "30",
                      "id": 7176,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "2175:1:39",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "2162:14:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "condition": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 7185,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 7183,
                        "name": "accountId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 7168,
                        "src": "2252:9:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "==",
                      "rightExpression": {
                        "hexValue": "31",
                        "id": 7184,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2265:1:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_1_by_1",
                          "typeString": "int_const 1"
                        },
                        "value": "1"
                      },
                      "src": "2252:14:39",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "falseBody": {
                      "id": 7196,
                      "nodeType": "Block",
                      "src": "2341:42:39",
                      "statements": [
                        {
                          "expression": {
                            "arguments": [
                              {
                                "hexValue": "30",
                                "id": 7193,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "2370:1:39",
                                "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": 7192,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "2362:7:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_address_$",
                                "typeString": "type(address)"
                              },
                              "typeName": {
                                "id": 7191,
                                "name": "address",
                                "nodeType": "ElementaryTypeName",
                                "src": "2362:7:39",
                                "typeDescriptions": {}
                              }
                            },
                            "id": 7194,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2362:10:39",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "functionReturnParameters": 7174,
                          "id": 7195,
                          "nodeType": "Return",
                          "src": "2355:17:39"
                        }
                      ]
                    },
                    "id": 7197,
                    "nodeType": "IfStatement",
                    "src": "2248:135:39",
                    "trueBody": {
                      "id": 7190,
                      "nodeType": "Block",
                      "src": "2268:67:39",
                      "statements": [
                        {
                          "expression": {
                            "baseExpression": {
                              "id": 7186,
                              "name": "hedgeFundAccountRegistry",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7104,
                              "src": "2289:24:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_address_$_t_address_$",
                                "typeString": "mapping(address => address)"
                              }
                            },
                            "id": 7188,
                            "indexExpression": {
                              "id": 7187,
                              "name": "msgSender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7170,
                              "src": "2314:9:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "IndexAccess",
                            "src": "2289:35:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "functionReturnParameters": 7174,
                          "id": 7189,
                          "nodeType": "Return",
                          "src": "2282:42:39"
                        }
                      ]
                    }
                  },
                  "id": 7198,
                  "nodeType": "IfStatement",
                  "src": "2158:225:39",
                  "trueBody": {
                    "id": 7182,
                    "nodeType": "Block",
                    "src": "2178:64:39",
                    "statements": [
                      {
                        "expression": {
                          "baseExpression": {
                            "id": 7178,
                            "name": "marginAccountRegistry",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7100,
                            "src": "2199:21:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_address_$_t_address_$",
                              "typeString": "mapping(address => address)"
                            }
                          },
                          "id": 7180,
                          "indexExpression": {
                            "id": 7179,
                            "name": "msgSender",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7170,
                            "src": "2221:9:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "2199:32:39",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "functionReturnParameters": 7174,
                        "id": 7181,
                        "nodeType": "Return",
                        "src": "2192:39:39"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": {
              "id": 7166,
              "nodeType": "StructuredDocumentation",
              "src": "1961:53:39",
              "text": " Get Account address by `accountId`"
            },
            "id": 7200,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "getAccountAddressById",
            "nameLocation": "2028:21:39",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 7171,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 7168,
                  "mutability": "mutable",
                  "name": "accountId",
                  "nameLocation": "2058:9:39",
                  "nodeType": "VariableDeclaration",
                  "scope": 7200,
                  "src": "2050:17:39",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 7167,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2050:7:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 7170,
                  "mutability": "mutable",
                  "name": "msgSender",
                  "nameLocation": "2077:9:39",
                  "nodeType": "VariableDeclaration",
                  "scope": 7200,
                  "src": "2069:17:39",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 7169,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "2069:7:39",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2049:38:39"
            },
            "returnParameters": {
              "id": 7174,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 7173,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 7200,
                  "src": "2135:7:39",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 7172,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "2135:7:39",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2134:9:39"
            },
            "scope": 7311,
            "src": "2019:370:39",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 7261,
              "nodeType": "Block",
              "src": "2582:450:39",
              "statements": [
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 7212,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 7210,
                      "name": "accountId",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 7203,
                      "src": "2596:9:39",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "hexValue": "30",
                      "id": 7211,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "2609:1:39",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "2596:14:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "condition": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 7234,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 7232,
                        "name": "accountId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 7203,
                        "src": "2774:9:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "==",
                      "rightExpression": {
                        "hexValue": "31",
                        "id": 7233,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2787:1:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_1_by_1",
                          "typeString": "int_const 1"
                        },
                        "value": "1"
                      },
                      "src": "2774:14:39",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "falseBody": {
                      "id": 7258,
                      "nodeType": "Block",
                      "src": "2963:63:39",
                      "statements": [
                        {
                          "expression": {
                            "arguments": [
                              {
                                "hexValue": "4e6f7420612076616c6964206163636f756e74496420676976656e21",
                                "id": 7255,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "string",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "2984:30:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_stringliteral_15f7cccdd529e230fa3f5cde8f5e4708c0979762d555cc2f8991d383cd98b14c",
                                  "typeString": "literal_string \"Not a valid accountId given!\""
                                },
                                "value": "Not a valid accountId given!"
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_stringliteral_15f7cccdd529e230fa3f5cde8f5e4708c0979762d555cc2f8991d383cd98b14c",
                                  "typeString": "literal_string \"Not a valid accountId given!\""
                                }
                              ],
                              "id": 7254,
                              "name": "revert",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [
                                4294967277,
                                4294967277
                              ],
                              "referencedDeclaration": 4294967277,
                              "src": "2977:6:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$",
                                "typeString": "function (string memory) pure"
                              }
                            },
                            "id": 7256,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2977:38:39",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$__$",
                              "typeString": "tuple()"
                            }
                          },
                          "id": 7257,
                          "nodeType": "ExpressionStatement",
                          "src": "2977:38:39"
                        }
                      ]
                    },
                    "id": 7259,
                    "nodeType": "IfStatement",
                    "src": "2770:256:39",
                    "trueBody": {
                      "id": 7253,
                      "nodeType": "Block",
                      "src": "2790:167:39",
                      "statements": [
                        {
                          "assignments": [
                            7237
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 7237,
                              "mutability": "mutable",
                              "name": "newHedgeFundAccount",
                              "nameLocation": "2821:19:39",
                              "nodeType": "VariableDeclaration",
                              "scope": 7253,
                              "src": "2804:36:39",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_HedgeFundAccount_$7314",
                                "typeString": "contract HedgeFundAccount"
                              },
                              "typeName": {
                                "id": 7236,
                                "nodeType": "UserDefinedTypeName",
                                "pathNode": {
                                  "id": 7235,
                                  "name": "HedgeFundAccount",
                                  "nodeType": "IdentifierPath",
                                  "referencedDeclaration": 7314,
                                  "src": "2804:16:39"
                                },
                                "referencedDeclaration": 7314,
                                "src": "2804:16:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_HedgeFundAccount_$7314",
                                  "typeString": "contract HedgeFundAccount"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 7242,
                          "initialValue": {
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "id": 7240,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "NewExpression",
                              "src": "2843:20:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_HedgeFundAccount_$7314_$",
                                "typeString": "function () returns (contract HedgeFundAccount)"
                              },
                              "typeName": {
                                "id": 7239,
                                "nodeType": "UserDefinedTypeName",
                                "pathNode": {
                                  "id": 7238,
                                  "name": "HedgeFundAccount",
                                  "nodeType": "IdentifierPath",
                                  "referencedDeclaration": 7314,
                                  "src": "2847:16:39"
                                },
                                "referencedDeclaration": 7314,
                                "src": "2847:16:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_HedgeFundAccount_$7314",
                                  "typeString": "contract HedgeFundAccount"
                                }
                              }
                            },
                            "id": 7241,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2843:22:39",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_HedgeFundAccount_$7314",
                              "typeString": "contract HedgeFundAccount"
                            }
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "2804:61:39"
                        },
                        {
                          "expression": {
                            "id": 7251,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftHandSide": {
                              "baseExpression": {
                                "id": 7243,
                                "name": "hedgeFundAccountRegistry",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7104,
                                "src": "2879:24:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_mapping$_t_address_$_t_address_$",
                                  "typeString": "mapping(address => address)"
                                }
                              },
                              "id": 7246,
                              "indexExpression": {
                                "expression": {
                                  "id": 7244,
                                  "name": "msg",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4294967281,
                                  "src": "2904:3:39",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_message",
                                    "typeString": "msg"
                                  }
                                },
                                "id": 7245,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "sender",
                                "nodeType": "MemberAccess",
                                "src": "2904:10:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": true,
                              "nodeType": "IndexAccess",
                              "src": "2879:36:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "nodeType": "Assignment",
                            "operator": "=",
                            "rightHandSide": {
                              "arguments": [
                                {
                                  "id": 7249,
                                  "name": "newHedgeFundAccount",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 7237,
                                  "src": "2926:19:39",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_HedgeFundAccount_$7314",
                                    "typeString": "contract HedgeFundAccount"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_HedgeFundAccount_$7314",
                                    "typeString": "contract HedgeFundAccount"
                                  }
                                ],
                                "id": 7248,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "2918:7:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": {
                                  "id": 7247,
                                  "name": "address",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "2918:7:39",
                                  "typeDescriptions": {}
                                }
                              },
                              "id": 7250,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2918:28:39",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "src": "2879:67:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "id": 7252,
                          "nodeType": "ExpressionStatement",
                          "src": "2879:67:39"
                        }
                      ]
                    }
                  },
                  "id": 7260,
                  "nodeType": "IfStatement",
                  "src": "2592:434:39",
                  "trueBody": {
                    "id": 7231,
                    "nodeType": "Block",
                    "src": "2612:152:39",
                    "statements": [
                      {
                        "assignments": [
                          7215
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 7215,
                            "mutability": "mutable",
                            "name": "newMarginAccount",
                            "nameLocation": "2640:16:39",
                            "nodeType": "VariableDeclaration",
                            "scope": 7231,
                            "src": "2626:30:39",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_MarginAccount_$7317",
                              "typeString": "contract MarginAccount"
                            },
                            "typeName": {
                              "id": 7214,
                              "nodeType": "UserDefinedTypeName",
                              "pathNode": {
                                "id": 7213,
                                "name": "MarginAccount",
                                "nodeType": "IdentifierPath",
                                "referencedDeclaration": 7317,
                                "src": "2626:13:39"
                              },
                              "referencedDeclaration": 7317,
                              "src": "2626:13:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_MarginAccount_$7317",
                                "typeString": "contract MarginAccount"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 7220,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 7218,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "NewExpression",
                            "src": "2659:17:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_MarginAccount_$7317_$",
                              "typeString": "function () returns (contract MarginAccount)"
                            },
                            "typeName": {
                              "id": 7217,
                              "nodeType": "UserDefinedTypeName",
                              "pathNode": {
                                "id": 7216,
                                "name": "MarginAccount",
                                "nodeType": "IdentifierPath",
                                "referencedDeclaration": 7317,
                                "src": "2663:13:39"
                              },
                              "referencedDeclaration": 7317,
                              "src": "2663:13:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_MarginAccount_$7317",
                                "typeString": "contract MarginAccount"
                              }
                            }
                          },
                          "id": 7219,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2659:19:39",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_MarginAccount_$7317",
                            "typeString": "contract MarginAccount"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2626:52:39"
                      },
                      {
                        "expression": {
                          "id": 7229,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "id": 7221,
                              "name": "marginAccountRegistry",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7100,
                              "src": "2692:21:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_address_$_t_address_$",
                                "typeString": "mapping(address => address)"
                              }
                            },
                            "id": 7224,
                            "indexExpression": {
                              "expression": {
                                "id": 7222,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4294967281,
                                "src": "2714:3:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 7223,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "src": "2714:10:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "2692:33:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 7227,
                                "name": "newMarginAccount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7215,
                                "src": "2736:16:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_MarginAccount_$7317",
                                  "typeString": "contract MarginAccount"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_contract$_MarginAccount_$7317",
                                  "typeString": "contract MarginAccount"
                                }
                              ],
                              "id": 7226,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "2728:7:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_address_$",
                                "typeString": "type(address)"
                              },
                              "typeName": {
                                "id": 7225,
                                "name": "address",
                                "nodeType": "ElementaryTypeName",
                                "src": "2728:7:39",
                                "typeDescriptions": {}
                              }
                            },
                            "id": 7228,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2728:25:39",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "src": "2692:61:39",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "id": 7230,
                        "nodeType": "ExpressionStatement",
                        "src": "2692:61:39"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": {
              "id": 7201,
              "nodeType": "StructuredDocumentation",
              "src": "2395:73:39",
              "text": " Create new user account with type based on `accountId`"
            },
            "functionSelector": "85a237a9",
            "id": 7262,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": [
                  {
                    "id": 7206,
                    "name": "accountId",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 7203,
                    "src": "2560:9:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  {
                    "hexValue": "66616c7365",
                    "id": 7207,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "bool",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "2571:5:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "value": "false"
                  }
                ],
                "id": 7208,
                "kind": "modifierInvocation",
                "modifierName": {
                  "id": 7205,
                  "name": "onlyAccountExist",
                  "nodeType": "IdentifierPath",
                  "referencedDeclaration": 7165,
                  "src": "2543:16:39"
                },
                "nodeType": "ModifierInvocation",
                "src": "2543:34:39"
              }
            ],
            "name": "createNewAccount",
            "nameLocation": "2482:16:39",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 7204,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 7203,
                  "mutability": "mutable",
                  "name": "accountId",
                  "nameLocation": "2507:9:39",
                  "nodeType": "VariableDeclaration",
                  "scope": 7262,
                  "src": "2499:17:39",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 7202,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2499:7:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2498:19:39"
            },
            "returnParameters": {
              "id": 7209,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2582:0:39"
            },
            "scope": 7311,
            "src": "2473:559:39",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": {
              "id": 7309,
              "nodeType": "Block",
              "src": "3292:215:39",
              "statements": [
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 7280,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 7278,
                      "name": "accountId",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 7265,
                      "src": "3306:9:39",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "hexValue": "30",
                      "id": 7279,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "3319:1:39",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "3306:14:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "condition": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 7294,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 7292,
                        "name": "accountId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 7265,
                        "src": "3403:9:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "==",
                      "rightExpression": {
                        "hexValue": "31",
                        "id": 7293,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3416:1:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_1_by_1",
                          "typeString": "int_const 1"
                        },
                        "value": "1"
                      },
                      "src": "3403:14:39",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "falseBody": {
                      "id": 7306,
                      "nodeType": "Block",
                      "src": "3499:2:39",
                      "statements": []
                    },
                    "id": 7307,
                    "nodeType": "IfStatement",
                    "src": "3399:102:39",
                    "trueBody": {
                      "id": 7305,
                      "nodeType": "Block",
                      "src": "3419:74:39",
                      "statements": [
                        {
                          "expression": {
                            "id": 7303,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftHandSide": {
                              "baseExpression": {
                                "id": 7295,
                                "name": "hedgeFundAccountRegistry",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7104,
                                "src": "3433:24:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_mapping$_t_address_$_t_address_$",
                                  "typeString": "mapping(address => address)"
                                }
                              },
                              "id": 7298,
                              "indexExpression": {
                                "expression": {
                                  "id": 7296,
                                  "name": "msg",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4294967281,
                                  "src": "3458:3:39",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_message",
                                    "typeString": "msg"
                                  }
                                },
                                "id": 7297,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "sender",
                                "nodeType": "MemberAccess",
                                "src": "3458:10:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": true,
                              "nodeType": "IndexAccess",
                              "src": "3433:36:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "nodeType": "Assignment",
                            "operator": "=",
                            "rightHandSide": {
                              "arguments": [
                                {
                                  "hexValue": "30",
                                  "id": 7301,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "3480:1:39",
                                  "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": 7300,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "3472:7:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": {
                                  "id": 7299,
                                  "name": "address",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "3472:7:39",
                                  "typeDescriptions": {}
                                }
                              },
                              "id": 7302,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "3472:10:39",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "src": "3433:49:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "id": 7304,
                          "nodeType": "ExpressionStatement",
                          "src": "3433:49:39"
                        }
                      ]
                    }
                  },
                  "id": 7308,
                  "nodeType": "IfStatement",
                  "src": "3302:199:39",
                  "trueBody": {
                    "id": 7291,
                    "nodeType": "Block",
                    "src": "3322:71:39",
                    "statements": [
                      {
                        "expression": {
                          "id": 7289,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "id": 7281,
                              "name": "marginAccountRegistry",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7100,
                              "src": "3336:21:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_address_$_t_address_$",
                                "typeString": "mapping(address => address)"
                              }
                            },
                            "id": 7284,
                            "indexExpression": {
                              "expression": {
                                "id": 7282,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4294967281,
                                "src": "3358:3:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 7283,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "src": "3358:10:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "3336:33:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "hexValue": "30",
                                "id": 7287,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "3380:1:39",
                                "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": 7286,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "3372:7:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_address_$",
                                "typeString": "type(address)"
                              },
                              "typeName": {
                                "id": 7285,
                                "name": "address",
                                "nodeType": "ElementaryTypeName",
                                "src": "3372:7:39",
                                "typeDescriptions": {}
                              }
                            },
                            "id": 7288,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3372:10:39",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "src": "3336:46:39",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "id": 7290,
                        "nodeType": "ExpressionStatement",
                        "src": "3336:46:39"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": {
              "id": 7263,
              "nodeType": "StructuredDocumentation",
              "src": "3038:70:39",
              "text": " Delete an existing user account of `accountAddress`"
            },
            "functionSelector": "a7a368fe",
            "id": 7310,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": [
                  {
                    "id": 7270,
                    "name": "accountId",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 7265,
                    "src": "3219:9:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  {
                    "hexValue": "74727565",
                    "id": 7271,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "bool",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "3230:4:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "value": "true"
                  }
                ],
                "id": 7272,
                "kind": "modifierInvocation",
                "modifierName": {
                  "id": 7269,
                  "name": "onlyAccountExist",
                  "nodeType": "IdentifierPath",
                  "referencedDeclaration": 7165,
                  "src": "3202:16:39"
                },
                "nodeType": "ModifierInvocation",
                "src": "3202:33:39"
              },
              {
                "arguments": [
                  {
                    "id": 7274,
                    "name": "accountId",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 7265,
                    "src": "3261:9:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  {
                    "id": 7275,
                    "name": "accountAddress",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 7267,
                    "src": "3272:14:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  }
                ],
                "id": 7276,
                "kind": "modifierInvocation",
                "modifierName": {
                  "id": 7273,
                  "name": "onlyAccountOwner",
                  "nodeType": "IdentifierPath",
                  "referencedDeclaration": 7124,
                  "src": "3244:16:39"
                },
                "nodeType": "ModifierInvocation",
                "src": "3244:43:39"
              }
            ],
            "name": "deleteAccount",
            "nameLocation": "3122:13:39",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 7268,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 7265,
                  "mutability": "mutable",
                  "name": "accountId",
                  "nameLocation": "3144:9:39",
                  "nodeType": "VariableDeclaration",
                  "scope": 7310,
                  "src": "3136:17:39",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 7264,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3136:7:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 7267,
                  "mutability": "mutable",
                  "name": "accountAddress",
                  "nameLocation": "3163:14:39",
                  "nodeType": "VariableDeclaration",
                  "scope": 7310,
                  "src": "3155:22:39",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 7266,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3155:7:39",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3135:43:39"
            },
            "returnParameters": {
              "id": 7277,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3292:0:39"
            },
            "scope": 7311,
            "src": "3113:394:39",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "public"
          }
        ],
        "scope": 7312,
        "src": "607:2902:39",
        "usedErrors": []
      }
    ],
    "src": "38:3472:39"
  },
  "compiler": {
    "name": "solc",
    "version": "0.8.11+commit.d7f03943.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.4.4",
  "updatedAt": "2022-03-06T23:47:11.077Z",
  "devdoc": {
    "kind": "dev",
    "methods": {},
    "version": 1
  },
  "userdoc": {
    "kind": "user",
    "methods": {
      "createNewAccount(uint256)": {
        "notice": "Create new user account with type based on `accountId`"
      },
      "deleteAccount(uint256,address)": {
        "notice": "Delete an existing user account of `accountAddress`"
      },
      "marginAccountRegistry(address)": {
        "notice": "ACCOUNT REGISTRIES The registry variables is used to store users account information in mapping type - first address is for user address, e.g. msg.sender - second address is for account address (type: margin or hedge fund)"
      }
    },
    "notice": "THIS IS THE `AccountManager` contract Description: This contract will function as a manager + factory for the account contracts. Some of the main functionality for the `AccountManager` contract will be to: - Create a new user account - Delete an existing user account - Managing access control to protect user's account Currently there are two types of account: - Margin Account (accountId = 0) - Hedge Fund Account (accountId = 1)",
    "version": 1
  }
}