# 手把手教你做Taiko深度交互,零成本领空投 **Published by:** [Mossmind](https://paragraph.com/@mossmind/) **Published on:** 2023-09-21 **URL:** https://paragraph.com/@mossmind/taiko ## Content 任务清单:设置公链的RPC获得测试代币官方跨链桥交易所交互部署自己的合约设置公链的RPC configuration链接:https://taiko.xyz/docs/reference/rpc-configuration需要分别设置 L1 和L2 的 RPC 操作:点击Connect连接MetaMask获得测试代币 Receive tokens 链接:https://taiko.xyz/docs/guides/receive-tokens领水地址: https://sepoliafaucet.com/ (一次性发放) https://sepolia-faucet.pk910.de/ (花的时间比较长) https://www.infura.io/faucet/sepolia (没得领了)官方跨链桥 Bridge tokens 链接:https://bridge.jolnir.taiko.xyz/ 转 0.05ETH 垮链过去 -> 点击 Bridge -> 小狐狸确认成功之后点击 Transactions 菜单栏:切换Jolnir网络:可以来回多跨链几次,增加TX次数:交易所交互 Swap链接:https://swap.jolnir.taiko.xyz/选其中一个token 来 进行 swap还可以给资金池子提供流动性:部署自己的合约打开网址:https://remix.ethereum.org新建合约 New a contract新建合约文件 MyToken.sol 把下面代码复制进去// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract MyToken is ERC20, Ownable { constructor() ERC20("MyToken", "MT") {} function mint(address to, uint256 amount) public onlyOwner { _mint(to, amount); } } 编译合约 Compile your smart contract点击 Compile MyToken.sol 按钮部署合约 Deploy your smart contract选择左侧菜单第4个按钮,然后选择网络环境 Injected Provider - MetaMask 注意:小狐狸当前环境网路必须是Taiko的,不然会部署到别的链上 点击Deploy 按钮 即部署,等待30秒左右,最下边会打印出绿色勾勾,显示部署成功的标志mint 铸造展开合约 -> 开展mint函数 -> 复制自己的address和输入一个长整数 -> 点击transact等待30秒左右,mint 成功:点击箭头指向 mint ,可以查看mint详情,可到区块浏览器中查看尝试用新部署的token 添加流动性复制箭头指向的代码 Interacted with contract 回到 swap 进行token搜索,会找到新铸造的token:可以尝试定价:Approve MT 授权成功后,点击Supply 提供流动性完结按着上边的任务清单,耐心的一步步操作,你会轻轻松松搞定,加油~ ## Publication Information - [Mossmind](https://paragraph.com/@mossmind/): Publication homepage - [All Posts](https://paragraph.com/@mossmind/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@mossmind): Subscribe to updates - [Twitter](https://twitter.com/0xMoss51502): Follow on Twitter