{"_id":"@synthetixio/router","_rev":"39-cd13c46f958872837baaf41b1dec518c","name":"@synthetixio/router","dist-tags":{"canary":"3.0.3-alpha.900","dev":"3.1.1-dev.6ad35880","alpha":"3.3.5-alpha.0","latest":"3.4.0"},"versions":{"1.0.5":{"name":"@synthetixio/router","version":"1.0.5","keywords":["deploy","solidity"],"author":{"name":"Synthetix"},"license":"MIT","_id":"@synthetixio/router@1.0.5","maintainers":[{"name":"joey-synthetix","email":"joey@cc.snxdao.io"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"synthetixio-team","email":"engineering@synthetix.io"},{"name":"ajsantander","email":"palebluedot@gmail.com"},{"name":"drptbl","email":"jakub.mucha@icloud.com"},{"name":"andytcf","email":"andy@synthetix.io"},{"name":"klbyte","email":"git@danb.email"}],"dist":{"shasum":"7519418ce65665edfa3d1f62a83b4f857e1d1a91","tarball":"https://registry.npmjs.org/@synthetixio/router/-/router-1.0.5.tgz","fileCount":105,"integrity":"sha512-y5NknPg5cCJrVNHqmsYpAj/OFhti6zsDI4m7JrZqq083A2einNAqHxmsgCrUv9/LxATgE4Q3Yyp7vwOvQvb/iQ==","signatures":[{"sig":"MEUCIEvr9iMfbpYDKUjlxyMs8q5yKmyoKrp7ts4B6pCCpWtBAiEA1FmG1pHTJtbY390wKDYYU+O980/whtoCwz6FPX+hNr0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":185575,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjuf+eACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpuPw/+Nhk/GzEv9L/vejOI2HgP8eZpBCDey9dDXaL9pJ78xIV+KoKF\r\n1aCR2CxOtcaNYIo9sWxk23pv8zz5kUxkw17a0F5YhXkVeGfhVFGP3iK5vIqF\r\n+KYtFsMlo7WBbV0zpY6XCeyAqO9uOmo1PuwkwbMk6FCQVnby5jJ828I1hSzH\r\nmqjZJDtkNsoMQBvW5DmFeoQn45jBQPdmfc+f88r5BXasdtmPstqOvtIL47SC\r\nklwfBqqr17EJVHRFHvdGm5bt7bbsslXDYDEaSd9PV0gmzVZohC7NZIrNb2vg\r\naNyTj9ZjzWxftj3Ankqf66tP1hZCyq4+8IvUUfoCYk+yDWZcVT316kHxtei5\r\nbF4/4re1HZN+Sx7NJOjq6r/YLgH3BtiIhdC/x+vyCA2ZNi1ooEoM58G9L1jJ\r\nkDjBk0soLUmZ6Tip3/eIbvS6uOF+LbDTz4sp8sJXNIBYcpe1vQha4kKQBq6b\r\n8gFqiXlAYhqL64MjYe3Tz8r1+X17y4r/HllEZ60o0VLnIIMB1Wvr1WKdlRg8\r\n/nVOSrTLkbW6/tjGVyMfx7tBbSY16Z2PO1g/TIdBcezYaELNTffvxsADVGwK\r\nP0hhcPpWDliX5Itvga0ZcBCD4UJOVrJc0nI8m/UCYL4HVTkBoXrNL8bMWSDN\r\nwgyqJD+C8bUPZrK2OCHXjnA9NwrQKYYXoxs=\r\n=o87C\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","source":"src/index.ts","gitHead":"f088d650ce17fc5e51f023217c5422280d22a4f0","scripts":{"test":"TS_NODE_PROJECT='test/tsconfig.json' mocha -r ts-node/register -r tsconfig-paths/register -r source-map-support/register","build":"tsc --project tsconfig.json","watch":"npm run build -- --watch","coverage":"nyc npm run test","test:watch":"npm run test -- --watch","prepublishOnly":"npm run build"},"_npmUser":{"name":"klbyte","email":"git@danb.email"},"_npmVersion":"8.19.2","description":"Synthetix Router Proxy Architecture Manager","directories":{},"_nodeVersion":"19.3.0","dependencies":{"ajv":"^8.11.0","solc":"^0.8.17","axios":"1.2.0","debug":"4.3.4","lodash":"4.17.21","mustache":"4.2.0","solidity-ast":"0.4.26"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","mocha":"9.1.1","typechain":"8.1.1","@types/debug":"4.1.7","@types/lodash":"4.14.191","tsconfig-paths":"4.1.0","@types/jsonpath":"0.2.0","@types/mustache":"4.2.1","@usecannon/builder":">=1.1.20","source-map-support":"0.5.21"},"peerDependencies":{"@usecannon/builder":">=1.1.20"},"peerDependenciesMeta":{"@usecannon/builder":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/router_1.0.5_1673133981832_0.9080839700474885","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@synthetixio/router","version":"1.1.0","keywords":["deploy","solidity"],"author":{"name":"Synthetix"},"license":"MIT","_id":"@synthetixio/router@1.1.0","maintainers":[{"name":"joey-synthetix","email":"joey@cc.snxdao.io"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"synthetixio-team","email":"engineering@synthetix.io"},{"name":"ajsantander","email":"palebluedot@gmail.com"},{"name":"drptbl","email":"jakub.mucha@icloud.com"},{"name":"andytcf","email":"andy@synthetix.io"},{"name":"klbyte","email":"git@danb.email"}],"dist":{"shasum":"9675203a41ef99b6b99372670c511d7cea752bfc","tarball":"https://registry.npmjs.org/@synthetixio/router/-/router-1.1.0.tgz","fileCount":46,"integrity":"sha512-u7uLw/gJ/h9zlhk1I0ZOt2OpBOR1e+H76cPHs1btjrY7R1sxR4+NmvzYo56AHfmhuYg8YkXNd0A8fb6xXcZDNA==","signatures":[{"sig":"MEYCIQCo+Nltz/SRTDQQNB1Ey4k8Awivn7xQ9OKyfZmMIz/BPQIhAPnEhK7yZzi9+6IPefhmcG9XqcABjvovXoSN4mQbGic7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":114930,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjxKFIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmosFQ/+MQITPL/Fo5M2GuTK/TCxix18UXrxFvk84ZekJWU35MbnO7ND\r\nH5xWqN7rih0hwt+yU0nFN9HO5bFCrs9SphFNq71gaEcPPrZuQNQXgrVhQf9R\r\ni+x72dIqRb1T2TEoP/0LEuxvjG5cNRy2dU4iQsclXrBrKGgyijFrC0xoCPK/\r\nciN25SsO+b99dO2wA2mBjE7MA13dsKzJmQCwUK58PLAevHOWwP05qqWF4FvV\r\njWhQMs4EtfEzK7E5U0XVlhITZHPgAPpI5Xzz10TIFGbIUfg1XfRbXu8G/bKy\r\nZAtfRb0OOSk2elEvVAUt7gj0L9JlUJp9KkcqwD0l8+N09W5brJtBZVOxjO+O\r\nXuj5Qz2J5T8pwuIjdQHS9rN0AzgWe0kR3y1g87X9+kTgLgPKejNaoh9vF4Hh\r\niIDB0v5vdfXhp1tPdYWKstoqbyTVFAlzVB5D3lq71Xk7/jCoOqDOfuotZAg5\r\nhQKq8E/Ep0tW/US/DI0OsiN+su2nxMRoulYEkC4Mbs9R8LkPa81LbMys/Q41\r\n5t8N8RAOOTTbwiMyAmEVwuEQhDQNQlG4Byl0cOiDDBoUrlaAxDvWFQ0vnwhj\r\n1xLs8Rtfvl3KAT5pcwvHjcyaZ0jMN/5cnPY/9uonXvMK+ThSbyHH1mTzowex\r\nGHWiaEfHbiPj5W4ZpvxevCgHYFRvjnzxczA=\r\n=gCI0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/src/index.js","types":"dist/src/index.d.ts","cannon":"dist/src/utils/cannon.js","source":"src/index.ts","gitHead":"82b635a039614a15ef24072f04f75356d9b2f4f0","scripts":{"test":"TS_NODE_PROJECT='test/tsconfig.json' mocha -r ts-node/register -r tsconfig-paths/register -r source-map-support/register","build":"tsc --project tsconfig.json && cp -r templates dist/","watch":"npm run build -- --watch","coverage":"nyc npm run test","test:watch":"npm run test -- --watch","prepublishOnly":"npm run build"},"_npmUser":{"name":"klbyte","email":"git@danb.email"},"_npmVersion":"8.19.2","description":"Synthetix Router Proxy Architecture Manager","directories":{},"_nodeVersion":"19.4.0","dependencies":{"ajv":"^8.11.0","solc":"^0.8.17","axios":"1.2.0","debug":"4.3.4","lodash":"4.17.21","mustache":"4.2.0","solidity-ast":"0.4.26"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","mocha":"9.1.1","typechain":"8.1.1","@types/debug":"4.1.7","@types/lodash":"4.14.191","tsconfig-paths":"4.1.0","@types/jsonpath":"0.2.0","@types/mustache":"4.2.1","@usecannon/builder":"^2.0.0-alpha.4","source-map-support":"0.5.21"},"peerDependencies":{"@usecannon/builder":"^2.0.0-alpha.4"},"peerDependenciesMeta":{"@usecannon/builder":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/router_1.1.0_1673830727956_0.6170834509444914","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"@synthetixio/router","version":"1.1.1","keywords":["deploy","solidity"],"author":{"name":"Synthetix"},"license":"MIT","_id":"@synthetixio/router@1.1.1","maintainers":[{"name":"joey-synthetix","email":"joey@cc.snxdao.io"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"synthetixio-team","email":"engineering@synthetix.io"},{"name":"ajsantander","email":"palebluedot@gmail.com"},{"name":"drptbl","email":"jakub.mucha@icloud.com"},{"name":"andytcf","email":"andy@synthetix.io"},{"name":"klbyte","email":"git@danb.email"}],"dist":{"shasum":"a92352261b6d2658f9871571487ea892e3d4bb5a","tarball":"https://registry.npmjs.org/@synthetixio/router/-/router-1.1.1.tgz","fileCount":46,"integrity":"sha512-H3jZfE/MeVPXpGMptK69IDKTWN7pcaig8gSnDWaHxMJqQmkDbGZ3a3vU85UPHAdq2WLz9gk7L9CBCN0ytqOwFg==","signatures":[{"sig":"MEYCIQCV6Bvr4XfszvG8nUqNJXWLVuImzN0BWEkJFG/iZnnNjQIhAO7NgyccQrs4j3/h71fTQ4rVv9TGd7BNiY0i07IZ76t3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115468,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjyJMuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmphZg//Qi7v+aak9tnFEELMs93glal92p0ZolUOvfhluHtRer4w+2iI\r\nwuWDTdeqMaFaKtuKNfafUGWOx6o4TUgiAz0MISu3wD9RwSKKymWvRoephE3b\r\n3EtGR/NVsgcTUQ52Huri39mVBpisSTMhHSrm/TAdzyJCqwkmu1GqSsWn5bN9\r\nJxegzjmtbyjh+tRzJtkZ7OiG+uVS+DMOwLzzUu90xLCcjWtQdptcz8MhD1WS\r\nC2Ofxcr5wc+VRHDdDGL4/pP8MMxFuY1lqFHyy1zqQ6lhOLKGiWUEpDA5uBk9\r\nQKBxT6dISHiz5sY3ohPSFU5bdGFZXqpbCGcnN2sslfNdn7EiBC7zqCLC8tzk\r\nk4rtZsdaEj6jVA0cq40E/P3hnvyIAEz1ObnZeIHkkVbioZH5eRWRHLy/iuF5\r\nvt6PR6HwuPFsAIgfYB6i5HiaGh4xbURgYduZPcCt5W+4SqYbgZ7n+As1IsKv\r\n/pmyWGbMyIQdf4L4RUWr9PC/y0Czq2Rmoy4m5TWi0zqJRQs7gTqkupAPCaoe\r\n34HsfM59vTA5zbS+Jn8lZa8KiczjtJrFHgxHRapUSlozxtmzf7ot+/GWzyJL\r\nvSOldVq1BWszabqhvhItD1Q2vSsGN622s0giV/I3hTWgm4lL9yCJfdBWs/Pu\r\n8jfBwUiU84w3IqJHo/SDudLX//7tJ09jjoQ=\r\n=JvaU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/src/index.js","types":"dist/src/index.d.ts","cannon":"dist/src/utils/cannon.js","source":"src/index.ts","gitHead":"c2a60a029226bb327d2b2548eda42dce1dadfacd","scripts":{"test":"TS_NODE_PROJECT='test/tsconfig.json' mocha -r ts-node/register -r tsconfig-paths/register -r source-map-support/register","build":"tsc --project tsconfig.json && cp -r templates dist/","watch":"npm run build -- --watch","coverage":"nyc npm run test","test:watch":"npm run test -- --watch","prepublishOnly":"npm run build"},"_npmUser":{"name":"klbyte","email":"git@danb.email"},"_npmVersion":"8.19.2","description":"Synthetix Router Proxy Architecture Manager","directories":{},"_nodeVersion":"16.19.0","dependencies":{"ajv":"^8.11.0","solc":"^0.8.17","axios":"1.2.0","debug":"4.3.4","lodash":"4.17.21","mustache":"4.2.0","solidity-ast":"0.4.26"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","mocha":"9.1.1","typechain":"8.1.1","@types/debug":"4.1.7","@types/lodash":"4.14.191","tsconfig-paths":"4.1.0","@types/jsonpath":"0.2.0","@types/mustache":"4.2.1","@usecannon/builder":"^2.0.0-alpha.6","source-map-support":"0.5.21"},"peerDependencies":{"@usecannon/builder":"^2.0.0-alpha.6"},"peerDependenciesMeta":{"@usecannon/builder":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/router_1.1.1_1674089262573_0.8762038658662408","host":"s3://npm-registry-packages"}},"1.1.2":{"name":"@synthetixio/router","version":"1.1.2","keywords":["deploy","solidity","cannon"],"author":{"name":"Synthetix"},"license":"MIT","_id":"@synthetixio/router@1.1.2","maintainers":[{"name":"joey-synthetix","email":"joey@cc.snxdao.io"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"synthetixio-team","email":"engineering@synthetix.io"},{"name":"ajsantander","email":"palebluedot@gmail.com"},{"name":"drptbl","email":"jakub.mucha@icloud.com"},{"name":"andytcf","email":"andy@synthetix.io"},{"name":"klbyte","email":"git@danb.email"}],"dist":{"shasum":"d77e1272f46a6327c82bc13cab818814c230466a","tarball":"https://registry.npmjs.org/@synthetixio/router/-/router-1.1.2.tgz","fileCount":93,"integrity":"sha512-yjLKfd4AMBITx0gK9fLm/tVLl6o6h8BDxqQGl9wTiqwSHx5zvTJqefqVRsikLcDON3TNfEBHE7CQt3CxngHoFA==","signatures":[{"sig":"MEUCIFvUP2cbfTwEuGYqwXXZV/W0ErZR8NjQFYIl8SRZIEeWAiEAk5SNaUp5W/b7pb9ByagKbhn1GOmBS7IKNaaKhnq37FY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":170637,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj9lvSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmot0g//djtBoLCATfB6zDVLaJhEYcw0W3ef154n7yVN8Hkkwa7LdBny\r\nuoiLhviKy0SsBJCsHNW3LF3aKupPMbDmJEN7J9+eBqujEelbFeValfVTW2c+\r\nbiAF4h2VIHi+wV84NJKjGWd1CbcSaPLK/JqoKVc6I6wa5K75427IfnpwfFF8\r\nkb/kFRXPpmFDUqIrA5G1NW8FpnIEUuEhM3zaK79XnesNwk8C5S66gYvActaf\r\nmJhCGDJkiiX+dBME3XBjRBXrb30afQ4ezSKa3bh1rdmudBShxJ5pcuP+YwmO\r\nQeR/COFDy/jn283SL2El+qRCnm4HmU17YRnf960cG+LbSTUO+/zeve8P6U+s\r\nu9FXB8fj5ZAKA3LtIxwzgoLZJ40mfip63/ZgV2hCbimnCBMkQz9OdS2hozDX\r\nm1fLj6JJlOT4WWbEMtHUVOEUS6ByT7eFoU24VY9FzqVJrOEMI+76CHtvUl+2\r\neWrxy7ygV1l8MQ6ddjbMyXCWwjjWzx7hMB518BH4MQ5ee0Vb5KjXfzPjLq/y\r\nNfAPUNNItzf2439J/G7x5Jx6nzBNJmLKUQ2Xn1uDma6SWBqBfTlMpNLh8nXJ\r\nJIcUWhrYLqTS3n7mKQTaAHBVYlBtudjchYvn0Z/9ebQVGPRLMc3uIVvY1KQe\r\nIGUkeypcKOsRhX3G7BulvlkP2fOycdbzQ6E=\r\n=EvMC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","cannon":"utils/cannon.js","source":"src/index.ts","gitHead":"3652c088eaeeb70a6669663278fb3eb1d3b7fdcb","scripts":{"test":"mocha --require ts-node/register","build":"tsc --project tsconfig.json","watch":"npm run build -- --watch","coverage":"nyc npm run test","test:watch":"npm run test -- --watch","prepublishOnly":"npm run build"},"_npmUser":{"name":"klbyte","email":"git@danb.email"},"_npmVersion":"8.19.2","description":"Synthetix Router Proxy Architecture Manager","directories":{},"_nodeVersion":"16.19.1","dependencies":{"ajv":"^8.11.0","solc":"^0.8.17","debug":"4.3.4","lodash":"4.17.21","mustache":"4.2.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","mocha":"9.1.1","@types/debug":"4.1.7","@types/lodash":"4.14.191","@types/mustache":"4.2.1","@usecannon/builder":"^2.1.3"},"peerDependencies":{"hardhat":"^2.0.0","@usecannon/builder":"^2.1.3"},"peerDependenciesMeta":{"hardhat":{"optional":true},"@usecannon/builder":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/router_1.1.2_1677089746692_0.6558348556059768","host":"s3://npm-registry-packages"}},"3.0.3-alpha.900":{"name":"@synthetixio/router","version":"3.0.3-alpha.900","keywords":["deploy","solidity","cannon"],"author":{"name":"Synthetix"},"license":"MIT","_id":"@synthetixio/router@3.0.3-alpha.900","maintainers":[{"name":"joey-synthetix","email":"joey@cc.snxdao.io"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"synthetixio-team","email":"engineering@synthetix.io"},{"name":"ajsantander","email":"palebluedot@gmail.com"},{"name":"drptbl","email":"jakub.mucha@icloud.com"},{"name":"andytcf","email":"andy@synthetix.io"},{"name":"klbyte","email":"git@danb.email"}],"dist":{"shasum":"116ea1ddd76a70ac69c54c858467a9fa2c03a1e7","tarball":"https://registry.npmjs.org/@synthetixio/router/-/router-3.0.3-alpha.900.tgz","fileCount":94,"integrity":"sha512-Dkj091/Y2u+XPUxEydXWGOYNbjoaFbumwtsXrHvsOu9X3g3JyEJp2YQQmDanmFveues09omXOR0ssGrIHk2j8w==","signatures":[{"sig":"MEQCIHW3pvXSpFH4QBxLR9zcfYFGciActy4f/GZbz7KB8qeoAiAMK4zLHiXayFGCRObm47lhV7lLVL94cEccBBtCYHVnLA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":170657,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkGf3qACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqjuxAAnaOHRdjJoQqVyYNqva3MOCKcJ8/3iOX4AtCbCpr2U1qLOb0q\r\n6iAEIwxY3GAuyfaA9oblUKh9TC0c8ko1tFRABRlXH3vWF+5zn81jwpQLU2YG\r\nOlaq1wZ3ug0ulpQGBQDAGJeGmkqTgT/Ozgh3E1FpNz2PDGwHrK3o295uMwRR\r\n5Vj/mMIbEAIvDfgQtP42clZVu+A31l3Mvqg+fScJWmdk5iKW5yl7dOSeYCHA\r\nWFToKXZM5L1XUo3xTCfUUx8ZixirsXMDuoYjJ+WtpfAa48v3ZtCllMrwS5SA\r\n53oU9cWVlRSHzDXiWfeoGwTyd7Wjkwr4kXVDEC9Qj59cQw+jodSHwl1vuXLw\r\nsiHx1TnMvUO0Kumt9bJNCNu9icWLSTLjZtUyg4Bebr9USEPs+ost4DmLqka5\r\nqAgcRXyxvvhnJFEBUQYXmDVU+D3v7MP5HNMfMDMckNbrbW7FlMPvitDKQMOg\r\n4OmShlZXBcStTBvhymEGRiHGFzL4VeiWh+sAhpfC0yAn0z7KXm8bBcxJ7Eru\r\ntw8roqAqd6yV95qNEesQIQU3Zd3PqgivLVsA5pXvy/d3ve/DDvN4H2UFrWEg\r\n/Prds3Yh2g96dpTENGdzz1HkQWYWUfwTjPZqNyifzr5gGE8y7iq40KuT3tRY\r\n7RnleJ0UcsJzTcX5i+/OfrIsiBtQv+dsYEo=\r\n=cXYL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","cannon":"utils/cannon.js","readme":"# router\n\nSolidity router generator.\n\n## Description\n\nThis plugin generates a router contract which simply merges multiple contracts (modules) behind a single proxy.\n\nThe router proxy receives incoming calls and forwards them to the appropriate implementation or module, depending on which one contains the incoming function selector.\n\nExample:\nA user calls the `rebalancePool()` function on a deployed router, which merges 3 modules; A.sol, B.sol, and C.sol. The router determines that the function `rebalancePool` is defined in module B.sol. So, the router simply performs a `DELEGATECALL` to B's deployed instance.\n\nThis router is similar to the [Diamond Proxy](https://eips.ethereum.org/EIPS/eip-2535) but:\n\n- is simpler\n  - because it has no module management interface\n- more explicit\n  - because its modular composition can easily be seen by looking at its hardcoded module addresses\n- more efficient\n  - because it hardcodes the deployed module addresses, minimizing `SLOAD` usage\n\n### Module deployment\n\nThe plugin will consider any contract inside a `modules` folder (configurable) a module, and automatically detect if its bytecode has changed and deploy it.\n\n### Router generation\n\nAfter module deployment, the router's source code is generated by the plugin. Generation will fail under certain conditions, e.g. if two of the modules contain the same selector, or a function with the same name.\n\nExample output:\n\n```\ncontract Router {\n    error UnknownSelector(bytes4 sel);\n\n    address private constant _OWNER_MODULE = 0x5FbDB2315678afecb367f032d93F642f64180aa3;\n    address private constant _SNXTOKEN_MODULE = 0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512;\n    address private constant _SYNTHS_MODULE = 0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0;\n    address private constant _UPGRADE_MODULE = 0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9;\n\n    fallback() external payable {\n        _forward();\n    }\n\n    receive() external payable {\n        _forward();\n    }\n\n    function _forward() internal {\n        // Lookup table: Function selector => implementation contract\n        bytes4 sig4 = msg.sig;\n        address implementation;\n\n        assembly {\n            let sig32 := shr(224, sig4)\n\n            function findImplementation(sig) -> result {\n                if lt(sig,0x81d49b75) {\n                    if lt(sig,0x53a47bb7) {\n                        switch sig\n                        case 0x0f36a2de { result := _SYNTHS_MODULE } // SynthsModule.createSynth()\n                        case 0x1627540c { result := _OWNER_MODULE } // OwnerModule.nominateNewOwner()\n                        case 0x2d6b3a6b { result := _SYNTHS_MODULE } // SynthsModule.getBeacon()\n                        case 0x35eb2824 { result := _OWNER_MODULE } // OwnerModule.isOwnerModuleInitialized()\n                        case 0x3659cfe6 { result := _UPGRADE_MODULE } // UpgradeModule.upgradeTo()\n                        case 0x51456061 { result := _SYNTHS_MODULE } // SynthsModule.getSynth()\n                        leave\n                    }\n                    switch sig\n                    case 0x53a47bb7 { result := _OWNER_MODULE } // OwnerModule.nominatedOwner()\n                    case 0x57d7995a { result := _SYNTHS_MODULE } // SynthsModule.createSynthImplementation()\n                    case 0x624bd96d { result := _OWNER_MODULE } // OwnerModule.initializeOwnerModule()\n                    case 0x7104fba5 { result := _SYNTHS_MODULE } // SynthsModule.getSynthImplementation()\n                    case 0x718fe928 { result := _OWNER_MODULE } // OwnerModule.renounceNomination()\n                    case 0x79ba5097 { result := _OWNER_MODULE } // OwnerModule.acceptOwnership()\n                    leave\n                }\n                if lt(sig,0xd1b6c504) {\n                    switch sig\n                    case 0x81d49b75 { result := _SNXTOKEN_MODULE } // SNXTokenModule.getSNXTokenModuleSatellites()\n                    case 0x8da5cb5b { result := _OWNER_MODULE } // OwnerModule.owner()\n                    case 0xa44896e7 { result := _SYNTHS_MODULE } // SynthsModule.isSynthsModuleInitialized()\n                    case 0xaaf10f42 { result := _UPGRADE_MODULE } // UpgradeModule.getImplementation()\n                    case 0xc6253216 { result := _SYNTHS_MODULE } // SynthsModule.upgradeSynthImplementation()\n                    case 0xc7f62cda { result := _UPGRADE_MODULE } // UpgradeModule.simulateUpgradeTo()\n                    leave\n                }\n                switch sig\n                case 0xd1b6c504 { result := _SNXTOKEN_MODULE } // SNXTokenModule.getSNXTokenAddress()\n                case 0xdaac1198 { result := _SNXTOKEN_MODULE } // SNXTokenModule.upgradeSNXImplementation()\n                case 0xe040da24 { result := _SNXTOKEN_MODULE } // SNXTokenModule.isSNXTokenModuleInitialized()\n                case 0xf4c4dc31 { result := _SYNTHS_MODULE } // SynthsModule.getSynthsModuleSatellites()\n                case 0xf5d6f068 { result := _SNXTOKEN_MODULE } // SNXTokenModule.initializeSNXTokenModule()\n                case 0xfbc6aa6f { result := _SYNTHS_MODULE } // SynthsModule.initializeSynthsModule()\n                leave\n            }\n\n            implementation := findImplementation(sig32)\n        }\n\n        if (implementation == address(0)) {\n            revert UnknownSelector(sig4);\n        }\n\n        // Delegatecall to the implementation contract\n        assembly {\n            calldatacopy(0, 0, calldatasize())\n\n            let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n            returndatacopy(0, 0, returndatasize())\n\n            switch result\n            case 0 {\n                revert(0, returndatasize())\n            }\n            default {\n                return(0, returndatasize())\n            }\n        }\n    }\n}\n```\n\n### Router validation\n\nAfter generation, the plugin performs a series of validations on the generated source, including:\n\n- Checks that there are no duplicate selectors in its modules (function names must be unique)\n- That there are no storage collisions between module namespaces\n- That there are no invalid storage mutations between module namespaces\n- TODO: Complete list of validations\n\n### Storage namespaces\n\nTo avoid storage collisions between modules, we recommend the usage of storage namespaces.\n\nInstead of declaring variables in regular Solidity slots:\n\n```\ncontract SettingsModule {\n\tuint private _someSetting;\n\n  function setSomeSetting(uint newValue) external {\n    _someSetting = newValue;\n  }\n\n  function getSomeSetting() external view returns (uint) {\n    return _someSetting;\n  }\n}\n```\n\nUse a store:\n\n```\ncontract SettingsModule is SettingsStorage {\n\tfunction setSomeSetting(uint newValue) external {\n    _settingsStore().someSetting = newValue;\n  }\n\n  function getSomeSetting() external view returns (uint) {\n    return _settingsStore().someSetting;\n  }\n}\n\ncontract SettingsStorage {\n  struct SettingsStore {\n    uint someSetting;\n  }\n\n  function _settingsStore() internal pure returns (ProxyStore storage store) {\n    assembly {\n      // bytes32(uint(keccak256(\"io.synthetix.settings\")) - 1)\n      store.slot = 0x312...\n    }\n  }\n}\n```\n\n### Inter-modular communication and mixins\n\nSince the router `DELEGATECALL`s to its implementation modules, all code specified by its modules will be run within a single execution context. If the router is used directly, it will be the execution context. If something is `DELEGATECALL`ing the router, then that will be the execution context. E.g. a proxy.\n\nThus, all modules have access to the global storage of the system. Instead of performing calls to other modules, it is recommended to use Mixins that know how to interact with the storage of another module.\n\nE.g.\n\n```\ncontract OwnableMixin is OwnableStorage {\n  modifier onlyOwner() {\n    require(msg.sender == _ownerStore().owner, \"Only owner allowed\");\n    _;\n  }\n}\n```\n\n```\ncontract SynthsModule is SynthsStorage, OwnableMixin {\n  function createSynth(...) external onlyOwner {\n    ...\n  }\n}\n```\n\n### No constructors\n\nSince the router `DELEGATECALL`s to its modules, they storage will never be used. Any storage that may have been set by a constructor during module deployment will be ignored. Thus, we recommend to avoid using constructors in modules, and use initializer functions instead.\n\n### Upgradeability\n\nIf the router is used as the implementation of a UUPS [Universal Upgradeable Proxy Standard](https://eips.ethereum.org/EIPS/eip-1822) proxy, and includes an UpgradeModule, it can be used to design complex systems which are upgradeable until the main proxy is upgraded to a router implementation that no longer has an UpgradeModule.\n\n⚠️ Make sure that the UUPS contract does not contain public facing functions becuase they could clash with function signatures from the implementation modules. ⚠️\n\n### Plugin configuration\n\nhardhat.config.js\n\n```\nmodule.exports = {\n  solidity: '0.8.11'\n  networks: {\n    ...\n  },\n  router: {\n    paths: {\n      deployments: 'deployments', // path to store deployment artifacts\n      modules: 'modules',         // path where to find module contracts\n    },\n  },\n};\n\n```\n","source":"src/index.ts","gitHead":"99e71ef69139457df9df4479d132350f303a5783","scripts":{"test":"mocha --require ts-node/register","build":"tsc --project tsconfig.json","watch":"yarn build --watch","coverage":"nyc yarn test","test:watch":"yarn test --watch","prepublishOnly":"yarn build"},"_npmUser":{"name":"klbyte","email":"git@danb.email"},"_npmVersion":"lerna/6.5.1/node@v16.19.1+x64 (linux)","description":"Synthetix Router Proxy Architecture Manager","directories":{},"_nodeVersion":"16.19.1","dependencies":{"ajv":"^8.11.0","solc":"^0.8.17","debug":"4.3.4","ethers":"^5.0.0","lodash":"4.17.21","mustache":"4.2.0","@ethersproject/abi":"5.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","mocha":"9.1.1","typechain":"8.1.1","typescript":"4.9.3","@types/debug":"4.1.7","@types/lodash":"4.14.191","@types/mustache":"4.2.2","@usecannon/builder":"2.1.10"},"peerDependencies":{"hardhat":"^2.0.0","@usecannon/builder":"^2.1.7"},"peerDependenciesMeta":{"hardhat":{"optional":true},"@usecannon/builder":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/router_3.0.3-alpha.900_1679425001801_0.8465200028888857","host":"s3://npm-registry-packages"}},"3.0.4-alpha.0":{"name":"@synthetixio/router","version":"3.0.4-alpha.0","keywords":["deploy","solidity","cannon"],"author":{"name":"Synthetix"},"license":"MIT","_id":"@synthetixio/router@3.0.4-alpha.0","maintainers":[{"name":"joey-synthetix","email":"joey@cc.snxdao.io"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"synthetixio-team","email":"engineering@synthetix.io"},{"name":"ajsantander","email":"palebluedot@gmail.com"},{"name":"drptbl","email":"jakub.mucha@icloud.com"},{"name":"andytcf","email":"andy@synthetix.io"},{"name":"klbyte","email":"git@danb.email"}],"dist":{"shasum":"d387cb80dabf63d18605ea4ab925e1307b5d70b8","tarball":"https://registry.npmjs.org/@synthetixio/router/-/router-3.0.4-alpha.0.tgz","fileCount":94,"integrity":"sha512-mdU1C0Vx8HcLVwuV9MtT9Gd2K9BhEUoCK6n7TzraKpkNtw1m9AH85RiOmLrbhPvDojp83nRGTFReVseW59gUxA==","signatures":[{"sig":"MEUCIH5YTQ1EuSf5Uovvup9Ls7SibIAWbDx7vkOui/T2aQQjAiEA2tz9DG+Wu9+M/YB/Hy7NOmFKcmFgAHqKms54Tsfw9J4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":170646,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkGgCXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqUNQ/+IFapzhvd/rixEDCYJpHF2/wrTDM7zCt91YuGOvHikbD71Y7Z\r\n63O/5UncJ9vlef1pgXsQgCnRWACsLNuSq+BfZkB89QEB/5JtOLHdZe+Yc0ex\r\n3WGG7HhZpxIOLQ7FvIDzvtiskGboLIMrkhuL3IZ+70NQS5LN2SzSx1hpEfmC\r\nsbyzhVks5bC75tVBQtaPGW8hgIhPbD/RGi3Drw0nQDgy0/A8OrXhpsky/CCT\r\npETtRpgO15nYXy0+Z9aX1f2lXHzQAOsR4TOdqThev51WhmGPmt+YZWUiU2Z5\r\nNtCVxAglMrf2QsgjK4p17JjQ2dKazI7Hvv8aHUwCcZkJzWvTn4iU7ocpHWrW\r\nczy8MU6A93ECXE8G9YCwW2Fd6cRugMcLhO22L5Uz9QYCEzER85RcRurTMpYk\r\np4P+LQxvv7RmzE7Cl8aG255mjm80yDYvroeyVKV2oo3ted1CdPAo5PnfUGqj\r\n3obzCvfU9JUky7LnnwHPF6Ql6Zx2e+6af6U5nHRtlK1l8EQT+PQaa/Vg0vMw\r\nyRMcb6aGLvPG4zqgdSdVWsri2Qn6jt8shqJWKDkMItuca8J9ZXQxrhPWr8a1\r\n/LdDW5xA6FNHy/jGOgmrfXj1fH2rlfYDoRr1Y537Jju4NH6+nER7Bglzcum3\r\n0yrp9eHAJ9soL0MIVITl38YjmlnO20bHLCI=\r\n=REj+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","cannon":"utils/cannon.js","source":"src/index.ts","gitHead":"9e40d3baf9b28df89a8f80a9f38c61c61c1d8876","scripts":{"test":"mocha --require ts-node/register","build":"tsc --project tsconfig.json","watch":"yarn build --watch","coverage":"nyc yarn test","test:watch":"yarn test --watch","prepublishOnly":"yarn build"},"_npmUser":{"name":"klbyte","email":"git@danb.email"},"_npmVersion":"lerna/6.5.1/node@v16.19.1+x64 (linux)","description":"Synthetix Router Proxy Architecture Manager","directories":{},"_nodeVersion":"16.19.1","dependencies":{"ajv":"^8.11.0","solc":"^0.8.17","debug":"4.3.4","ethers":"^5.0.0","lodash":"4.17.21","mustache":"4.2.0","@ethersproject/abi":"5.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","mocha":"9.1.1","typechain":"8.1.1","typescript":"4.9.3","@types/debug":"4.1.7","@types/lodash":"4.14.191","@types/mustache":"4.2.2","@usecannon/builder":"2.1.10"},"peerDependencies":{"hardhat":"^2.0.0","@usecannon/builder":"^2.1.7"},"peerDependenciesMeta":{"hardhat":{"optional":true},"@usecannon/builder":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/router_3.0.4-alpha.0_1679425687092_0.8653021700714676","host":"s3://npm-registry-packages"}},"3.0.4-dev.29caac17":{"name":"@synthetixio/router","version":"3.0.4-dev.29caac17","keywords":["deploy","solidity","cannon"],"author":{"name":"Synthetix"},"license":"MIT","_id":"@synthetixio/router@3.0.4-dev.29caac17","maintainers":[{"name":"joey-synthetix","email":"joey@cc.snxdao.io"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"synthetixio-team","email":"engineering@synthetix.io"},{"name":"ajsantander","email":"palebluedot@gmail.com"},{"name":"drptbl","email":"jakub.mucha@icloud.com"},{"name":"andytcf","email":"andy@synthetix.io"},{"name":"klbyte","email":"git@danb.email"}],"dist":{"shasum":"75b72d818143b486a982b69f8d51cbc0c474fffc","tarball":"https://registry.npmjs.org/@synthetixio/router/-/router-3.0.4-dev.29caac17.tgz","fileCount":94,"integrity":"sha512-ZJngf6lYvmdRsTqXkZ75OSSSO1dH4Ec5z6Mecp2m9KRw1U0IVs/MYyeYz/gv9wXvRN0ia1mvQqOl0RDEbSUJhg==","signatures":[{"sig":"MEYCIQDCqxXHpQpqwamEU/oX1E1ESxHoqO2ogHa4hj36tIjJwwIhAOXvOTbxk6RedVnyOkC9FhDFDSWdjS4rTzemCZC2C4YP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":170651,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkKwy/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrEDQ//Ww2q36cwJf3g7dqRSd+kYrDsX7UTjjQtb4eWr5TZpmW8tGvP\r\nax7BjAsTBnkuCl+1zLc+SN54tfJOsuAFDf7RJVTtqfpeuv+bSnT1uebgpRPG\r\ncpej5EdrOTyUmGdpshOEelBS+2CzVifd7twp4cBvOTdTiZoRsEIQDdfLvnED\r\nnE2cKD6A+cWOEpINF1toKl7HHt78X/clbPqVn0kGSy3NeXG4au3bLuGVHwGZ\r\nUZYNYESCCd9ICCN8aERhJgQOM07PflfOesL0O5WUotqpZCxZJXd61DPaP+VJ\r\n0+nKLD1L05TZAav91O53UIrs9fQUZAfXASmtNPb2zIKn0SF+x5g67JzX2BAG\r\np1rZceRg7/ASd1p4ajR0xrr15ypF5sffCWvXmnr6FJGywc6EYSSKcU0Azq9E\r\ndZeoEuPLLhIIgFW0d/jxipEqNBGNR4j+auTt+LiqweA2h7AeQYB6HdkEaN/y\r\n9Dt7pSWMo1s97o7vhV8zHnNzEdyu6mBt1OXDB2uYYbDG0Oe+Z0tM9ghlKOsc\r\nxQ8NwQ7vFVsY5QW9cI0PTrk7o6dDDKrZXwIozKm4XkR1IZtimCpz5dzeSzib\r\n+pU+wOaGB44PB9njVL6O+yDilmIxc4ggOYIqXZNuMm9TThlLUHC75l/fX7S/\r\nHJrk8ff3bcj4No+sFyNhzoFelHXEX/6S944=\r\n=Ubjw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","cannon":"utils/cannon.js","readme":"# router\n\nSolidity router generator.\n\n## Description\n\nThis plugin generates a router contract which simply merges multiple contracts (modules) behind a single proxy.\n\nThe router proxy receives incoming calls and forwards them to the appropriate implementation or module, depending on which one contains the incoming function selector.\n\nExample:\nA user calls the `rebalancePool()` function on a deployed router, which merges 3 modules; A.sol, B.sol, and C.sol. The router determines that the function `rebalancePool` is defined in module B.sol. So, the router simply performs a `DELEGATECALL` to B's deployed instance.\n\nThis router is similar to the [Diamond Proxy](https://eips.ethereum.org/EIPS/eip-2535) but:\n\n- is simpler\n  - because it has no module management interface\n- more explicit\n  - because its modular composition can easily be seen by looking at its hardcoded module addresses\n- more efficient\n  - because it hardcodes the deployed module addresses, minimizing `SLOAD` usage\n\n### Module deployment\n\nThe plugin will consider any contract inside a `modules` folder (configurable) a module, and automatically detect if its bytecode has changed and deploy it.\n\n### Router generation\n\nAfter module deployment, the router's source code is generated by the plugin. Generation will fail under certain conditions, e.g. if two of the modules contain the same selector, or a function with the same name.\n\nExample output:\n\n```\ncontract Router {\n    error UnknownSelector(bytes4 sel);\n\n    address private constant _OWNER_MODULE = 0x5FbDB2315678afecb367f032d93F642f64180aa3;\n    address private constant _SNXTOKEN_MODULE = 0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512;\n    address private constant _SYNTHS_MODULE = 0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0;\n    address private constant _UPGRADE_MODULE = 0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9;\n\n    fallback() external payable {\n        _forward();\n    }\n\n    receive() external payable {\n        _forward();\n    }\n\n    function _forward() internal {\n        // Lookup table: Function selector => implementation contract\n        bytes4 sig4 = msg.sig;\n        address implementation;\n\n        assembly {\n            let sig32 := shr(224, sig4)\n\n            function findImplementation(sig) -> result {\n                if lt(sig,0x81d49b75) {\n                    if lt(sig,0x53a47bb7) {\n                        switch sig\n                        case 0x0f36a2de { result := _SYNTHS_MODULE } // SynthsModule.createSynth()\n                        case 0x1627540c { result := _OWNER_MODULE } // OwnerModule.nominateNewOwner()\n                        case 0x2d6b3a6b { result := _SYNTHS_MODULE } // SynthsModule.getBeacon()\n                        case 0x35eb2824 { result := _OWNER_MODULE } // OwnerModule.isOwnerModuleInitialized()\n                        case 0x3659cfe6 { result := _UPGRADE_MODULE } // UpgradeModule.upgradeTo()\n                        case 0x51456061 { result := _SYNTHS_MODULE } // SynthsModule.getSynth()\n                        leave\n                    }\n                    switch sig\n                    case 0x53a47bb7 { result := _OWNER_MODULE } // OwnerModule.nominatedOwner()\n                    case 0x57d7995a { result := _SYNTHS_MODULE } // SynthsModule.createSynthImplementation()\n                    case 0x624bd96d { result := _OWNER_MODULE } // OwnerModule.initializeOwnerModule()\n                    case 0x7104fba5 { result := _SYNTHS_MODULE } // SynthsModule.getSynthImplementation()\n                    case 0x718fe928 { result := _OWNER_MODULE } // OwnerModule.renounceNomination()\n                    case 0x79ba5097 { result := _OWNER_MODULE } // OwnerModule.acceptOwnership()\n                    leave\n                }\n                if lt(sig,0xd1b6c504) {\n                    switch sig\n                    case 0x81d49b75 { result := _SNXTOKEN_MODULE } // SNXTokenModule.getSNXTokenModuleSatellites()\n                    case 0x8da5cb5b { result := _OWNER_MODULE } // OwnerModule.owner()\n                    case 0xa44896e7 { result := _SYNTHS_MODULE } // SynthsModule.isSynthsModuleInitialized()\n                    case 0xaaf10f42 { result := _UPGRADE_MODULE } // UpgradeModule.getImplementation()\n                    case 0xc6253216 { result := _SYNTHS_MODULE } // SynthsModule.upgradeSynthImplementation()\n                    case 0xc7f62cda { result := _UPGRADE_MODULE } // UpgradeModule.simulateUpgradeTo()\n                    leave\n                }\n                switch sig\n                case 0xd1b6c504 { result := _SNXTOKEN_MODULE } // SNXTokenModule.getSNXTokenAddress()\n                case 0xdaac1198 { result := _SNXTOKEN_MODULE } // SNXTokenModule.upgradeSNXImplementation()\n                case 0xe040da24 { result := _SNXTOKEN_MODULE } // SNXTokenModule.isSNXTokenModuleInitialized()\n                case 0xf4c4dc31 { result := _SYNTHS_MODULE } // SynthsModule.getSynthsModuleSatellites()\n                case 0xf5d6f068 { result := _SNXTOKEN_MODULE } // SNXTokenModule.initializeSNXTokenModule()\n                case 0xfbc6aa6f { result := _SYNTHS_MODULE } // SynthsModule.initializeSynthsModule()\n                leave\n            }\n\n            implementation := findImplementation(sig32)\n        }\n\n        if (implementation == address(0)) {\n            revert UnknownSelector(sig4);\n        }\n\n        // Delegatecall to the implementation contract\n        assembly {\n            calldatacopy(0, 0, calldatasize())\n\n            let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n            returndatacopy(0, 0, returndatasize())\n\n            switch result\n            case 0 {\n                revert(0, returndatasize())\n            }\n            default {\n                return(0, returndatasize())\n            }\n        }\n    }\n}\n```\n\n### Router validation\n\nAfter generation, the plugin performs a series of validations on the generated source, including:\n\n- Checks that there are no duplicate selectors in its modules (function names must be unique)\n- That there are no storage collisions between module namespaces\n- That there are no invalid storage mutations between module namespaces\n- TODO: Complete list of validations\n\n### Storage namespaces\n\nTo avoid storage collisions between modules, we recommend the usage of storage namespaces.\n\nInstead of declaring variables in regular Solidity slots:\n\n```\ncontract SettingsModule {\n\tuint private _someSetting;\n\n  function setSomeSetting(uint newValue) external {\n    _someSetting = newValue;\n  }\n\n  function getSomeSetting() external view returns (uint) {\n    return _someSetting;\n  }\n}\n```\n\nUse a store:\n\n```\ncontract SettingsModule is SettingsStorage {\n\tfunction setSomeSetting(uint newValue) external {\n    _settingsStore().someSetting = newValue;\n  }\n\n  function getSomeSetting() external view returns (uint) {\n    return _settingsStore().someSetting;\n  }\n}\n\ncontract SettingsStorage {\n  struct SettingsStore {\n    uint someSetting;\n  }\n\n  function _settingsStore() internal pure returns (ProxyStore storage store) {\n    assembly {\n      // bytes32(uint(keccak256(\"io.synthetix.settings\")) - 1)\n      store.slot = 0x312...\n    }\n  }\n}\n```\n\n### Inter-modular communication and mixins\n\nSince the router `DELEGATECALL`s to its implementation modules, all code specified by its modules will be run within a single execution context. If the router is used directly, it will be the execution context. If something is `DELEGATECALL`ing the router, then that will be the execution context. E.g. a proxy.\n\nThus, all modules have access to the global storage of the system. Instead of performing calls to other modules, it is recommended to use Mixins that know how to interact with the storage of another module.\n\nE.g.\n\n```\ncontract OwnableMixin is OwnableStorage {\n  modifier onlyOwner() {\n    require(msg.sender == _ownerStore().owner, \"Only owner allowed\");\n    _;\n  }\n}\n```\n\n```\ncontract SynthsModule is SynthsStorage, OwnableMixin {\n  function createSynth(...) external onlyOwner {\n    ...\n  }\n}\n```\n\n### No constructors\n\nSince the router `DELEGATECALL`s to its modules, they storage will never be used. Any storage that may have been set by a constructor during module deployment will be ignored. Thus, we recommend to avoid using constructors in modules, and use initializer functions instead.\n\n### Upgradeability\n\nIf the router is used as the implementation of a UUPS [Universal Upgradeable Proxy Standard](https://eips.ethereum.org/EIPS/eip-1822) proxy, and includes an UpgradeModule, it can be used to design complex systems which are upgradeable until the main proxy is upgraded to a router implementation that no longer has an UpgradeModule.\n\n⚠️ Make sure that the UUPS contract does not contain public facing functions becuase they could clash with function signatures from the implementation modules. ⚠️\n\n### Plugin configuration\n\nhardhat.config.js\n\n```\nmodule.exports = {\n  solidity: '0.8.11'\n  networks: {\n    ...\n  },\n  router: {\n    paths: {\n      deployments: 'deployments', // path to store deployment artifacts\n      modules: 'modules',         // path where to find module contracts\n    },\n  },\n};\n\n```\n","source":"src/index.ts","gitHead":"29caac179f1bb36b99f700757915b4ac69c11e10","scripts":{"test":"mocha --require ts-node/register","build":"tsc --project tsconfig.json","watch":"yarn build --watch","coverage":"nyc yarn test","test:watch":"yarn test --watch","prepublishOnly":"yarn build"},"_npmUser":{"name":"klbyte","email":"git@danb.email"},"_npmVersion":"lerna/1.17.0/node@v16.19.1+x64 (linux)","description":"Synthetix Router Proxy Architecture Manager","directories":{},"_nodeVersion":"16.19.1","dependencies":{"ajv":"^8.11.0","solc":"^0.8.17","debug":"4.3.4","ethers":"^5.0.0","lodash":"4.17.21","mustache":"4.2.0","@ethersproject/abi":"5.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","mocha":"9.1.1","typechain":"8.1.1","typescript":"4.9.3","@types/debug":"4.1.7","@types/lodash":"4.14.191","@types/mustache":"4.2.2","@usecannon/builder":"2.1.10"},"peerDependencies":{"hardhat":"^2.0.0","@usecannon/builder":"^2.1.7"},"peerDependenciesMeta":{"hardhat":{"optional":true},"@usecannon/builder":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/router_3.0.4-dev.29caac17_1680542911050_0.40705124096816325","host":"s3://npm-registry-packages"}},"3.1.0-alpha.1":{"name":"@synthetixio/router","version":"3.1.0-alpha.1","keywords":["deploy","solidity","cannon"],"author":{"name":"Synthetix"},"license":"MIT","_id":"@synthetixio/router@3.1.0-alpha.1","maintainers":[{"name":"joey-synthetix","email":"joey@cc.snxdao.io"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"synthetixio-team","email":"engineering@synthetix.io"},{"name":"ajsantander","email":"palebluedot@gmail.com"},{"name":"drptbl","email":"jakub.mucha@icloud.com"},{"name":"klbyte","email":"git@danb.email"}],"dist":{"shasum":"759dcae2fcf779835fe7c7672f2a1bd307941cd7","tarball":"https://registry.npmjs.org/@synthetixio/router/-/router-3.1.0-alpha.1.tgz","fileCount":94,"integrity":"sha512-i1RWlU9ahAMxabP7GH0vjbXMJh8bH+V0BwtQbdWKKaqcLQOgqjGHB4e6qmukklGj8Gr69sZ+ee+7+lKYje/W+Q==","signatures":[{"sig":"MEQCIDJFTr+i/Gt42RFixkNYLFV0rXHBChSrxGXUp62wyESpAiB3597bt72EdDxGte+SW+MTjonDF87hHgKO6PXedKuD0A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":173848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkRzfNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrj0g//SEk4QdhDNInPIKw4JUTeoiOQvcg2JvT0TlGjrYNUKsaNOHwG\r\n6XZK+aHJONILS8xJnqCMnlJa2csczz0er8TrQiF5OBnEz5HyRgAjI71gDH5z\r\n9pW3NE2GL3/QYQz+lHphaOoxFizhfhL1zeQOgXgp2iLYqzbq7P1Vsba7Y+tI\r\n67sAj/GpYHqO3VhCCqRV133dfQxv78R/tatz8VFA5FiQAM1WpvZG6XUxXo7g\r\nwP0hV5WfjZ1xarnB/+EY65AND5dGZJhVMPTjecpt68vQkD4FF6P3wCYCsFdQ\r\n0RqLfTvsM4ZT2Y8cQ8zEYV2wEugr4nHADWC7HnIypAi+fkybyQThsXiEQKoU\r\nHCh5TVccSwCvXpo7jdnruVZ9Pc2fmgIqpOwX6wLoXJkri9CQne7N3elgjsce\r\nMrdi/INjFn6DTx8vkxyK4aiWo6z2sFk046GoY0dMTyVOvJGXaKiOyKlN8lFw\r\n7w7ED67rJLvFbl0sF5yYopCowwTFssuT3LwAeVqBKpdCdnXvKxNi68V8UCNk\r\nA+dVGECcKj3WIGwoFiI3oCN07hp9G3GbzRVfPnN/yf3uChtxYN0Fopf/KfYy\r\nLSChjl3JgbllVSIdSkmgIp2V9FgDRyXSsyNuGCwUL9ch+R+7fWuvdCbilsLH\r\nBK8Ysw7W7DKoRU73A1OPLL5Pf/uhuKvkYJ4=\r\n=/8Nx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","cannon":"utils/cannon.js","source":"src/index.ts","gitHead":"8128923745f5a21cef7b8712babd4c835a60fbe6","scripts":{"test":"mocha --require ts-node/register","build":"tsc --project tsconfig.json","watch":"yarn build --watch","coverage":"nyc yarn test","test:watch":"yarn test --watch","prepublishOnly":"yarn build"},"_npmUser":{"name":"klbyte","email":"git@danb.email"},"_npmVersion":"lerna/1.17.0/node@v16.20.0+x64 (linux)","description":"Synthetix Router Proxy Architecture Manager","directories":{},"_nodeVersion":"16.20.0","dependencies":{"ajv":"^8.11.0","solc":"^0.8.17","debug":"4.3.4","ethers":"^5.0.0","lodash":"4.17.21","mustache":"4.2.0","@ethersproject/abi":"5.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","mocha":"9.1.1","typechain":"8.1.1","typescript":"4.9.3","@types/debug":"4.1.7","@types/lodash":"4.14.191","@types/mustache":"4.2.2","@usecannon/builder":"2.4.7"},"peerDependencies":{"hardhat":"^2.0.0","@usecannon/builder":"^2.4.0-alpha.1"},"peerDependenciesMeta":{"hardhat":{"optional":true},"@usecannon/builder":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/router_3.1.0-alpha.1_1682388941437_0.3377291934252298","host":"s3://npm-registry-packages"}},"3.1.0":{"name":"@synthetixio/router","version":"3.1.0","keywords":["deploy","solidity","cannon"],"author":{"name":"Synthetix"},"license":"MIT","_id":"@synthetixio/router@3.1.0","maintainers":[{"name":"joey-synthetix","email":"joey@cc.snxdao.io"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"synthetixio-team","email":"engineering@synthetix.io"},{"name":"ajsantander","email":"palebluedot@gmail.com"},{"name":"drptbl","email":"jakub.mucha@icloud.com"},{"name":"klbyte","email":"git@danb.email"}],"dist":{"shasum":"fabfa067578ef812f0e18d585b4beb570626f76f","tarball":"https://registry.npmjs.org/@synthetixio/router/-/router-3.1.0.tgz","fileCount":94,"integrity":"sha512-ggkRvW3GreYHzbqntO/rBrC91BO40NuK4rDoQC1tBR6/torCgBC1nBFRLhnGy/EsZSdMjADfrjJK8l8K6+gICw==","signatures":[{"sig":"MEQCIEjuqim4s1TxrgQfaxs9z2fVrmi5jYvNY+zMF168wrwtAiAC3p9lOkceLn1XR2ZgYlN90SETTH8AHwP5QLBe94TZzA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":173840,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkStg3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr8GQ//QUPAJUb2189u93dq0aVQC+QUt6MbN8Ez7VnLSXbmhbV8MH7V\r\nIUaUmNxhaGq18pCXc07kByVGtaitZBBCHOUa8KvrqwN9hkJ4JDLbNLVlnta0\r\nSf4kddeOgwRhkQ9NeIfeGyDttifEFEzKb/VtG8qDW0f15fVgyxap+UcCJAhC\r\nnqCCSaRcYgHnvkimccUfzoqpLfgqi/VqFTyM5rxXFpOSlwkRQx7lOiOwcZ+D\r\noP1YaOZmiuxOMd++uesv+V0Oe8kTqdpGso7Aq1vtJQH5sggS7KdqBo+WkJ41\r\ninwRQXk/it0580boGZbUD1DCOnhAMFBsmSS2GM5cMM9XSJMwFDTJsHwhtZ+Y\r\nR+/iSxUIA47A52tbnqEI8J8nERcC4BlvnnIBwwd2p4BJBdYrKqCXc/OJyAQd\r\nkZyv0SkgNBdHTf7Pg22CkEp6tBMWMeKXZcyoRoZ5Fp9KeuowL4ojrf1diUFx\r\nLAmBMOOjgQKLNxmXmlt/+C4U5S58swbRT5Vg0txBOB9fSrfQjrM5t1/OZZv8\r\nGT79ygAQiprGmQfqbD6cy6r5Hz4eqFVEkrhHhTaYLJVSnkPyp6q03xZogZF4\r\n8nEY6Mf//mWDEEjY57/QzwhIPVFoZLfmW8pFp0VS+YhC98TOlVvraZv8T0gM\r\nPKNQpnYbtfRyF9T6YdcvTs7mK8Z3xGbqew0=\r\n=dEVN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","cannon":"utils/cannon.js","source":"src/index.ts","gitHead":"d5d322abfb3a6260ecd3e0339c945649f5d53cb2","scripts":{"test":"mocha --require ts-node/register","build":"tsc --project tsconfig.json","watch":"yarn build --watch","coverage":"nyc yarn test","test:watch":"yarn test --watch","prepublishOnly":"yarn build"},"_npmUser":{"name":"klbyte","email":"git@danb.email"},"_npmVersion":"lerna/1.17.0/node@v16.20.0+x64 (linux)","description":"Synthetix Router Proxy Architecture Manager","directories":{},"_nodeVersion":"16.20.0","dependencies":{"ajv":"^8.11.0","solc":"^0.8.17","debug":"4.3.4","ethers":"^5.0.0","lodash":"4.17.21","mustache":"4.2.0","@ethersproject/abi":"5.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","mocha":"9.1.1","typechain":"8.1.1","typescript":"4.9.3","@types/debug":"4.1.7","@types/lodash":"4.14.191","@types/mustache":"4.2.2","@usecannon/builder":"2.4.7"},"peerDependencies":{"hardhat":"^2.0.0","@usecannon/builder":"^2.4.0-alpha.1"},"peerDependenciesMeta":{"hardhat":{"optional":true},"@usecannon/builder":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/router_3.1.0_1682626615285_0.3872412845333195","host":"s3://npm-registry-packages"}},"3.1.1-dev.6ad35880":{"name":"@synthetixio/router","version":"3.1.1-dev.6ad35880","keywords":["deploy","solidity","cannon"],"author":{"name":"Synthetix"},"license":"MIT","_id":"@synthetixio/router@3.1.1-dev.6ad35880","maintainers":[{"name":"noisekit","email":"noisekit@proton.me"},{"name":"joey-synthetix","email":"joey@cc.snxdao.io"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"synthetixio-team","email":"engineering@synthetix.io"},{"name":"ajsantander","email":"palebluedot@gmail.com"},{"name":"drptbl","email":"jakub.mucha@icloud.com"},{"name":"klbyte","email":"git@danb.email"}],"dist":{"shasum":"1f780e1cf3bb5db0d6988e6ec585dbb12616cdb7","tarball":"https://registry.npmjs.org/@synthetixio/router/-/router-3.1.1-dev.6ad35880.tgz","fileCount":53,"integrity":"sha512-ZQ7TX1rgKjsGjkPsIFCq9uT9Xlm0Jw6lyMOzg/wc6CcZ8nmv74XaER5YhSmHfuCVcicvuvjPTO+BESzZjwrymg==","signatures":[{"sig":"MEUCIQDi7vNzdDK0/N3IQc+eE5PTmb2KD9gUhAAW9ctZZnZrtAIgeZYFvVXu/HK0vReWlAl3P0OeXDtlB7TvwSOyhlLW3TM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":143332},"main":"dist/index.js","types":"dist/index.d.ts","cannon":"utils/cannon.js","readme":"# router\n\nSolidity router generator.\n\n## Description\n\nThis plugin generates a router contract which simply merges multiple contracts (modules) behind a single proxy.\n\nThe router proxy receives incoming calls and forwards them to the appropriate implementation or module, depending on which one contains the incoming function selector.\n\nExample:\nA user calls the `rebalancePool()` function on a deployed router, which merges 3 modules; A.sol, B.sol, and C.sol. The router determines that the function `rebalancePool` is defined in module B.sol. So, the router simply performs a `DELEGATECALL` to B's deployed instance.\n\nThis router is similar to the [Diamond Proxy](https://eips.ethereum.org/EIPS/eip-2535) but:\n\n- is simpler\n  - because it has no module management interface\n- more explicit\n  - because its modular composition can easily be seen by looking at its hardcoded module addresses\n- more efficient\n  - because it hardcodes the deployed module addresses, minimizing `SLOAD` usage\n\n### Module deployment\n\nThe plugin will consider any contract inside a `modules` folder (configurable) a module, and automatically detect if its bytecode has changed and deploy it.\n\n### Router generation\n\nAfter module deployment, the router's source code is generated by the plugin. Generation will fail under certain conditions, e.g. if two of the modules contain the same selector, or a function with the same name.\n\nExample output:\n\n```\ncontract Router {\n    error UnknownSelector(bytes4 sel);\n\n    address private constant _OWNER_MODULE = 0x5FbDB2315678afecb367f032d93F642f64180aa3;\n    address private constant _SNXTOKEN_MODULE = 0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512;\n    address private constant _SYNTHS_MODULE = 0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0;\n    address private constant _UPGRADE_MODULE = 0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9;\n\n    fallback() external payable {\n        _forward();\n    }\n\n    receive() external payable {\n        _forward();\n    }\n\n    function _forward() internal {\n        // Lookup table: Function selector => implementation contract\n        bytes4 sig4 = msg.sig;\n        address implementation;\n\n        assembly {\n            let sig32 := shr(224, sig4)\n\n            function findImplementation(sig) -> result {\n                if lt(sig,0x81d49b75) {\n                    if lt(sig,0x53a47bb7) {\n                        switch sig\n                        case 0x0f36a2de { result := _SYNTHS_MODULE } // SynthsModule.createSynth()\n                        case 0x1627540c { result := _OWNER_MODULE } // OwnerModule.nominateNewOwner()\n                        case 0x2d6b3a6b { result := _SYNTHS_MODULE } // SynthsModule.getBeacon()\n                        case 0x35eb2824 { result := _OWNER_MODULE } // OwnerModule.isOwnerModuleInitialized()\n                        case 0x3659cfe6 { result := _UPGRADE_MODULE } // UpgradeModule.upgradeTo()\n                        case 0x51456061 { result := _SYNTHS_MODULE } // SynthsModule.getSynth()\n                        leave\n                    }\n                    switch sig\n                    case 0x53a47bb7 { result := _OWNER_MODULE } // OwnerModule.nominatedOwner()\n                    case 0x57d7995a { result := _SYNTHS_MODULE } // SynthsModule.createSynthImplementation()\n                    case 0x624bd96d { result := _OWNER_MODULE } // OwnerModule.initializeOwnerModule()\n                    case 0x7104fba5 { result := _SYNTHS_MODULE } // SynthsModule.getSynthImplementation()\n                    case 0x718fe928 { result := _OWNER_MODULE } // OwnerModule.renounceNomination()\n                    case 0x79ba5097 { result := _OWNER_MODULE } // OwnerModule.acceptOwnership()\n                    leave\n                }\n                if lt(sig,0xd1b6c504) {\n                    switch sig\n                    case 0x81d49b75 { result := _SNXTOKEN_MODULE } // SNXTokenModule.getSNXTokenModuleSatellites()\n                    case 0x8da5cb5b { result := _OWNER_MODULE } // OwnerModule.owner()\n                    case 0xa44896e7 { result := _SYNTHS_MODULE } // SynthsModule.isSynthsModuleInitialized()\n                    case 0xaaf10f42 { result := _UPGRADE_MODULE } // UpgradeModule.getImplementation()\n                    case 0xc6253216 { result := _SYNTHS_MODULE } // SynthsModule.upgradeSynthImplementation()\n                    case 0xc7f62cda { result := _UPGRADE_MODULE } // UpgradeModule.simulateUpgradeTo()\n                    leave\n                }\n                switch sig\n                case 0xd1b6c504 { result := _SNXTOKEN_MODULE } // SNXTokenModule.getSNXTokenAddress()\n                case 0xdaac1198 { result := _SNXTOKEN_MODULE } // SNXTokenModule.upgradeSNXImplementation()\n                case 0xe040da24 { result := _SNXTOKEN_MODULE } // SNXTokenModule.isSNXTokenModuleInitialized()\n                case 0xf4c4dc31 { result := _SYNTHS_MODULE } // SynthsModule.getSynthsModuleSatellites()\n                case 0xf5d6f068 { result := _SNXTOKEN_MODULE } // SNXTokenModule.initializeSNXTokenModule()\n                case 0xfbc6aa6f { result := _SYNTHS_MODULE } // SynthsModule.initializeSynthsModule()\n                leave\n            }\n\n            implementation := findImplementation(sig32)\n        }\n\n        if (implementation == address(0)) {\n            revert UnknownSelector(sig4);\n        }\n\n        // Delegatecall to the implementation contract\n        assembly {\n            calldatacopy(0, 0, calldatasize())\n\n            let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n            returndatacopy(0, 0, returndatasize())\n\n            switch result\n            case 0 {\n                revert(0, returndatasize())\n            }\n            default {\n                return(0, returndatasize())\n            }\n        }\n    }\n}\n```\n\n### Router validation\n\nAfter generation, the plugin performs a series of validations on the generated source, including:\n\n- Checks that there are no duplicate selectors in its modules (function names must be unique)\n- That there are no storage collisions between module namespaces\n- That there are no invalid storage mutations between module namespaces\n- TODO: Complete list of validations\n\n### Storage namespaces\n\nTo avoid storage collisions between modules, we recommend the usage of storage namespaces.\n\nInstead of declaring variables in regular Solidity slots:\n\n```\ncontract SettingsModule {\n\tuint private _someSetting;\n\n  function setSomeSetting(uint newValue) external {\n    _someSetting = newValue;\n  }\n\n  function getSomeSetting() external view returns (uint) {\n    return _someSetting;\n  }\n}\n```\n\nUse a store:\n\n```\ncontract SettingsModule is SettingsStorage {\n\tfunction setSomeSetting(uint newValue) external {\n    _settingsStore().someSetting = newValue;\n  }\n\n  function getSomeSetting() external view returns (uint) {\n    return _settingsStore().someSetting;\n  }\n}\n\ncontract SettingsStorage {\n  struct SettingsStore {\n    uint someSetting;\n  }\n\n  function _settingsStore() internal pure returns (ProxyStore storage store) {\n    assembly {\n      // bytes32(uint(keccak256(\"io.synthetix.settings\")) - 1)\n      store.slot = 0x312...\n    }\n  }\n}\n```\n\n### Inter-modular communication and mixins\n\nSince the router `DELEGATECALL`s to its implementation modules, all code specified by its modules will be run within a single execution context. If the router is used directly, it will be the execution context. If something is `DELEGATECALL`ing the router, then that will be the execution context. E.g. a proxy.\n\nThus, all modules have access to the global storage of the system. Instead of performing calls to other modules, it is recommended to use Mixins that know how to interact with the storage of another module.\n\nE.g.\n\n```\ncontract OwnableMixin is OwnableStorage {\n  modifier onlyOwner() {\n    require(msg.sender == _ownerStore().owner, \"Only owner allowed\");\n    _;\n  }\n}\n```\n\n```\ncontract SynthsModule is SynthsStorage, OwnableMixin {\n  function createSynth(...) external onlyOwner {\n    ...\n  }\n}\n```\n\n### No constructors\n\nSince the router `DELEGATECALL`s to its modules, they storage will never be used. Any storage that may have been set by a constructor during module deployment will be ignored. Thus, we recommend to avoid using constructors in modules, and use initializer functions instead.\n\n### Upgradeability\n\nIf the router is used as the implementation of a UUPS [Universal Upgradeable Proxy Standard](https://eips.ethereum.org/EIPS/eip-1822) proxy, and includes an UpgradeModule, it can be used to design complex systems which are upgradeable until the main proxy is upgraded to a router implementation that no longer has an UpgradeModule.\n\n⚠️ Make sure that the UUPS contract does not contain public facing functions becuase they could clash with function signatures from the implementation modules. ⚠️\n\n### Plugin configuration\n\nhardhat.config.js\n\n```\nmodule.exports = {\n  solidity: '0.8.11'\n  networks: {\n    ...\n  },\n  router: {\n    paths: {\n      deployments: 'deployments', // path to store deployment artifacts\n      modules: 'modules',         // path where to find module contracts\n    },\n  },\n};\n\n```\n","source":"src/index.ts","gitHead":"6ad3588038432a2015409633fe7d0dc641f54a27","scripts":{"test":"mocha --require ts-node/register","build":"tsc --project tsconfig.json","watch":"yarn build --watch","coverage":"nyc yarn test","test:watch":"yarn test --watch","prepublishOnly":"yarn build"},"_npmUser":{"name":"synthetixio-team","email":"engineering@synthetix.io"},"_npmVersion":"lerna/1.17.0/node@v16.13.2+arm64 (darwin)","description":"Synthetix Router Proxy Architecture Manager","directories":{},"_nodeVersion":"16.13.2","dependencies":{"ajv":"^8.11.0","solc":"^0.8.17","debug":"4.3.4","ethers":"^5.0.0","lodash":"4.17.21","mustache":"4.2.0","@ethersproject/abi":"5.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","mocha":"9.1.1","typechain":"8.1.1","typescript":"4.9.3","@types/debug":"4.1.7","@types/lodash":"4.14.191","@types/mustache":"4.2.2","@usecannon/builder":"2.4.7"},"peerDependencies":{"hardhat":"^2.0.0","@usecannon/builder":"^2.4.0-alpha.1"},"peerDependenciesMeta":{"hardhat":{"optional":true},"@usecannon/builder":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/router_3.1.1-dev.6ad35880_1683739950223_0.8926580452407717","host":"s3://npm-registry-packages"}},"3.1.1":{"name":"@synthetixio/router","version":"3.1.1","keywords":["deploy","solidity","cannon"],"author":{"name":"Synthetix"},"license":"MIT","_id":"@synthetixio/router@3.1.1","maintainers":[{"name":"noisekit","email":"noisekit@proton.me"},{"name":"joey-synthetix","email":"joey@cc.snxdao.io"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"synthetixio-team","email":"engineering@synthetix.io"},{"name":"ajsantander","email":"palebluedot@gmail.com"},{"name":"drptbl","email":"jakub.mucha@icloud.com"},{"name":"klbyte","email":"git@danb.email"}],"dist":{"shasum":"76fafafe8813404e5fcdb8822d882603fc164291","tarball":"https://registry.npmjs.org/@synthetixio/router/-/router-3.1.1.tgz","fileCount":53,"integrity":"sha512-iTpUj1CrnAgf8al+inyRaaFOQcHkkgwb6LnpdXbdck7PZFfsBI7jPFT8qytcyTQyVbN1jVRsHoI3/1WdsT6txw==","signatures":[{"sig":"MEYCIQD6v8DlXjTbxj45PBbWqfK+8P/gytz0C66QJKqswBfgmAIhANuCG17GM3mrxMbkpJrCABYDYsOd5du0g6FVd46Q9B9H","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":143319},"main":"dist/index.js","types":"dist/index.d.ts","cannon":"utils/cannon.js","source":"src/index.ts","gitHead":"1f2838102418c17ab4fa8d173ed290eb46948beb","scripts":{"test":"mocha --require ts-node/register","build":"tsc --project tsconfig.json","watch":"yarn build --watch","coverage":"nyc yarn test","test:watch":"yarn test --watch","prepublishOnly":"yarn build"},"_npmUser":{"name":"synthetixio-team","email":"engineering@synthetix.io"},"_npmVersion":"lerna/1.17.0/node@v16.13.2+arm64 (darwin)","description":"Synthetix Router Proxy Architecture Manager","directories":{},"_nodeVersion":"16.13.2","dependencies":{"ajv":"^8.11.0","solc":"^0.8.17","debug":"4.3.4","ethers":"^5.0.0","lodash":"4.17.21","mustache":"4.2.0","@ethersproject/abi":"5.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","mocha":"9.1.1","typechain":"8.1.1","typescript":"4.9.3","@types/debug":"4.1.7","@types/lodash":"4.14.191","@types/mustache":"4.2.2","@usecannon/builder":"2.4.7"},"peerDependencies":{"hardhat":"^2.0.0","@usecannon/builder":"^2.4.0-alpha.1"},"peerDependenciesMeta":{"hardhat":{"optional":true},"@usecannon/builder":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/router_3.1.1_1684875615950_0.971035429686534","host":"s3://npm-registry-packages"}},"3.1.2":{"name":"@synthetixio/router","version":"3.1.2","keywords":["deploy","solidity","cannon"],"author":{"name":"Synthetix"},"license":"MIT","_id":"@synthetixio/router@3.1.2","maintainers":[{"name":"noisekit","email":"noisekit@proton.me"},{"name":"joey-synthetix","email":"joey@cc.snxdao.io"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"synthetixio-team","email":"engineering@synthetix.io"},{"name":"ajsantander","email":"palebluedot@gmail.com"},{"name":"drptbl","email":"jakub.mucha@icloud.com"},{"name":"klbyte","email":"git@danb.email"}],"dist":{"shasum":"9d2db8510dcdf213305f072b885c9bf45d879def","tarball":"https://registry.npmjs.org/@synthetixio/router/-/router-3.1.2.tgz","fileCount":52,"integrity":"sha512-iwQfqoTh/UTZoKcx/02MrHtytTuv+3gMDbtEtgdSoWg1VfsQXPrH35OK9pwaUAF5Ssn0Y2Z3Wqfv3t0xdxuxAA==","signatures":[{"sig":"MEUCIAoDFCX52wQO4nwdZFH3/ksUSOtICx5P4TG8wk8Zc5V+AiEAx9nuzQf+RHQV60oixxtCxMh6IuBIY5zqxGri57UPlqU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":142456},"main":"dist/index.js","types":"dist/index.d.ts","cannon":"utils/cannon.js","source":"src/index.ts","gitHead":"6ad3588038432a2015409633fe7d0dc641f54a27","scripts":{"test":"mocha --require ts-node/register","build":"tsc --project tsconfig.json","watch":"yarn build --watch","coverage":"nyc yarn test","test:watch":"yarn test --watch","prepublishOnly":"yarn build"},"_npmUser":{"name":"synthetixio-team","email":"engineering@synthetix.io"},"_npmVersion":"8.1.2","description":"Synthetix Router Proxy Architecture Manager","directories":{},"_nodeVersion":"16.13.2","dependencies":{"ajv":"^8.11.0","solc":"^0.8.17","debug":"4.3.4","ethers":"^5.0.0","lodash":"4.17.21","mustache":"4.2.0","@ethersproject/abi":"5.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","mocha":"9.1.1","typechain":"8.1.1","typescript":"4.9.3","@types/debug":"4.1.7","@types/lodash":"4.14.191","@types/mustache":"4.2.2","@usecannon/builder":"2.4.7"},"peerDependencies":{"hardhat":"^2.0.0","@usecannon/builder":"^2.4.0-alpha.1"},"peerDependenciesMeta":{"hardhat":{"optional":true},"@usecannon/builder":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/router_3.1.2_1684878736917_0.5522357409044356","host":"s3://npm-registry-packages"}},"3.1.3":{"name":"@synthetixio/router","version":"3.1.3","keywords":["deploy","solidity","cannon"],"author":{"name":"Synthetix"},"license":"MIT","_id":"@synthetixio/router@3.1.3","maintainers":[{"name":"noisekit","email":"noisekit@proton.me"},{"name":"joey-synthetix","email":"joey@cc.snxdao.io"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"synthetixio-team","email":"engineering@synthetix.io"},{"name":"ajsantander","email":"palebluedot@gmail.com"},{"name":"drptbl","email":"jakub.mucha@icloud.com"},{"name":"klbyte","email":"git@danb.email"}],"dist":{"shasum":"ad81e059561cf98df3516e6a79a0a60918ec9b76","tarball":"https://registry.npmjs.org/@synthetixio/router/-/router-3.1.3.tgz","fileCount":51,"integrity":"sha512-6t6hmn3FKekzPD1Dx02curGlNYviWzv+NrQ5IAfj1OMkH0QuqVoqplzwhiXPLoiqsVasE3iVACWyzsE2/US9Vw==","signatures":[{"sig":"MEYCIQCNotMb4v2/7sQd1xQYH8CBrsXSxQrJXuBzoNDEw72DygIhALmnJrImoVQIhCUbGFMwSC23d3ISrrBzhc2lMxpzd5HJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":59058},"main":"dist/index.js","types":"dist/index.d.ts","cannon":"utils/cannon.js","source":"src/index.ts","gitHead":"6ad3588038432a2015409633fe7d0dc641f54a27","scripts":{"lint":"eslint .","test":"mocha --require ts-node/register","build":"tsc","watch":"tsc --watch","pretty":"prettier --check .","coverage":"nyc yarn test","lint:fix":"eslint --fix .","pretty:fix":"prettier --write .","test:watch":"yarn test --watch","prepublishOnly":"yarn build"},"_npmUser":{"name":"synthetixio-team","email":"engineering@synthetix.io"},"_npmVersion":"9.5.1","description":"Synthetix Router Proxy Architecture Manager","directories":{},"_nodeVersion":"18.16.0","dependencies":{"ajv":"^8.11.0","solc":"^0.8.17","debug":"^4.3.4","ethers":"^5.7.2","lodash":"^4.17.21","mustache":"^4.2.0","@ethersproject/abi":"^5.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"yarn@3.6.0","devDependencies":{"nyc":"^15.1.0","mocha":"^10.2.0","eslint":"8.43.0","hardhat":"^2.0.0","ts-node":"^10.9.1","prettier":"^2.8.8","typechain":"^8.2.0","typescript":"^4.9.5","@types/node":"^18.16.18","@types/debug":"^4.1.8","@types/mocha":"^10.0.1","@types/lodash":"^4.14.195","@types/mustache":"^4.2.2","@usecannon/builder":"^2.4.16","@typescript-eslint/parser":"^5.60.0","eslint-plugin-no-only-tests":"^3.1.0","@typescript-eslint/eslint-plugin":"^5.60.0"},"peerDependencies":{"hardhat":"^2.0.0","@usecannon/builder":"^2.4.0-alpha.1"},"peerDependenciesMeta":{"hardhat":{"optional":true},"@usecannon/builder":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/router_3.1.3_1687361724160_0.2263478798231635","host":"s3://npm-registry-packages"}},"3.1.4":{"name":"@synthetixio/router","version":"3.1.4","keywords":["deploy","solidity","cannon"],"author":{"name":"Synthetix"},"license":"MIT","_id":"@synthetixio/router@3.1.4","maintainers":[{"name":"noisekit","email":"noisekit@proton.me"},{"name":"joey-synthetix","email":"joey@cc.snxdao.io"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"synthetixio-team","email":"engineering@synthetix.io"},{"name":"ajsantander","email":"palebluedot@gmail.com"},{"name":"drptbl","email":"jakub.mucha@icloud.com"},{"name":"klbyte","email":"git@danb.email"}],"dist":{"shasum":"f08b3e0ef0f8cf5e4094efa3667cf1552caf9ed8","tarball":"https://registry.npmjs.org/@synthetixio/router/-/router-3.1.4.tgz","fileCount":54,"integrity":"sha512-A35qPlFwfoukivAvk6BARAYSb+LPJaQyjJZf+HJQf6qwQRtCnuT/T7DPRF47ObCnst3rwgJaLK7jCzQVR7+WCg==","signatures":[{"sig":"MEUCIQCOCF7iOfHD+/Tq132/qOC3NwaE7d/zEnE2Aqx4QT4I5AIgcXXZ/w6efp6Lt8IsssR4ip27Vp7xdJ20B80gsHj3YBg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61326},"main":"dist/index.js","types":"dist/index.d.ts","cannon":"utils/cannon.js","source":"src/index.ts","gitHead":"6ad3588038432a2015409633fe7d0dc641f54a27","scripts":{"lint":"eslint .","test":"mocha --require ts-node/register","build":"tsc","watch":"tsc --watch","pretty":"prettier --check .","coverage":"nyc yarn test","lint:fix":"eslint --fix .","pretty:fix":"prettier --write .","test:watch":"yarn test --watch","prepublishOnly":"yarn build"},"_npmUser":{"name":"synthetixio-team","email":"engineering@synthetix.io"},"_npmVersion":"8.19.4","description":"Synthetix Router Proxy Architecture Manager","directories":{},"_nodeVersion":"16.20.1","dependencies":{"ajv":"^8.11.0","solc":"^0.8.17","debug":"^4.3.4","ethers":"^5.7.2","lodash":"^4.17.21","mustache":"^4.2.0","@ethersproject/abi":"^5.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"yarn@3.6.0","devDependencies":{"nyc":"^15.1.0","mocha":"^10.2.0","eslint":"8.43.0","hardhat":"^2.0.0","ts-node":"^10.9.1","prettier":"^2.8.8","typechain":"^8.2.0","typescript":"^4.9.5","@types/node":"^18.16.18","@types/debug":"^4.1.8","@types/mocha":"^10.0.1","@types/lodash":"^4.14.195","@types/mustache":"^4.2.2","@usecannon/builder":"^2.4.16","@typescript-eslint/parser":"^5.60.0","eslint-plugin-no-only-tests":"^3.1.0","@typescript-eslint/eslint-plugin":"^5.60.0"},"peerDependencies":{"hardhat":"^2.0.0","@usecannon/builder":"^2.4.0-alpha.1"},"peerDependenciesMeta":{"hardhat":{"optional":true},"@usecannon/builder":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/router_3.1.4_1687949619077_0.4988796555841679","host":"s3://npm-registry-packages"}},"3.2.0":{"name":"@synthetixio/router","version":"3.2.0","keywords":["deploy","solidity","cannon"],"author":{"name":"Synthetix"},"license":"MIT","_id":"@synthetixio/router@3.2.0","maintainers":[{"name":"noisekit","email":"noisekit@proton.me"},{"name":"joey-synthetix","email":"joey@cc.snxdao.io"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"synthetixio-team","email":"engineering@synthetix.io"},{"name":"ajsantander","email":"palebluedot@gmail.com"},{"name":"drptbl","email":"jakub.mucha@icloud.com"},{"name":"klbyte","email":"git@danb.email"}],"dist":{"shasum":"80f6bdcbb2d565532237c70b5c17fa978649959c","tarball":"https://registry.npmjs.org/@synthetixio/router/-/router-3.2.0.tgz","fileCount":62,"integrity":"sha512-btOI1cIeIrjB/eBc9qo/ZLDrtx/auR7yYmsJA5Vug0x+pA3N7WAH7oZAlfxX6eFEeT3F7QhCFbgK2wmBmtV4Cg==","signatures":[{"sig":"MEUCIFti23mi84sNwsWQoja9EOgf5gSNSdltziq+6ITMWKZfAiEAtuyhGC+AEzuxl753qnbm+KffaKIKI1IOVgBE0jphSv4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":82567},"main":"dist/index.js","types":"dist/index.d.ts","cannon":"utils/cannon.js","source":"src/index.ts","gitHead":"6ad3588038432a2015409633fe7d0dc641f54a27","scripts":{"lint":"eslint .","test":"mocha","build":"tsc","watch":"tsc --watch","pretty":"prettier --check .","coverage":"nyc yarn test","lint:fix":"eslint --fix .","pretty:fix":"prettier --write .","test:watch":"yarn test --watch","prepublishOnly":"yarn build"},"_npmUser":{"name":"synthetixio-team","email":"engineering@synthetix.io"},"_npmVersion":"9.8.0","description":"Synthetix Router Proxy Architecture Manager","directories":{},"_nodeVersion":"20.5.1","dependencies":{"debug":"^4.3.4","lodash":"^4.17.21","mustache":"^4.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"yarn@3.6.0","devDependencies":{"ajv":"^8.11.0","nyc":"^15.1.0","solc":"^0.8.17","mocha":"^10.2.0","eslint":"8.43.0","ethers":"^5.7.2","hardhat":"^2.0.0","ts-node":"^10.9.1","prettier":"^2.8.8","typechain":"^8.2.0","typescript":"^4.9.5","@types/node":"^18.16.18","@types/debug":"^4.1.8","@types/mocha":"^10.0.1","@types/lodash":"^4.14.195","@types/mustache":"^4.2.2","@ethersproject/abi":"^5.7.0","@usecannon/builder":"^2.4.16","@typescript-eslint/parser":"^5.60.0","eslint-plugin-no-only-tests":"^3.1.0","@typescript-eslint/eslint-plugin":"^5.60.0"},"peerDependencies":{"solc":"^0.8.17","ethers":"^5.0.0","hardhat":"^2.0.0","@usecannon/builder":"^2.4.0-alpha.1"},"peerDependenciesMeta":{"hardhat":{"optional":true},"@usecannon/builder":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/router_3.2.0_1693849557847_0.33156713212615974","host":"s3://npm-registry-packages"}},"3.2.1":{"name":"@synthetixio/router","version":"3.2.1","keywords":["deploy","solidity","cannon"],"author":{"name":"Synthetix"},"license":"MIT","_id":"@synthetixio/router@3.2.1","maintainers":[{"name":"noisekit","email":"noisekit@proton.me"},{"name":"joey-synthetix","email":"joey@cc.snxdao.io"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"synthetixio-team","email":"engineering@synthetix.io"},{"name":"ajsantander","email":"palebluedot@gmail.com"},{"name":"drptbl","email":"jakub.mucha@icloud.com"},{"name":"klbyte","email":"git@danb.email"}],"dist":{"shasum":"a8c7d45fb5c1ed20fdb6adb5b3d4b5b94e2687d6","tarball":"https://registry.npmjs.org/@synthetixio/router/-/router-3.2.1.tgz","fileCount":61,"integrity":"sha512-1SFs/H8L2GiC6kGZMSjP7WbMPWEjSBldxwnFY5h0Sf1iABpJpAlM8fL0G+nyG+8eGzmgsagpRmYcmw9EzT2idQ==","signatures":[{"sig":"MEUCIFOYK/8rkjae7PN2SDFZ7H8G++6Pi0IaU2UYZZk95chmAiEA5SS9qNE1+zeBKtp8/dUkJgzKQ4Kxz3a+roU7ib31BBA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":77322},"main":"dist/index.js","types":"dist/index.d.ts","cannon":"utils/cannon.js","source":"src/index.ts","gitHead":"6ad3588038432a2015409633fe7d0dc641f54a27","scripts":{"lint":"eslint .","test":"mocha","build":"tsc","watch":"tsc --watch","pretty":"prettier --check .","coverage":"nyc yarn test","lint:fix":"eslint --fix .","pretty:fix":"prettier --write .","test:watch":"yarn test --watch","prepublishOnly":"yarn build"},"_npmUser":{"name":"synthetixio-team","email":"engineering@synthetix.io"},"_npmVersion":"9.8.0","description":"Synthetix Router Proxy Architecture Manager","directories":{},"_nodeVersion":"20.5.1","dependencies":{"debug":"^4.3.4","mustache":"^4.2.0","@ethersproject/keccak256":"^5.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"yarn@3.6.3","devDependencies":{"nyc":"^15.1.0","solc":"^0.8.21","mocha":"^10.2.0","eslint":"^8.48.0","ethers":"^5.7.2","hardhat":"^2.17.2","ts-node":"^10.9.1","prettier":"^3.0.3","typechain":"^8.3.1","typescript":"^5.2.2","@types/node":"^18.17.14","@types/debug":"^4.1.8","@types/mocha":"^10.0.1","@types/mustache":"^4.2.2","@ethersproject/abi":"^5.7.0","@usecannon/builder":"^2.5.4","@typescript-eslint/parser":"^6.6.0","eslint-plugin-no-only-tests":"^3.1.0","@typescript-eslint/eslint-plugin":"^6.6.0"},"peerDependencies":{"solc":"^0.8.17","ethers":"^5.0.0","hardhat":"^2.0.0","@usecannon/builder":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/router_3.2.1_1693929921297_0.7568533531438542","host":"s3://npm-registry-packages"}},"3.3.0":{"name":"@synthetixio/router","version":"3.3.0","keywords":["deploy","solidity","cannon"],"author":{"name":"Synthetix"},"license":"MIT","_id":"@synthetixio/router@3.3.0","maintainers":[{"name":"noisekit","email":"noisekit@proton.me"},{"name":"joey-synthetix","email":"joey@cc.snxdao.io"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"synthetixio-team","email":"engineering@synthetix.io"},{"name":"ajsantander","email":"palebluedot@gmail.com"},{"name":"drptbl","email":"jakub.mucha@icloud.com"},{"name":"klbyte","email":"git@danb.email"}],"dist":{"shasum":"ed46a5cf2b74563c7342785bc1a8a56aed2340f9","tarball":"https://registry.npmjs.org/@synthetixio/router/-/router-3.3.0.tgz","fileCount":61,"integrity":"sha512-I/McfsD2vwQNDATQ43IAyTCRs3kER9S7KiNd2EG0cDErki4qGlwhBV+VNaa+V+TJr9K0tKf2IvT3x7CaXFDSMw==","signatures":[{"sig":"MEUCIQD40sNAE2zAIvQOgk1fSt6YXKXaUgYfxN3VqMGfMwausAIgM7s6uVSELUTfZmNWpASNHDkogUDnWV68DuBD2Gc/lIg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":77911},"main":"dist/index.js","types":"dist/index.d.ts","cannon":"utils/cannon.js","source":"src/index.ts","gitHead":"6ad3588038432a2015409633fe7d0dc641f54a27","scripts":{"lint":"eslint .","test":"mocha","build":"tsc","watch":"tsc --watch","pretty":"prettier --check .","coverage":"nyc yarn test","lint:fix":"eslint --fix .","pretty:fix":"prettier --write .","test:watch":"yarn test --watch","prepublishOnly":"yarn build"},"_npmUser":{"name":"synthetixio-team","email":"engineering@synthetix.io"},"_npmVersion":"9.8.0","description":"Synthetix Router Proxy Architecture Manager","directories":{},"_nodeVersion":"20.5.1","dependencies":{"debug":"^4.3.4","mustache":"^4.2.0","@ethersproject/keccak256":"^5.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"yarn@3.6.3","devDependencies":{"nyc":"^15.1.0","solc":"^0.8.21","mocha":"^10.2.0","eslint":"^8.48.0","ethers":"^5.7.2","hardhat":"^2.17.2","ts-node":"^10.9.1","prettier":"^3.0.3","typechain":"^8.3.1","typescript":"^5.2.2","@types/node":"^18.17.14","@types/debug":"^4.1.8","@types/mocha":"^10.0.1","@types/mustache":"^4.2.2","@ethersproject/abi":"^5.7.0","@usecannon/builder":"^2.5.4","@typescript-eslint/parser":"^6.6.0","eslint-plugin-no-only-tests":"^3.1.0","@typescript-eslint/eslint-plugin":"^6.6.0"},"peerDependencies":{"solc":"^0.8.17","ethers":"^5.0.0","hardhat":"^2.0.0","@usecannon/builder":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/router_3.3.0_1694599504175_0.8779858128738376","host":"s3://npm-registry-packages"}},"3.3.1":{"name":"@synthetixio/router","version":"3.3.1","keywords":["deploy","solidity","cannon"],"author":{"name":"Synthetix"},"license":"MIT","_id":"@synthetixio/router@3.3.1","maintainers":[{"name":"noisekit","email":"noisekit@proton.me"},{"name":"joey-synthetix","email":"joey@cc.snxdao.io"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"synthetixio-team","email":"engineering@synthetix.io"},{"name":"ajsantander","email":"palebluedot@gmail.com"},{"name":"drptbl","email":"jakub.mucha@icloud.com"},{"name":"klbyte","email":"git@danb.email"}],"dist":{"shasum":"8afaf7e5053511388081e6cac99973e54839fe80","tarball":"https://registry.npmjs.org/@synthetixio/router/-/router-3.3.1.tgz","fileCount":57,"integrity":"sha512-0XrGeYs7c7Yu36rHKHSo3qtsoi/4beKQdXAOWz2jIbQt3RzrAQiiiWkKB6jHsp12X7ln+wui1eAf4FPPiJH9kA==","signatures":[{"sig":"MEUCIA46MUDJ3ZF/C5/4SlNvnwRUjLN1Vm1JMM0vPIsiB9DhAiEAhVAPn3Y9Fw+06uzDtWD3/WS8PocOrSQUaQj0sQZYXZE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66598},"main":"dist/index.js","types":"dist/index.d.ts","cannon":"utils/cannon.js","source":"src/index.ts","gitHead":"6ad3588038432a2015409633fe7d0dc641f54a27","scripts":{"lint":"eslint .","test":"mocha","build":"tsc","watch":"tsc --watch","pretty":"prettier --check .","coverage":"nyc yarn test","lint:fix":"eslint --fix .","pretty:fix":"prettier --write .","test:watch":"yarn test --watch","prepublishOnly":"yarn build"},"_npmUser":{"name":"synthetixio-team","email":"engineering@synthetix.io"},"_npmVersion":"9.5.1","description":"Synthetix Router Proxy Architecture Manager","directories":{},"_nodeVersion":"18.16.0","dependencies":{"debug":"^4.3.4","mustache":"^4.2.0","@ethersproject/keccak256":"^5.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"yarn@3.6.3","devDependencies":{"nyc":"^15.1.0","solc":"^0.8.21","mocha":"^10.2.0","eslint":"^8.48.0","ethers":"^5.7.2","hardhat":"^2.17.2","ts-node":"^10.9.1","prettier":"^3.0.3","typechain":"^8.3.1","typescript":"^5.2.2","@types/node":"^18.17.14","@types/debug":"^4.1.8","@types/mocha":"^10.0.1","@types/mustache":"^4.2.2","@ethersproject/abi":"^5.7.0","@usecannon/builder":"^2.5.4","@typescript-eslint/parser":"^6.6.0","eslint-plugin-no-only-tests":"^3.1.0","@typescript-eslint/eslint-plugin":"^6.6.0"},"peerDependencies":{"solc":"^0.8.17","ethers":"^5.0.0","hardhat":"^2.0.0","@usecannon/builder":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/router_3.3.1_1705368585596_0.18909666017772553","host":"s3://npm-registry-packages"}},"3.3.2":{"name":"@synthetixio/router","version":"3.3.2","keywords":["deploy","solidity","cannon"],"author":{"name":"Synthetix"},"license":"MIT","_id":"@synthetixio/router@3.3.2","maintainers":[{"name":"noisekit","email":"noisekit@proton.me"},{"name":"joey-synthetix","email":"joey@cc.snxdao.io"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"synthetixio-team","email":"engineering@synthetix.io"},{"name":"ajsantander","email":"palebluedot@gmail.com"},{"name":"drptbl","email":"jakub.mucha@icloud.com"},{"name":"klbyte","email":"git@danb.email"}],"dist":{"shasum":"4eaa2a362677956d25b81e63ee984ca253b8f156","tarball":"https://registry.npmjs.org/@synthetixio/router/-/router-3.3.2.tgz","fileCount":61,"integrity":"sha512-TrBjIi89n94q57bPKmCzHBy8FYAiy0bgK6fTFlYeQD5KEn/MxRkJJjOMIhBr+azr+uBQdltBkisZ8UuAXk3UCw==","signatures":[{"sig":"MEQCIHyqlwi2NX3smYqzkEjO7MFf+l+Izmrq1WMz+pndtvypAiBenExg/QDpa45WfTpCEhWTwNNshn7kKOEvU7y5FMLZCg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":78560},"main":"dist/index.js","types":"dist/index.d.ts","cannon":"utils/cannon.js","source":"src/index.ts","gitHead":"6ad3588038432a2015409633fe7d0dc641f54a27","scripts":{"lint":"eslint .","test":"mocha","build":"tsc","watch":"tsc --watch","pretty":"prettier --check .","coverage":"nyc yarn test","lint:fix":"eslint --fix .","pretty:fix":"prettier --write .","test:watch":"yarn test --watch","prepublishOnly":"yarn build"},"_npmUser":{"name":"synthetixio-team","email":"engineering@synthetix.io"},"_npmVersion":"9.8.1","description":"Synthetix Router Proxy Architecture Manager","directories":{},"_nodeVersion":"18.18.0","dependencies":{"debug":"^4.3.4","mustache":"^4.2.0","@ethersproject/keccak256":"^5.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"yarn@3.6.3","devDependencies":{"nyc":"^15.1.0","solc":"^0.8.21","mocha":"^10.2.0","eslint":"^8.48.0","ethers":"^5.7.2","hardhat":"^2.17.2","ts-node":"^10.9.1","prettier":"^3.0.3","typechain":"^8.3.1","typescript":"^5.2.2","@types/node":"^18.17.14","@types/debug":"^4.1.8","@types/mocha":"^10.0.1","@types/mustache":"^4.2.2","@ethersproject/abi":"^5.7.0","@usecannon/builder":"^2.5.4","@typescript-eslint/parser":"^6.6.0","eslint-plugin-no-only-tests":"^3.1.0","@typescript-eslint/eslint-plugin":"^6.6.0"},"peerDependencies":{"solc":"^0.8.17","hardhat":"^2.0.0","@usecannon/builder":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/router_3.3.2_1706113435417_0.22046890275668507","host":"s3://npm-registry-packages"}},"3.3.2-alpha.0":{"name":"@synthetixio/router","version":"3.3.2-alpha.0","keywords":["deploy","solidity","cannon"],"author":{"name":"Synthetix"},"license":"MIT","_id":"@synthetixio/router@3.3.2-alpha.0","maintainers":[{"name":"noisekit","email":"noisekit@proton.me"},{"name":"joey-synthetix","email":"joey@cc.snxdao.io"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"synthetixio-team","email":"engineering@synthetix.io"},{"name":"ajsantander","email":"palebluedot@gmail.com"},{"name":"drptbl","email":"jakub.mucha@icloud.com"},{"name":"klbyte","email":"git@danb.email"}],"dist":{"shasum":"fc264ad8225809776e049d61c7438e89ea1b9ffa","tarball":"https://registry.npmjs.org/@synthetixio/router/-/router-3.3.2-alpha.0.tgz","fileCount":57,"integrity":"sha512-rtLVXuXD+YIZcJEK7pg4e7rq/v4T+GpfpA2VwGsel3pu9GL/4KfgPih9TqlvUsz4Wy1qXP/Xch4aG1Ul7iElCg==","signatures":[{"sig":"MEUCIEHY6OvH07ebvAFCJzM3Z9yWXMQhwCJtPHolWtjBFPDbAiEAlLekq1jtx7Yx5B39gjZ4W9Q4HjS1wHvHWezvADm9S1M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":68539},"main":"dist/index.js","types":"dist/index.d.ts","cannon":"utils/cannon.js","source":"src/index.ts","gitHead":"6ad3588038432a2015409633fe7d0dc641f54a27","scripts":{"lint":"eslint .","test":"mocha","build":"tsc","watch":"tsc --watch","pretty":"prettier --check .","coverage":"nyc yarn test","lint:fix":"eslint --fix .","pretty:fix":"prettier --write .","test:watch":"yarn test --watch","prepublishOnly":"yarn build"},"_npmUser":{"name":"synthetixio-team","email":"engineering@synthetix.io"},"_npmVersion":"9.8.1","description":"Synthetix Router Proxy Architecture Manager","directories":{},"_nodeVersion":"18.18.0","dependencies":{"debug":"^4.3.4","mustache":"^4.2.0","@ethersproject/keccak256":"^5.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"yarn@3.6.3","devDependencies":{"nyc":"^15.1.0","solc":"^0.8.21","mocha":"^10.2.0","eslint":"^8.48.0","ethers":"^5.7.2","hardhat":"^2.17.2","ts-node":"^10.9.1","prettier":"^3.0.3","typechain":"^8.3.1","typescript":"^5.2.2","@types/node":"^18.17.14","@types/debug":"^4.1.8","@types/mocha":"^10.0.1","@types/mustache":"^4.2.2","@ethersproject/abi":"^5.7.0","@usecannon/builder":"^2.11.2","@typescript-eslint/parser":"^6.6.0","eslint-plugin-no-only-tests":"^3.1.0","@typescript-eslint/eslint-plugin":"^6.6.0"},"peerDependencies":{"solc":"^0.8.17","hardhat":"^2.0.0","@usecannon/builder":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/router_3.3.2-alpha.0_1707940007300_0.5051086293612344","host":"s3://npm-registry-packages"}},"3.3.3":{"name":"@synthetixio/router","version":"3.3.3","keywords":["deploy","solidity","cannon"],"author":{"name":"Synthetix"},"license":"MIT","_id":"@synthetixio/router@3.3.3","maintainers":[{"name":"noisekit","email":"noisekit@proton.me"},{"name":"joey-synthetix","email":"joey@cc.snxdao.io"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"synthetixio-team","email":"engineering@synthetix.io"},{"name":"ajsantander","email":"palebluedot@gmail.com"},{"name":"drptbl","email":"jakub.mucha@icloud.com"},{"name":"klbyte","email":"git@danb.email"}],"dist":{"shasum":"a09ae7d3293d4074102ce78f6b2819f7d1c11e1e","tarball":"https://registry.npmjs.org/@synthetixio/router/-/router-3.3.3.tgz","fileCount":57,"integrity":"sha512-rbfC3q6mbdTk0IH3mfCxovaJp0qCoeH+QkANJWQfJeJ0hszXytONwRRL77a1090lpgytZW68WUlU/qtYFuzfnQ==","signatures":[{"sig":"MEUCIGL1kew0rv6Ibk5XGfvq1938TYYcAfPi038p1/VlCYkLAiEA0luVqVCaPKUlmJOxJ1jLkMamjcTYMNJmrWs3+99t31A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":68531},"main":"dist/index.js","types":"dist/index.d.ts","cannon":"utils/cannon.js","source":"src/index.ts","gitHead":"6ad3588038432a2015409633fe7d0dc641f54a27","scripts":{"lint":"eslint .","test":"mocha","build":"tsc","watch":"tsc --watch","pretty":"prettier --check .","coverage":"nyc yarn test","lint:fix":"eslint --fix .","pretty:fix":"prettier --write .","test:watch":"yarn test --watch","prepublishOnly":"yarn build"},"_npmUser":{"name":"synthetixio-team","email":"engineering@synthetix.io"},"_npmVersion":"9.8.1","description":"Synthetix Router Proxy Architecture Manager","directories":{},"_nodeVersion":"18.18.0","dependencies":{"debug":"^4.3.4","mustache":"^4.2.0","@ethersproject/keccak256":"^5.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"yarn@3.6.3","devDependencies":{"nyc":"^15.1.0","solc":"^0.8.21","mocha":"^10.2.0","eslint":"^8.48.0","ethers":"^5.7.2","hardhat":"^2.17.2","ts-node":"^10.9.1","prettier":"^3.0.3","typechain":"^8.3.1","typescript":"^5.2.2","@types/node":"^18.17.14","@types/debug":"^4.1.8","@types/mocha":"^10.0.1","@types/mustache":"^4.2.2","@ethersproject/abi":"^5.7.0","@usecannon/builder":"^2.11.2","@typescript-eslint/parser":"^6.6.0","eslint-plugin-no-only-tests":"^3.1.0","@typescript-eslint/eslint-plugin":"^6.6.0"},"peerDependencies":{"solc":"^0.8.17","hardhat":"^2.0.0","@usecannon/builder":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/router_3.3.3_1707941297262_0.2263595260477076","host":"s3://npm-registry-packages"}},"3.3.4":{"name":"@synthetixio/router","version":"3.3.4","keywords":["deploy","solidity","cannon"],"author":{"name":"Synthetix"},"license":"MIT","_id":"@synthetixio/router@3.3.4","maintainers":[{"name":"noisekit","email":"noisekit@proton.me"},{"name":"joey-synthetix","email":"joey@cc.snxdao.io"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"synthetixio-team","email":"engineering@synthetix.io"},{"name":"ajsantander","email":"palebluedot@gmail.com"},{"name":"drptbl","email":"jakub.mucha@icloud.com"},{"name":"klbyte","email":"git@danb.email"}],"dist":{"shasum":"54d8cf628fcb31e6e268d2fad953f6c2143b118b","tarball":"https://registry.npmjs.org/@synthetixio/router/-/router-3.3.4.tgz","fileCount":57,"integrity":"sha512-NuVglL2W6lQPIwu/wyK3MIzFs/+zs/gcqgdhgbD9u0FWtDD2CISPZPGv/QKyyzSzE3ehmFSeN5AbCiYQxyA+NA==","signatures":[{"sig":"MEQCIHJYtYHys9jMLQOnE2em55tWMl/KlUMbXGWfhejZ5U2/AiBkbri1tFDpXxupNjKdTlOrObgvV634imLr0VIVntGdUQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":68531},"main":"dist/index.js","types":"dist/index.d.ts","cannon":"utils/cannon.js","source":"src/index.ts","gitHead":"6ad3588038432a2015409633fe7d0dc641f54a27","scripts":{"lint":"eslint .","test":"mocha","build":"tsc","watch":"tsc --watch","pretty":"prettier --check .","coverage":"nyc yarn test","lint:fix":"eslint --fix .","pretty:fix":"prettier --write .","test:watch":"yarn test --watch","prepublishOnly":"yarn build"},"_npmUser":{"name":"synthetixio-team","email":"engineering@synthetix.io"},"_npmVersion":"9.8.1","description":"Synthetix Router Proxy Architecture Manager","directories":{},"_nodeVersion":"18.18.0","dependencies":{"debug":"^4.3.4","mustache":"^4.2.0","@ethersproject/keccak256":"^5.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"yarn@3.6.3","devDependencies":{"nyc":"^15.1.0","solc":"^0.8.21","mocha":"^10.2.0","eslint":"^8.48.0","ethers":"^5.7.2","hardhat":"^2.17.2","ts-node":"^10.9.1","prettier":"^3.0.3","typechain":"^8.3.1","typescript":"^5.2.2","@types/node":"^18.17.14","@types/debug":"^4.1.8","@types/mocha":"^10.0.1","@types/mustache":"^4.2.2","@ethersproject/abi":"^5.7.0","@usecannon/builder":"^2.11.2","@typescript-eslint/parser":"^6.6.0","eslint-plugin-no-only-tests":"^3.1.0","@typescript-eslint/eslint-plugin":"^6.6.0"},"peerDependencies":{"solc":"^0.8.17","hardhat":"^2.0.0","@usecannon/builder":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/router_3.3.4_1707942628442_0.22596056622236316","host":"s3://npm-registry-packages"}},"3.3.5-alpha.0":{"name":"@synthetixio/router","version":"3.3.5-alpha.0","keywords":["deploy","solidity","cannon"],"author":{"name":"Synthetix"},"license":"MIT","_id":"@synthetixio/router@3.3.5-alpha.0","maintainers":[{"name":"noisekit","email":"noisekit@proton.me"},{"name":"joey-synthetix","email":"joey@cc.snxdao.io"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"synthetixio-team","email":"engineering@synthetix.io"},{"name":"ajsantander","email":"palebluedot@gmail.com"},{"name":"drptbl","email":"jakub.mucha@icloud.com"},{"name":"klbyte","email":"git@danb.email"}],"dist":{"shasum":"db4b7f68c34e9652202f39a28ab1b8259d36374a","tarball":"https://registry.npmjs.org/@synthetixio/router/-/router-3.3.5-alpha.0.tgz","fileCount":57,"integrity":"sha512-BBneal1YDtjvhSbTscFfJpZTexDvgeDxYkujZoVSRnVZUuUVtjnLjwW1dIcpWLNOvL72PGipP49B3+oskHh5dA==","signatures":[{"sig":"MEUCIE5oX2kTP33/vFeDFzlj2VEgTm6mPMBoe+0CjhpKaXuPAiEA3EBguqNcMNe31unQS4vjO1mCxbeIsbGVbAWrenzHI44=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":68539},"main":"dist/index.js","types":"dist/index.d.ts","cannon":"utils/cannon.js","readme":"# router\n\nSolidity router generator.\n\n## Description\n\nThis plugin generates a router contract which simply merges multiple contracts (modules) behind a single proxy.\n\nThe router proxy receives incoming calls and forwards them to the appropriate implementation or module, depending on which one contains the incoming function selector.\n\nExample:\nA user calls the `rebalancePool()` function on a deployed router, which merges 3 modules; A.sol, B.sol, and C.sol. The router determines that the function `rebalancePool` is defined in module B.sol. So, the router simply performs a `DELEGATECALL` to B's deployed instance.\n\nThis router is similar to the [Diamond Proxy](https://eips.ethereum.org/EIPS/eip-2535) but:\n\n- is simpler\n  - because it has no module management interface\n- more explicit\n  - because its modular composition can easily be seen by looking at its hardcoded module addresses\n- more efficient\n  - because it hardcodes the deployed module addresses, minimizing `SLOAD` usage\n\n### Module deployment\n\nThe plugin will consider any contract inside a `modules` folder (configurable) a module, and automatically detect if its bytecode has changed and deploy it.\n\n### Router generation\n\nAfter module deployment, the router's source code is generated by the plugin. Generation will fail under certain conditions, e.g. if two of the modules contain the same selector, or a function with the same name.\n\nExample output:\n\n```\ncontract Router {\n    error UnknownSelector(bytes4 sel);\n\n    address private constant _OWNER_MODULE = 0x5FbDB2315678afecb367f032d93F642f64180aa3;\n    address private constant _SNXTOKEN_MODULE = 0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512;\n    address private constant _SYNTHS_MODULE = 0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0;\n    address private constant _UPGRADE_MODULE = 0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9;\n\n    fallback() external payable {\n        _forward();\n    }\n\n    receive() external payable {\n        _forward();\n    }\n\n    function _forward() internal {\n        // Lookup table: Function selector => implementation contract\n        bytes4 sig4 = msg.sig;\n        address implementation;\n\n        assembly {\n            let sig32 := shr(224, sig4)\n\n            function findImplementation(sig) -> result {\n                if lt(sig,0x81d49b75) {\n                    if lt(sig,0x53a47bb7) {\n                        switch sig\n                        case 0x0f36a2de { result := _SYNTHS_MODULE } // SynthsModule.createSynth()\n                        case 0x1627540c { result := _OWNER_MODULE } // OwnerModule.nominateNewOwner()\n                        case 0x2d6b3a6b { result := _SYNTHS_MODULE } // SynthsModule.getBeacon()\n                        case 0x35eb2824 { result := _OWNER_MODULE } // OwnerModule.isOwnerModuleInitialized()\n                        case 0x3659cfe6 { result := _UPGRADE_MODULE } // UpgradeModule.upgradeTo()\n                        case 0x51456061 { result := _SYNTHS_MODULE } // SynthsModule.getSynth()\n                        leave\n                    }\n                    switch sig\n                    case 0x53a47bb7 { result := _OWNER_MODULE } // OwnerModule.nominatedOwner()\n                    case 0x57d7995a { result := _SYNTHS_MODULE } // SynthsModule.createSynthImplementation()\n                    case 0x624bd96d { result := _OWNER_MODULE } // OwnerModule.initializeOwnerModule()\n                    case 0x7104fba5 { result := _SYNTHS_MODULE } // SynthsModule.getSynthImplementation()\n                    case 0x718fe928 { result := _OWNER_MODULE } // OwnerModule.renounceNomination()\n                    case 0x79ba5097 { result := _OWNER_MODULE } // OwnerModule.acceptOwnership()\n                    leave\n                }\n                if lt(sig,0xd1b6c504) {\n                    switch sig\n                    case 0x81d49b75 { result := _SNXTOKEN_MODULE } // SNXTokenModule.getSNXTokenModuleSatellites()\n                    case 0x8da5cb5b { result := _OWNER_MODULE } // OwnerModule.owner()\n                    case 0xa44896e7 { result := _SYNTHS_MODULE } // SynthsModule.isSynthsModuleInitialized()\n                    case 0xaaf10f42 { result := _UPGRADE_MODULE } // UpgradeModule.getImplementation()\n                    case 0xc6253216 { result := _SYNTHS_MODULE } // SynthsModule.upgradeSynthImplementation()\n                    case 0xc7f62cda { result := _UPGRADE_MODULE } // UpgradeModule.simulateUpgradeTo()\n                    leave\n                }\n                switch sig\n                case 0xd1b6c504 { result := _SNXTOKEN_MODULE } // SNXTokenModule.getSNXTokenAddress()\n                case 0xdaac1198 { result := _SNXTOKEN_MODULE } // SNXTokenModule.upgradeSNXImplementation()\n                case 0xe040da24 { result := _SNXTOKEN_MODULE } // SNXTokenModule.isSNXTokenModuleInitialized()\n                case 0xf4c4dc31 { result := _SYNTHS_MODULE } // SynthsModule.getSynthsModuleSatellites()\n                case 0xf5d6f068 { result := _SNXTOKEN_MODULE } // SNXTokenModule.initializeSNXTokenModule()\n                case 0xfbc6aa6f { result := _SYNTHS_MODULE } // SynthsModule.initializeSynthsModule()\n                leave\n            }\n\n            implementation := findImplementation(sig32)\n        }\n\n        if (implementation == address(0)) {\n            revert UnknownSelector(sig4);\n        }\n\n        // Delegatecall to the implementation contract\n        assembly {\n            calldatacopy(0, 0, calldatasize())\n\n            let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n            returndatacopy(0, 0, returndatasize())\n\n            switch result\n            case 0 {\n                revert(0, returndatasize())\n            }\n            default {\n                return(0, returndatasize())\n            }\n        }\n    }\n}\n```\n\n### Router validation\n\nAfter generation, the plugin performs a series of validations on the generated source, including:\n\n- Checks that there are no duplicate selectors in its modules (function names must be unique)\n- That there are no storage collisions between module namespaces\n- That there are no invalid storage mutations between module namespaces\n- TODO: Complete list of validations\n\n### Storage namespaces\n\nTo avoid storage collisions between modules, we recommend the usage of storage namespaces.\n\nInstead of declaring variables in regular Solidity slots:\n\n```\ncontract SettingsModule {\n\tuint private _someSetting;\n\n  function setSomeSetting(uint newValue) external {\n    _someSetting = newValue;\n  }\n\n  function getSomeSetting() external view returns (uint) {\n    return _someSetting;\n  }\n}\n```\n\nUse a store:\n\n```\ncontract SettingsModule is SettingsStorage {\n\tfunction setSomeSetting(uint newValue) external {\n    _settingsStore().someSetting = newValue;\n  }\n\n  function getSomeSetting() external view returns (uint) {\n    return _settingsStore().someSetting;\n  }\n}\n\ncontract SettingsStorage {\n  struct SettingsStore {\n    uint someSetting;\n  }\n\n  function _settingsStore() internal pure returns (ProxyStore storage store) {\n    assembly {\n      // bytes32(uint(keccak256(\"io.synthetix.settings\")) - 1)\n      store.slot = 0x312...\n    }\n  }\n}\n```\n\n### Inter-modular communication and mixins\n\nSince the router `DELEGATECALL`s to its implementation modules, all code specified by its modules will be run within a single execution context. If the router is used directly, it will be the execution context. If something is `DELEGATECALL`ing the router, then that will be the execution context. E.g. a proxy.\n\nThus, all modules have access to the global storage of the system. Instead of performing calls to other modules, it is recommended to use Mixins that know how to interact with the storage of another module.\n\nE.g.\n\n```\ncontract OwnableMixin is OwnableStorage {\n  modifier onlyOwner() {\n    require(msg.sender == _ownerStore().owner, \"Only owner allowed\");\n    _;\n  }\n}\n```\n\n```\ncontract SynthsModule is SynthsStorage, OwnableMixin {\n  function createSynth(...) external onlyOwner {\n    ...\n  }\n}\n```\n\n### No constructors\n\nSince the router `DELEGATECALL`s to its modules, they storage will never be used. Any storage that may have been set by a constructor during module deployment will be ignored. Thus, we recommend to avoid using constructors in modules, and use initializer functions instead.\n\n### Upgradeability\n\nIf the router is used as the implementation of a UUPS [Universal Upgradeable Proxy Standard](https://eips.ethereum.org/EIPS/eip-1822) proxy, and includes an UpgradeModule, it can be used to design complex systems which are upgradeable until the main proxy is upgraded to a router implementation that no longer has an UpgradeModule.\n\n⚠️ Make sure that the UUPS contract does not contain public facing functions becuase they could clash with function signatures from the implementation modules. ⚠️\n\n### Plugin configuration\n\nhardhat.config.js\n\n```\nmodule.exports = {\n  solidity: '0.8.11'\n  networks: {\n    ...\n  },\n  router: {\n    paths: {\n      deployments: 'deployments', // path to store deployment artifacts\n      modules: 'modules',         // path where to find module contracts\n    },\n  },\n};\n\n```\n","source":"src/index.ts","gitHead":"6ad3588038432a2015409633fe7d0dc641f54a27","scripts":{"lint":"eslint .","test":"mocha","build":"tsc","watch":"tsc --watch","pretty":"prettier --check .","coverage":"nyc yarn test","lint:fix":"eslint --fix .","pretty:fix":"prettier --write .","test:watch":"yarn test --watch","prepublishOnly":"yarn build"},"_npmUser":{"name":"synthetixio-team","email":"engineering@synthetix.io"},"_npmVersion":"9.8.1","description":"Synthetix Router Proxy Architecture Manager","directories":{},"_nodeVersion":"18.18.0","dependencies":{"debug":"^4.3.4","mustache":"^4.2.0","@ethersproject/keccak256":"^5.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"yarn@3.6.3","readmeFilename":"README.md","devDependencies":{"nyc":"^15.1.0","solc":"^0.8.21","mocha":"^10.2.0","eslint":"^8.48.0","ethers":"^5.7.2","hardhat":"^2.17.2","ts-node":"^10.9.1","prettier":"^3.0.3","typechain":"^8.3.1","typescript":"^5.2.2","@types/node":"^18.17.14","@types/debug":"^4.1.8","@types/mocha":"^10.0.1","@types/mustache":"^4.2.2","@ethersproject/abi":"^5.7.0","@usecannon/builder":"^2.11.2","@typescript-eslint/parser":"^6.6.0","eslint-plugin-no-only-tests":"^3.1.0","@typescript-eslint/eslint-plugin":"^6.6.0"},"peerDependencies":{"solc":"^0.8.17","hardhat":"^2.0.0","@usecannon/builder":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/router_3.3.5-alpha.0_1707942771557_0.12021285330008813","host":"s3://npm-registry-packages"}},"3.3.5":{"name":"@synthetixio/router","version":"3.3.5","keywords":["deploy","solidity","cannon"],"author":{"name":"Synthetix"},"license":"MIT","_id":"@synthetixio/router@3.3.5","maintainers":[{"name":"noisekit","email":"noisekit@proton.me"},{"name":"joey-synthetix","email":"joey@cc.snxdao.io"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"synthetixio-team","email":"engineering@synthetix.io"},{"name":"ajsantander","email":"palebluedot@gmail.com"},{"name":"drptbl","email":"jakub.mucha@icloud.com"},{"name":"klbyte","email":"git@danb.email"}],"dist":{"shasum":"8964a72fc5cc8e996a35a7e4bf1499546f52a91d","tarball":"https://registry.npmjs.org/@synthetixio/router/-/router-3.3.5.tgz","fileCount":62,"integrity":"sha512-9DdvRVlNuN/Yg2wEG6CBL11UODTXlyYRWKUE2gzhFFHJIjDZuv3qz0p245D2oCKljXMQpDNQ7fBMwq/xo4mkfg==","signatures":[{"sig":"MEUCIDbc8UHMKW+SKp3MEYaufuGkCCTCAp8TAol35f2KstxgAiEAngmfJHE9qrc8W4Ai0m22v4e70g/q7NFSYv4iFCIUqtg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":71648},"main":"dist/index.js","types":"dist/index.d.ts","cannon":"utils/cannon.js","source":"src/index.ts","gitHead":"6ad3588038432a2015409633fe7d0dc641f54a27","scripts":{"lint":"eslint .","test":"mocha","build":"tsc","watch":"tsc --watch","pretty":"prettier --check .","coverage":"nyc yarn test","lint:fix":"eslint --fix .","pretty:fix":"prettier --write .","test:watch":"yarn test --watch","prepublishOnly":"yarn build"},"_npmUser":{"name":"synthetixio-team","email":"engineering@synthetix.io"},"_npmVersion":"9.8.1","description":"Synthetix Router Proxy Architecture Manager","directories":{},"_nodeVersion":"18.18.0","dependencies":{"debug":"^4.3.4","mustache":"^4.2.0","@ethersproject/keccak256":"^5.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"yarn@3.6.3","devDependencies":{"nyc":"^15.1.0","solc":"^0.8.21","mocha":"^10.2.0","eslint":"^8.48.0","ethers":"^5.7.2","hardhat":"^2.17.2","ts-node":"^10.9.1","prettier":"^3.0.3","typechain":"^8.3.1","typescript":"^5.2.2","@types/node":"^18.17.14","@types/debug":"^4.1.8","@types/mocha":"^10.0.1","@types/mustache":"^4.2.2","@ethersproject/abi":"^5.7.0","@usecannon/builder":"^2.11.5","@typescript-eslint/parser":"^6.6.0","eslint-plugin-no-only-tests":"^3.1.0","@typescript-eslint/eslint-plugin":"^6.6.0"},"peerDependencies":{"solc":"^0.8.17","hardhat":"^2.0.0","@usecannon/builder":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/router_3.3.5_1708457525303_0.11741926254789647","host":"s3://npm-registry-packages"}},"3.3.6":{"name":"@synthetixio/router","version":"3.3.6","keywords":["deploy","solidity","cannon"],"author":{"name":"Synthetix"},"license":"MIT","_id":"@synthetixio/router@3.3.6","maintainers":[{"name":"noisekit","email":"noisekit@proton.me"},{"name":"joey-synthetix","email":"joey@cc.snxdao.io"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"synthetixio-team","email":"engineering@synthetix.io"},{"name":"ajsantander","email":"palebluedot@gmail.com"},{"name":"drptbl","email":"jakub.mucha@icloud.com"},{"name":"klbyte","email":"git@danb.email"}],"dist":{"shasum":"f2392969e95ae6fa6923a3d0581bffac45f16171","tarball":"https://registry.npmjs.org/@synthetixio/router/-/router-3.3.6.tgz","fileCount":67,"integrity":"sha512-a4CTRKakYuZfx5KoSBlh+a2HI2lh8+UzqggiGYIQgNQxxnK8D/ksmxE9A/Vpts/biDtnWl7kPQipDtg+PjZJnA==","signatures":[{"sig":"MEYCIQCwYGltB/Pd0NYacpv80LoVoKzWEusJ5Vzk66yIFSvqfAIhAJg3MAB5aYw3VlxByR/OcTGW+Vk6UOgBTr8x/ItYVTsU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":77310},"main":"dist/index.js","types":"dist/index.d.ts","cannon":"utils/cannon.js","source":"src/index.ts","gitHead":"6ad3588038432a2015409633fe7d0dc641f54a27","scripts":{"lint":"eslint .","test":"mocha","build":"tsc","watch":"tsc --watch","pretty":"prettier --check .","coverage":"nyc yarn test","lint:fix":"eslint --fix .","pretty:fix":"prettier --write .","test:watch":"yarn test --watch","prepublishOnly":"yarn build"},"_npmUser":{"name":"synthetixio-team","email":"engineering@synthetix.io"},"_npmVersion":"9.8.1","description":"Synthetix Router Proxy Architecture Manager","directories":{},"_nodeVersion":"18.18.0","dependencies":{"debug":"^4.3.4","mustache":"^4.2.0","@ethersproject/keccak256":"^5.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"yarn@3.6.3","devDependencies":{"nyc":"^15.1.0","solc":"^0.8.21","mocha":"^10.2.0","eslint":"^8.48.0","ethers":"^5.7.2","hardhat":"^2.17.2","ts-node":"^10.9.1","prettier":"^3.0.3","typechain":"^8.3.1","typescript":"^5.2.2","@types/node":"^18.17.14","@types/debug":"^4.1.8","@types/mocha":"^10.0.1","@types/mustache":"^4.2.2","@ethersproject/abi":"^5.7.0","@typescript-eslint/parser":"^6.6.0","eslint-plugin-no-only-tests":"^3.1.0","@typescript-eslint/eslint-plugin":"^6.6.0"},"peerDependencies":{"solc":"^0.8.17","hardhat":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/router_3.3.6_1708459258277_0.10908350455039861","host":"s3://npm-registry-packages"}},"3.3.7":{"name":"@synthetixio/router","version":"3.3.7","keywords":["deploy","solidity","cannon"],"author":{"name":"Synthetix"},"license":"MIT","_id":"@synthetixio/router@3.3.7","maintainers":[{"name":"noisekit","email":"noisekit@proton.me"},{"name":"joey-synthetix","email":"joey@cc.snxdao.io"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"synthetixio-team","email":"engineering@synthetix.io"},{"name":"ajsantander","email":"palebluedot@gmail.com"},{"name":"drptbl","email":"jakub.mucha@icloud.com"},{"name":"klbyte","email":"git@danb.email"}],"dist":{"shasum":"cfa97961d404cce620e6862e68bd2d6110849d1d","tarball":"https://registry.npmjs.org/@synthetixio/router/-/router-3.3.7.tgz","fileCount":67,"integrity":"sha512-4/LedFeeM1QkdbErftZyoJ+9A1K+EUQZplwA4LVy5aBomHGPKFLKHxW0bCxzjAp9eeq0CN28rd6dxv4bSmgGBQ==","signatures":[{"sig":"MEQCIDKVVxKbfWao6iMs6iesY0gtYbhmydNtAbj1hXPE4tPWAiBk3+KAGCnR/itQ4jdiEuS3CynSANlk5VtPmNUu626QbQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":76848},"main":"dist/index.js","types":"dist/index.d.ts","cannon":"utils/cannon.js","source":"src/index.ts","gitHead":"6ad3588038432a2015409633fe7d0dc641f54a27","scripts":{"lint":"eslint .","test":"mocha","build":"tsc","watch":"tsc --watch","pretty":"prettier --check .","coverage":"nyc yarn test","lint:fix":"eslint --fix .","pretty:fix":"prettier --write .","test:watch":"yarn test --watch","prepublishOnly":"yarn build"},"_npmUser":{"name":"synthetixio-team","email":"engineering@synthetix.io"},"_npmVersion":"9.8.1","description":"Synthetix Router Proxy Architecture Manager","directories":{},"_nodeVersion":"18.18.0","dependencies":{"debug":"^4.3.4","mustache":"^4.2.0","@ethersproject/keccak256":"^5.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"yarn@3.6.3","devDependencies":{"nyc":"^15.1.0","solc":"^0.8.21","mocha":"^10.2.0","eslint":"^8.48.0","ethers":"^5.7.2","hardhat":"^2.17.2","ts-node":"^10.9.1","prettier":"^3.0.3","typechain":"^8.3.1","typescript":"^5.2.2","@types/node":"^18.17.14","@types/debug":"^4.1.8","@types/mocha":"^10.0.1","@types/mustache":"^4.2.2","@ethersproject/abi":"^5.7.0","@typescript-eslint/parser":"^6.6.0","eslint-plugin-no-only-tests":"^3.1.0","@typescript-eslint/eslint-plugin":"^6.6.0"},"peerDependencies":{"solc":"^0.8.17","hardhat":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/router_3.3.7_1708525086842_0.03129931821420362","host":"s3://npm-registry-packages"}},"3.3.8":{"name":"@synthetixio/router","version":"3.3.8","keywords":["deploy","solidity","cannon"],"author":{"name":"Synthetix"},"license":"MIT","_id":"@synthetixio/router@3.3.8","maintainers":[{"name":"noisekit","email":"noisekit@proton.me"},{"name":"joey-synthetix","email":"joey@cc.snxdao.io"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"synthetixio-team","email":"engineering@synthetix.io"},{"name":"ajsantander","email":"palebluedot@gmail.com"},{"name":"drptbl","email":"jakub.mucha@icloud.com"},{"name":"klbyte","email":"git@danb.email"}],"dist":{"shasum":"9d092334399692a629846b0468dd27a4f5d48d42","tarball":"https://registry.npmjs.org/@synthetixio/router/-/router-3.3.8.tgz","fileCount":67,"integrity":"sha512-SF2+64hi/VQmthw/hOxFqzrpgjP1615LLyz84gPfwjlnGX3xqauc4cNlt0ugOwuc+4MrdP5XdABtZhUh5Ez/Rg==","signatures":[{"sig":"MEQCIC8U22vq/awUh3DFXSU9IjHjEOknAKXzu1AENJ+AM3CJAiAai6tfVYoRkaeXPN562A/F4MfYLp16LQqTDbSUVY8oJA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":78546},"main":"dist/index.js","types":"dist/index.d.ts","cannon":"utils/cannon.js","source":"src/index.ts","gitHead":"6ad3588038432a2015409633fe7d0dc641f54a27","scripts":{"lint":"eslint .","test":"mocha","build":"tsc","watch":"tsc --watch","pretty":"prettier --check .","coverage":"nyc yarn test","lint:fix":"eslint --fix .","pretty:fix":"prettier --write .","test:watch":"yarn test --watch","prepublishOnly":"yarn build"},"_npmUser":{"name":"synthetixio-team","email":"engineering@synthetix.io"},"_npmVersion":"9.8.1","description":"Synthetix Router Proxy Architecture Manager","directories":{},"_nodeVersion":"18.18.0","dependencies":{"debug":"^4.3.4","mustache":"^4.2.0","@ethersproject/keccak256":"^5.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"yarn@3.6.3","devDependencies":{"nyc":"^15.1.0","solc":"^0.8.21","mocha":"^10.2.0","eslint":"^8.48.0","ethers":"^5.7.2","hardhat":"^2.17.2","ts-node":"^10.9.1","prettier":"^3.0.3","typechain":"^8.3.1","typescript":"^5.2.2","@types/node":"^18.17.14","@types/debug":"^4.1.8","@types/mocha":"^10.0.1","@types/mustache":"^4.2.2","@ethersproject/abi":"^5.7.0","@typescript-eslint/parser":"^6.6.0","eslint-plugin-no-only-tests":"^3.1.0","@typescript-eslint/eslint-plugin":"^6.6.0"},"peerDependencies":{"solc":"^0.8.17","hardhat":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/router_3.3.8_1714029934453_0.811043833473299","host":"s3://npm-registry-packages"}},"3.4.0":{"name":"@synthetixio/router","version":"3.4.0","keywords":["deploy","solidity","cannon"],"author":{"name":"Synthetix"},"license":"MIT","_id":"@synthetixio/router@3.4.0","maintainers":[{"name":"noisekit","email":"noisekit@proton.me"},{"name":"joey-synthetix","email":"joey@cc.snxdao.io"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"synthetixio-team","email":"engineering@synthetix.io"},{"name":"ajsantander","email":"palebluedot@gmail.com"},{"name":"drptbl","email":"jakub.mucha@icloud.com"},{"name":"klbyte","email":"git@danb.email"}],"dist":{"shasum":"b53a5a325c4a4614b095e551f1830c620224a193","tarball":"https://registry.npmjs.org/@synthetixio/router/-/router-3.4.0.tgz","fileCount":67,"integrity":"sha512-5U6Es0Om/2J0nhnnFdTFk2FhdA0MOb0UMshI6YO3gUmHZu3Jgvjzi3Wca4oJviWnODIVotG0KxLEeRUqDIBblQ==","signatures":[{"sig":"MEQCIAR5h2yIEfH6k+GuzVcZHKqwPzBuQnO3LNA/U/rWByE7AiApBg1vT5GE1hD/RiKF90RF4grzjD/plmbU1JlOxmPHBg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":79067},"main":"dist/index.js","types":"dist/index.d.ts","cannon":"utils/cannon.js","source":"src/index.ts","gitHead":"6ad3588038432a2015409633fe7d0dc641f54a27","scripts":{"lint":"eslint .","test":"mocha","build":"tsc","watch":"tsc --watch","pretty":"prettier --check .","coverage":"nyc yarn test","lint:fix":"eslint --fix .","pretty:fix":"prettier --write .","test:watch":"yarn test --watch","prepublishOnly":"yarn build"},"_npmUser":{"name":"klbyte","email":"git@danb.email"},"_npmVersion":"10.8.0","description":"Synthetix Router Proxy Architecture Manager","directories":{},"_nodeVersion":"22.0.0","dependencies":{"debug":"^4.3.4","mustache":"^4.2.0","@ethersproject/keccak256":"^5.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"yarn@3.6.3","devDependencies":{"nyc":"^15.1.0","solc":"^0.8.21","mocha":"^10.2.0","eslint":"^8.48.0","ethers":"^5.7.2","hardhat":"^2.17.2","ts-node":"^10.9.1","prettier":"^3.0.3","typechain":"^8.3.1","typescript":"^5.2.2","@types/node":"^18.17.14","@types/debug":"^4.1.8","@types/mocha":"^10.0.1","@types/mustache":"^4.2.2","@ethersproject/abi":"^5.7.0","@typescript-eslint/parser":"^6.6.0","eslint-plugin-no-only-tests":"^3.1.0","@typescript-eslint/eslint-plugin":"^6.6.0"},"peerDependencies":{"solc":"^0.8.17","hardhat":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/router_3.4.0_1716101453837_0.4836991596178635","host":"s3://npm-registry-packages"}}},"time":{"created":"2023-01-07T23:26:21.769Z","modified":"2026-06-01T01:20:08.252Z","1.0.5":"2023-01-07T23:26:22.108Z","1.1.0":"2023-01-16T00:58:48.145Z","1.1.1":"2023-01-19T00:47:42.737Z","1.1.2":"2023-02-22T18:15:46.915Z","3.0.3-alpha.900":"2023-03-21T18:56:41.976Z","3.0.4-alpha.0":"2023-03-21T19:08:07.280Z","3.0.4-dev.29caac17":"2023-04-03T17:28:31.233Z","3.1.0-alpha.1":"2023-04-25T02:15:41.588Z","3.1.0":"2023-04-27T20:16:55.450Z","3.1.1-dev.6ad35880":"2023-05-10T17:32:30.412Z","3.1.1":"2023-05-23T21:00:16.207Z","3.1.2":"2023-05-23T21:52:17.137Z","3.1.3":"2023-06-21T15:35:24.312Z","3.1.4":"2023-06-28T10:53:39.286Z","3.2.0":"2023-09-04T17:45:58.024Z","3.2.1":"2023-09-05T16:05:21.530Z","3.3.0":"2023-09-13T10:05:04.333Z","3.3.1":"2024-01-16T01:29:45.730Z","3.3.2":"2024-01-24T16:23:55.558Z","3.3.2-alpha.0":"2024-02-14T19:46:47.469Z","3.3.3":"2024-02-14T20:08:17.402Z","3.3.4":"2024-02-14T20:30:28.619Z","3.3.5-alpha.0":"2024-02-14T20:32:51.777Z","3.3.5":"2024-02-20T19:32:05.503Z","3.3.6":"2024-02-20T20:00:58.476Z","3.3.7":"2024-02-21T14:18:07.080Z","3.3.8":"2024-04-25T07:25:34.605Z","3.4.0":"2024-05-19T06:50:53.976Z"},"author":{"name":"Synthetix"},"license":"MIT","keywords":["deploy","solidity","cannon"],"description":"Synthetix Router Proxy Architecture Manager","maintainers":[{"email":"kai@cc.snxdao.io","name":"kai-reed"},{"email":"thor@snxdao.io","name":"thor_snax"}],"readme":"# router\n\nSolidity router generator.\n\n## Description\n\nThis plugin generates a router contract which simply merges multiple contracts (modules) behind a single proxy.\n\nThe router proxy receives incoming calls and forwards them to the appropriate implementation or module, depending on which one contains the incoming function selector.\n\nExample:\nA user calls the `rebalancePool()` function on a deployed router, which merges 3 modules; A.sol, B.sol, and C.sol. The router determines that the function `rebalancePool` is defined in module B.sol. So, the router simply performs a `DELEGATECALL` to B's deployed instance.\n\nThis router is similar to the [Diamond Proxy](https://eips.ethereum.org/EIPS/eip-2535) but:\n\n- is simpler\n  - because it has no module management interface\n- more explicit\n  - because its modular composition can easily be seen by looking at its hardcoded module addresses\n- more efficient\n  - because it hardcodes the deployed module addresses, minimizing `SLOAD` usage\n\n### Module deployment\n\nThe plugin will consider any contract inside a `modules` folder (configurable) a module, and automatically detect if its bytecode has changed and deploy it.\n\n### Router generation\n\nAfter module deployment, the router's source code is generated by the plugin. Generation will fail under certain conditions, e.g. if two of the modules contain the same selector, or a function with the same name.\n\nExample output:\n\n```\ncontract Router {\n    error UnknownSelector(bytes4 sel);\n\n    address private constant _OWNER_MODULE = 0x5FbDB2315678afecb367f032d93F642f64180aa3;\n    address private constant _SNXTOKEN_MODULE = 0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512;\n    address private constant _SYNTHS_MODULE = 0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0;\n    address private constant _UPGRADE_MODULE = 0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9;\n\n    fallback() external payable {\n        _forward();\n    }\n\n    receive() external payable {\n        _forward();\n    }\n\n    function _forward() internal {\n        // Lookup table: Function selector => implementation contract\n        bytes4 sig4 = msg.sig;\n        address implementation;\n\n        assembly {\n            let sig32 := shr(224, sig4)\n\n            function findImplementation(sig) -> result {\n                if lt(sig,0x81d49b75) {\n                    if lt(sig,0x53a47bb7) {\n                        switch sig\n                        case 0x0f36a2de { result := _SYNTHS_MODULE } // SynthsModule.createSynth()\n                        case 0x1627540c { result := _OWNER_MODULE } // OwnerModule.nominateNewOwner()\n                        case 0x2d6b3a6b { result := _SYNTHS_MODULE } // SynthsModule.getBeacon()\n                        case 0x35eb2824 { result := _OWNER_MODULE } // OwnerModule.isOwnerModuleInitialized()\n                        case 0x3659cfe6 { result := _UPGRADE_MODULE } // UpgradeModule.upgradeTo()\n                        case 0x51456061 { result := _SYNTHS_MODULE } // SynthsModule.getSynth()\n                        leave\n                    }\n                    switch sig\n                    case 0x53a47bb7 { result := _OWNER_MODULE } // OwnerModule.nominatedOwner()\n                    case 0x57d7995a { result := _SYNTHS_MODULE } // SynthsModule.createSynthImplementation()\n                    case 0x624bd96d { result := _OWNER_MODULE } // OwnerModule.initializeOwnerModule()\n                    case 0x7104fba5 { result := _SYNTHS_MODULE } // SynthsModule.getSynthImplementation()\n                    case 0x718fe928 { result := _OWNER_MODULE } // OwnerModule.renounceNomination()\n                    case 0x79ba5097 { result := _OWNER_MODULE } // OwnerModule.acceptOwnership()\n                    leave\n                }\n                if lt(sig,0xd1b6c504) {\n                    switch sig\n                    case 0x81d49b75 { result := _SNXTOKEN_MODULE } // SNXTokenModule.getSNXTokenModuleSatellites()\n                    case 0x8da5cb5b { result := _OWNER_MODULE } // OwnerModule.owner()\n                    case 0xa44896e7 { result := _SYNTHS_MODULE } // SynthsModule.isSynthsModuleInitialized()\n                    case 0xaaf10f42 { result := _UPGRADE_MODULE } // UpgradeModule.getImplementation()\n                    case 0xc6253216 { result := _SYNTHS_MODULE } // SynthsModule.upgradeSynthImplementation()\n                    case 0xc7f62cda { result := _UPGRADE_MODULE } // UpgradeModule.simulateUpgradeTo()\n                    leave\n                }\n                switch sig\n                case 0xd1b6c504 { result := _SNXTOKEN_MODULE } // SNXTokenModule.getSNXTokenAddress()\n                case 0xdaac1198 { result := _SNXTOKEN_MODULE } // SNXTokenModule.upgradeSNXImplementation()\n                case 0xe040da24 { result := _SNXTOKEN_MODULE } // SNXTokenModule.isSNXTokenModuleInitialized()\n                case 0xf4c4dc31 { result := _SYNTHS_MODULE } // SynthsModule.getSynthsModuleSatellites()\n                case 0xf5d6f068 { result := _SNXTOKEN_MODULE } // SNXTokenModule.initializeSNXTokenModule()\n                case 0xfbc6aa6f { result := _SYNTHS_MODULE } // SynthsModule.initializeSynthsModule()\n                leave\n            }\n\n            implementation := findImplementation(sig32)\n        }\n\n        if (implementation == address(0)) {\n            revert UnknownSelector(sig4);\n        }\n\n        // Delegatecall to the implementation contract\n        assembly {\n            calldatacopy(0, 0, calldatasize())\n\n            let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n            returndatacopy(0, 0, returndatasize())\n\n            switch result\n            case 0 {\n                revert(0, returndatasize())\n            }\n            default {\n                return(0, returndatasize())\n            }\n        }\n    }\n}\n```\n\n### Router validation\n\nAfter generation, the plugin performs a series of validations on the generated source, including:\n\n- Checks that there are no duplicate selectors in its modules (function names must be unique)\n- That there are no storage collisions between module namespaces\n- That there are no invalid storage mutations between module namespaces\n- TODO: Complete list of validations\n\n### Storage namespaces\n\nTo avoid storage collisions between modules, we recommend the usage of storage namespaces.\n\nInstead of declaring variables in regular Solidity slots:\n\n```\ncontract SettingsModule {\n\tuint private _someSetting;\n\n  function setSomeSetting(uint newValue) external {\n    _someSetting = newValue;\n  }\n\n  function getSomeSetting() external view returns (uint) {\n    return _someSetting;\n  }\n}\n```\n\nUse a store:\n\n```\ncontract SettingsModule is SettingsStorage {\n\tfunction setSomeSetting(uint newValue) external {\n    _settingsStore().someSetting = newValue;\n  }\n\n  function getSomeSetting() external view returns (uint) {\n    return _settingsStore().someSetting;\n  }\n}\n\ncontract SettingsStorage {\n  struct SettingsStore {\n    uint someSetting;\n  }\n\n  function _settingsStore() internal pure returns (ProxyStore storage store) {\n    assembly {\n      // bytes32(uint(keccak256(\"io.synthetix.settings\")) - 1)\n      store.slot = 0x312...\n    }\n  }\n}\n```\n\n### Inter-modular communication and mixins\n\nSince the router `DELEGATECALL`s to its implementation modules, all code specified by its modules will be run within a single execution context. If the router is used directly, it will be the execution context. If something is `DELEGATECALL`ing the router, then that will be the execution context. E.g. a proxy.\n\nThus, all modules have access to the global storage of the system. Instead of performing calls to other modules, it is recommended to use Mixins that know how to interact with the storage of another module.\n\nE.g.\n\n```\ncontract OwnableMixin is OwnableStorage {\n  modifier onlyOwner() {\n    require(msg.sender == _ownerStore().owner, \"Only owner allowed\");\n    _;\n  }\n}\n```\n\n```\ncontract SynthsModule is SynthsStorage, OwnableMixin {\n  function createSynth(...) external onlyOwner {\n    ...\n  }\n}\n```\n\n### No constructors\n\nSince the router `DELEGATECALL`s to its modules, they storage will never be used. Any storage that may have been set by a constructor during module deployment will be ignored. Thus, we recommend to avoid using constructors in modules, and use initializer functions instead.\n\n### Upgradeability\n\nIf the router is used as the implementation of a UUPS [Universal Upgradeable Proxy Standard](https://eips.ethereum.org/EIPS/eip-1822) proxy, and includes an UpgradeModule, it can be used to design complex systems which are upgradeable until the main proxy is upgraded to a router implementation that no longer has an UpgradeModule.\n\n⚠️ Make sure that the UUPS contract does not contain public facing functions becuase they could clash with function signatures from the implementation modules. ⚠️\n\n### Plugin configuration\n\nhardhat.config.js\n\n```\nmodule.exports = {\n  solidity: '0.8.11'\n  networks: {\n    ...\n  },\n  router: {\n    paths: {\n      deployments: 'deployments', // path to store deployment artifacts\n      modules: 'modules',         // path where to find module contracts\n    },\n  },\n};\n\n```\n","readmeFilename":"README.md"}