- An alternative approach to RESTful APIs
- Clients issue queries/mutations to read and update data
- Clients can fetch only the entity fields that are required
- GraphQL query syntax can express complex entity relations => nested objects
- Mitigates the explosion of RESTful endpoints in scenarios where many different representations of an entity are needed
- Graphiql is a query execution UI, also provides good documentation
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
Blockgames Task - Web3 Proposal - by Kelechi Ndukwe - Kcpele | |
Introduction | |
With the rapid development of cryptocurrencies such as Bitcoin and the application of blockchain technology in industries such as finance, | |
Internet of things (IoT), cloud computing and supply-chain, blockchain has gradually attracted global attention | |
Blockchain provides a programmable environment for smart contracts as an emerging technology with great potential. | |
Taking advantage of blockchain, smart contract has been widely used in blockchain. | |
Smart contract can not only change the existing business model, but also bring a lot of convenience to public life in reality. | |
Main Content |
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: GPL-3.0 | |
pragma solidity ^0.8.7; | |
contract Upload { | |
//task: upload files, retreive, share | |
//@geting the data format | |
struct DataFormat { |
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 | |
pragma solidity ^0.8.7; | |
interface IERC721 { | |
function transferFrom(address _from, address _to, uint _nftId) external; | |
} | |
contract DutchAuction { | |
uint private constant DURATION = 7 days; |
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
// eslintrc.js | |
module.exports = { | |
env: { | |
browser: true, | |
es6: true, | |
}, | |
extends: [ | |
'plugin:react/recommended', | |
'airbnb', | |
], |
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
void main() { | |
//setting the range of numbers to generate | |
int num = 30; | |
//the for loop is generating the numbers from 1 to 30 inclusive that is why i added 1 to 30 | |
for (int i = 1; i < num + 1; i++) { | |
if(i % 2 != 0){ | |
print(i); | |
} else if (i == num){ | |
print("The number is at $i"); | |
} |
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
class Circle { | |
static const pie = 3.142; | |
double Radius; | |
String Color; | |
Circle.noValues() : Radius = 1, Color="red"; | |
Circle.onlyRadius(this.Radius) : Color = "red"; |
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 | |
pragma solidity ^0.8.17; | |
error ERC1155__AddressZero(); | |
error ERC1155__AccountAndIdNotSameLength(); | |
error ERC1155__InsufficientBalance(); | |
error ERC1155__ReceiverNotImplemented(); | |
error ERC1155__MsgSenderIsNotOwner(); |
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 | |
pragma solidity ^0.8.13; | |
import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; | |
import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; | |
import "@openzeppelin/contracts/interfaces/IERC1271.sol"; | |
import "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol"; | |
import "./lib/Bytecode.sol"; | |
import "./interface/IERC6551Account.sol"; |
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 | |
pragma solidity ^0.8.17; | |
/// @title ERC-721 Non-Fungible Token Standard | |
/// @dev See https://eips.ethereum.org/EIPS/eip-721 | |
/// Note: the ERC-165 identifier for this interface is 0x80ac58cd. | |
interface ERC721 /* is ERC165 */ { | |
event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); |
OlderNewer