Skip to content

Delayed Recovery Module Setup #107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Feb 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"extends": [
"airbnb-base"
],
"rules": {
"no-console": "off",
"no-underscore-dangle": "off",
"import/no-extraneous-dependencies": "off",
"strict": "off"
},
"env": {
"mocha": true,
"node": true,
"es6": true
},
"globals": {
"artifacts": false,
"contract": false,
"assert": false
}
}
1 change: 1 addition & 0 deletions contracts/abi/CreateAndAddModules.abi
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"constant":false,"inputs":[{"name":"module","type":"address"}],"name":"enableModule","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"proxyFactory","type":"address"},{"name":"data","type":"bytes"}],"name":"createAndAddModules","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]
1 change: 1 addition & 0 deletions contracts/abi/DelayedRecoveryModule.abi
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"constant":true,"inputs":[],"name":"INITIATE_RECOVERY_STRUCT_TYPEHASH","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"DOMAIN_SEPARATOR_TYPEHASH","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"RESET_RECOVERY_OWNER_STRUCT_TYPEHASH","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"activeRecoveryInfo","outputs":[{"name":"prevOwner","type":"address"},{"name":"oldOwner","type":"address"},{"name":"newOwner","type":"address"},{"name":"executionBlockHeight","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"manager","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ABORT_RECOVERY_STRUCT_TYPEHASH","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"recoveryOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"NAME","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"recoveryBlockDelay","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"recoveryController","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"domainSeparator","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"VERSION","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_prevOwner","type":"address"},{"indexed":false,"name":"_oldOwner","type":"address"},{"indexed":false,"name":"_newOwner","type":"address"}],"name":"RecoveryInitiated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_prevOwner","type":"address"},{"indexed":false,"name":"_oldOwner","type":"address"},{"indexed":false,"name":"_newOwner","type":"address"}],"name":"RecoveryExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_prevOwner","type":"address"},{"indexed":false,"name":"_oldOwner","type":"address"},{"indexed":false,"name":"_newOwner","type":"address"}],"name":"RecoveryAborted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_oldRecoveryOwner","type":"address"},{"indexed":false,"name":"_newRecoveryOwner","type":"address"}],"name":"ResetRecoveryOwner","type":"event"},{"constant":false,"inputs":[{"name":"_recoveryOwner","type":"address"},{"name":"_recoveryController","type":"address"},{"name":"_recoveryBlockDelay","type":"uint256"}],"name":"setup","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_prevOwner","type":"address"},{"name":"_oldOwner","type":"address"},{"name":"_newOwner","type":"address"},{"name":"_r","type":"bytes32"},{"name":"_s","type":"bytes32"},{"name":"_v","type":"uint8"}],"name":"initiateRecovery","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_prevOwner","type":"address"},{"name":"_oldOwner","type":"address"},{"name":"_newOwner","type":"address"}],"name":"executeRecovery","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_prevOwner","type":"address"},{"name":"_oldOwner","type":"address"},{"name":"_newOwner","type":"address"},{"name":"_r","type":"bytes32"},{"name":"_s","type":"bytes32"},{"name":"_v","type":"uint8"}],"name":"abortRecoveryByOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_prevOwner","type":"address"},{"name":"_oldOwner","type":"address"},{"name":"_newOwner","type":"address"}],"name":"abortRecoveryByController","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newRecoveryOwner","type":"address"},{"name":"_r","type":"bytes32"},{"name":"_s","type":"bytes32"},{"name":"_v","type":"uint8"}],"name":"resetRecoveryOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]
1 change: 1 addition & 0 deletions contracts/bin/CreateAndAddModules.bin
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0x608060405234801561001057600080fd5b506102e2806100206000396000f3fe60806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806360df7f5814610051578063610b592514610139575b600080fd5b34801561005d57600080fd5b506101376004803603604081101561007457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156100b157600080fd5b8201836020820111156100c357600080fd5b803590602001918460018302840111640100000000831117156100e557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061018a565b005b34801561014557600080fd5b506101886004803603602081101561015c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506102b1565b005b600081519050600080600090505b828110156102aa5780840160200151818501604001604051600060208285858c5af414156101c557600080fd5b73ffffffffffffffffffffffffffffffffffffffff8151169450602080601f85010402602001840193505050503073ffffffffffffffffffffffffffffffffffffffff1663610b5925836040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b15801561028d57600080fd5b505af11580156102a1573d6000803e3d6000fd5b50505050610198565b5050505050565b600080fdfea165627a7a72305820c61d1a6a741c9e94077b28e3649b12d2e663efba81622bde4a4b1bd9f6a825530029
1 change: 1 addition & 0 deletions contracts/bin/DelayedRecoveryModule.bin
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0x608060405234801561001057600080fd5b50611954806100206000396000f3fe6080604052600436106100fb5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166307218f4381146101005780631db61b54146101275780631de52d4e1461013c578063363893ae146101515780633811b1091461019b578063481c6a75146101e557806365ae42ae14610216578063698eb6681461025b5780637525c346146102a05780637ded0af7146102f95780638583c7c01461030e5780638931417414610323578063a3f4df7e1461037c578063bde4459014610406578063cbe406221461041b578063f48da4751461045e578063f698da2514610473578063ffa1ad7414610488575b600080fd5b34801561010c57600080fd5b5061011561049d565b60408051918252519081900360200190f35b34801561013357600080fd5b5061011561051d565b34801561014857600080fd5b50610115610578565b34801561015d57600080fd5b506101666105f8565b60408051600160a060020a03958616815293851660208501529190931682820152606082019290925290519081900360800190f35b3480156101a757600080fd5b506101e3600480360360808110156101be57600080fd5b508035600160a060020a0316906020810135906040810135906060013560ff1661061b565b005b3480156101f157600080fd5b506101fa61079f565b60408051600160a060020a039092168252519081900360200190f35b34801561022257600080fd5b506101e36004803603606081101561023957600080fd5b50600160a060020a0381358116916020810135821691604090910135166107ae565b34801561026757600080fd5b506101e36004803603606081101561027e57600080fd5b50600160a060020a0381358116916020810135821691604090910135166109ba565b3480156102ac57600080fd5b506101e3600480360360c08110156102c357600080fd5b508035600160a060020a039081169160208101358216916040820135169060608101359060808101359060a0013560ff16610e2f565b34801561030557600080fd5b50610115611075565b34801561031a57600080fd5b506101fa6110f5565b34801561032f57600080fd5b506101e3600480360360c081101561034657600080fd5b508035600160a060020a039081169160208101358216916040820135169060608101359060808101359060a0013560ff16611104565b34801561038857600080fd5b50610391611312565b6040805160208082528351818301528351919283929083019185019080838360005b838110156103cb5781810151838201526020016103b3565b50505050905090810190601f1680156103f85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561041257600080fd5b50610115611349565b34801561042757600080fd5b506101e36004803603606081101561043e57600080fd5b50600160a060020a0381358116916020810135909116906040013561134f565b34801561046a57600080fd5b506101fa6115fc565b34801561047f57600080fd5b5061011561160b565b34801561049457600080fd5b50610391611611565b604080517f496e6974696174655265636f766572795374727563742861646472657373207081527f7265764f776e65722c61646472657373206f6c644f776e65722c61646472657360208201527f73206e65774f776e65722900000000000000000000000000000000000000000081830152905190819003604b01902081565b604080517f454950373132446f6d61696e28616464726573732064656c617965645265636f81527f766572794d6f64756c65290000000000000000000000000000000000000000006020820152905190819003602b01902081565b604080517f52657365745265636f766572794f776e6572537472756374286164647265737381527f206f6c645265636f766572794f776e65722c61646472657373206e657752656360208201527f6f766572794f776e65722900000000000000000000000000000000000000000081830152905190819003604b01902081565b600654600754600854600954600160a060020a0393841693928316929091169084565b600354600160a060020a0316331461067f576040805160e560020a62461bcd02815260206004820152602c60248201526000805160206118e98339815191526044820152600080516020611909833981519152606482015290519081900360840190fd5b600160a060020a0384161515610705576040805160e560020a62461bcd02815260206004820152602560248201527f4e6577207265636f76657279206f776e6572277320616464726573732069732060448201527f6e756c6c2e000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60045460009061071e90600160a060020a031686611648565b905061072c81858585611712565b60048054600160a060020a0387811673ffffffffffffffffffffffffffffffffffffffff19831617928390556040805192821680845293909116602083015280517f694d34d730078c03a64a5c5937027a85a71f3631085fb14efebcefba0f1200ad9281900390910190a1505050505050565b600154600160a060020a031681565b600354600160a060020a03163314610812576040805160e560020a62461bcd02815260206004820152602c60248201526000805160206118e98339815191526044820152600080516020611909833981519152606482015290519081900360840190fd5b60095460001061086c576040805160e560020a62461bcd02815260206004820152601c60248201527f5468657265206973206e6f20616374697665207265636f766572792e00000000604482015290519081900360640190fd5b600654839083908390600160a060020a03808516911614801561089c5750600754600160a060020a038381169116145b80156108b55750600854600160a060020a038281169116145b1515610931576040805160e560020a62461bcd02815260206004820152602481018290527f54686520657865637574696f6e20726571756573742773206461746120646f6560448201527f73206e6f74206d6174636820776974682074686520616374697665206f6e652e606482015290519081900360840190fd5b6006805473ffffffffffffffffffffffffffffffffffffffff199081169091556007805482169055600880549091169055600060095560408051600160a060020a038881168252878116602083015286168183015290517f7789739c172389f440865a4d26a746e433bc23a4058077237b7c8cf47a9a18bb9181900360600190a1505050505050565b600354600160a060020a03163314610a1e576040805160e560020a62461bcd02815260206004820152602c60248201526000805160206118e98339815191526044820152600080516020611909833981519152606482015290519081900360840190fd5b600954600010610a78576040805160e560020a62461bcd02815260206004820152601c60248201527f5468657265206973206e6f20616374697665207265636f766572792e00000000604482015290519081900360640190fd5b600654839083908390600160a060020a038085169116148015610aa85750600754600160a060020a038381169116145b8015610ac15750600854600160a060020a038281169116145b1515610b3d576040805160e560020a62461bcd02815260206004820152602481018290527f54686520657865637574696f6e20726571756573742773206461746120646f6560448201527f73206e6f74206d6174636820776974682074686520616374697665206f6e652e606482015290519081900360840190fd5b6009544311610bbc576040805160e560020a62461bcd02815260206004820152603860248201527f5265717569726564206e756d626572206f6620626c6f636b7320746f2072656360448201527f6f76657220776173206e6f742070726f677265737365642e0000000000000000606482015290519081900360840190fd5b60408051600160a060020a03808916602480840191909152818916604480850191909152828916606480860191909152855180860382018152608490950186526020850180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fe318b52b0000000000000000000000000000000000000000000000000000000017905260015495517f468721a7000000000000000000000000000000000000000000000000000000008152959093166004860181815260009387018490529495909463468721a794869493889385939291810191018360ff168152602001828103825284818151815260200191508051906020019080838360005b83811015610cd4578181015183820152602001610cbc565b50505050905090810190601f168015610d015780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b158015610d2357600080fd5b505af1158015610d37573d6000803e3d6000fd5b505050506040513d6020811015610d4d57600080fd5b50511515610da5576040805160e560020a62461bcd02815260206004820152601a60248201527f5265636f7665727920657865637574696f6e206661696c65642e000000000000604482015290519081900360640190fd5b6006805473ffffffffffffffffffffffffffffffffffffffff199081169091556007805482169055600880549091169055600060095560408051600160a060020a038981168252888116602083015287168183015290517f39a93e422776c9b292c4617cb75d1f0bb8e528c2c06ea7cbc10cd233793a4f859181900360600190a150505050505050565b600954600010610e89576040805160e560020a62461bcd02815260206004820152601c60248201527f5468657265206973206e6f20616374697665207265636f766572792e00000000604482015290519081900360640190fd5b600654869086908690600160a060020a038085169116148015610eb95750600754600160a060020a038381169116145b8015610ed25750600854600160a060020a038281169116145b1515610f4e576040805160e560020a62461bcd02815260206004820152602481018290527f54686520657865637574696f6e20726571756573742773206461746120646f6560448201527f73206e6f74206d6174636820776974682074686520616374697665206f6e652e606482015290519081900360840190fd5b604080517f41626f72745265636f766572795374727563742861646472657373207072657681527f4f776e65722c61646472657373206f6c644f776e65722c61646472657373206e60208201527f65774f776e657229000000000000000000000000000000000000000000000000818301529051908190036048019020600090610fda908b8b8b61180e565b9050610fe881888888611712565b6006805473ffffffffffffffffffffffffffffffffffffffff199081169091556007805482169055600880549091169055600060095560408051600160a060020a038c811682528b811660208301528a168183015290517f7789739c172389f440865a4d26a746e433bc23a4058077237b7c8cf47a9a18bb9181900360600190a150505050505050505050565b604080517f41626f72745265636f766572795374727563742861646472657373207072657681527f4f776e65722c61646472657373206f6c644f776e65722c61646472657373206e60208201527f65774f776e65722900000000000000000000000000000000000000000000000081830152905190819003604801902081565b600454600160a060020a031681565b600354600160a060020a03163314611168576040805160e560020a62461bcd02815260206004820152602c60248201526000805160206118e98339815191526044820152600080516020611909833981519152606482015290519081900360840190fd5b600954156111c0576040805160e560020a62461bcd02815260206004820152601c60248201527f546865726520697320616e20616374697665207265636f766572792e00000000604482015290519081900360640190fd5b604080517f496e6974696174655265636f766572795374727563742861646472657373207081527f7265764f776e65722c61646472657373206f6c644f776e65722c61646472657360208201527f73206e65774f776e65722900000000000000000000000000000000000000000081830152905190819003604b01902060009061124c9088888861180e565b905061125a81858585611712565b60408051608081018252600160a060020a03808a168083528982166020808501829052928a16848601819052600554430160609586018190526006805473ffffffffffffffffffffffffffffffffffffffff1990811686179091556007805482168517905560088054909116831790556009558551928352928201528084019190915291517f984ae6bb7fc6ec202143bd903c70af8408ed9b154ef3e4cfe78e47a90ebbe2e49281900390910190a150505050505050565b60408051808201909152601781527f44656c61796564205265636f76657279204d6f64756c65000000000000000000602082015281565b60055481565b600254156113cd576040805160e560020a62461bcd02815260206004820152602160248201527f446f6d61696e20736570617261746f722077617320616c72656164792073657460448201527f2e00000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a0383161515611453576040805160e560020a62461bcd02815260206004820152602160248201527f5265636f76657279206f776e657227732061646472657373206973206e756c6c60448201527f2e00000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a03821615156114d9576040805160e560020a62461bcd02815260206004820152602660248201527f5265636f7665727920636f6e74726f6c6c65722773206164647265737320697360448201527f206e756c6c2e0000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008111611531576040805160e560020a62461bcd02815260206004820152601a60248201527f5265636f7665727920626c6f636b2064656c617920697320302e000000000000604482015290519081900360640190fd5b604080517f454950373132446f6d61696e28616464726573732064656c617965645265636f81527f766572794d6f64756c6529000000000000000000000000000000000000000000602080830191909152825191829003602b018220828201523082840152825180830384018152606090920190925280519101206002556001805473ffffffffffffffffffffffffffffffffffffffff19908116331790915560048054600160a060020a039586169083161790556003805493909416921691909117909155600555565b600354600160a060020a031681565b60025481565b60408051808201909152600581527f302e312e30000000000000000000000000000000000000000000000000000000602082015281565b604080517f52657365745265636f766572794f776e6572537472756374286164647265737381527f206f6c645265636f766572794f776e65722c61646472657373206e65775265636020808301919091527f6f766572794f776e65722900000000000000000000000000000000000000000082840152825191829003604b01822082820152600160a060020a03808616838501528416606080840191909152835180840390910181526080909201909252805191012060009061170a81611869565b949350505050565b6004546040805160008152602080820180845288905260ff85168284015260608201879052608082018690529151600160a060020a039093169260019260a0808401939192601f1981019281900390910190855afa158015611778573d6000803e3d6000fd5b50505060206040510351600160a060020a0316141515611808576040805160e560020a62461bcd02815260206004820152602560248201527f496e76616c6964207369676e617475726520666f72207265636f76657279206f60448201527f776e65722e000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50505050565b604080516020808201879052600160a060020a0380871683850152808616606084015284166080808401919091528351808403909101815260a0909201909252805191012060009061185f81611869565b9695505050505050565b600254604080517f19000000000000000000000000000000000000000000000000000000000000006020808301919091527f01000000000000000000000000000000000000000000000000000000000000006021830152602282019390935260428082019490945281518082039094018452606201905281519101209056fe4f6e6c79207265636f7665727920636f6e74726f6c6c657220697320616c6c6f77656420746f2063616c6c2e0000000000000000000000000000000000000000a165627a7a72305820d7d2593cd6db88b8ed76cbb8b85e32c50134307556a83712fed6824ac6e6e3e30029
Loading