A single transaction multi signature contract based on: Gnosis Multisig. This version includes the modifier:
modifier onlyOneTransaction() {
require(transactionCount == 0);
_;
}
which allows for only one transaction. After that the contract is rendered unusable.
Useful for simple transactions in which parties part ways after execution.
$ truffle install single-tx-multisig@2.2.1
Clone repo:
git clone git@github.com:NFhbar/SingleTxMultisig.git
Create a new .env
file in root directory and add your private key:
RINKEBY_PRIVATE_KEY="MyPrivateKeyHere..."
If you don't have a private key, you can use one provided by Ganache (for development only!):
RINKEBY_PRIVATE_KEY="c87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3"
then:
npm install
To enter Truffle:
truffle develop
To compile:
truffle(develop)> compile
To migrate:
truffle(develop)> migrate
To test:
truffle(develop)> test
or
npm run test
To run Solidity Coverage reports:
$ npm run coverage
Keep in mind solidity-coverage now expects a globally installed truffle. Coverage report available here.
Docker image here. Dockerfile here.
When migrating
Error: Attempting to run transaction which calls a contract function, but recipient address 0x8cdaf0cd259887258bc13a92c0a6da92698644c0 is not a contract address
Solution: delete contents of /build/contracts and recompile.
When testing in truffle develop
Error: sender doesn't have enough funds to send tx.
Solution: restart truffle develop.
Notes: truffle does not reset accounts balance on multiple runs.
After running solidity-coverage, testrpc remains a ghost process.
Solution: kill it with:
$ npm run stop
and run coverage again:
$ npm run coverage