These Files will be updated for each talk. If you are looking for a past talk check the history.
Resources for live session from SmartCon Workshop
| // Import necessary libraries | |
| import * as CCIP from '@chainlink/ccip-js' // Chainlink CCIP library for cross-chain interactions | |
| import { createWalletClient, custom} from 'viem' // Ethereum interaction library | |
| import { sepolia } from 'viem/chains' // Testnet chain configurations | |
| // Constants for the CCIP routers, tokens, and other parameters | |
| // Router addresses are specific to each network | |
| // See https://docs.chain.link/ccip/directory/ for more details | |
| const sepoliaRouterAddress = '0x0BF3dE8c5D3e8A2B34D2BEeB17ABfCeBaf363A59' // Sepolia network router |
| // SPDX-License-Identifier: MIT | |
| // Compatible with OpenZeppelin Contracts ^5.0.0 | |
| pragma solidity ^0.8.22; | |
| import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
| import {ERC721URIStorage} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; | |
| import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; | |
| contract BloomsCollection is ERC721, ERC721URIStorage, Ownable { | |
| uint256 private _nextTokenId; |
| // SPDX-License-Identifier: UNLICENSED | |
| pragma solidity ^0.8.7; | |
| // Importing other contracts | |
| import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
| import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; | |
| import "@openzeppelin/contracts/utils/Strings.sol"; | |
| import "@openzeppelin/contracts/utils/Base64.sol"; | |
| // Importing Chainlink contracts |
| // SPDX-License-Identifier: MIT | |
| // An example of a consumer contract that relies on a subscription for funding. | |
| pragma solidity ^0.8.17; | |
| import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
| import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; | |
| import "@openzeppelin/contracts/access/Ownable.sol"; | |
| import "@openzeppelin/contracts/utils/Counters.sol"; | |
| import "@openzeppelin/contracts/utils/Strings.sol"; | |
| import "@openzeppelin/contracts/utils/Base64.sol"; |
| import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; | |
| import "@openzeppelin/contracts/utils/Counters.sol"; | |
| contract EmojiGotchi is ERC721, ERC721URIStorage { | |
| using Counters for Counters.Counter; | |
| Counters.Counter private _tokenIdCounter; | |
| constructor() ERC721("EmojiGotchi", "emg") {} |
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.7; | |
| import "@openzeppelin/[email protected]/token/ERC721/extensions/ERC721URIStorage.sol"; | |
| import "@openzeppelin/[email protected]/utils/Counters.sol"; | |
| contract dynBloom is ERC721, ERC721URIStorage { | |
| using Counters for Counters.Counter; |
| just_modifier.sol | |
| 968 length | |
| MyContract (484 bytes) | |
| Deployment costs: 90541 gas | |
| 608060405234801561001057600080fd5b506101c4806100206000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c806398e9a73d116100b8578063c3f902021161007c578063c3f902021461013c578063c9ff79aa1461013c578063df2025dc1461013c578063e6e0ae361461013c578063e70255931461013c578063ebd25c8f1461013c57600080fd5b806398e9a73d1461013c5780639942ec6f1461013c578063aa66aa631461013c578063aaf05f3d1461013c578063c27fc3051461013c57600080fd5b80636d4975a2116100ff5780636d4975a21461013c5780637c396b831461013c5780638da5cb5b146101465780638dc714ba1461013c578063920f5c731461013c57600080fd5b806324a75cfd1461013c5780633b88f6c21461013c5780633c9d377d1461013c57806340bcff2a1461013c5780635fb435921461013c575b600080fd5b610144610175565b005b600054610159906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b6000546001600160a01b0316331461018c57600080fd5b56fea264697066735822122075be568f28bfc828da662bbfbd86eef234a773f9810037dc5dbb9a7b5bf1 |
| <!DOCTYPE html><html lang="en"><head><script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-140352188-1"></script><script>window.dataLayer = window.dataLayer || []; | |
| function gtag(){dataLayer.push(arguments);} | |
| gtag('js', new Date()); | |
| gtag('config', 'UA-140352188-1');</script><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/><meta name="description" content="The CDN for everything on npm"/><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1"/><meta name="timestamp" content="2021-08-28T16:46:02.357Z"/><link rel="shortcut icon" href="/favicon.ico"/><title>UNPKG</title><script>window.Promise || document.write('\x3Cscript src="/[email protected]/dist/es6-promise.min.js">\x3C/script>\x3Cscript>ES6Promise.polyfill()\x3C/script>')</script><script>window.fetch || document.write('\x3Cscript src="/[email protected]/dist/fetch.umd.js">\x3C/script>')</script></head><body><div id="root"><style data-emotion-css="xshv0">html{box-sizing:border-box |
| pragma solidity ^ 0.4.18; | |
| contract Ownable { | |
| address public owner; | |
| constructor() public { | |
| owner = msg.sender; | |
| } | |
| modifier onlyOwner() { |