Skip to content

Commit

Permalink
remove obsolete makeContractStore
Browse files Browse the repository at this point in the history
  • Loading branch information
clbrge committed Jun 3, 2023
1 parent ec5aa1b commit d92de35
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
12 changes: 0 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -411,18 +411,6 @@ leveraging the reactivity and simplicity of Svelte along with the powerful
features of web3.js, you can create a seamless and efficient user experience
for your decentralized applications.

## Create contract stores (deprecated)

The function `makeContractStore` allowed you to create a Svelte derived
store of a `web3.eth.Contract` object instance. It takes the same
parameters as a ̀new web3.eth.Contract` call:

```js
makeContractStore(jsonInterface[, address][, options])
```

This function will be removed in the next major release of `svelte-web3`.
Please update your code to use the new $contracts store.

## Simultaneous multi chain usage

Expand Down
5 changes: 0 additions & 5 deletions src/stores.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,11 +333,6 @@ export const contracts = allStores.default.contracts
// TODO spin off dectector
export const walletType = allStores.default.walletType

// TODO legacy makeContractStore to be removed
export const makeContractStore = (abi, address, defaults = {}) =>
console.warn(
'[svelte-web3] makeContractStore is deprecated. Please use the new $contracts store'
)
derived([web3, connected], ([$web3, $connected]) => {
if ($connected && $web3.eth) {
return new $web3.eth.Contract(abi, address, defaults)
Expand Down

0 comments on commit d92de35

Please sign in to comment.