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.20; | |
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; | |
import {CCIPReceiver} from "@chainlink/contracts-ccip/src/v0.8/ccip/applications/CCIPReceiver.sol"; | |
import {Client} from "@chainlink/contracts-ccip/src/v0.8/ccip/libraries/Client.sol"; | |
contract MyNFT is ERC721URIStorage { | |
string constant TOKEN_URI = | |
"https://ipfs.io/ipfs/QmYuKY45Aq87LeL1R5dhb1hqHLp6ZFbJaCP8jxqKM1MX6y/babe_ruth_1.json"; |
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.20; | |
import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; | |
import "@openzeppelin/contracts/utils/Base64.sol"; | |
contract ChainlinkNFT is ERC721URIStorage { | |
using Strings for uint256; |
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
Tax Cer Logic: | |
TaxCer_Flow_In_Enquiry / TaxCer_Flow_Out_Enquiry | |
เธเธธเธเธเนเธญเธเธเธฒเธฃเธเธญเธซเธเธฑเธเธชเธทเธญเธฃเธฑเธเธฃเธญเธเธเธฒเธฃเธเธณเธฃเธฐเนเธเธตเนเธข เนเธเนเธซเธฃเธทเธญเนเธกเนเธเธฐ | |
// Handle by Dialogflow | |
if caller answer in variation of โYesโ: | |
intent = TaxCer_Flow_In_Year_Request / TaxCer_Flow_Out_Year_Request | |
else: | |
// Handle by Backend logic |
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.20; | |
import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; | |
import "@openzeppelin/contracts/utils/Base64.sol"; | |
contract ChainlinkNFT is ERC721URIStorage { | |
using Strings for uint256; |
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
{"name":"Exploring Lens Protocol","children":[{"name":"MockProfileCreatorProxy","children":[{"lock":false,"address":"{{MOCK_PROFILE_CREATOR_PROXY}}","name":"proxyCreateProfile","abi":{"inputs":[{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"string","name":"handle","type":"string"},{"internalType":"string","name":"imageURI","type":"string"},{"internalType":"address","name":"followModule","type":"address"},{"internalType":"bytes","name":"followModuleInitData","type":"bytes"},{"internalType":"string","name":"followNFTURI","type":"string"}],"internalType":"struct DataTypes.CreateProfileData","name":"vars","type":"tuple"}],"name":"proxyCreateProfile","outputs":[],"stateMutability":"nonpayable","type":"function"},"params":[[]]}],"lock":false},{"name":"LensHub","children":[{"lock":true,"address":"{{LENS_HUB}}","name":"whitelistReferenceModule","abi":{"inputs":[{"internalType":"address","name":"referenceModule","type":"address"},{"internalType":"bool","name":"whitelist","type" |
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
// Unlike Solmate, we're going to try to detect what went wrong | |
// and return a more meaningful error. There are a few different | |
// cases here: | |
// | |
// - Bubble up the original error message if we have enough gas | |
// - Return an error indicating a bad return value | |
// - Return an error indicating that the contract has no code | |
// - Return a generic error message | |
// If the transfer failed or it returned nothing: |
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
contract Seaport { | |
function _performERC20Transfer( | |
address token, | |
address from, | |
address to, | |
uint256 amount | |
) internal { | |
// Utilize assembly to perform an optimized ERC20 token transfer. | |
assembly { |
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
// We require the Hardhat Runtime Environment explicitly here. This is optional | |
// but useful for running the script in a standalone fashion through `node <script>`. | |
// | |
// When running the script with `npx hardhat run <script>` you'll find the Hardhat | |
// Runtime Environment's members available in the global scope. | |
const hre = require("hardhat"); | |
async function main() { | |
// Hardhat always runs the compile task when running scripts with its command | |
// line interface. |
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
require("@nomiclabs/hardhat-waffle"); | |
require("hardhat-laika"); // << this line | |
// This is a sample Hardhat task. To learn how to create your own go to | |
// https://hardhat.org/guides/create-task.html | |
task("accounts", "Prints the list of accounts", async (taskArgs, hre) => { | |
const accounts = await hre.ethers.getSigners(); | |
for (const account of accounts) { | |
console.log(account.address); |
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 { extendEnvironment } from "hardhat/config"; | |
import laikaSync from "./tasks/laika-sync"; | |
import "./tasks/laika-sync"; | |
import "./type-extensions"; | |
extendEnvironment((hre) => { | |
hre.laikaSync = laikaSync; | |
}); |
NewerOlder