|
7 months ago | |
---|---|---|
contracts | 7 months ago | |
lib | 7 months ago | |
migrations | 7 months ago | |
scripts | 7 months ago | |
test | 7 months ago | |
.babelrc | 7 months ago | |
.editorconfig | 7 months ago | |
.eslintignore | 7 months ago | |
.eslintrc | 7 months ago | |
.gitignore | 7 months ago | |
.jshintrc | 7 months ago | |
.solcover.js | 7 months ago | |
.soliumignore | 7 months ago | |
.soliumrc.json | 7 months ago | |
.travis.yml | 7 months ago | |
README.md | 7 months ago | |
package-lock.json | 7 months ago | |
package.json | 7 months ago | |
truffle.js | 7 months ago |
ERC20 token extension allowing recovery it after transfering to wrong address
npm install -g truffle
npm install -g ganache-cli
npm install
scripts/rpc.sh
npm test
On macOS you also need to install watchman: brew install watchman
Just inherit your token from TypoToken
and pass argument of possible typos in destination address:
contract MyToken is StandardToken, TypoToken(3) {
...
}
Or:
contract MyToken is StandardToken, TypoToken {
...
constructor() public TypoToken(3) {
...
}
...
}
Or:
contract MyToken is StandardToken, TypoToken {
...
constructor(uint _maxAllowedTypos) public TypoToken(_maxAllowedTypos) {
...
}
...
}