This is the main Connectivity Token's smart contract development repository. Copyright (C) 2023 Marco Jardim
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Our vision is to provide reliable and affordable internet connectivity to schools in hard-to-reach areas, enabling children and their families to access education and technology, and empowering them to improve their lives.
Our mission is to leverage innovative technologies, partnerships, and incentives to ensure that schools in remote areas have access to fast and reliable internet connectivity. We aim to promote transparency, trust, and accountability in the delivery of these services, and to foster a sense of ownership and engagement among all stakeholders.
We are committed to working closely with the local communities in which we operate to understand their needs and to ensure that our services are tailored to meet their specific requirements. We will engage in open and transparent communication with all stakeholders, including schools, ISPs, government agencies, and incentive providers, to build trust, foster collaboration, and maximize the impact of our project.
This project will adopt the Affero General Public License version 3 (AGPLv3) as its primary open-source license. This decision is based on the project's commitment to fostering collaboration, promoting transparency, and ensuring that any modifications or derivative works contribute back to the open-source community. By using AGPLv3, the project ensures that users can freely access, modify, and distribute the software while also maintaining the obligation to release their modifications or derivative works under the same license.
In addition to the AGPLv3, the project may consider offering a dual licensing model, providing users the option to choose between the open-source AGPLv3 license and a commercial license. This approach can cater to those who require more flexibility, such as the ability to use the software in proprietary projects or access to premium support.
By adopting the AGPLv3 and potentially implementing a dual licensing model, the School Connectivity Initiative aims to create a sustainable and collaborative ecosystem that encourages the sharing of knowledge, resources, and expertise while also allowing for diverse monetization opportunities.
TBD
We are committed to fostering a welcoming and inclusive community. Please read our Code of Conduct for more information.
- ERC20 compliant
- Burnable tokens
- Snapshots
- Pausable
- Permit functionality
- Access control
- OpenZeppelin Contracts: a library of secure and tested smart contracts for the Ethereum network.
- Hardhat: a development environment for Ethereum smart contracts.
git clone https://github.com/investtools/ivttoken.gitnpm installcp .env.example .env # (linux)
copy .env.example .env # (windows)npx hardhat compilenpx hardhat deploynpx hardhat nodenpx hardhat console --network localhostnpx hardhat deploy --network polygonMumbainpx hardhat testnpx hardhat typechainnpx hardhat clean- The
deployments/localhostdirectory is included in the git repository, so that the contract addresses remain constant. Otherwise, the frontend'sconstants.tsfile would need to be updated. - Avoid committing changes to the
deployments/localhostfiles (unless you are sure), as this will alter the state of the hardhat node when deployed in tests.
DEFAULT_ADMIN_ROLE: assigned to the contract deployer, this role can grant and revoke other roles.SNAPSHOT_ROLE: can create snapshots.PAUSER_ROLE: can pause and unpause the contract.MINTER_ROLE: can mint tokens and manage unlocked tokens.
mint(address _to, uint256 _amount): mints_amounttokens and assigns them to_to. Accessible byMINTER_ROLE.increaseUnlockedTokens(address _recipient, uint _amount): increases the number of unlocked tokens for_recipientby_amount. Accessible byMINTER_ROLE.decreaseUnlockedTokens(address _recipient, uint _amount): decreases the number of unlocked tokens for_recipientby_amount. Accessible byMINTER_ROLE.
pause(): pauses the contract, blocking transfers, approvals, and mints. Accessible byPAUSER_ROLE.unpause(): unpauses the contract. Accessible byPAUSER_ROLE.
snapshot(): creates a new snapshot of the token balances. Accessible bySNAPSHOT_ROLE.
verifyAddress(address _signer, string memory _message, bytes memory _signature): verifies if a given Ethereum signed message_signaturewas signed by_signerfor the given_message.getMessageHash(string memory _message): returns the keccak256 hash of_message.getEthSignedMessageHash(bytes32 _messageHash): returns the Ethereum signed message hash for_messageHash.recover(bytes32 _ethSignedMessageHash, bytes memory _signature): recovers the signer's address from the given Ethereum signed message hash_ethSignedMessageHashand_signature.getUnlockedTokens(address _from): returns the number of unlocked tokens for the address_from.
- GigaToken: 0xd8e40ccd8bcb4e5994b79a094f6f39e7a9d1b4aa
- Multisig: 0xe1c9cdb52c9759204fda541976d15b3d6f67b546
- Verifier: 0x8f2bec657241eb98a89012ecbe24b13be3ef8db8
- GigaToken: 0x8CBC04668981e3f7901D46CB56611611545B7A6D
- Multisig: 0x685a13093cA561F531c93185B942a3f33385e14E
- Verifier: 0xD5E253Ff866a342D4227c71eB90263713A79A04b