secretmultisigrecovery.spec.js
1 const { SecretMultisig } = require('../utils/secretMultisig.js'); 2 const EmbarkJS = require('Embark/EmbarkJS'); 3 const MultisigRecovery = require('Embark/contracts/MultisigRecovery') 4 5 let accounts; 6 let ms; 7 8 config({ 9 blockchain: { 10 accounts: [ 11 { 12 mnemonic: "candy maple cake sugar pudding cream honey rich smooth crumble sweet treat", 13 addressIndex: "0", 14 numAddresses: "102", 15 balance: "5 ether" 16 } 17 ] 18 }, 19 namesystem: { 20 enabled: true, 21 register: { 22 rootDomain: "eth", 23 subdomains: { 24 'test': '0x627306090abaB3A6e1400e9345bC60c78a8BEf57' 25 } 26 } 27 }, 28 contracts: { 29 deploy: { 30 "MultisigRecovery": { 31 args: [ "$ENSRegistry" ] 32 } 33 } 34 } 35 }, (_err, web3_accounts) => { 36 accounts = web3_accounts; 37 ms = new SecretMultisig(accounts[0], "0x0011223344556677889900112233445566778899001122334455667788990011", accounts.slice(1)); 38 }); 39 40 41 contract('SecretMultisigRecovery', function () { 42 43 describe('setup', function () { 44 it('first time activates immediately', async function () { 45 46 }); 47 48 it('pending setup', async function () { 49 50 }); 51 52 }); 53 54 describe('activate', function () { 55 it('does not activate during delay time', async function () { 56 57 }); 58 59 it('activates a pending setup', async function () { 60 61 }); 62 }); 63 64 describe('cancelSetup', function () { 65 it('cancels when not reached', async function () { 66 67 }); 68 69 it('does not cancel when reached', async function () { 70 71 }); 72 }); 73 74 describe('approve', function () { 75 it('using address', async function () { 76 77 }); 78 it('using ENS', async function () { 79 let address = await EmbarkJS.Names.resolve('test.eth') 80 console.log('ENS address', address); 81 }); 82 }); 83 84 describe('approvePreSigned', function () { 85 it('using address', async function () { 86 87 }); 88 it('using ENS', async function () { 89 let address = await EmbarkJS.Names.resolve('test.eth') 90 console.log('ENS address', address); 91 }); 92 }); 93 94 describe('execute', function () { 95 it('executes approved', async function () { 96 97 }); 98 99 it('cant execute with low threshold', async function () { 100 101 }); 102 103 it('cant execute with different calldest', async function () { 104 105 }); 106 107 it('cant execute with different calldata', async function () { 108 109 }); 110 111 }); 112 113 });