How to migrate to ContractKit v1 and use its features
How to migrate to from prerelease of ContractKit to v1 and make use of its features.
ContractKit has been sunset for external use. Please use viem or wagmi for connecting with the blockchain.Check out the migration guide for updating your app from ContractKit to viem.To learn more visit the Celo forum.
cLabs recently released ContractKit version 1.0.0. In it, the original ContractKit package has been split into several separate packages that all make up the Celo SDK. This document explains the key differences and shows you how you can start using the updated SDK.
If you are using a previous version of ContractKit (anything below 1.0.0), you can continue using that version and you will only need to make the following changes when you upgrade.
The main benefit of using the new version include:
Reduced bundle size
Better Typescript support
Improved maintenance by making it easier to use other libraries
Connect handles how we communicate to the our chain nodes. It wraps the web3 library and has its own rpcCaller class, to make custom calls to the node. It’s the layer in charge of knowing how and which parameters are added by Celo, connect to the node, build the message, send it and handle those responses.
ContractKit is a reduced subset of the previous versions of ContractKit. This is the layer in charge of loading and using our core contracts. Internally, uses the connect package described above. It has our contracts generated from the ABIs, their wrappers, and also the logic to make claims.
Importing the packages is slightly different now that many packages are separate from the main ContractKit package. You will have to explicitly import these packages instead of just importing all of them with ContractKit.For example:
// Previously this would work to import the block-explorerimport { newBlockExplorer } from "@celo/contractkit/lib/explorer/block-explorer";// With ContractKit v1.x.y, import the block-explorer explicitlyimport { newBlockExplorer } from "@celo/explorer/lib/block-explorer";
// version ^0.4.0const ContractKit = require("@celo/contractkit");// Older versions of ContractKit create a new Web3 instance internallyconst kit = ContractKit.newKit("https://forno.celo.org");
These ContractKit functions will still work when accessed directly from kit, but it is advised to consume it via connection to avoid future deprecation.
// This still workskit.addAccount// recommended:kit.connection.addAccount
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Celo Docs","description":"Learn to develop on the Ethereum L2 built for the real world. Access guides, APIs, and tools for fast, affordable blockchain applications","colors":{"primary":"#000000","light":"#fcff52","dark":"#000000"},"logo":{"light":"https://mintcdn.com/celo-64ac69bd/0WkPc8r8miw6rJ0o/images/CeloDocs_LogoLight.svg?fit=max\u0026auto=format\u0026n=0WkPc8r8miw6rJ0o\u0026q=85\u0026s=9d6c38002bd204ed66ca9db0782aecf9","dark":"https://mintcdn.com/celo-64ac69bd/0WkPc8r8miw6rJ0o/images/CeloDocs_LogoDark.svg?fit=max\u0026auto=format\u0026n=0WkPc8r8miw6rJ0o\u0026q=85\u0026s=020f629b1f5797de98cb1aed37d8a3a7"},"favicon":"https://mintcdn.com/celo-64ac69bd/0WkPc8r8miw6rJ0o/images/CeloDocs_Favicon_64px.png?fit=max\u0026auto=format\u0026n=0WkPc8r8miw6rJ0o\u0026q=85\u0026s=7ba4295bda57bbba69fb5e4d52e86db9","appearance":{"default":"dark"},"background":{"color":{"light":"#FCF6F1","dark":"#0b0d10"}},"navbar":{"links":[{"href":"https://discord.com/invite/celo","label":"Community"},{"href":"https://celo.org","label":"Celo.org"}],"primary":{"type":"button","label":"GitHub","href":"https://github.com/celo-org"}},"footer":{"links":[{"header":"Community","items":[{"label":"Forum","href":"https://forum.celo.org/"},{"label":"Contributors","href":"/contribute"}]},{"header":"Socials","items":[{"label":"Youtube","href":"https://www.youtube.com/@CeloOrg"},{"label":"Discord","href":"https://discord.com/invite/celo"},{"label":"X","href":"https://x.com/Celo"},{"label":"Events","href":"https://luma.com/user/usr-QJkvU5EML2BJeYc"},{"label":"Celo Developers newsletter","href":"https://celo-devs.beehiiv.com/subscribe"}]}]},"seo":{"organization":{"name":"Celo","url":"https://celo.org","logo":"https://docs.celo.org/logo/celo_light.png","sameAs":["https://github.com/celo-org","https://x.com/Celo","https://www.youtube.com/@CeloOrg","https://discord.com/invite/celo","https://forum.celo.org/","https://l2beat.com/scaling/projects/celo"]}},"fonts":{"heading":{"family":"system-ui"},"body":{"family":"system-ui"}},"integrations":{"ga4":{"measurementId":"G-0CXEKQ81V2"}},"banner":{"content":"🤖 **Agents on Open Rails** | Celo’s global hackathon — $5,000 in prizes, kicks off Oct 6. [Join the hackathon](https://www.loops.house/agents-on-open-rails)","dismissible":true},"contextual":{"options":["copy","view","mcp","chatgpt","claude","cursor","vscode",{"title":"Edit on GitHub","description":"Open the docs repository to edit a page and raise a pull request","icon":"github","href":"https://github.com/celo-org/docs"}],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Docs for AI","icon":"robot","href":"/build/agents/use-docs-with-ai"},{"anchor":"Organization","icon":"globe","href":"https://celo.org/"},{"anchor":"Support","icon":"bullhorn","href":"https://discord.com/invite/celo"},{"anchor":"Forum","icon":"newspaper","href":"https://forum.celo.org/"},{"anchor":"Faucet","icon":"faucet","href":"https://faucet.celo.org/celo-sepolia"},{"anchor":"FAQs","icon":"square-question","href":"https://docs.celo.org/operate/operators/faq"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"celo-64ac69bd","hasAudioNarration":false,"actualSubdomain":"celo-64ac69bd","customDomains":["docs.celo.org"],"gitSource":{"type":"github","owner":"celo-org","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6adb4425cf9bd761b13fd127","collectionId":"d7fc9077-9e80-462e-9371-bd0fc74f59ab","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adb4425cf9bd761b13fd127"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6adb4425cf9bd761b13fd127","clientVersion":"0.0.3965","searchFilterCounts":[{"language":"default","tag":"Build","count":129},{"language":"default","tag":"Tools","count":84},{"language":"default","tag":"Learn","count":44},{"language":"default","tag":"Libraries \u0026 SDKs","count":40},{"language":"default","tag":"Operate","count":39},{"language":"default","tag":"CLI","count":21},{"language":"default","tag":"Agents","count":18},{"language":"default","tag":"Contribute","count":15},{"language":"default","tag":"Guides","count":12},{"language":"default","tag":"ContractKit","count":10}]},"assistantConfig":{"enableAskAiButton":true,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"community@celo.org"}},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".colored_text a{color:inherit!important}ol ol{list-style-type:lower-roman!important}"}],"page":{"pagePath":"build/tools/libraries-sdks/contractkit/migrating-to-contractkit-v1","slug":"/build/tools/libraries-sdks/contractkit/migrating-to-contractkit-v1","pageMetadata":{"title":"Migrating to ContractKit v1.0","description":"How to migrate to ContractKit v1 and use its features","href":"/build/tools/libraries-sdks/contractkit/migrating-to-contractkit-v1"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"How to migrate to ContractKit v1 and use its features\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,hr:`hr`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`How to migrate to from prerelease of ContractKit to v1 and make use of its features.`}),`\n`,_jsxs(Warning,{children:[_jsxs(_components.p,{children:[_jsx(_components.a,{href:`https://forum.celo.org/t/sunsetting-contractkit/5337`,children:`ContractKit has been sunset`}),` for external use. Please use viem or wagmi for connecting with the blockchain.`]}),_jsxs(_components.p,{children:[`Check out the `,_jsx(_components.a,{href:`/developer/contractkit/migrating-to-viem`,children:`migration guide`}),` for updating your app from ContractKit to viem.`]}),_jsxs(_components.p,{children:[`To learn more visit the `,_jsx(_components.a,{href:`https://forum.celo.org/t/sunsetting-contractkit/5337`,children:`Celo forum`}),`.`]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`what-is-contractkit-version-v1-0`,children:`What is ContractKit version v1.0?`}),`\n`,_jsxs(_components.p,{children:[`cLabs recently released `,_jsx(_components.a,{href:`https://medium.com/celoorg/contractkit-1-0-0-9c0412462d45`,children:`ContractKit version 1.0.0`}),`. In it, the original ContractKit package has been split into several separate packages that all make up the Celo SDK. This document explains the key differences and shows you how you can start using the updated SDK.`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`If you are using a previous version of ContractKit (anything below 1.0.0), you can continue using that version and you will only need to make the following changes when you upgrade.`})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`The main benefit of using the new version include:`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Reduced bundle size`}),`\n`,_jsx(_components.li,{children:`Better Typescript support`}),`\n`,_jsx(_components.li,{children:`Improved maintenance by making it easier to use other libraries`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`contractkit-packages`,children:`ContractKit packages`}),`\n`,_jsx(_components.p,{children:`ContractKit is a suite of packages.`}),`\n`,_jsx(Heading,{level:`3`,id:`main-packages`,children:`Main packages`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`Connect`}),` handles how we communicate to the our chain nodes. It wraps the `,_jsx(_components.code,{children:`web3`}),` library and has its own `,_jsx(_components.code,{children:`rpcCaller`}),` class, to make custom calls to the node. It’s the layer in charge of knowing how and which parameters are added by Celo, connect to the node, build the message, send it and handle those responses.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`ContractKit`}),` is a reduced subset of the previous versions of ContractKit. This is the layer in charge of loading and using our `,_jsx(_components.a,{href:`/developer/contractkit/contracts-wrappers-registry`,children:`core contracts`}),`. Internally, uses the `,_jsx(_components.code,{children:`connect`}),` package described above. It has our contracts generated from the ABIs, their wrappers, and also the logic to make claims.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`complementary-packages`,children:`Complementary Packages`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`Explorer`}),` depends on `,_jsx(_components.code,{children:`contractkit`}),` and `,_jsx(_components.code,{children:`connect`}),`. It provides some utility functions that make it easy to listen for new block and log information.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`Governance`}),` depends on `,_jsx(_components.code,{children:`contractkit`}),` and `,_jsx(_components.code,{children:`explorer`}),`. It provides functions to read and interact with Celo Governance Proposals (CGPs).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`Identity`}),` simplifies interacting with `,_jsx(_components.a,{href:`/build/build-on-socialconnect`,children:`ODIS`}),`, Celo’s lightweight identity layer based on phone numbers.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`Network-utils`}),` provides utilities for getting genesis block and static node information.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`Transactions-uri`}),` makes it easy to generate Celo transaction URIs and QR codes.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`wallets-and-wallet-utility-packages`,children:`Wallets and Wallet Utility packages`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`Wallet-hsm-azure`}),` is a Azure Key Vault implementation of a RemoteWallet.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`Wallet-hsm-aws`}),` allows you to easily interact with a cloud HSM wallet built on AWS KMS.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`Wallet-ledger`}),` provides utilities for interacting with a Ledger hardware wallet.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`Wallet-local`}),`provides utilities for locally managing wallet by importing a private key string.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`Wallet-rpc`}),` provides utilities for performing wallet functions via RPC.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`Wallet-base`}),` provides base utilities for creating Celo wallets.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`Wallet-hsm`}),` provides signature utilities for using HSMs.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`Wallet-remote`}),` provides utilities for interacting with remote wallets. This is useful for interacting with wallets on secure remote servers.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`importing-packages`,children:`Importing packages`}),`\n`,_jsxs(_components.p,{children:[`Importing the packages is slightly different now that many packages are separate from the main `,_jsx(_components.code,{children:`ContractKit`}),` package. You will have to explicitly import these packages instead of just importing all of them with `,_jsx(_components.code,{children:`ContractKit`}),`.`]}),`\n`,_jsx(_components.p,{children:`For example:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Previously this would work to import the block-explorer`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`newBlockExplorer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@celo/contractkit/lib/explorer/block-explorer\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// With ContractKit v1.x.y, import the block-explorer explicitly`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`newBlockExplorer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@celo/explorer/lib/block-explorer\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`connecting-to-the-network`,children:`Connecting to the network`}),`\n`,_jsx(Heading,{level:`3`,id:`older-versions-of-contractkit`,children:`Older versions of ContractKit:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// version ^0.4.0`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` ContractKit`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` require`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"@celo/contractkit\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Older versions of ContractKit create a new Web3 instance internally`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` kit`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` ContractKit`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`newKit`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://forno.celo.org\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`version-1-x-y`,children:`Version 1.x.y`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Since ContractKit no longer instantiates web3, you'll need to explicitly require it`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` Web3`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` require`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"web3\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` web3`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Web3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://forno.celo.org\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Require ContractKit and newKitFromWeb3`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`ContractKit`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`newKitFromWeb3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` require`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"@celo/contractkit\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` contractKit`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` newKitFromWeb3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`web3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`accessing-web3-functions`,children:`Accessing Web3 functions`}),`\n`,_jsxs(_components.p,{children:[`You can access `,_jsx(_components.code,{children:`web3`}),` functions through the `,_jsx(_components.code,{children:`connection`}),` module.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// version ^0.4.0`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` amount`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` kit`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`web3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`utils`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`fromWei`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1000000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ether\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// version 1.x.y`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` amount`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` kit`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`connection`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`web3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`utils`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`fromWei`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1000000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ether\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`backward-compatibility`,children:`Backward Compatibility`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.a,{href:`https://github.com/celo-org/celo-monorepo/blob/a7579fc9bdc0c1b4ce1d9fec702938accf82be2a/packages/sdk/contractkit/src/kit.ts#L278`,children:`These ContractKit functions`}),` will still work when accessed directly from `,_jsx(_components.code,{children:`kit`}),`, but it is advised to consume it via `,_jsx(_components.code,{children:`connection`}),` to avoid future deprecation.`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`6`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`// This still works`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`kit.addAccount`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`// recommended:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`kit.connection.addAccount`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(Heading,{level:`2`,id:`connection-package`,children:[_jsx(_components.code,{children:`Connection`}),` package`]}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`connection`}),` package update includes implementations of some common web3 functions. Here are a few examples:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`kit.web3.eth.isSyncing`}),` —> `,_jsx(_components.code,{children:`kit.connection.isSyncing`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`kit.web3.eth.getBlock`}),` —> `,_jsx(_components.code,{children:`kit.connection.getBlock`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`kit.web3.eth.getBlockNumber`}),` —> `,_jsx(_components.code,{children:`kit.connection.getBlockNumber`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`kit.web3.eth.sign`}),` —> `,_jsx(_components.code,{children:`kit.connection.sign`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`kit.isListening`}),` —> `,_jsx(_components.code,{children:`kit.connection.isListening`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`kit.addAccount`}),` —> `,_jsx(_components.code,{children:`kit.connection.addAccount`})]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Migrating to ContractKit v1.0","description":"How to migrate to ContractKit v1 and use its features","href":"/build/tools/libraries-sdks/contractkit/migrating-to-contractkit-v1"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"What is ContractKit version v1.0?","slug":"what-is-contractkit-version-v1-0","depth":2,"children":[]},{"title":"ContractKit packages","slug":"contractkit-packages","depth":2,"children":[{"title":"Main packages","slug":"main-packages","depth":3,"children":[]},{"title":"Complementary Packages","slug":"complementary-packages","depth":3,"children":[]},{"title":"Wallets and Wallet Utility packages","slug":"wallets-and-wallet-utility-packages","depth":3,"children":[]}]},{"title":"Importing packages","slug":"importing-packages","depth":2,"children":[]},{"title":"Connecting to the network","slug":"connecting-to-the-network","depth":2,"children":[{"title":"Older versions of ContractKit:","slug":"older-versions-of-contractkit","depth":3,"children":[]},{"title":"Version 1.x.y","slug":"version-1-x-y","depth":3,"children":[]}]},{"title":"Accessing Web3 functions","slug":"accessing-web3-functions","depth":2,"children":[]},{"title":"Backward Compatibility","slug":"backward-compatibility","depth":2,"children":[]},{"title":"Connection package","slug":"connection-package","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/celo-64ac69bd/2f1ae726193f7358/assistant.js"],"subdomain":"celo-64ac69bd","siteName":"Celo Docs","title":"Migrating to ContractKit v1.0 - Celo Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-06T17:44:46.566Z","originalFileLocation":"build/tools/libraries-sdks/contractkit/migrating-to-contractkit-v1.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"How to migrate to ContractKit v1 and use its features\">\u003cmeta data-mint-head name=\"application-name\" content=\"Celo Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/celo-64ac69bd/AG5c0rSidebGFnjH/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/celo-64ac69bd/AG5c0rSidebGFnjH/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/celo-64ac69bd/AG5c0rSidebGFnjH/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/celo-64ac69bd/AG5c0rSidebGFnjH/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/celo-64ac69bd/AG5c0rSidebGFnjH/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/celo-64ac69bd/AG5c0rSidebGFnjH/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/celo-64ac69bd/AG5c0rSidebGFnjH/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/celo-64ac69bd/AG5c0rSidebGFnjH/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/celo-64ac69bd/AG5c0rSidebGFnjH/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Migrating to ContractKit v1.0 - Celo Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"How to migrate to ContractKit v1 and use its features\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Celo Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.celo.org/build/tools/libraries-sdks/contractkit/migrating-to-contractkit-v1\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://celo-64ac69bd.mintlify.app/_mintlify/api/og/v2?division=ContractKit\u0026amp;title=Migrating+to+ContractKit+v1.0\u0026amp;description=How+to+migrate+to+ContractKit+v1+and+use+its+features\u0026amp;theme=f89b675bf0695d1efecdbf40\u0026amp;signature=ef988ab19768d794af482f3586e557e256168b4003e82b55a70e41b5a156862d\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Migrating to ContractKit v1.0 - Celo Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"How to migrate to ContractKit v1 and use its features\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://celo-64ac69bd.mintlify.app/_mintlify/api/og/v2?division=ContractKit\u0026amp;title=Migrating+to+ContractKit+v1.0\u0026amp;description=How+to+migrate+to+ContractKit+v1+and+use+its+features\u0026amp;theme=f89b675bf0695d1efecdbf40\u0026amp;signature=ef988ab19768d794af482f3586e557e256168b4003e82b55a70e41b5a156862d\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/celo-64ac69bd/AG5c0rSidebGFnjH/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Celo Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#000000\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.celo.org/build/tools/libraries-sdks/contractkit/migrating-to-contractkit-v1\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/build/tools/libraries-sdks/contractkit/migrating-to-contractkit-v1.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://celo.org/#organization\",\"name\":\"Celo\",\"url\":\"https://celo.org\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://docs.celo.org/logo/celo_light.png\"},\"sameAs\":[\"https://github.com/celo-org\",\"https://x.com/Celo\",\"https://www.youtube.com/@CeloOrg\",\"https://discord.com/invite/celo\",\"https://forum.celo.org/\",\"https://l2beat.com/scaling/projects/celo\"]},{\"@type\":\"WebSite\",\"@id\":\"https://docs.celo.org#website\",\"name\":\"Celo Docs\",\"url\":\"https://docs.celo.org\",\"publisher\":{\"@id\":\"https://celo.org/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.celo.org/build/tools/libraries-sdks/contractkit/migrating-to-contractkit-v1#webpage\",\"url\":\"https://docs.celo.org/build/tools/libraries-sdks/contractkit/migrating-to-contractkit-v1\",\"name\":\"Migrating to ContractKit v1.0\",\"description\":\"How to migrate to ContractKit v1 and use its features\",\"dateModified\":\"2026-10-06T17:44:46.566Z\",\"isPartOf\":{\"@id\":\"https://docs.celo.org#website\"},\"breadcrumb\":{\"@id\":\"https://docs.celo.org/build/tools/libraries-sdks/contractkit/migrating-to-contractkit-v1#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.celo.org/build/tools/libraries-sdks/contractkit/migrating-to-contractkit-v1#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Tools\",\"item\":\"https://docs.celo.org/build/tools/libraries-sdks/celo-sdks\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Libraries \u0026 SDKs\",\"item\":\"https://docs.celo.org/build/tools/libraries-sdks/celo-sdks\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"ContractKit\",\"item\":\"https://docs.celo.org/build/tools/libraries-sdks/contractkit/index\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Migrating to ContractKit v1.0\",\"item\":\"https://docs.celo.org/build/tools/libraries-sdks/contractkit/migrating-to-contractkit-v1\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.celo.org/build/tools/libraries-sdks/contractkit/migrating-to-contractkit-v1#article\",\"headline\":\"Migrating to ContractKit v1.0\",\"name\":\"Migrating to ContractKit v1.0\",\"description\":\"How to migrate to ContractKit v1 and use its features\",\"url\":\"https://docs.celo.org/build/tools/libraries-sdks/contractkit/migrating-to-contractkit-v1\",\"mainEntityOfPage\":{\"@id\":\"https://docs.celo.org/build/tools/libraries-sdks/contractkit/migrating-to-contractkit-v1#webpage\"},\"dateModified\":\"2026-10-06T17:44:46.566Z\",\"publisher\":{\"@id\":\"https://celo.org/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.celo.org#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Celo Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Celo Docs","nav":{"global":{"anchors":[{"anchor":"Docs for AI","icon":"robot","href":"/build/agents/use-docs-with-ai"},{"anchor":"Organization","icon":"globe","href":"https://celo.org/"},{"anchor":"Support","icon":"bullhorn","href":"https://discord.com/invite/celo"},{"anchor":"Forum","icon":"newspaper","href":"https://forum.celo.org/"},{"anchor":"Faucet","icon":"faucet","href":"https://faucet.celo.org/celo-sepolia"},{"anchor":"FAQs","icon":"square-question","href":"https://docs.celo.org/operate/operators/faq"}]},"tabs":[{"tab":"Learn","pages":[{"title":"Learn","href":"/learn/celo"}]},{"tab":"Build","groups":[{"group":"Quickstart","pages":[{"title":"Building Apps on Celo","sidebarTitle":"Getting started","href":"/build"},{"title":"Quickstart","sidebarTitle":"Quickstart with Celo Composer","href":"/build/quickstart"},{"title":"Developer Tools and Resources","href":"/build/tools/overview/index"},{"title":"Celo for Ethereum Developers","href":"/build/tools/overview/migrate/from-ethereum"}]},{"group":"Agents","pages":[{"title":"Build with AI on Celo","sidebarTitle":"Overview","href":"/build/agents/overview"},{"title":"Use Celo Docs with AI Tools","sidebarTitle":"Docs for AI Tools","href":"/build/agents/use-docs-with-ai"},{"title":"AI Resources","href":"/build/agents/ai-resources"},{"title":"Give Your Agent a Wallet and Test Funds","sidebarTitle":"Agent Wallet","href":"/build/agents/agent-wallet"},{"title":"ERC-8004: Agent Trust Protocol","sidebarTitle":"8004: Agent Trust","href":"/build/agents/8004"},{"title":"Self Agent ID: Proof-of-Human Identity for Agents","sidebarTitle":"Self: Agent Identity","href":"/build/agents/self-agent-id"},{"title":"Agent Vault: Card Payments and Logins for Agents","sidebarTitle":"Self: Agent Vault","href":"/build/agents/agent-vault"},{"title":"x402: Agent Payments","sidebarTitle":"x402: Payments","href":"/build/agents/x402"},{"title":"x402: Get your endpoint discovered","sidebarTitle":"x402: Get discovered","href":"/build/agents/x402-get-discovered"},{"title":"MPP: Machine Payments Protocol","sidebarTitle":"MPP: Payments","href":"/build/agents/mpp"},{"title":"Celopedia","sidebarTitle":"Celopedia (Skill)","href":"/build/agents/celopedia"},{"title":"Vibe Coding","href":"/build/agents/vibe-coding"},{"title":"Model Context Protocol (MCP)","href":"/build/agents/mcp/index"},{"title":"Celo MCP Server","href":"/build/agents/mcp/celo-mcp"},{"title":"Celina","sidebarTitle":"Celina (agent wallet)","href":"/build/agents/mcp/celina"},{"title":"AskBots: Paid reviews from AI agents","sidebarTitle":"AskBots (agent reviews)","href":"/build/agents/askbots"},{"title":"AI Agents Examples","sidebarTitle":"Use Cases","href":"/build/agents/usecases"},{"title":"Attribution Tags","href":"/build/agents/attribution-tags"}]},{"group":"Mini Apps","pages":[{"title":"Build for MiniPay","sidebarTitle":"MiniPay","href":"/build/mini-apps/overview"}]},{"group":"Network info","pages":[{"title":"Celo Sepolia Testnet","sidebarTitle":"Celo Sepolia","href":"/build/tools/testnets/celo-sepolia/index"},{"title":"Nodes and Services","sidebarTitle":"Overview","href":"/build/tools/nodes/overview"},{"title":"Forno","sidebarTitle":"Forno","href":"/build/tools/nodes/forno"},{"title":"Alchemy","href":"/build/tools/nodes/alchemy"}]},{"group":"Guides","pages":[{"title":"Build with Farcaster","href":"/build/build-with-farcaster"},{"title":"Build with Self","href":"/build/build-with-self"},{"title":"Build with Local Stablecoins","href":"/build/build-with-local-stablecoin"},{"title":"Build with USA₮","href":"/build/build-with-usat"},{"title":"Introduction to SocialConnect","href":"/build/build-on-socialconnect"},{"title":"Build with DeFi","href":"/build/build-with-defi"},{"group":"Fee Abstraction","pages":[{"title":"Fee abstraction guide","sidebarTitle":"Overview","href":"/build/fee-abstraction/overview"},{"title":"Using Fee Abstraction in Transactions","sidebarTitle":"Using Fee Abstraction","href":"/build/fee-abstraction/using-fee-abstraction"},{"title":"Adding Fee Currencies","sidebarTitle":"Adding Fee Currencies","href":"/build/fee-abstraction/add-fee-currency"}]},{"title":"Scaling Your App","href":"/build/scaling-your-app"},{"title":"Nightfall Privacy Layer","sidebarTitle":"Nightfall Privacy Layer","href":"/build/nightfall"},{"title":"Fund your Project","href":"/build/fund-your-project"}]},{"group":"Tools","pages":[{"group":"Libraries \u0026 SDKs","pages":[{"title":"Celo Libraries \u0026 SDKs","sidebarTitle":"Overview","href":"/build/tools/libraries-sdks/celo-sdks"},{"title":"Composer Kit UI","href":"/build/tools/libraries-sdks/composer-kit"},{"group":"CLI","pages":[{"title":"Celo CLI","sidebarTitle":"Overview","href":"/build/tools/libraries-sdks/cli/index"},{"title":"celocli account","sidebarTitle":"Account","href":"/build/tools/libraries-sdks/cli/account"},{"title":"celocli autocomplete","sidebarTitle":"Autocomplete","href":"/build/tools/libraries-sdks/cli/autocomplete"},{"title":"celocli commands","sidebarTitle":"Commands","href":"/build/tools/libraries-sdks/cli/commands"},{"title":"celocli config","sidebarTitle":"Config","href":"/build/tools/libraries-sdks/cli/config"},{"title":"celocli election","sidebarTitle":"Election","href":"/build/tools/libraries-sdks/cli/election"},{"title":"celocli epochs","sidebarTitle":"Epochs","href":"/build/tools/libraries-sdks/cli/epochs"},{"title":"celocli governance","sidebarTitle":"Governance","href":"/build/tools/libraries-sdks/cli/governance"},{"title":"celocli help","sidebarTitle":"Help","href":"/build/tools/libraries-sdks/cli/help"},{"title":"celocli identity","sidebarTitle":"Identity","href":"/build/tools/libraries-sdks/cli/identity"},{"title":"celocli lockedcelo","sidebarTitle":"Lockedcelo","href":"/build/tools/libraries-sdks/cli/lockedcelo"},{"title":"celocli multisig","sidebarTitle":"Multisig","href":"/build/tools/libraries-sdks/cli/multisig"},{"title":"celocli network","sidebarTitle":"Network","href":"/build/tools/libraries-sdks/cli/network"},{"title":"celocli node","sidebarTitle":"Node","href":"/build/tools/libraries-sdks/cli/node"},{"title":"celocli oracle","sidebarTitle":"Oracle","href":"/build/tools/libraries-sdks/cli/oracle"},{"title":"celocli plugins","sidebarTitle":"Plugins","href":"/build/tools/libraries-sdks/cli/plugins"},{"title":"celocli releasecelo","sidebarTitle":"Releasecelo","href":"/build/tools/libraries-sdks/cli/releasecelo"},{"title":"celocli rewards","sidebarTitle":"Rewards","href":"/build/tools/libraries-sdks/cli/rewards"},{"title":"celocli transfer","sidebarTitle":"Transfer","href":"/build/tools/libraries-sdks/cli/transfer"},{"title":"celocli validator","sidebarTitle":"Validator","href":"/build/tools/libraries-sdks/cli/validator"},{"title":"celocli validatorgroup","sidebarTitle":"Validatorgroup","href":"/build/tools/libraries-sdks/cli/validatorgroup"}]},{"title":"Viem","sidebarTitle":"viem","href":"/build/tools/libraries-sdks/viem/index"},{"title":"Ethers.js","href":"/build/tools/libraries-sdks/ethers/index"},{"title":"Reown (prev. known as WalletConnect)","sidebarTitle":"Reown","href":"/build/tools/libraries-sdks/reown/index"},{"title":"Using Dynamic","sidebarTitle":"Dynamic","href":"/build/tools/libraries-sdks/dynamic/index"},{"title":"Build with Portal","sidebarTitle":"Portal","href":"/build/tools/libraries-sdks/portal/index"},{"title":"Build with JAW","sidebarTitle":"JAW","href":"/build/tools/libraries-sdks/jaw/index"},{"group":"ContractKit","pages":[{"title":"ContractKit","sidebarTitle":"Overview","href":"/build/tools/libraries-sdks/contractkit/index"},{"title":"Setup","sidebarTitle":" Setup","href":"/build/tools/libraries-sdks/contractkit/setup"},{"title":"Using the Kit","href":"/build/tools/libraries-sdks/contractkit/usage"},{"title":"Core Contracts (Wrapper/Registry)","sidebarTitle":"Core Contracts Registry","href":"/build/tools/libraries-sdks/contractkit/contracts-wrappers-registry"},{"title":"Query On-Chain Identifiers with ODIS","sidebarTitle":"Querying on-chain identifiers with ODIS","href":"/build/tools/libraries-sdks/contractkit/odis"},{"title":"Data Encryption Key","href":"/build/tools/libraries-sdks/contractkit/data-encryption-key"},{"title":"Migrating to viem","sidebarTitle":"Migrating to viem","href":"/build/tools/libraries-sdks/contractkit/migrating-to-viem"},{"title":"Migrating to ContractKit v2.0","description":"How to migrate from ContractKit v1 to the v2 suite of packages","href":"/build/tools/libraries-sdks/contractkit/migrating-to-contractkit-v2"},{"title":"Migrating to ContractKit v1.0","href":"/build/tools/libraries-sdks/contractkit/migrating-to-contractkit-v1"},{"title":"Using Web3 from ContractKit","sidebarTitle":"Using Web3 from ContractKit with Celo","description":"How to use Web3 from ContractKit to read data from the Celo blockchain","href":"/build/tools/libraries-sdks/contractkit/notes-web3-with-contractkit"}]},{"title":"Web3.js","sidebarTitle":"Web3.js (deprecated)","href":"/build/tools/libraries-sdks/web3/index"}]},{"group":"Dev environments","pages":[{"title":"Build with Celo","sidebarTitle":"Overview","href":"/build/tools/dev-environments/index"},{"title":"Deploy on Celo with Foundry","sidebarTitle":"Using Foundry","href":"/build/tools/dev-environments/foundry"},{"title":"Deploy on Celo with thirdweb","sidebarTitle":"Using thirdweb","href":"/build/tools/dev-environments/thirdweb"},{"group":"Using MultiBaas","pages":[{"title":"MultiBaas by Curvegrid","sidebarTitle":"Overview","href":"/build/tools/dev-environments/multibaas/overview"},{"title":"Smart Contracts","href":"/build/tools/dev-environments/multibaas/contracts"},{"title":"Event Webhooks","href":"/build/tools/dev-environments/multibaas/webhooks"}]},{"title":"Deploy on Celo with Remix","sidebarTitle":"Using Remix","href":"/build/tools/dev-environments/remix"},{"title":"Deploy on Celo with Hardhat","sidebarTitle":"Using Hardhat","href":"/build/tools/dev-environments/hardhat"}]},{"group":"Wallets","pages":[{"title":"Wallet integration","href":"/build/tools/wallets/index"},{"group":"MetaMask","pages":[{"title":"Add Celo Testnet to MetaMask","sidebarTitle":"Add Celo to MetaMask","href":"/build/tools/wallets/metamask/add-celo-testnet-to-metamask"},{"title":"Programmatic Setup","href":"/build/tools/wallets/metamask/setup"},{"title":"MetaMask and Celo","href":"/build/tools/wallets/metamask/use"},{"title":"Import Valora to MetaMask","sidebarTitle":"MetaMask and Valora","href":"/build/tools/wallets/metamask/import"}]},{"group":"Ledger Wallet","pages":[{"title":"Set up a Ledger Wallet with Celo","sidebarTitle":"Ledger Wallet Setup","href":"/build/tools/wallets/ledger/setup"},{"title":"Connect Ledger to Celo Terminal","sidebarTitle":"Connect to Celo Terminal","href":"/build/tools/wallets/ledger/to-celo-terminal"},{"title":"Connect Ledger to Celo Web Wallet","sidebarTitle":"Connect to Celo Web Wallet","href":"/build/tools/wallets/ledger/to-celo-web"},{"title":"Connect Ledger to Celo CLI","sidebarTitle":"Connect to Celo CLI","href":"/build/tools/wallets/ledger/to-celo-cli"},{"title":"Ledger EIP-712 Signing Workaround","sidebarTitle":"EIP-712 Workaround","href":"/build/tools/wallets/ledger/eip712-workaround"}]}]},{"group":"Indexers","pages":[{"title":"Data Indexer","sidebarTitle":"Overview","href":"/build/tools/indexers/overview"},{"title":"The Graph","href":"/build/tools/indexers/the-graph"},{"title":"SubQuery","href":"/build/tools/indexers/subquery"},{"title":"Envio","href":"/build/tools/indexers/envio"},{"title":"GoldRush","href":"/build/tools/indexers/goldrush"},{"title":"Indexing Co","href":"/build/tools/indexers/indexing-co"},{"title":"Codex","href":"/build/tools/indexers/codex"}]},{"group":"Oracles","pages":[{"title":"Running oracles","sidebarTitle":"Running Oracles","href":"/build/tools/oracles/run"},{"title":"Oracles on Celo","sidebarTitle":"Overview","href":"/build/tools/oracles/index"},{"title":"Using Band","sidebarTitle":"Using Band Protocol","href":"/build/tools/oracles/band-protocol"},{"title":"Using Chainlink Oracles","href":"/build/tools/oracles/chainlink-oracles"},{"title":"Using RedStone Oracles","sidebarTitle":"Using RedStone","href":"/build/tools/oracles/redstone"},{"title":"Using Supra Oracle","sidebarTitle":"Using Supra","href":"/build/tools/oracles/supra"},{"title":"Using Quex Oracles","sidebarTitle":"Using Quex","href":"/build/tools/oracles/quex-oracles"},{"title":"Using DIA Oracles","sidebarTitle":"Using DIA","href":"/build/tools/oracles/dia"},{"title":"How to Use Wit/Oracle on Celo","sidebarTitle":"Wit/Oracle","href":"/build/tools/oracles/wit-oracle"}]},{"group":"Explorers","pages":[{"title":"Explorer on Celo","sidebarTitle":"Overview","href":"/build/tools/explorers/overview"},{"title":"Block Explorer","href":"/build/tools/explorers/block-explorers"},{"title":"Analytics","href":"/build/tools/explorers/analytics"}]},{"group":"Contract verification","pages":[{"title":"Verify Contract Deployed on Celo","sidebarTitle":"Overview","href":"/build/tools/contract-verification/index"},{"title":"Verify Smart Contract using Blockscout","sidebarTitle":"Using Blockscout","href":"/build/tools/contract-verification/blockscout"},{"title":"Verify Smart Contract using CeloScan","sidebarTitle":"Using Celoscan","href":"/build/tools/contract-verification/celoscan"},{"title":"Verify Smart Contract using Remix","sidebarTitle":"Using Remix","href":"/build/tools/contract-verification/remix"},{"title":"Verify Smart Contract using Hardhat","sidebarTitle":"Using Hardhat","href":"/build/tools/contract-verification/hardhat"}]},{"group":"Bridges","pages":[{"title":"Bridge Providers","href":"/build/tools/bridges/bridges"},{"title":"Cross-Chain Messaging","href":"/build/tools/bridges/cross-chain-messaging"}]}]},{"group":"Reference","pages":[{"title":"L1 Contracts","href":"/build/tools/contracts/l1-contracts"},{"title":"Core Contracts","href":"/build/tools/contracts/core-contracts"},{"title":"Stablecoin Contracts","href":"/build/tools/contracts/stablecoin-contracts"},{"title":"Fee currency contracts","href":"/build/tools/contracts/fee-currencies"},{"title":"Uniswap Contracts","href":"/build/tools/contracts/uniswap-contracts"},{"title":"Launch Checklist","href":"/build/launch-checklist"}]}]},{"tab":"Contribute","pages":[{"title":"Contribute","href":"/contribute"}]},{"tab":"Operate","pages":[{"title":"Operate","href":"/operate"}]}]},"title":"Migrating to ContractKit v1.0 - Celo Docs","buildId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","deploymentId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","dynamics":["10e4515597"],"chunks":["BannerMarkdown-cfwQA_n9.js","dist-2LoAhjKH.js","lib--scc4DXi.js","lib-B8HbPgcC.js","clsx-DZLdJUrt.js","html-void-elements-mCSPHezU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js"]}