1.1.0 • Published 5 years ago
@hyperdivision/eth-multisig-wallet v1.1.0
eth-multisig-wallet
Ethereum Multisig Wallet
Usage
const keygen = require('./lib/keygen')
const quorum = require('./lib/quorum-calc')
const signCall = require('./lib/wallet-sign')
const keypair = keygen()
const keypair2 = keygen()
const instance = await Wallet.new([keypair.address], quorum(0.5), quorum(0.5), quorum(0.5), quorum(0.5))
assert(await instance.isOwner.call(keypair.address) === true)
assert(await instance.isOwner.call(keypair2.address) === false)
const res = await instance.replaceOwner([
signCall(
0, // seq,
instance.address,
keypair,
'replaceOwner',
['address', 'address'],
[keypair.address, keypair2.address]
)
], keypair.address, keypair2.address)
assert((await instance.seq.call()).toNumber() === 1)
assert(await instance.isOwner.call(keypair.address) === false)
assert(await instance.isOwner.call(keypair2.address) === true)