Skip to content

Instantly share code, notes, and snippets.

View Dnevend's full-sized avatar
💤

小学後生 Dnevend

💤
View GitHub Profile
@BlockmanCodes
BlockmanCodes / 01_simpleSwap.js
Created July 23, 2023 20:04
Uniswap: Universal Router: ETH to USDC
const { SwapRouter } = require('@uniswap/universal-router-sdk')
const { TradeType, Ether, Token, CurrencyAmount, Percent } = require('@uniswap/sdk-core')
const { Trade: V2Trade } = require('@uniswap/v2-sdk')
const { Pool, nearestUsableTick, TickMath, TICK_SPACINGS, FeeAmount, Trade: V3Trade, Route: RouteV3 } = require('@uniswap/v3-sdk')
const { MixedRouteTrade, Trade: RouterTrade } = require('@uniswap/router-sdk')
const IUniswapV3Pool = require('@uniswap/v3-core/artifacts/contracts/UniswapV3Pool.sol/UniswapV3Pool.json')
const JSBI = require('jsbi')
const erc20Abi = require('../abis/erc20.json')
ActivityPub 是一种去中心化的内容聚合协议,可以让其他用户远程订阅你的内容。它很像升级版的 RSS,但是支持远程推送,因此订阅者可以及时获取你的内容,而不必时不时从客户端进行抓取。
下面是目前支持 ActivityPub 协议的开源软件,可以在自己的服务器架设服务。
- 微博(Twitter 的替代品):[Mastodon](https://mastodon.social/),[Pleroma](https://pleroma.social/)
- 照片分享(Instagram 的替代品):[Pixelfed](https://pixelfed.social/)
- 视频分享(Youtube 的替代品):[Peertube](https://joinpeertube.org/)
- 博客(Facebook 的替代品):[WriteFreely](https://writefreely.org/),[WordPress + ActivityPub 插件](https://wordpress.org/plugins/activitypub/),[Plume](https://joinplu.me/)
- 聊天(Slack 的替代品):[Mattermost](https://mattermost.com/),[Matrix](https://matrix.org/)
- 音乐分享(Spotify 的替代品):[Funkwhale](https://funkwhale.audio/)