├── .eslintrc.js ├── .gitattributes ├── .gitignore ├── .travis.yml ├── LICENSE ├── README.md ├── appveyor.yml ├── apt-packages ├── contracts ├── Factory.sol ├── Migrations.sol ├── MultiSigWallet.sol ├── MultiSigWalletFactory.sol ├── MultiSigWalletWithDailyLimit.sol ├── MultiSigWalletWithDailyLimitFactory.sol ├── TestCalls.sol └── TestToken.sol ├── dapp ├── Gruntfile.js ├── Readme.md ├── build │ ├── icon.icns │ ├── icon.ico │ ├── icon_128x128x32.png │ ├── icon_16x16x32.png │ ├── icon_256x256x32.png │ ├── icon_32x32x32.png │ ├── icon_48x48x32.png │ └── icon_512x512x32.png ├── config.karma.js ├── css │ ├── app.css │ ├── gnosis-bootstrap-dialog.css │ └── gnosis-bootstrap.css ├── less │ ├── .csscomb.json │ ├── .csslintrc │ ├── alerts.less │ ├── badges.less │ ├── bootstrap.less │ ├── breadcrumbs.less │ ├── button-groups.less │ ├── buttons.less │ ├── carousel.less │ ├── close.less │ ├── code.less │ ├── component-animations.less │ ├── dropdowns.less │ ├── forms.less │ ├── glyphicons.less │ ├── grid.less │ ├── input-groups.less │ ├── jumbotron.less │ ├── labels.less │ ├── list-group.less │ ├── media.less │ ├── mixins.less │ ├── mixins │ │ ├── alerts.less │ │ ├── background-variant.less │ │ ├── border-radius.less │ │ ├── buttons.less │ │ ├── center-block.less │ │ ├── clearfix.less │ │ ├── forms.less │ │ ├── gradients.less │ │ ├── grid-framework.less │ │ ├── grid.less │ │ ├── hide-text.less │ │ ├── image.less │ │ ├── labels.less │ │ ├── list-group.less │ │ ├── nav-divider.less │ │ ├── nav-vertical-align.less │ │ ├── opacity.less │ │ ├── pagination.less │ │ ├── panels.less │ │ ├── progress-bar.less │ │ ├── reset-filter.less │ │ ├── reset-text.less │ │ ├── resize.less │ │ ├── responsive-visibility.less │ │ ├── size.less │ │ ├── tab-focus.less │ │ ├── table-row.less │ │ ├── text-emphasis.less │ │ ├── text-overflow.less │ │ └── vendor-prefixes.less │ ├── modals.less │ ├── navbar.less │ ├── navs.less │ ├── normalize.less │ ├── pager.less │ ├── pagination.less │ ├── panels.less │ ├── popovers.less │ ├── print.less │ ├── progress-bars.less │ ├── responsive-embed.less │ ├── responsive-utilities.less │ ├── scaffolding.less │ ├── tables.less │ ├── theme.less │ ├── thumbnails.less │ ├── tooltip.less │ ├── type.less │ ├── utilities.less │ ├── variables.less │ └── wells.less ├── package-lock.json ├── package.json ├── src │ ├── TermsofUseMultisig.pdf │ ├── abi.js │ ├── app.js │ ├── bundles │ │ ├── css │ │ │ └── bundle.css │ │ ├── fonts │ │ │ ├── fontawesome-webfont.woff2 │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ ├── img │ │ │ ├── gnosis-logo.svg │ │ │ ├── icon.icns │ │ │ ├── icon.ico │ │ │ ├── icon.png │ │ │ ├── ledger-provider.png │ │ │ ├── ledger.jpg │ │ │ ├── wallet-logo.png │ │ │ ├── wallet-logo.svg │ │ │ └── web3-provider.png │ │ └── js │ │ │ ├── bundle.js │ │ │ └── jquery.min.js │ ├── config.js │ ├── controllers │ │ ├── accountCtrl.js │ │ ├── addOwnerCtrl.js │ │ ├── addTokenCtrl.js │ │ ├── addressBookCtrl.js │ │ ├── confirmMultisigTransactionOfflineCtrl.js │ │ ├── confirmTransactionCtrl.js │ │ ├── depositCtrl.js │ │ ├── depositTokenCtrl.js │ │ ├── editABICtrl.js │ │ ├── executeTransactionCtrl.js │ │ ├── exportWalletConfigCtrl.js │ │ ├── footerCtrl.js │ │ ├── importWalletConfigCtrl.js │ │ ├── navCtrl.js │ │ ├── newWalletCtrl.js │ │ ├── nonceCtrl.js │ │ ├── removeOwnerCtrl.js │ │ ├── removeWalletCtrl.js │ │ ├── replaceOwnerCtrl.js │ │ ├── replaceOwnerOfflineCtrl.js │ │ ├── revokeCtrl.js │ │ ├── sendTransactionCtrl.js │ │ ├── setLimitCtrl.js │ │ ├── settingsCtrl.js │ │ ├── signOfflineCtrl.js │ │ ├── signedTransactionCtrl.js │ │ ├── transactionCtrl.js │ │ ├── updateRequiredCtrl.js │ │ ├── walletCtrl.js │ │ ├── walletDetailCtrl.js │ │ ├── walletTransactionCtrl.js │ │ ├── withdrawLimitCtrl.js │ │ └── withdrawTokenCtrl.js │ ├── directives.js │ ├── filters.js │ ├── imprint.html │ ├── index.html │ ├── main.js │ ├── partials.js │ ├── partials │ │ ├── 404.html │ │ ├── accounts.html │ │ ├── addressBook.html │ │ ├── addressPopoverTemplate.html │ │ ├── editable-select-contract-settings-tpl.html │ │ ├── editable-select-settings-tpl.html │ │ ├── modals │ │ │ ├── addAddressToBook.html │ │ │ ├── addLightWalletAccount.html │ │ │ ├── addOwner.html │ │ │ ├── addWalletOwner.html │ │ │ ├── askLightWalletPassword.html │ │ │ ├── chooseWeb3Wallet.html │ │ │ ├── configureGas.html │ │ │ ├── confirmTransaction.html │ │ │ ├── confirmTransactionOffline.html │ │ │ ├── deposit.html │ │ │ ├── depositToken.html │ │ │ ├── disclaimer.html │ │ │ ├── disclaimerElectron.html │ │ │ ├── editABI.html │ │ │ ├── editAddressBookItem.html │ │ │ ├── editLightWalletAccount.html │ │ │ ├── editOwner.html │ │ │ ├── editToken.html │ │ │ ├── editWallet.html │ │ │ ├── executeMultisigTransactionOffline.html │ │ │ ├── executeTransaction.html │ │ │ ├── exportWalletConfiguration.html │ │ │ ├── getNonce.html │ │ │ ├── importLightWalletAccount.html │ │ │ ├── importWalletConfiguration.html │ │ │ ├── ledgerHelp.html │ │ │ ├── lightWalletPassword.html │ │ │ ├── newWallet.html │ │ │ ├── removeAddressFromBook.html │ │ │ ├── removeLightWalletAccount.html │ │ │ ├── removeOwner.html │ │ │ ├── removeToken.html │ │ │ ├── removeWallet.html │ │ │ ├── removeWalletOwnerOffline.html │ │ │ ├── replaceOwner.html │ │ │ ├── replaceOwnerOffline.html │ │ │ ├── resetSettings.html │ │ │ ├── restoreSeed.html │ │ │ ├── restoreWallet.html │ │ │ ├── retrieveNonce.html │ │ │ ├── revokeConfirmation.html │ │ │ ├── revokeMultisigConfirmationOffline.html │ │ │ ├── safeMigration.html │ │ │ ├── selectAddressFromBook.html │ │ │ ├── selectNewWallet.html │ │ │ ├── sendTransaction.html │ │ │ ├── setLimit.html │ │ │ ├── showNonce.html │ │ │ ├── showSeed.html │ │ │ ├── showSignedTransaction.html │ │ │ ├── signMultisigConfirmationRevokeOffline.html │ │ │ ├── signOffline.html │ │ │ ├── signedTransaction.html │ │ │ ├── simulatedTransaction.html │ │ │ ├── spinner.html │ │ │ ├── updateRequired.html │ │ │ ├── walletTransaction.html │ │ │ ├── web3Wallets.html │ │ │ ├── withdrawLimit.html │ │ │ └── withdrawToken.html │ │ ├── multisigData.html │ │ ├── paramValueData.html │ │ ├── settings.html │ │ ├── transactions.html │ │ ├── txData.html │ │ ├── wallet.html │ │ └── wallets.html │ ├── routes.js │ ├── services │ │ ├── ABI.js │ │ ├── CommunicationBus.js │ │ ├── Config.js │ │ ├── Connection.js │ │ ├── Token.js │ │ ├── Transaction.js │ │ ├── Utils.js │ │ ├── Wallet.js │ │ └── Web3Service.js │ └── trezor-connect-v4.js ├── testrpc.sh └── tests │ ├── globalvars.js │ └── wallet.test.js ├── migrations ├── 1_initial_migration.js └── 2_deploy_contracts.js ├── package-lock.json ├── package.json ├── prepare_deploy_linux.sh ├── prepare_deploy_win.sh ├── test ├── javascript │ ├── testExecutionAfterRequirementsChanged.js │ ├── testExternalCalls.js │ ├── testExternalCallsWithDailyLimit.js │ ├── testMultiSigWalletWithDailyLimit.js │ ├── testMultiSigWalletWithDailyLimitFactory.js │ └── utils.js └── python │ ├── test_execution_after_requirements_changed.py │ ├── test_multisig_wallet_with_daily_limit.py │ └── test_multisig_wallet_with_daily_limit_factory.py ├── truffle.js └── truffle_test_runner.sh /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "extends": "eslint:recommended", 3 | "parser": "babel-eslint", 4 | "parserOptions": { 5 | "sourceType": "script" 6 | }, 7 | "rules": { 8 | "no-unused-vars": ["error", { "argsIgnorePattern": "^_" }] 9 | }, 10 | "env": { 11 | "node": true, 12 | "mocha": true, 13 | "es6": true 14 | }, 15 | "globals": { 16 | "assert": true, 17 | "artifacts": true, 18 | "contract": true, 19 | "web3": true 20 | } 21 | }; -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.sol linguist-language=Solidity 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Basics 2 | *.py[cod] 3 | *.pyc 4 | __pycache__ 5 | 6 | # Logs 7 | *.log 8 | pip-log.txt 9 | 10 | # Unit test / coverage reports 11 | .coverage 12 | .tox 13 | nosetests.xml 14 | 15 | # Translations 16 | *.mo 17 | *.pot 18 | 19 | # Pycharm 20 | .idea 21 | 22 | # Vagrant 23 | .vagrant 24 | 25 | # Vim 26 | 27 | *~ 28 | *.swp 29 | *.swo 30 | 31 | # npm 32 | node_modules/ 33 | # package-lock.json 34 | # dapp/package-lock.json 35 | 36 | # Compass 37 | .sass-cache 38 | 39 | # sqlite 40 | *.sqlite 41 | 42 | CACHE 43 | 44 | # OS generated files # 45 | ###################### 46 | .DS_Store 47 | .DS_Store? 48 | ._* 49 | .Spotlight-V100 50 | .Trashes 51 | ehthumbs.db 52 | Thumbs.db 53 | 54 | # pip 55 | /src 56 | 57 | # Collected static files via Django's staticfiles app 58 | /staticfiles 59 | 60 | # custom multisig folders 61 | /contracts/abi 62 | /dapp/partials.js 63 | multisigWallet.zip 64 | /dapp/dist 65 | 66 | # Truffle 67 | /build 68 | 69 | # Bower 70 | dapp/bower_components 71 | 72 | # Keys 73 | dapp/localhost.crt 74 | dapp/localhost.key 75 | 76 | # Travis 77 | .travis/deploy_key 78 | 79 | # built package.json 80 | dapp/src/package.json -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - '9' 4 | matrix: 5 | include: 6 | - os: linux 7 | dist: trusty 8 | sudo: required 9 | env: 10 | - DIST='web' # distribution 11 | - os: linux 12 | dist: trusty 13 | sudo: required 14 | env: 15 | - DIST='desktop' 16 | - os: osx 17 | env: 18 | - DIST='desktop' 19 | before_install: 20 | - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update && sudo apt-get install -y libusb-1.0-0-dev ; fi 21 | - export CHROME_BIN=chromium-browser 22 | - export DISPLAY=:99.0 23 | - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sh -e /etc/init.d/xvfb start ; fi 24 | install: npm install && cd dapp && npm install && cd .. 25 | script: 26 | - npm run test-dapp 27 | - npm run test 28 | before_deploy: 29 | - chmod +x prepare_deploy_linux.sh 30 | - ./prepare_deploy_linux.sh 31 | deploy: 32 | - provider: s3 33 | bucket: wallet-development 34 | access_key_id: $AWS_ACCESS_KEY_ID 35 | secret_access_key: $AWS_SECRET_ACCESS_KEY 36 | skip_cleanup: true 37 | local_dir: dapp/src 38 | on: 39 | branch: develop 40 | condition: $DIST = web 41 | - provider: s3 42 | bucket: wallet-staging 43 | access_key_id: $AWS_ACCESS_KEY_ID 44 | secret_access_key: $AWS_SECRET_ACCESS_KEY 45 | skip_cleanup: true 46 | local_dir: dapp/src 47 | on: 48 | branch: master 49 | condition: $DIST = web 50 | 51 | - provider: s3 52 | bucket: wallet-desktop-builds 53 | access_key_id: $AWS_ACCESS_KEY_ID 54 | secret_access_key: $AWS_SECRET_ACCESS_KEY 55 | skip_cleanup: true 56 | local_dir: $TRAVIS_BUILD_DIR/dapp/dist/ 57 | on: 58 | branch: develop # remember to change it to master 59 | condition: $DIST = 'desktop' 60 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | platform: 2 | - x64 3 | 4 | # branches to build 5 | branches: 6 | # whitelist 7 | only: 8 | - master 9 | - develop 10 | 11 | skip_tags: true 12 | 13 | # Maximum number of concurrent jobs for the project 14 | max_jobs: 1 15 | 16 | # set clone depth 17 | clone_depth: 5 # clone entire repository history if not defined 18 | 19 | # to run your custom scripts instead of automatic tests 20 | # test_script: 21 | # - npm run test-dapp 22 | # - npm run test 23 | 24 | # scripts that run after cloning repository 25 | install: 26 | - ps: Install-Product node 8 x64 27 | - ps: $env:DEBUG = "electron-builder" 28 | - npm i -g --production windows-build-tools 29 | - cd dapp && rm -rf node_modules && rm package-lock.json && yarn config set msvs_version 2015 --global && yarn add secp256k1 && yarn add sha3 && yarn install && cd .. 30 | 31 | # to run your custom scripts instead of automatic MSBuild 32 | build_script: 33 | - cd dapp/ && mkdir dist && yarn build-libs-electron && yarn build-win 34 | 35 | # scripts to run before deployment 36 | after_build: 37 | - chmod +x prepare_deploy_win.sh 38 | - prepare_deploy_win.sh 39 | - cp dapp/dist/*.exe . 40 | 41 | artifacts: 42 | path: '*.exe' 43 | name: exe 44 | 45 | deploy: 46 | provider: S3 47 | access_key_id: $(AWS_ACCESS_KEY_ID) 48 | secret_access_key: $(AWS_SECRET_ACCESS_KEY) 49 | bucket: $(BUCKET_NAME) 50 | region: $(AWS_REGION) 51 | artifact: "exe" 52 | -------------------------------------------------------------------------------- /apt-packages: -------------------------------------------------------------------------------- 1 | libusb-1.0-0-dev 2 | -------------------------------------------------------------------------------- /contracts/Factory.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.15; 2 | 3 | contract Factory { 4 | 5 | /* 6 | * Events 7 | */ 8 | event ContractInstantiation(address sender, address instantiation); 9 | 10 | /* 11 | * Storage 12 | */ 13 | mapping(address => bool) public isInstantiation; 14 | mapping(address => address[]) public instantiations; 15 | 16 | /* 17 | * Public functions 18 | */ 19 | /// @dev Returns number of instantiations by creator. 20 | /// @param creator Contract creator. 21 | /// @return Returns number of instantiations by creator. 22 | function getInstantiationCount(address creator) 23 | public 24 | constant 25 | returns (uint) 26 | { 27 | return instantiations[creator].length; 28 | } 29 | 30 | /* 31 | * Internal functions 32 | */ 33 | /// @dev Registers contract in factory registry. 34 | /// @param instantiation Address of contract instantiation. 35 | function register(address instantiation) 36 | internal 37 | { 38 | isInstantiation[instantiation] = true; 39 | instantiations[msg.sender].push(instantiation); 40 | ContractInstantiation(msg.sender, instantiation); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /contracts/Migrations.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.15; 2 | 3 | contract Migrations { 4 | address public owner; 5 | uint public last_completed_migration; 6 | 7 | modifier restricted() { 8 | if (msg.sender == owner) _; 9 | } 10 | 11 | function Migrations() { 12 | owner = msg.sender; 13 | } 14 | 15 | function setCompleted(uint completed) restricted { 16 | last_completed_migration = completed; 17 | } 18 | 19 | function upgrade(address new_address) restricted { 20 | Migrations upgraded = Migrations(new_address); 21 | upgraded.setCompleted(last_completed_migration); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /contracts/MultiSigWalletFactory.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.15; 2 | import "./Factory.sol"; 3 | import "./MultiSigWallet.sol"; 4 | 5 | 6 | /// @title Multisignature wallet factory - Allows creation of multisig wallet. 7 | /// @author Stefan George - 8 | contract MultiSigWalletFactory is Factory { 9 | 10 | /* 11 | * Public functions 12 | */ 13 | /// @dev Allows verified creation of multisignature wallet. 14 | /// @param _owners List of initial owners. 15 | /// @param _required Number of required confirmations. 16 | /// @return Returns wallet address. 17 | function create(address[] _owners, uint _required) 18 | public 19 | returns (address wallet) 20 | { 21 | wallet = new MultiSigWallet(_owners, _required); 22 | register(wallet); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /contracts/MultiSigWalletWithDailyLimitFactory.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.15; 2 | import "./Factory.sol"; 3 | import "./MultiSigWalletWithDailyLimit.sol"; 4 | 5 | 6 | /// @title Multisignature wallet factory for daily limit version - Allows creation of multisig wallet. 7 | /// @author Stefan George - 8 | contract MultiSigWalletWithDailyLimitFactory is Factory { 9 | 10 | /* 11 | * Public functions 12 | */ 13 | /// @dev Allows verified creation of multisignature wallet. 14 | /// @param _owners List of initial owners. 15 | /// @param _required Number of required confirmations. 16 | /// @param _dailyLimit Amount in wei, which can be withdrawn without confirmations on a daily basis. 17 | /// @return Returns wallet address. 18 | function create(address[] _owners, uint _required, uint _dailyLimit) 19 | public 20 | returns (address wallet) 21 | { 22 | wallet = new MultiSigWalletWithDailyLimit(_owners, _required, _dailyLimit); 23 | register(wallet); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /contracts/TestCalls.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.15; 2 | 3 | 4 | /// @title Contract for testing low-level calls issued from the multisig wallet 5 | contract TestCalls { 6 | 7 | // msg.data.length of the latest call to "receive" methods 8 | uint public lastMsgDataLength; 9 | 10 | // msg.value of the latest call to "receive" methods 11 | uint public lastMsgValue; 12 | 13 | uint public uint1; 14 | uint public uint2; 15 | bytes public byteArray1; 16 | 17 | modifier setMsgFields { 18 | lastMsgDataLength = msg.data.length; 19 | lastMsgValue = msg.value; 20 | _; 21 | } 22 | 23 | function TestCalls() setMsgFields public { 24 | // This constructor will be used to test the creation via multisig wallet 25 | } 26 | 27 | function receive1uint(uint a) setMsgFields payable public { 28 | uint1 = a; 29 | } 30 | 31 | function receive2uints(uint a, uint b) setMsgFields payable public { 32 | uint1 = a; 33 | uint2 = b; 34 | } 35 | 36 | function receive1bytes(bytes c) setMsgFields payable public { 37 | byteArray1 = c; 38 | } 39 | 40 | function nonPayable() setMsgFields public { 41 | } 42 | 43 | } -------------------------------------------------------------------------------- /dapp/Readme.md: -------------------------------------------------------------------------------- 1 | Ethereum Multisignature Wallet UI 2 | =================== 3 | 4 | A web user interface for the [MultiSigWallet](https://github.com/gnosis/MultiSigWallet). 5 | 6 | Requirements 7 | ------------- 8 | * Node v5+ (Confirmed working on v6.17.1 - will not work on current LTS v12.13.0) 9 | * [Grunt-cli](http://gruntjs.com/getting-started#installing-the-cli) 10 | 11 | Install 12 | ------------- 13 | ``` 14 | # For Ubuntu/Debian you need to install libusb development headers 15 | apt install -y libusb-1.0-0-dev 16 | 17 | # Latest NodeJS (v12.13.0) does NOT appear to work correctly. 18 | # You should use NVM and install Node v6.17.1 for best results: https://github.com/nvm-sh/nvm 19 | # Tested by @Privex on 2019-Nov-06 with v6.17.1 with success 20 | nvm install v6.17.1 21 | 22 | git clone https://github.com/gnosis/MultiSigWallet.git 23 | cd MultiSigWallet/dapp 24 | 25 | # node-gyp is required for 'npm install' to work correctly 26 | npm install node-gyp 27 | 28 | npm install -g grunt-cli 29 | npm install 30 | grunt 31 | ``` 32 | 33 | Test 34 | ------------- 35 | ``` 36 | npm test 37 | ``` 38 | 39 | Build 40 | ------------- 41 | 42 | Web version 43 | 44 | ``` 45 | npm run build-libs-web 46 | ``` 47 | 48 | Desktop version 49 | 50 | ``` 51 | npm run build-libs-electron 52 | ``` 53 | -------------------------------------------------------------------------------- /dapp/build/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gnosis/MultiSigWallet/90639984c960d281bed3e0a5d56dd4adcb9407c4/dapp/build/icon.icns -------------------------------------------------------------------------------- /dapp/build/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gnosis/MultiSigWallet/90639984c960d281bed3e0a5d56dd4adcb9407c4/dapp/build/icon.ico -------------------------------------------------------------------------------- /dapp/build/icon_128x128x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gnosis/MultiSigWallet/90639984c960d281bed3e0a5d56dd4adcb9407c4/dapp/build/icon_128x128x32.png -------------------------------------------------------------------------------- /dapp/build/icon_16x16x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gnosis/MultiSigWallet/90639984c960d281bed3e0a5d56dd4adcb9407c4/dapp/build/icon_16x16x32.png -------------------------------------------------------------------------------- /dapp/build/icon_256x256x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gnosis/MultiSigWallet/90639984c960d281bed3e0a5d56dd4adcb9407c4/dapp/build/icon_256x256x32.png -------------------------------------------------------------------------------- /dapp/build/icon_32x32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gnosis/MultiSigWallet/90639984c960d281bed3e0a5d56dd4adcb9407c4/dapp/build/icon_32x32x32.png -------------------------------------------------------------------------------- /dapp/build/icon_48x48x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gnosis/MultiSigWallet/90639984c960d281bed3e0a5d56dd4adcb9407c4/dapp/build/icon_48x48x32.png -------------------------------------------------------------------------------- /dapp/build/icon_512x512x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gnosis/MultiSigWallet/90639984c960d281bed3e0a5d56dd4adcb9407c4/dapp/build/icon_512x512x32.png -------------------------------------------------------------------------------- /dapp/config.karma.js: -------------------------------------------------------------------------------- 1 | // Karma configuration 2 | // Generated on Wed Jan 11 2017 14:38:33 GMT+0100 (CET) 3 | 4 | module.exports = function(config) { 5 | const karmaConfig = { 6 | 7 | // base path that will be used to resolve all patterns (eg. files, exclude) 8 | basePath: '', 9 | 10 | 11 | // frameworks to use 12 | // available frameworks: https://npmjs.org/browse/keyword/karma-adapter 13 | frameworks: ['jasmine'], 14 | 15 | 16 | // list of files / patterns to load in the browser 17 | files: [ 18 | 'tests/globalvars.js', 19 | 'node_modules/angular/angular.js', 20 | 'node_modules/angular-mocks/angular-mocks.js', 21 | 'node_modules/angular-ui-bootstrap/dist/ui-bootstrap-tpls.js', 22 | 'node_modules/angular-route/angular-route.min.js', 23 | 'node_modules/ngclipboard/dist/ngclipboard.min.js', 24 | 'node_modules/web3/dist/web3.min.js', 25 | 'node_modules/abi-decoder/dist/abi-decoder.js', 26 | 'node_modules/web3-provider-engine/dist/ProviderEngine.js', 27 | 'node_modules/angular-ui-notification/dist/angular-ui-notification.min.js', 28 | // 'node_modules/phantomjs-polyfill-object-assign/object-assign-polyfill.js', 29 | 'src/app.js', 30 | 'src/abi.js', 31 | 'src/config.js', 32 | 'src/services/**/*.js', 33 | 'tests/*.test*' 34 | ], 35 | 36 | 37 | // list of files to exclude 38 | exclude: [ 39 | //'services/Utils.js', 40 | ], 41 | 42 | // preprocess matching files before serving them to the browser 43 | // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor 44 | preprocessors: { 45 | 46 | }, 47 | 48 | // test results reporter to use 49 | // possible values: 'dots', 'progress' 50 | // available reporters: https://npmjs.org/browse/keyword/karma-reporter 51 | reporters: ['progress'], 52 | 53 | 54 | // web server port 55 | port: 9876, 56 | 57 | 58 | // enable / disable colors in the output (reporters and logs) 59 | colors: true, 60 | 61 | 62 | // level of logging 63 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG 64 | logLevel: config.LOG_DEBUG, 65 | 66 | 67 | // enable / disable watching file and executing tests whenever any file changes 68 | autoWatch: true, 69 | 70 | 71 | // start these browsers 72 | // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher 73 | browsers: ['Chrome'], //['PhantomJS'], //['Chrome'], 74 | 75 | 76 | // Continuous Integration mode 77 | // if true, Karma captures browsers, runs the tests and exits 78 | singleRun: true, 79 | 80 | // Concurrency level 81 | // how many browser should be started simultaneous 82 | concurrency: Infinity, 83 | 84 | }; 85 | 86 | // 87 | // config.set( 88 | var configuration = { 89 | // other things 90 | customLaunchers: { 91 | Chrome_travis_ci: { 92 | base: 'Chrome', 93 | flags: ['--no-sandbox'] 94 | } 95 | }, 96 | }; 97 | 98 | if (process.env.TRAVIS) { 99 | configuration.browsers = ['Chrome_travis_ci']; 100 | } 101 | 102 | config.set(Object.assign({}, karmaConfig, configuration)); 103 | }; 104 | -------------------------------------------------------------------------------- /dapp/css/gnosis-bootstrap-dialog.css: -------------------------------------------------------------------------------- 1 | .bootstrap-dialog { 2 | /* dialog types */ 3 | /** 4 | * Icon animation 5 | * Copied from font-awesome: http://fontawesome.io/ 6 | **/ 7 | /** End of icon animation **/ 8 | } 9 | .bootstrap-dialog .modal-header { 10 | border-top-left-radius: 0px; 11 | border-top-right-radius: 0px; 12 | } 13 | .bootstrap-dialog .bootstrap-dialog-title { 14 | color: #fff; 15 | display: inline-block; 16 | font-size: 16px; 17 | } 18 | .bootstrap-dialog .bootstrap-dialog-message { 19 | font-size: 14px; 20 | } 21 | .bootstrap-dialog .bootstrap-dialog-button-icon { 22 | margin-right: 3px; 23 | } 24 | .bootstrap-dialog .bootstrap-dialog-close-button { 25 | font-size: 20px; 26 | float: right; 27 | opacity: 0.9; 28 | filter: alpha(opacity=90); 29 | } 30 | .bootstrap-dialog .bootstrap-dialog-close-button:hover { 31 | cursor: pointer; 32 | opacity: 1; 33 | filter: alpha(opacity=100); 34 | } 35 | .bootstrap-dialog.type-default .modal-header { 36 | background-color: #ffffff; 37 | } 38 | .bootstrap-dialog.type-default .bootstrap-dialog-title { 39 | color: #333; 40 | } 41 | .bootstrap-dialog.type-info .modal-header { 42 | background-color: #5bc0de; 43 | } 44 | .bootstrap-dialog.type-primary .modal-header { 45 | background-color: #337ab7; 46 | } 47 | .bootstrap-dialog.type-success .modal-header { 48 | background-color: #5cb85c; 49 | } 50 | .bootstrap-dialog.type-warning .modal-header { 51 | background-color: #f0ad4e; 52 | } 53 | .bootstrap-dialog.type-danger .modal-header { 54 | background-color: #d9534f; 55 | } 56 | .bootstrap-dialog.size-large .bootstrap-dialog-title { 57 | font-size: 24px; 58 | } 59 | .bootstrap-dialog.size-large .bootstrap-dialog-close-button { 60 | font-size: 30px; 61 | } 62 | .bootstrap-dialog.size-large .bootstrap-dialog-message { 63 | font-size: 18px; 64 | } 65 | .bootstrap-dialog .icon-spin { 66 | display: inline-block; 67 | -moz-animation: spin 2s infinite linear; 68 | -o-animation: spin 2s infinite linear; 69 | -webkit-animation: spin 2s infinite linear; 70 | animation: spin 2s infinite linear; 71 | } 72 | @-moz-keyframes spin { 73 | 0% { 74 | -moz-transform: rotate(0deg); 75 | } 76 | 100% { 77 | -moz-transform: rotate(359deg); 78 | } 79 | } 80 | @-webkit-keyframes spin { 81 | 0% { 82 | -webkit-transform: rotate(0deg); 83 | } 84 | 100% { 85 | -webkit-transform: rotate(359deg); 86 | } 87 | } 88 | @-o-keyframes spin { 89 | 0% { 90 | -o-transform: rotate(0deg); 91 | } 92 | 100% { 93 | -o-transform: rotate(359deg); 94 | } 95 | } 96 | @-ms-keyframes spin { 97 | 0% { 98 | -ms-transform: rotate(0deg); 99 | } 100 | 100% { 101 | -ms-transform: rotate(359deg); 102 | } 103 | } 104 | @keyframes spin { 105 | 0% { 106 | transform: rotate(0deg); 107 | } 108 | 100% { 109 | transform: rotate(359deg); 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /dapp/less/.csslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "adjoining-classes": false, 3 | "box-sizing": false, 4 | "box-model": false, 5 | "compatible-vendor-prefixes": false, 6 | "floats": false, 7 | "font-sizes": false, 8 | "gradients": false, 9 | "important": false, 10 | "known-properties": false, 11 | "outline-none": false, 12 | "qualified-headings": false, 13 | "regex-selectors": false, 14 | "shorthand": false, 15 | "text-indent": false, 16 | "unique-headings": false, 17 | "universal-selector": false, 18 | "unqualified-attributes": false 19 | } 20 | -------------------------------------------------------------------------------- /dapp/less/alerts.less: -------------------------------------------------------------------------------- 1 | // 2 | // Alerts 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base styles 7 | // ------------------------- 8 | 9 | .alert { 10 | padding: @alert-padding; 11 | margin-bottom: @line-height-computed; 12 | border: 1px solid transparent; 13 | border-radius: @alert-border-radius; 14 | 15 | // Headings for larger alerts 16 | h4 { 17 | margin-top: 0; 18 | // Specified for the h4 to prevent conflicts of changing @headings-color 19 | color: inherit; 20 | } 21 | 22 | // Provide class for links that match alerts 23 | .alert-link { 24 | font-weight: @alert-link-font-weight; 25 | } 26 | 27 | // Improve alignment and spacing of inner content 28 | > p, 29 | > ul { 30 | margin-bottom: 0; 31 | } 32 | 33 | > p + p { 34 | margin-top: 5px; 35 | } 36 | } 37 | 38 | // Dismissible alerts 39 | // 40 | // Expand the right padding and account for the close button's positioning. 41 | 42 | .alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0. 43 | .alert-dismissible { 44 | padding-right: (@alert-padding + 20); 45 | 46 | // Adjust close link position 47 | .close { 48 | position: relative; 49 | top: -2px; 50 | right: -21px; 51 | color: inherit; 52 | } 53 | } 54 | 55 | // Alternate styles 56 | // 57 | // Generate contextual modifier classes for colorizing the alert. 58 | 59 | .alert-success { 60 | .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text); 61 | } 62 | 63 | .alert-info { 64 | .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text); 65 | } 66 | 67 | .alert-warning { 68 | .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text); 69 | } 70 | 71 | .alert-danger { 72 | .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text); 73 | } 74 | -------------------------------------------------------------------------------- /dapp/less/badges.less: -------------------------------------------------------------------------------- 1 | // 2 | // Badges 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .badge { 8 | display: inline-block; 9 | min-width: 10px; 10 | padding: 3px 7px; 11 | font-size: @font-size-small; 12 | font-weight: @badge-font-weight; 13 | color: @badge-color; 14 | line-height: @badge-line-height; 15 | vertical-align: middle; 16 | white-space: nowrap; 17 | text-align: center; 18 | background-color: @badge-bg; 19 | border-radius: @badge-border-radius; 20 | 21 | // Empty badges collapse automatically (not available in IE8) 22 | &:empty { 23 | display: none; 24 | } 25 | 26 | // Quick fix for badges in buttons 27 | .btn & { 28 | position: relative; 29 | top: -1px; 30 | } 31 | 32 | .btn-xs &, 33 | .btn-group-xs > .btn & { 34 | top: 0; 35 | padding: 1px 5px; 36 | } 37 | 38 | // Hover state, but only for links 39 | a& { 40 | &:hover, 41 | &:focus { 42 | color: @badge-link-hover-color; 43 | text-decoration: none; 44 | cursor: pointer; 45 | } 46 | } 47 | 48 | // Account for badges in navs 49 | .list-group-item.active > &, 50 | .nav-pills > .active > a > & { 51 | color: @badge-active-color; 52 | background-color: @badge-active-bg; 53 | } 54 | 55 | .list-group-item > & { 56 | float: right; 57 | } 58 | 59 | .list-group-item > & + & { 60 | margin-right: 5px; 61 | } 62 | 63 | .nav-pills > li > a > & { 64 | margin-left: 3px; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /dapp/less/bootstrap.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.7 (http://getbootstrap.com) 3 | * Copyright 2011-2016 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | 7 | // Core variables and mixins 8 | @import "variables.less"; 9 | @import "mixins.less"; 10 | 11 | // Reset and dependencies 12 | @import "normalize.less"; 13 | @import "print.less"; 14 | @import "glyphicons.less"; 15 | 16 | // Core CSS 17 | @import "scaffolding.less"; 18 | @import "type.less"; 19 | @import "code.less"; 20 | @import "grid.less"; 21 | @import "tables.less"; 22 | @import "forms.less"; 23 | @import "buttons.less"; 24 | 25 | // Components 26 | @import "component-animations.less"; 27 | @import "dropdowns.less"; 28 | @import "button-groups.less"; 29 | @import "input-groups.less"; 30 | @import "navs.less"; 31 | @import "navbar.less"; 32 | @import "breadcrumbs.less"; 33 | @import "pagination.less"; 34 | @import "pager.less"; 35 | @import "labels.less"; 36 | @import "badges.less"; 37 | @import "jumbotron.less"; 38 | @import "thumbnails.less"; 39 | @import "alerts.less"; 40 | @import "progress-bars.less"; 41 | @import "media.less"; 42 | @import "list-group.less"; 43 | @import "panels.less"; 44 | @import "responsive-embed.less"; 45 | @import "wells.less"; 46 | @import "close.less"; 47 | 48 | // Components w/ JavaScript 49 | @import "modals.less"; 50 | @import "tooltip.less"; 51 | @import "popovers.less"; 52 | @import "carousel.less"; 53 | 54 | // Utility classes 55 | @import "utilities.less"; 56 | @import "responsive-utilities.less"; 57 | -------------------------------------------------------------------------------- /dapp/less/breadcrumbs.less: -------------------------------------------------------------------------------- 1 | // 2 | // Breadcrumbs 3 | // -------------------------------------------------- 4 | 5 | 6 | .breadcrumb { 7 | padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal; 8 | margin-bottom: @line-height-computed; 9 | list-style: none; 10 | background-color: @breadcrumb-bg; 11 | border-radius: @border-radius-base; 12 | 13 | > li { 14 | display: inline-block; 15 | 16 | + li:before { 17 | content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space 18 | padding: 0 5px; 19 | color: @breadcrumb-color; 20 | } 21 | } 22 | 23 | > .active { 24 | color: @breadcrumb-active-color; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /dapp/less/close.less: -------------------------------------------------------------------------------- 1 | // 2 | // Close icons 3 | // -------------------------------------------------- 4 | 5 | 6 | .close { 7 | float: right; 8 | font-size: (@font-size-base * 1.5); 9 | font-weight: @close-font-weight; 10 | line-height: 1; 11 | color: @close-color; 12 | text-shadow: @close-text-shadow; 13 | .opacity(.2); 14 | 15 | &:hover, 16 | &:focus { 17 | color: @close-color; 18 | text-decoration: none; 19 | cursor: pointer; 20 | .opacity(.5); 21 | } 22 | 23 | // Additional properties for button version 24 | // iOS requires the button element instead of an anchor tag. 25 | // If you want the anchor version, it requires `href="#"`. 26 | // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile 27 | button& { 28 | padding: 0; 29 | cursor: pointer; 30 | background: transparent; 31 | border: 0; 32 | -webkit-appearance: none; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /dapp/less/code.less: -------------------------------------------------------------------------------- 1 | // 2 | // Code (inline and block) 3 | // -------------------------------------------------- 4 | 5 | 6 | // Inline and block code styles 7 | code, 8 | kbd, 9 | pre, 10 | samp { 11 | font-family: @font-family-monospace; 12 | } 13 | 14 | // Inline code 15 | code { 16 | padding: 2px 4px; 17 | font-size: 90%; 18 | color: @code-color; 19 | background-color: @code-bg; 20 | border-radius: @border-radius-base; 21 | } 22 | 23 | // User input typically entered via keyboard 24 | kbd { 25 | padding: 2px 4px; 26 | font-size: 90%; 27 | color: @kbd-color; 28 | background-color: @kbd-bg; 29 | border-radius: @border-radius-small; 30 | box-shadow: inset 0 -1px 0 rgba(0,0,0,.25); 31 | 32 | kbd { 33 | padding: 0; 34 | font-size: 100%; 35 | font-weight: bold; 36 | box-shadow: none; 37 | } 38 | } 39 | 40 | // Blocks of code 41 | pre { 42 | display: block; 43 | padding: ((@line-height-computed - 1) / 2); 44 | margin: 0 0 (@line-height-computed / 2); 45 | font-size: (@font-size-base - 1); // 14px to 13px 46 | line-height: @line-height-base; 47 | word-break: break-all; 48 | word-wrap: break-word; 49 | color: @pre-color; 50 | background-color: @pre-bg; 51 | border: 1px solid @pre-border-color; 52 | border-radius: @border-radius-base; 53 | 54 | // Account for some code outputs that place code tags in pre tags 55 | code { 56 | padding: 0; 57 | font-size: inherit; 58 | color: inherit; 59 | white-space: pre-wrap; 60 | background-color: transparent; 61 | border-radius: 0; 62 | } 63 | } 64 | 65 | // Enable scrollable blocks of code 66 | .pre-scrollable { 67 | max-height: @pre-scrollable-max-height; 68 | overflow-y: scroll; 69 | } 70 | -------------------------------------------------------------------------------- /dapp/less/component-animations.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component animations 3 | // -------------------------------------------------- 4 | 5 | // Heads up! 6 | // 7 | // We don't use the `.opacity()` mixin here since it causes a bug with text 8 | // fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552. 9 | 10 | .fade { 11 | opacity: 0; 12 | .transition(opacity .15s linear); 13 | &.in { 14 | opacity: 1; 15 | } 16 | } 17 | 18 | .collapse { 19 | display: none; 20 | 21 | &.in { display: block; } 22 | tr&.in { display: table-row; } 23 | tbody&.in { display: table-row-group; } 24 | } 25 | 26 | .collapsing { 27 | position: relative; 28 | height: 0; 29 | overflow: hidden; 30 | .transition-property(~"height, visibility"); 31 | .transition-duration(.35s); 32 | .transition-timing-function(ease); 33 | } 34 | -------------------------------------------------------------------------------- /dapp/less/grid.less: -------------------------------------------------------------------------------- 1 | // 2 | // Grid system 3 | // -------------------------------------------------- 4 | 5 | 6 | // Container widths 7 | // 8 | // Set the container width, and override it for fixed navbars in media queries. 9 | 10 | .container { 11 | .container-fixed(); 12 | 13 | @media (min-width: @screen-sm-min) { 14 | width: @container-sm; 15 | } 16 | @media (min-width: @screen-md-min) { 17 | width: @container-md; 18 | } 19 | @media (min-width: @screen-lg-min) { 20 | width: @container-lg; 21 | } 22 | } 23 | 24 | 25 | // Fluid container 26 | // 27 | // Utilizes the mixin meant for fixed width containers, but without any defined 28 | // width for fluid, full width layouts. 29 | 30 | .container-fluid { 31 | .container-fixed(); 32 | } 33 | 34 | 35 | // Row 36 | // 37 | // Rows contain and clear the floats of your columns. 38 | 39 | .row { 40 | .make-row(); 41 | } 42 | 43 | 44 | // Columns 45 | // 46 | // Common styles for small and large grid columns 47 | 48 | .make-grid-columns(); 49 | 50 | 51 | // Extra small grid 52 | // 53 | // Columns, offsets, pushes, and pulls for extra small devices like 54 | // smartphones. 55 | 56 | .make-grid(xs); 57 | 58 | 59 | // Small grid 60 | // 61 | // Columns, offsets, pushes, and pulls for the small device range, from phones 62 | // to tablets. 63 | 64 | @media (min-width: @screen-sm-min) { 65 | .make-grid(sm); 66 | } 67 | 68 | 69 | // Medium grid 70 | // 71 | // Columns, offsets, pushes, and pulls for the desktop device range. 72 | 73 | @media (min-width: @screen-md-min) { 74 | .make-grid(md); 75 | } 76 | 77 | 78 | // Large grid 79 | // 80 | // Columns, offsets, pushes, and pulls for the large desktop device range. 81 | 82 | @media (min-width: @screen-lg-min) { 83 | .make-grid(lg); 84 | } 85 | -------------------------------------------------------------------------------- /dapp/less/jumbotron.less: -------------------------------------------------------------------------------- 1 | // 2 | // Jumbotron 3 | // -------------------------------------------------- 4 | 5 | 6 | .jumbotron { 7 | padding-top: @jumbotron-padding; 8 | padding-bottom: @jumbotron-padding; 9 | margin-bottom: @jumbotron-padding; 10 | color: @jumbotron-color; 11 | background-color: @jumbotron-bg; 12 | 13 | h1, 14 | .h1 { 15 | color: @jumbotron-heading-color; 16 | } 17 | 18 | p { 19 | margin-bottom: (@jumbotron-padding / 2); 20 | font-size: @jumbotron-font-size; 21 | font-weight: 200; 22 | } 23 | 24 | > hr { 25 | border-top-color: darken(@jumbotron-bg, 10%); 26 | } 27 | 28 | .container &, 29 | .container-fluid & { 30 | border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container 31 | padding-left: (@grid-gutter-width / 2); 32 | padding-right: (@grid-gutter-width / 2); 33 | } 34 | 35 | .container { 36 | max-width: 100%; 37 | } 38 | 39 | @media screen and (min-width: @screen-sm-min) { 40 | padding-top: (@jumbotron-padding * 1.6); 41 | padding-bottom: (@jumbotron-padding * 1.6); 42 | 43 | .container &, 44 | .container-fluid & { 45 | padding-left: (@jumbotron-padding * 2); 46 | padding-right: (@jumbotron-padding * 2); 47 | } 48 | 49 | h1, 50 | .h1 { 51 | font-size: @jumbotron-heading-font-size; 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /dapp/less/labels.less: -------------------------------------------------------------------------------- 1 | // 2 | // Labels 3 | // -------------------------------------------------- 4 | 5 | .label { 6 | display: inline; 7 | padding: .2em .6em .3em; 8 | font-size: 75%; 9 | font-weight: bold; 10 | line-height: 1; 11 | color: @label-color; 12 | text-align: center; 13 | white-space: nowrap; 14 | vertical-align: baseline; 15 | border-radius: .25em; 16 | 17 | // Add hover effects, but only for links 18 | a& { 19 | &:hover, 20 | &:focus { 21 | color: @label-link-hover-color; 22 | text-decoration: none; 23 | cursor: pointer; 24 | } 25 | } 26 | 27 | // Empty labels collapse automatically (not available in IE8) 28 | &:empty { 29 | display: none; 30 | } 31 | 32 | // Quick fix for labels in buttons 33 | .btn & { 34 | position: relative; 35 | top: -1px; 36 | } 37 | } 38 | 39 | // Colors 40 | // Contextual variations (linked labels get darker on :hover) 41 | 42 | .label-default { 43 | .label-variant(@label-default-bg); 44 | } 45 | 46 | .label-primary { 47 | .label-variant(@label-primary-bg); 48 | } 49 | 50 | .label-success { 51 | .label-variant(@label-success-bg); 52 | } 53 | 54 | .label-info { 55 | .label-variant(@label-info-bg); 56 | } 57 | 58 | .label-warning { 59 | .label-variant(@label-warning-bg); 60 | } 61 | 62 | .label-danger { 63 | .label-variant(@label-danger-bg); 64 | } 65 | -------------------------------------------------------------------------------- /dapp/less/media.less: -------------------------------------------------------------------------------- 1 | .media { 2 | // Proper spacing between instances of .media 3 | margin-top: 15px; 4 | 5 | &:first-child { 6 | margin-top: 0; 7 | } 8 | } 9 | 10 | .media, 11 | .media-body { 12 | zoom: 1; 13 | overflow: hidden; 14 | } 15 | 16 | .media-body { 17 | width: 10000px; 18 | } 19 | 20 | .media-object { 21 | display: block; 22 | 23 | // Fix collapse in webkit from max-width: 100% and display: table-cell. 24 | &.img-thumbnail { 25 | max-width: none; 26 | } 27 | } 28 | 29 | .media-right, 30 | .media > .pull-right { 31 | padding-left: 10px; 32 | } 33 | 34 | .media-left, 35 | .media > .pull-left { 36 | padding-right: 10px; 37 | } 38 | 39 | .media-left, 40 | .media-right, 41 | .media-body { 42 | display: table-cell; 43 | vertical-align: top; 44 | } 45 | 46 | .media-middle { 47 | vertical-align: middle; 48 | } 49 | 50 | .media-bottom { 51 | vertical-align: bottom; 52 | } 53 | 54 | // Reset margins on headings for tighter default spacing 55 | .media-heading { 56 | margin-top: 0; 57 | margin-bottom: 5px; 58 | } 59 | 60 | // Media list variation 61 | // 62 | // Undo default ul/ol styles 63 | .media-list { 64 | padding-left: 0; 65 | list-style: none; 66 | } 67 | -------------------------------------------------------------------------------- /dapp/less/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------------------------------- 3 | 4 | // Utilities 5 | @import "mixins/hide-text.less"; 6 | @import "mixins/opacity.less"; 7 | @import "mixins/image.less"; 8 | @import "mixins/labels.less"; 9 | @import "mixins/reset-filter.less"; 10 | @import "mixins/resize.less"; 11 | @import "mixins/responsive-visibility.less"; 12 | @import "mixins/size.less"; 13 | @import "mixins/tab-focus.less"; 14 | @import "mixins/reset-text.less"; 15 | @import "mixins/text-emphasis.less"; 16 | @import "mixins/text-overflow.less"; 17 | @import "mixins/vendor-prefixes.less"; 18 | 19 | // Components 20 | @import "mixins/alerts.less"; 21 | @import "mixins/buttons.less"; 22 | @import "mixins/panels.less"; 23 | @import "mixins/pagination.less"; 24 | @import "mixins/list-group.less"; 25 | @import "mixins/nav-divider.less"; 26 | @import "mixins/forms.less"; 27 | @import "mixins/progress-bar.less"; 28 | @import "mixins/table-row.less"; 29 | 30 | // Skins 31 | @import "mixins/background-variant.less"; 32 | @import "mixins/border-radius.less"; 33 | @import "mixins/gradients.less"; 34 | 35 | // Layout 36 | @import "mixins/clearfix.less"; 37 | @import "mixins/center-block.less"; 38 | @import "mixins/nav-vertical-align.less"; 39 | @import "mixins/grid-framework.less"; 40 | @import "mixins/grid.less"; 41 | -------------------------------------------------------------------------------- /dapp/less/mixins/alerts.less: -------------------------------------------------------------------------------- 1 | // Alerts 2 | 3 | .alert-variant(@background; @border; @text-color) { 4 | background-color: @background; 5 | border-color: @border; 6 | color: @text-color; 7 | 8 | hr { 9 | border-top-color: darken(@border, 5%); 10 | } 11 | .alert-link { 12 | color: darken(@text-color, 10%); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /dapp/less/mixins/background-variant.less: -------------------------------------------------------------------------------- 1 | // Contextual backgrounds 2 | 3 | .bg-variant(@color) { 4 | background-color: @color; 5 | a&:hover, 6 | a&:focus { 7 | background-color: darken(@color, 10%); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /dapp/less/mixins/border-radius.less: -------------------------------------------------------------------------------- 1 | // Single side border-radius 2 | 3 | .border-top-radius(@radius) { 4 | border-top-right-radius: @radius; 5 | border-top-left-radius: @radius; 6 | } 7 | .border-right-radius(@radius) { 8 | border-bottom-right-radius: @radius; 9 | border-top-right-radius: @radius; 10 | } 11 | .border-bottom-radius(@radius) { 12 | border-bottom-right-radius: @radius; 13 | border-bottom-left-radius: @radius; 14 | } 15 | .border-left-radius(@radius) { 16 | border-bottom-left-radius: @radius; 17 | border-top-left-radius: @radius; 18 | } 19 | -------------------------------------------------------------------------------- /dapp/less/mixins/buttons.less: -------------------------------------------------------------------------------- 1 | // Button variants 2 | // 3 | // Easily pump out default styles, as well as :hover, :focus, :active, 4 | // and disabled options for all buttons 5 | 6 | .button-variant(@color; @background; @border) { 7 | color: @color; 8 | background-color: @background; 9 | border-color: @border; 10 | 11 | &:focus, 12 | &.focus { 13 | color: @color; 14 | background-color: darken(@background, 10%); 15 | border-color: darken(@border, 25%); 16 | } 17 | &:hover { 18 | color: @color; 19 | background-color: darken(@background, 10%); 20 | border-color: darken(@border, 12%); 21 | } 22 | &:active, 23 | &.active, 24 | .open > .dropdown-toggle& { 25 | color: @color; 26 | background-color: darken(@background, 10%); 27 | border-color: darken(@border, 12%); 28 | 29 | &:hover, 30 | &:focus, 31 | &.focus { 32 | color: @color; 33 | background-color: darken(@background, 17%); 34 | border-color: darken(@border, 25%); 35 | } 36 | } 37 | &:active, 38 | &.active, 39 | .open > .dropdown-toggle& { 40 | background-image: none; 41 | } 42 | &.disabled, 43 | &[disabled], 44 | fieldset[disabled] & { 45 | &:hover, 46 | &:focus, 47 | &.focus { 48 | background-color: @background; 49 | border-color: @border; 50 | } 51 | } 52 | 53 | .badge { 54 | color: @background; 55 | background-color: @color; 56 | } 57 | } 58 | 59 | // Button sizes 60 | .button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) { 61 | padding: @padding-vertical @padding-horizontal; 62 | font-size: @font-size; 63 | line-height: @line-height; 64 | border-radius: @border-radius; 65 | } 66 | -------------------------------------------------------------------------------- /dapp/less/mixins/center-block.less: -------------------------------------------------------------------------------- 1 | // Center-align a block level element 2 | 3 | .center-block() { 4 | display: block; 5 | margin-left: auto; 6 | margin-right: auto; 7 | } 8 | -------------------------------------------------------------------------------- /dapp/less/mixins/clearfix.less: -------------------------------------------------------------------------------- 1 | // Clearfix 2 | // 3 | // For modern browsers 4 | // 1. The space content is one way to avoid an Opera bug when the 5 | // contenteditable attribute is included anywhere else in the document. 6 | // Otherwise it causes space to appear at the top and bottom of elements 7 | // that are clearfixed. 8 | // 2. The use of `table` rather than `block` is only necessary if using 9 | // `:before` to contain the top-margins of child elements. 10 | // 11 | // Source: http://nicolasgallagher.com/micro-clearfix-hack/ 12 | 13 | .clearfix() { 14 | &:before, 15 | &:after { 16 | content: " "; // 1 17 | display: table; // 2 18 | } 19 | &:after { 20 | clear: both; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /dapp/less/mixins/forms.less: -------------------------------------------------------------------------------- 1 | // Form validation states 2 | // 3 | // Used in forms.less to generate the form validation CSS for warnings, errors, 4 | // and successes. 5 | 6 | .form-control-validation(@text-color: #555; @border-color: #ccc; @background-color: #f5f5f5) { 7 | // Color the label and help text 8 | .help-block, 9 | .control-label, 10 | .radio, 11 | .checkbox, 12 | .radio-inline, 13 | .checkbox-inline, 14 | &.radio label, 15 | &.checkbox label, 16 | &.radio-inline label, 17 | &.checkbox-inline label { 18 | color: @text-color; 19 | } 20 | // Set the border and box shadow on specific inputs to match 21 | .form-control { 22 | border-color: @border-color; 23 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work 24 | &:focus { 25 | border-color: darken(@border-color, 10%); 26 | @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@border-color, 20%); 27 | .box-shadow(@shadow); 28 | } 29 | } 30 | // Set validation states also for addons 31 | .input-group-addon { 32 | color: @text-color; 33 | border-color: @border-color; 34 | background-color: @background-color; 35 | } 36 | // Optional feedback icon 37 | .form-control-feedback { 38 | color: @text-color; 39 | } 40 | } 41 | 42 | 43 | // Form control focus state 44 | // 45 | // Generate a customized focus state and for any input with the specified color, 46 | // which defaults to the `@input-border-focus` variable. 47 | // 48 | // We highly encourage you to not customize the default value, but instead use 49 | // this to tweak colors on an as-needed basis. This aesthetic change is based on 50 | // WebKit's default styles, but applicable to a wider range of browsers. Its 51 | // usability and accessibility should be taken into account with any change. 52 | // 53 | // Example usage: change the default blue border and shadow to white for better 54 | // contrast against a dark gray background. 55 | .form-control-focus(@color: @input-border-focus) { 56 | @color-rgba: rgba(red(@color), green(@color), blue(@color), .6); 57 | &:focus { 58 | border-color: @color; 59 | outline: 0; 60 | .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}"); 61 | } 62 | } 63 | 64 | // Form control sizing 65 | // 66 | // Relative text size, padding, and border-radii changes for form controls. For 67 | // horizontal sizing, wrap controls in the predefined grid classes. ` 11 | 19 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /dapp/src/partials/editable-select-settings-tpl.html: -------------------------------------------------------------------------------- 1 |
2 | 34 |
35 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/addAddressToBook.html: -------------------------------------------------------------------------------- 1 | 6 | 16 | 24 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/addOwner.html: -------------------------------------------------------------------------------- 1 | 6 | 16 | 24 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/addWalletOwner.html: -------------------------------------------------------------------------------- 1 | 6 |
7 | 17 | 30 |
31 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/askLightWalletPassword.html: -------------------------------------------------------------------------------- 1 | 6 | 23 | 24 | 41 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/chooseWeb3Wallet.html: -------------------------------------------------------------------------------- 1 | 8 | 38 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/configureGas.html: -------------------------------------------------------------------------------- 1 | 6 |
7 | 23 | 31 |
-------------------------------------------------------------------------------- /dapp/src/partials/modals/confirmTransaction.html: -------------------------------------------------------------------------------- 1 | 6 | 14 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/confirmTransactionOffline.html: -------------------------------------------------------------------------------- 1 | 6 |
7 | 13 | 19 |
20 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/deposit.html: -------------------------------------------------------------------------------- 1 | 6 |
7 | 13 | 24 |
25 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/depositToken.html: -------------------------------------------------------------------------------- 1 | 6 |
7 | 13 | 24 |
25 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/disclaimer.html: -------------------------------------------------------------------------------- 1 | 6 | 40 | 45 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/disclaimerElectron.html: -------------------------------------------------------------------------------- 1 | 6 | 33 | 38 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/editABI.html: -------------------------------------------------------------------------------- 1 | 6 | 17 | 25 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/editAddressBookItem.html: -------------------------------------------------------------------------------- 1 | 6 | 16 | 24 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/editLightWalletAccount.html: -------------------------------------------------------------------------------- 1 | 6 | 19 | 29 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/editOwner.html: -------------------------------------------------------------------------------- 1 | 6 | 12 | 20 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/editToken.html: -------------------------------------------------------------------------------- 1 | 6 |
7 | 26 | 36 |
37 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/editWallet.html: -------------------------------------------------------------------------------- 1 | 6 |
7 | 17 | 25 |
26 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/executeMultisigTransactionOffline.html: -------------------------------------------------------------------------------- 1 | 6 |
7 | 13 | 19 |
20 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/executeTransaction.html: -------------------------------------------------------------------------------- 1 | 6 | 14 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/exportWalletConfiguration.html: -------------------------------------------------------------------------------- 1 | 6 | 16 | 24 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/getNonce.html: -------------------------------------------------------------------------------- 1 | 6 |
7 | 13 | 21 |
22 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/importLightWalletAccount.html: -------------------------------------------------------------------------------- 1 | 6 |
7 | 47 | 64 |
65 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/importWalletConfiguration.html: -------------------------------------------------------------------------------- 1 | 6 | 11 | 19 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/ledgerHelp.html: -------------------------------------------------------------------------------- 1 | 8 | 50 | 55 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/lightWalletPassword.html: -------------------------------------------------------------------------------- 1 | 6 | 20 | 30 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/removeAddressFromBook.html: -------------------------------------------------------------------------------- 1 | 6 | 16 | 24 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/removeLightWalletAccount.html: -------------------------------------------------------------------------------- 1 | 6 | 23 | 33 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/removeOwner.html: -------------------------------------------------------------------------------- 1 | 6 | 16 | 24 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/removeToken.html: -------------------------------------------------------------------------------- 1 | 6 | 24 | 32 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/removeWallet.html: -------------------------------------------------------------------------------- 1 | 6 |
7 | 21 | 29 |
30 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/removeWalletOwnerOffline.html: -------------------------------------------------------------------------------- 1 | 6 | 12 | 20 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/replaceOwner.html: -------------------------------------------------------------------------------- 1 | 6 |
7 | 21 | 31 |
32 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/replaceOwnerOffline.html: -------------------------------------------------------------------------------- 1 | 6 |
7 | 17 | 25 |
26 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/resetSettings.html: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | 18 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/restoreSeed.html: -------------------------------------------------------------------------------- 1 | 6 | 18 | 28 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/restoreWallet.html: -------------------------------------------------------------------------------- 1 | 6 |
7 | 17 | 25 |
26 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/retrieveNonce.html: -------------------------------------------------------------------------------- 1 | 6 | 12 | 20 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/revokeConfirmation.html: -------------------------------------------------------------------------------- 1 | 6 | 14 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/revokeMultisigConfirmationOffline.html: -------------------------------------------------------------------------------- 1 | 6 |
7 | 13 | 19 |
20 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/safeMigration.html: -------------------------------------------------------------------------------- 1 | 6 | 56 | 62 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/selectAddressFromBook.html: -------------------------------------------------------------------------------- 1 | 6 | 42 | 47 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/selectNewWallet.html: -------------------------------------------------------------------------------- 1 | 6 | 20 | 28 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/sendTransaction.html: -------------------------------------------------------------------------------- 1 | 6 |
7 | 47 | 65 |
66 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/setLimit.html: -------------------------------------------------------------------------------- 1 | 6 |
7 | 13 | 24 |
25 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/showNonce.html: -------------------------------------------------------------------------------- 1 | 6 | 12 | 20 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/showSeed.html: -------------------------------------------------------------------------------- 1 | 6 | 11 | 19 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/showSignedTransaction.html: -------------------------------------------------------------------------------- 1 | 6 | 12 | 20 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/signMultisigConfirmationRevokeOffline.html: -------------------------------------------------------------------------------- 1 | 6 |
7 | 19 | 25 |
26 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/signOffline.html: -------------------------------------------------------------------------------- 1 | 6 |
7 | 13 | 19 |
20 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/signedTransaction.html: -------------------------------------------------------------------------------- 1 | 6 | 12 | 20 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/simulatedTransaction.html: -------------------------------------------------------------------------------- 1 | 6 | 12 | 20 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/spinner.html: -------------------------------------------------------------------------------- 1 | 6 | 22 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/updateRequired.html: -------------------------------------------------------------------------------- 1 | 6 |
7 | 13 | 24 |
25 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/walletTransaction.html: -------------------------------------------------------------------------------- 1 | 6 |
7 | 48 | 61 |
62 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/web3Wallets.html: -------------------------------------------------------------------------------- 1 | 8 | 22 | 27 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/withdrawLimit.html: -------------------------------------------------------------------------------- 1 | 6 |
7 | 17 | 30 |
31 | -------------------------------------------------------------------------------- /dapp/src/partials/modals/withdrawToken.html: -------------------------------------------------------------------------------- 1 | 6 |
7 | 17 | 28 |
29 | -------------------------------------------------------------------------------- /dapp/src/partials/multisigData.html: -------------------------------------------------------------------------------- 1 |
2 | {{transactions[txId].data|limitTo:1000}} 3 | ... 4 |
5 | -------------------------------------------------------------------------------- /dapp/src/partials/paramValueData.html: -------------------------------------------------------------------------------- 1 |
2 | {{param.value}} 3 |
4 | -------------------------------------------------------------------------------- /dapp/src/partials/settings.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

