Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gmussi/solidity-claimable
Allows the owner of a smart contract to specify who can claim ownership of the contract after a certain amount of time
https://github.com/gmussi/solidity-claimable
Last synced: about 1 month ago
JSON representation
Allows the owner of a smart contract to specify who can claim ownership of the contract after a certain amount of time
- Host: GitHub
- URL: https://github.com/gmussi/solidity-claimable
- Owner: gmussi
- License: mit
- Created: 2021-05-13T11:20:22.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-07-13T08:01:51.000Z (over 3 years ago)
- Last Synced: 2024-11-20T03:54:21.786Z (about 2 months ago)
- Language: HTML
- Size: 6.83 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Claimable contracts for Solidity
Claimable contracts extend the concept of Ownable contracts and allow the owner of the contract to specify one or more addresses that can claim ownership of the contract after a certain time.
The owner can keep extending ownership by periodically setting a new expiration date. Should the owner lose keys, one of the specified claimers can then claim ownership and become the new owner.
## Usage
To use this package, copy `Ownable.sol` and `Claimable.sol` into your project, and make it extend Claimable:
```Solidity
import "./Claimable.sol";
contract MyContract is Claimable {}
```## See it in action (Frontend Console)
To see this project in action, you need to install a few dependencies:
```bash
npm install -g truffle
npm install -g express
npm install -g ganache-cliganache -p 7545 # if you chose another port, modify truffle-config.js
truffle migrate # (copy address of the contract for the frontend)
node gui/run.js # will start a webserver on port 3000
```## License
This code is provided under the [MIT License](https://github.com/gmussi/solidity-claimable/blob/master/LICENSE)