{"id":21347106,"url":"https://github.com/kybernetwork/uniswapv3-sdk-uint256","last_synced_at":"2025-10-16T21:22:49.901Z","repository":{"id":229607332,"uuid":"777161955","full_name":"KyberNetwork/uniswapv3-sdk-uint256","owner":"KyberNetwork","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-30T16:13:37.000Z","size":346,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-01-22T16:31:06.426Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KyberNetwork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-25T10:23:01.000Z","updated_at":"2025-01-02T04:29:28.000Z","dependencies_parsed_at":"2024-12-31T15:30:33.933Z","dependency_job_id":null,"html_url":"https://github.com/KyberNetwork/uniswapv3-sdk-uint256","commit_stats":null,"previous_names":["kybernetwork/uniswapv3-sdk-uint256"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KyberNetwork%2Funiswapv3-sdk-uint256","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KyberNetwork%2Funiswapv3-sdk-uint256/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KyberNetwork%2Funiswapv3-sdk-uint256/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KyberNetwork%2Funiswapv3-sdk-uint256/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KyberNetwork","download_url":"https://codeload.github.com/KyberNetwork/uniswapv3-sdk-uint256/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243822277,"owners_count":20353499,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T02:12:42.375Z","updated_at":"2025-10-16T21:22:44.883Z","avatar_url":"https://github.com/KyberNetwork.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Uniswap V3 SDK\n\n[![API Reference](https://camo.githubusercontent.com/915b7be44ada53c290eb157634330494ebe3e30a/68747470733a2f2f676f646f632e6f72672f6769746875622e636f6d2f676f6c616e672f6764646f3f7374617475732e737667)](https://pkg.go.dev/github.com/daoleno/uniswapv3-sdk)\n[![Test](https://github.com/daoleno/uniswapv3-sdk/actions/workflows/test.yml/badge.svg)](https://github.com/daoleno/uniswapv3-sdk/actions/workflows/test.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/daoleno/uniswapv3-sdk)](https://goreportcard.com/report/github.com/daoleno/uniswapv3-sdk)\n\n🛠 A Go SDK for building applications on top of Uniswap V3\n\n## Installation\n\n```sh\ngo get github.com/daoleno/uniswapv3-sdk\n```\n\n## Usage\n\nThe following example shows how to create a pool, and get the inputAmount\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"math/big\"\n\n\tcore \"github.com/daoleno/uniswap-sdk-core/entities\"\n\t\"github.com/daoleno/uniswapv3-sdk/constants\"\n\t\"github.com/daoleno/uniswapv3-sdk/entities\"\n\t\"github.com/daoleno/uniswapv3-sdk/utils\"\n\t\"github.com/ethereum/go-ethereum/common\"\n)\n\nvar (\n\tUSDC     = core.NewToken(1, common.HexToAddress(\"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\"), 6, \"USDC\", \"USD Coin\")\n\tDAI      = core.NewToken(1, common.HexToAddress(\"0x6B175474E89094C44Da98b954EedeAC495271d0F\"), 18, \"DAI\", \"Dai Stablecoin\")\n\tOneEther = big.NewInt(1e18)\n)\n\nfunc main() {\n\t// create demo ticks\n\tticks := []entities.Tick{\n\t\t{\n\t\t\tIndex:          entities.NearestUsableTick(utils.MinTick, constants.TickSpacings[constants.FeeLow]),\n\t\t\tLiquidityNet:   OneEther,\n\t\t\tLiquidityGross: OneEther,\n\t\t},\n\t\t{\n\t\t\tIndex:          entities.NearestUsableTick(utils.MaxTick, constants.TickSpacings[constants.FeeLow]),\n\t\t\tLiquidityNet:   new(big.Int).Mul(OneEther, constants.NegativeOne),\n\t\t\tLiquidityGross: OneEther,\n\t\t},\n\t}\n\n\t// create tick data provider\n\tp, err := entities.NewTickListDataProvider(ticks, constants.TickSpacings[constants.FeeLow])\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// new pool\n\tpool, err := entities.NewPool(USDC, DAI, constants.FeeLow, utils.EncodeSqrtRatioX96(constants.One, constants.One), OneEther, 0, p)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// USDC -\u003e DAI\n\toutputAmount := core.FromRawAmount(DAI, big.NewInt(98))\n\tinputAmount, _, err := pool.GetInputAmount(outputAmount, nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tfmt.Println(inputAmount.ToSignificant(4))\n}\n```\n\n[More Examples](./examples/README.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkybernetwork%2Funiswapv3-sdk-uint256","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkybernetwork%2Funiswapv3-sdk-uint256","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkybernetwork%2Funiswapv3-sdk-uint256/lists"}