A Pen by Marco Dell'Anna on CodePen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "contracts/idcl_token.sol": { | |
| "__sources__": { | |
| "contracts/idcl_token.sol": { | |
| "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.23;\n\n/**\n* @title Imo Digital City Token (IDCT)\n* @dev ERC-20 compliant token for the Imo Digital City ecosystem\n* @notice This token represents digital assets in the Imo Digital City project\n* @author [Imo Digital City Limited]\n*/\ncontract BasicToken {\n // Token metadata\n string public name = \"Imo Digital City Token\";\n string public symbol = \"IDCT\";\n uint8 public decimals = 18;\n uint256 public totalSupply;\n \n // Token icon/logo URI (IPFS recommended for decentralization)\n string public logoURI = \"https://secret-room.sirv.com/digital.png\";\n \n // Balance mapping\n mapping(address => uint256) public balanceOf;\n \n // Allowance mapping for approved spending\n mapping(address => mapping(address => uint256)) public allowance;\n \n // Contract owner\n address public owner;\n |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { createClient } from 'contentful'; | |
| if (!process.env.NEXT_PUBLIC_CONTENTFUL_SPACE_ID) throw new Error("Content space ID is missing!") | |
| if (!process.env.NEXT_PUBLIC_CONTENTFUL_ACCESS_TOKEN) throw new Error("Content Access Token is missing!") | |
| const client = createClient({ | |
| space: process.env.NEXT_PUBLIC_CONTENTFUL_SPACE_ID!, | |
| accessToken: process.env.NEXT_PUBLIC_CONTENTFUL_ACCESS_TOKEN!, | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| // OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol) | |
| pragma solidity ^0.8.0; | |
| import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/IAccessControl.sol"; | |
| import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Context.sol"; | |
| import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Strings.sol"; | |
| import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/introspection/ERC165.sol"; |