4 | Settings 5 |

6 |
7 |
8 |
9 |
10 |
11 | 12 | 17 | 18 |
19 |
20 | 21 | 24 | 25 |
26 |
27 |
28 |
29 | 30 | 31 |
32 |
33 | 34 | 35 |
36 |
37 |
38 |
39 | 40 | 46 | 47 |
48 |
49 |
50 | 58 |
59 |
60 | 61 |
62 |
63 |

64 | About 65 |

66 |
67 |
68 |
69 |
70 | App Version {{ appVersion }} 71 |
72 |
73 |
74 |
75 | -------------------------------------------------------------------------------- /dapp/src/partials/txData.html: -------------------------------------------------------------------------------- 1 |
2 | {{transaction.info.input|limitTo:1000}} 3 | ... 4 |
5 | -------------------------------------------------------------------------------- /dapp/src/routes.js: -------------------------------------------------------------------------------- 1 | ( 2 | function () { 3 | angular 4 | .module('multiSigWeb') 5 | .config(function($routeProvider, NotificationProvider){ 6 | $routeProvider 7 | .when("/wallets", { 8 | controller: 'walletCtrl', 9 | templateUrl: 'partials/wallets.html' 10 | }) 11 | .when("/transactions", { 12 | controller: 'transactionCtrl', 13 | templateUrl: 'partials/transactions.html' 14 | }) 15 | .when("/wallet/:address", { 16 | controller: 'walletDetailCtrl', 17 | templateUrl: 'partials/wallet.html' 18 | }) 19 | .when("/settings", { 20 | controller: 'settingsCtrl', 21 | templateUrl: 'partials/settings.html' 22 | }) 23 | .when("/signup", { 24 | controller: 'notificationsSignupConfirmationCtrl', 25 | templateUrl: 'partials/wallets.html' 26 | }) 27 | .when("/accounts", { 28 | // Only for Electron 29 | controller: 'accountCtrl', 30 | templateUrl: 'partials/accounts.html' 31 | }) 32 | .when("/address-book", { 33 | controller: 'addressBookCtrl', 34 | templateUrl: 'partials/addressBook.html' 35 | }) 36 | .when("/404", { 37 | templateUrl: 'partials/404.html' 38 | }) 39 | .otherwise({ 40 | redirectTo: '/wallets' 41 | }); 42 | 43 | NotificationProvider.setOptions({ 44 | delay: 3000, 45 | horizontalSpacing: 60 46 | }); 47 | }); 48 | } 49 | )(); 50 | -------------------------------------------------------------------------------- /dapp/src/services/ABI.js: -------------------------------------------------------------------------------- 1 | ( 2 | function () { 3 | angular 4 | .module("multiSigWeb") 5 | .service("ABI", function () { 6 | var factory = { 7 | saved: JSON.parse(localStorage.getItem("abis")) || {}, 8 | }; 9 | 10 | factory.get = function () { 11 | return JSON.parse(localStorage.getItem("abis")) || {}; 12 | }; 13 | 14 | factory.update = function (abi, to, name) { 15 | abiDecoder.addABI(abi); 16 | factory.saved[to] = { abi: abi, name: name}; 17 | 18 | localStorage.setItem("abis", JSON.stringify(factory.saved)); 19 | }; 20 | 21 | factory.remove = function (to) { 22 | abiDecoder.removeABI(factory.saved[to].abi); 23 | delete factory.saved[to]; 24 | localStorage.setItem("abis", JSON.stringify(factory.saved)); 25 | }; 26 | 27 | factory.decode = function (data) { 28 | var decoded = abiDecoder.decodeMethod(data); 29 | if (!decoded) { 30 | if (data.length > 20) { 31 | return { 32 | title: data.slice(0, 20) + "...", 33 | notDecoded: true 34 | }; 35 | } 36 | else { 37 | return { 38 | title: data.slice(0, 20), 39 | notDecoded: true 40 | }; 41 | } 42 | } 43 | else { 44 | return { 45 | title: decoded.name, 46 | params: decoded.params 47 | }; 48 | } 49 | }; 50 | 51 | return factory; 52 | }); 53 | } 54 | )(); 55 | -------------------------------------------------------------------------------- /dapp/src/services/CommunicationBus.js: -------------------------------------------------------------------------------- 1 | ( 2 | function () { 3 | angular 4 | .module("multiSigWeb") 5 | .service("CommunicationBus", function ($interval) { 6 | var factory = { 7 | functions: {}, 8 | intervals: {} 9 | }; 10 | 11 | /** 12 | * Add a function to the list of available functions. 13 | * @param fn {Function} 14 | * @param index {String} - The name of the function normally 15 | */ 16 | factory.addFn = function (fn, index) { 17 | factory.functions[index] = fn; 18 | return index; 19 | }; 20 | 21 | /** 22 | * Set the Angular $interval for a function at a given index 23 | * @param index - Function identifier 24 | * @param millis - Timeout interval in milliseconds 25 | */ 26 | factory.startInterval = function (index, millis) { 27 | if (!factory.intervals[index]) { 28 | factory.intervals[index] = $interval(factory.functions[index], millis); 29 | } 30 | }; 31 | 32 | /** 33 | * Stop an existing $interval 34 | * @param index - Function identifier 35 | */ 36 | factory.stopInterval = function (index) { 37 | if (factory.intervals[index]) { 38 | $interval.cancel(factory.intervals[index]); 39 | delete factory.intervals[index]; 40 | } 41 | }; 42 | 43 | /** 44 | * Retrieve a function 45 | * @param index - Function identifier 46 | */ 47 | factory.getFn = function (index) { 48 | return factory.functions[index]; 49 | }; 50 | 51 | return factory; 52 | }); 53 | } 54 | )(); 55 | -------------------------------------------------------------------------------- /dapp/src/services/Config.js: -------------------------------------------------------------------------------- 1 | ( 2 | function () { 3 | angular 4 | .module("multiSigWeb") 5 | .service("Config", function () { 6 | var factory = { 7 | updates: 0 8 | }; 9 | 10 | factory.getUserConfiguration = function () { 11 | return Object.assign({}, txDefault, JSON.parse(localStorage.getItem("userConfig"))); 12 | }; 13 | 14 | factory.getConfiguration = function (key) { 15 | return JSON.parse(localStorage.getItem(key)); 16 | }; 17 | 18 | factory.setConfiguration = function (key, value) { 19 | localStorage.setItem(key, value); 20 | this.triggerUpdates(); 21 | }; 22 | 23 | factory.removeConfiguration = function (key) { 24 | localStorage.removeItem(key); 25 | this.triggerUpdates(); 26 | }; 27 | 28 | factory.triggerUpdates = function () { 29 | this.updates++; 30 | }; 31 | 32 | return factory; 33 | }); 34 | } 35 | )(); 36 | -------------------------------------------------------------------------------- /dapp/src/services/Connection.js: -------------------------------------------------------------------------------- 1 | ( 2 | function () { 3 | angular 4 | .module('multiSigWeb') 5 | .service('Connection', function ($rootScope, $interval) { 6 | 7 | var factory = {}; 8 | var isConnected = false; 9 | 10 | var setup = function () { 11 | // Call it at startup 12 | factory.checkConnection(); 13 | // Setup interval 14 | $interval(factory.checkConnection, txDefault.connectionChecker.checkInterval); 15 | }; 16 | 17 | function callDigest() { 18 | try{ 19 | $rootScope.$digest(); 20 | }catch(error){} 21 | } 22 | 23 | /** 24 | * Connection lookup against a defined endpoint 25 | * Check config.js for the endpoint configuration 26 | */ 27 | factory.checkConnection = function () { 28 | factory.isConnected = navigator.onLine; // true | false 29 | callDigest(); 30 | }; 31 | 32 | setup(); 33 | 34 | return factory; 35 | }); 36 | } 37 | )(); 38 | -------------------------------------------------------------------------------- /dapp/testrpc.sh: -------------------------------------------------------------------------------- 1 | # npm rebuild leveldown scrypt; 2 | echo "Starting Testrpc..." 3 | ganache-cli -d --port 8545 --account "0xb21e287e6dcb34cf16abb6ce71f7209906c13f763c6415c6b2320eea7688212f, 10000000000000000000000000" --account "0x3ba8150286625233d3154d795527e3cbbc07a135d14392e9485f08d2d555fb3d, 10000000000000000000000000" & 4 | testrpc_pid=$! 5 | sleep 5 6 | 7 | echo "Running Karma tests..." 8 | karma start config.karma.js 9 | 10 | echo "Shutting down TestRpc..." 11 | kill -9 $testrpc_pid 12 | -------------------------------------------------------------------------------- /dapp/tests/globalvars.js: -------------------------------------------------------------------------------- 1 | var isElectron = false; 2 | var ledgerPort = 8080; 3 | -------------------------------------------------------------------------------- /migrations/1_initial_migration.js: -------------------------------------------------------------------------------- 1 | const Migrations = artifacts.require("./Migrations.sol") 2 | 3 | module.exports = deployer => deployer.deploy(Migrations) 4 | -------------------------------------------------------------------------------- /migrations/2_deploy_contracts.js: -------------------------------------------------------------------------------- 1 | const MultisigWalletWithDailyLimit = artifacts.require('MultiSigWalletWithDailyLimit.sol') 2 | const MultisigWalletWithoutDailyLimit = artifacts.require('MultiSigWallet.sol') 3 | const MultisigWalletFactory = artifacts.require('MultiSigWalletWithDailyLimitFactory.sol') 4 | 5 | module.exports = deployer => { 6 | const args = process.argv.slice() 7 | if (process.env.DEPLOY_FACTORY){ 8 | deployer.deploy(MultisigWalletFactory) 9 | console.log("Factory with Daily Limit deployed") 10 | } else if (args.length < 5) { 11 | console.error("Multisig with daily limit requires to pass owner " + 12 | "list, required confirmations and daily limit") 13 | } else if (args.length < 6) { 14 | deployer.deploy(MultisigWalletWithoutDailyLimit, args[3].split(","), args[4]) 15 | console.log("Wallet deployed") 16 | } else { 17 | deployer.deploy(MultisigWalletWithDailyLimit, args[3].split(","), args[4], args[5]) 18 | console.log("Wallet with Daily Limit deployed") 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "multisig-wallet-gnosis", 3 | "version": "1.6.0", 4 | "description": "Ethereum MultiSignature Wallet. Main module, for installing all dependencies", 5 | "scripts": { 6 | "test-dapp": "cd dapp && npm test", 7 | "test": "sh truffle_test_runner.sh", 8 | "install": "cd dapp && npm install", 9 | "start": "cd dapp && npm start" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "git+https://github.com/gnosis/MultiSigWallet.git" 14 | }, 15 | "author": "Gnosis (https://gnosis.pm/)", 16 | "license": "ISC", 17 | "bugs": { 18 | "url": "https://github.com/gnosis/MultiSigWallet/issues" 19 | }, 20 | "homepage": "https://github.com/gnosis/MultiSigWallet#readme", 21 | "eslintConfig": { 22 | "env": { 23 | "browser": true, 24 | "node": false 25 | } 26 | }, 27 | "dependencies": { 28 | "child_process": "1.0.2", 29 | "ganache-cli": "6.1.8", 30 | "solc": "0.5.8", 31 | "truffle": "3.4.11" 32 | }, 33 | "devDependencies": { 34 | "babel-eslint": "7.2.3", 35 | "eslint": "4.19.1", 36 | "eslint-config-airbnb": "15.1.0", 37 | "eslint-plugin-import": "2.12.0", 38 | "eslint-plugin-jsx-a11y": "5.1.1", 39 | "eslint-plugin-react": "7.8.2", 40 | "growl": "^1.10.5", 41 | "run-with-testrpc": "0.2.1" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /prepare_deploy_linux.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ENABLED_BRANCH="develop" 4 | 5 | echo "=== PREPARE DEPLOY ===" 6 | 7 | # Check dist is for desktop devices and the commit was towards 8 | if [[ ${DIST} == "desktop" ]] && [[ ${TRAVIS_BRANCH} == ${ENABLED_BRANCH} || ${TRAVIS_BRANCH} == ${TRAVIS_TAG} ]] && [[ ${TRAVIS_OS_NAME} == "linux" ]]; then 9 | cd dapp/ && mkdir dist && npm run build-libs-electron && npm run build-linux; 10 | 11 | if [[ ${TRAVIS_BRANCH} == ${TRAVIS_TAG} ]]; then 12 | # it is a TAG 13 | mv multisigweb*.deb multisigweb-$TRAVIS_TAG.deb; 14 | fi 15 | fi 16 | 17 | if [[ ${DIST} == "desktop" ]] && [[ ${TRAVIS_BRANCH} == ${ENABLED_BRANCH} || ${TRAVIS_BRANCH} == ${TRAVIS_TAG} ]] && [[ ${TRAVIS_OS_NAME} == "osx" ]]; then 18 | cd dapp/ && mkdir dist && npm run build-libs-electron && npm run build-osx; 19 | 20 | if [[ ${TRAVIS_BRANCH} == ${TRAVIS_TAG} ]]; then 21 | # it is a TAG 22 | mv multisigweb*-mac.zip multisigweb-$TRAVIS_TAG-mac.zip; 23 | mv multisigweb*.dmg multisigweb-$TRAVIS_TAG.dmg; 24 | fi 25 | fi 26 | 27 | if [[ ${DIST} == "web" ]] && [[ ${TRAVIS_OS_NAME} == "linux" ]]; then 28 | # Copy package.json into the web project, it's required to load the APP version on the UI 29 | cd dapp/ && npm run build-libs-web && npm run copy-package; 30 | fi 31 | 32 | echo "=== PREPARE DEPLOY DONE ===" 33 | -------------------------------------------------------------------------------- /prepare_deploy_win.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "=== PREPARE DEPLOY ===" 4 | 5 | if [[ ${APPVEYOR_REPO_TAG} == true ]]; then 6 | # it is a TAG 7 | # rename .exe file 8 | echo "Renaming multisigweb.*.exe to multisigweb-$APPVEYOR_REPO_TAG.exe" 9 | mv dapp/dist/multisigweb*.exe dapp/dist/multisigweb-$APPVEYOR_REPO_TAG.exe 10 | fi 11 | 12 | echo "=== PREPARE DEPLOY DONE ===" 13 | -------------------------------------------------------------------------------- /test/javascript/testExecutionAfterRequirementsChanged.js: -------------------------------------------------------------------------------- 1 | const MultiSigWallet = artifacts.require('MultiSigWallet') 2 | const web3 = MultiSigWallet.web3 3 | const deployMultisig = (owners, confirmations) => { 4 | return MultiSigWallet.new(owners, confirmations) 5 | } 6 | 7 | const utils = require('./utils') 8 | const ONE_DAY = 24*3600 9 | 10 | contract('MultiSigWallet', (accounts) => { 11 | let multisigInstance 12 | const requiredConfirmations = 2 13 | 14 | beforeEach(async () => { 15 | multisigInstance = await deployMultisig([accounts[0], accounts[1], accounts[2]], requiredConfirmations) 16 | assert.ok(multisigInstance) 17 | }) 18 | 19 | it('test execution after requirements changed', async () => { 20 | const deposit = 1000 21 | 22 | // Send money to wallet contract 23 | await new Promise((resolve, reject) => web3.eth.sendTransaction({to: multisigInstance.address, value: deposit, from: accounts[0]}, e => (e ? reject(e) : resolve()))) 24 | const balance = await utils.balanceOf(web3, multisigInstance.address) 25 | assert.equal(balance.valueOf(), deposit) 26 | 27 | // Add owner wa_4 28 | const addOwnerData = multisigInstance.contract.addOwner.getData(accounts[3]) 29 | const transactionId = utils.getParamFromTxEvent( 30 | await multisigInstance.submitTransaction(multisigInstance.address, 0, addOwnerData, {from: accounts[0]}), 31 | 'transactionId', 32 | null, 33 | 'Submission' 34 | ) 35 | 36 | // There is one pending transaction 37 | const excludePending = false 38 | const includePending = true 39 | const excludeExecuted = false 40 | const includeExecuted = true 41 | assert.deepEqual( 42 | await multisigInstance.getTransactionIds(0, 1, includePending, excludeExecuted), 43 | [transactionId] 44 | ) 45 | 46 | // Update required to 1 47 | const newRequired = 1 48 | const updateRequirementData = multisigInstance.contract.changeRequirement.getData(newRequired) 49 | 50 | // Submit successfully 51 | const transactionId2 = utils.getParamFromTxEvent( 52 | await multisigInstance.submitTransaction(multisigInstance.address, 0, updateRequirementData, {from: accounts[0]}), 53 | 'transactionId', 54 | null, 55 | 'Submission' 56 | ) 57 | 58 | assert.deepEqual( 59 | await multisigInstance.getTransactionIds(0, 2, includePending, excludeExecuted), 60 | [transactionId, transactionId2] 61 | ) 62 | 63 | // Confirm change requirement transaction 64 | await multisigInstance.confirmTransaction(transactionId2, {from: accounts[1]}) 65 | assert.equal((await multisigInstance.required()).toNumber(), newRequired) 66 | assert.deepEqual( 67 | await multisigInstance.getTransactionIds(0, 1, excludePending, includeExecuted), 68 | [transactionId2] 69 | ) 70 | 71 | // Execution fails, because sender is not wallet owner 72 | utils.assertThrowsAsynchronously( 73 | () => multisigInstance.executeTransaction(transactionId, {from: accounts[9]}) 74 | ) 75 | 76 | // Because the # required confirmations changed to 1, the addOwner transaction can be executed now 77 | await multisigInstance.executeTransaction(transactionId, {from: accounts[0]}) 78 | assert.deepEqual( 79 | await multisigInstance.getTransactionIds(0, 2, excludePending, includeExecuted), 80 | [transactionId, transactionId2] 81 | ) 82 | }) 83 | }) -------------------------------------------------------------------------------- /test/javascript/testExternalCallsWithDailyLimit.js: -------------------------------------------------------------------------------- 1 | const MultiSigWalletWithDailyLimit = artifacts.require('MultiSigWalletWithDailyLimit') 2 | const web3 = MultiSigWalletWithDailyLimit.web3 3 | const TestToken = artifacts.require('TestToken') 4 | const TestCalls = artifacts.require('TestCalls') 5 | 6 | const deployToken = () => { 7 | return TestToken.new() 8 | } 9 | const deployCalls = () => { 10 | return TestCalls.new() 11 | } 12 | 13 | const deployMultisig = (owners, confirmations, limit) => { 14 | return MultiSigWalletWithDailyLimit.new(owners, confirmations, limit) 15 | } 16 | 17 | const utils = require('./utils') 18 | const ONE_DAY = 24*3600 19 | 20 | contract('MultiSigWalletWithDailyLimit', (accounts) => { 21 | let multisigInstance 22 | const dailyLimit = 3000 23 | const requiredConfirmations = 2 24 | 25 | beforeEach(async () => { 26 | multisigInstance = await deployMultisig([accounts[0], accounts[1]], requiredConfirmations, dailyLimit) 27 | assert.ok(multisigInstance) 28 | tokenInstance = await deployToken() 29 | assert.ok(tokenInstance) 30 | callsInstance = await deployCalls() 31 | assert.ok(callsInstance) 32 | 33 | const deposit = 10000000 34 | 35 | // Send money to wallet contract 36 | await new Promise((resolve, reject) => web3.eth.sendTransaction({to: multisigInstance.address, value: deposit, from: accounts[0]}, e => (e ? reject(e) : resolve()))) 37 | const balance = await utils.balanceOf(web3, multisigInstance.address) 38 | assert.equal(balance.valueOf(), deposit) 39 | }) 40 | 41 | it('transferWithPayloadSizeCheck', async () => { 42 | // Issue tokens to the multisig address 43 | const issueResult = await tokenInstance.issueTokens(multisigInstance.address, 1000000, {from: accounts[0]}) 44 | assert.ok(issueResult) 45 | // Encode transfer call for the multisig 46 | const transferEncoded = tokenInstance.contract.transfer.getData(accounts[1], 1000000) 47 | const transactionId = utils.getParamFromTxEvent( 48 | await multisigInstance.submitTransaction(tokenInstance.address, 0, transferEncoded, {from: accounts[0]}), 49 | 'transactionId', null, 'Submission') 50 | 51 | const executedTransactionId = utils.getParamFromTxEvent( 52 | await multisigInstance.confirmTransaction(transactionId, {from: accounts[1]}), 53 | 'transactionId', null, 'Execution') 54 | // Check that transaction has been executed 55 | assert.ok(transactionId.equals(executedTransactionId)) 56 | // Check that the transfer has actually occured 57 | assert.equal( 58 | 1000000, 59 | await tokenInstance.balanceOf(accounts[1]) 60 | ) 61 | }) 62 | }) 63 | -------------------------------------------------------------------------------- /test/javascript/testMultiSigWalletWithDailyLimitFactory.js: -------------------------------------------------------------------------------- 1 | const MultiSigWalletWithDailyLimit = artifacts.require('MultiSigWalletWithDailyLimit') 2 | const MultiSigWalletWithDailyLimitFactory = artifacts.require('MultiSigWalletWithDailyLimitFactory') 3 | const web3 = MultiSigWalletWithDailyLimitFactory.web3 4 | 5 | const utils = require('./utils') 6 | 7 | contract('MultiSigWalletWithDailyLimitFactory', (accounts) => { 8 | let factoryInstance 9 | const dailyLimit = 3000 10 | const requiredConfirmations = 2 11 | 12 | beforeEach(async () => { 13 | // [accounts[0], accounts[1]], requiredConfirmations, dailyLimit 14 | factoryInstance = await MultiSigWalletWithDailyLimitFactory.new() 15 | assert.ok(factoryInstance) 16 | }) 17 | 18 | it('Multisig Factory', async () => { 19 | // Create factory 20 | const tx = await factoryInstance.create([accounts[0], accounts[1]], requiredConfirmations, dailyLimit) 21 | const walletAddress = utils.getParamFromTxEvent(tx, 'instantiation', null, 'ContractInstantiation') 22 | 23 | const walletCount = await factoryInstance.getInstantiationCount(accounts[0]) 24 | const multisigWalletAddressConfirmation = await factoryInstance.instantiations(accounts[0], walletCount.sub(1).toNumber()) 25 | assert.equal(walletAddress, multisigWalletAddressConfirmation) 26 | assert.ok(factoryInstance.isInstantiation(walletAddress)) 27 | 28 | // Send money to wallet contract 29 | const multisigInstance = MultiSigWalletWithDailyLimit.at(walletAddress) 30 | const deposit = 10000 31 | await new Promise((resolve, reject) => web3.eth.sendTransaction({to: walletAddress, value: deposit, from: accounts[0]}, e => (e ? reject(e) : resolve()))) 32 | const balance = await utils.balanceOf(web3, walletAddress) 33 | assert.equal(balance.valueOf(), deposit) 34 | assert.equal(dailyLimit, await multisigInstance.dailyLimit()) 35 | assert.equal(dailyLimit, await multisigInstance.calcMaxWithdraw()) 36 | 37 | // Update daily limit 38 | const dailyLimitUpdated = 2000 39 | const dailyLimitEncoded = multisigInstance.contract.changeDailyLimit.getData(dailyLimitUpdated) 40 | const transactionId = utils.getParamFromTxEvent( 41 | await multisigInstance.submitTransaction(multisigInstance.address, 0, dailyLimitEncoded, {from: accounts[0]}), 42 | 'transactionId', null, 'Submission' 43 | ) 44 | 45 | await multisigInstance.confirmTransaction(transactionId, {from: accounts[1]}) 46 | assert.equal(dailyLimitUpdated, (await multisigInstance.dailyLimit()).toNumber()) 47 | assert.equal(dailyLimitUpdated, (await multisigInstance.calcMaxWithdraw()).toNumber()) 48 | }) 49 | }) -------------------------------------------------------------------------------- /test/javascript/utils.js: -------------------------------------------------------------------------------- 1 | function getParamFromTxEvent(transaction, paramName, contractFactory, eventName) { 2 | assert.isObject(transaction) 3 | let logs = transaction.logs 4 | if(eventName != null) { 5 | logs = logs.filter((l) => l.event === eventName) 6 | } 7 | assert.equal(logs.length, 1, 'too many logs found!') 8 | let param = logs[0].args[paramName] 9 | if(contractFactory != null) { 10 | let contract = contractFactory.at(param) 11 | assert.isObject(contract, `getting ${paramName} failed for ${param}`) 12 | return contract 13 | } else { 14 | return param 15 | } 16 | } 17 | 18 | function mineBlock(web3, reject, resolve) { 19 | web3.currentProvider.sendAsync({ 20 | method: "evm_mine", 21 | jsonrpc: "2.0", 22 | id: new Date().getTime() 23 | }, (e) => (e ? reject(e) : resolve())) 24 | } 25 | 26 | function increaseTimestamp(web3, increase) { 27 | return new Promise((resolve, reject) => { 28 | web3.currentProvider.sendAsync({ 29 | method: "evm_increaseTime", 30 | params: [increase], 31 | jsonrpc: "2.0", 32 | id: new Date().getTime() 33 | }, (e) => (e ? reject(e) : mineBlock(web3, reject, resolve))) 34 | }) 35 | } 36 | 37 | function balanceOf(web3, account) { 38 | return new Promise((resolve, reject) => web3.eth.getBalance(account, (e, balance) => (e ? reject(e) : resolve(balance)))) 39 | } 40 | 41 | async function assertThrowsAsynchronously(test, error) { 42 | try { 43 | await test(); 44 | } catch(e) { 45 | if (!error || e instanceof error) 46 | return "everything is fine"; 47 | } 48 | throw new Error("Missing rejection" + (error ? " with "+error.name : "")); 49 | } 50 | 51 | Object.assign(exports, { 52 | getParamFromTxEvent, 53 | increaseTimestamp, 54 | balanceOf, 55 | assertThrowsAsynchronously, 56 | }) -------------------------------------------------------------------------------- /truffle.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | networks: { 3 | development: { 4 | host: "localhost", 5 | port: 8545, 6 | network_id: "*", // Match any network id 7 | gas: 4000000, 8 | gasPrice: 10000000000, // 10 gwei 9 | } 10 | } 11 | }; 12 | -------------------------------------------------------------------------------- /truffle_test_runner.sh: -------------------------------------------------------------------------------- 1 | # Tests have to be executed separately due to https://github.com/ethereumjs/testrpc/issues/346 2 | truffle compile 3 | run-with-testrpc -d 'truffle test test/javascript/testMultiSigWalletWithDailyLimit.js' 4 | run-with-testrpc -d 'truffle test test/javascript/testMultiSigWalletWithDailyLimitFactory.js' 5 | run-with-testrpc -d 'truffle test test/javascript/testExecutionAfterRequirementsChanged.js' 6 | run-with-testrpc -d 'truffle test test/javascript/testExternalCalls.js' 7 | run-with-testrpc -d 'truffle test test/javascript/testExternalCallsWithDailyLimit.js' 8 | --------------------------------------------------------------------------------