Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nezz0746 committed Nov 30, 2023
1 parent 5b5a89e commit f29b4be
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
22 changes: 19 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

<img src="./InstateGrey.jpg">

Instate is an experimental protocol created to build localized applications with local accounts. As well as a factory to create customizable network states.
Instate is an conceptual protocol created to build localized applications with local accounts. As well as a factory to create customizable network states.

## Connect Button
## @instate/kit

@instate/kit ConnectButton exports Rainbowkit's original ConnectButton with an additional LocalAccountButton that let user's pick the local account they would like to use for your application. Just like for networks, you can require a certain location and
ConnectButton exports Rainbowkit's original ConnectButton with an additional LocalAccountButton that let user's pick the local account they would like to use for your application. Just like for networks, you can require a certain location and
propose a local account switch to your user, or (soon) a move if the user doesn't have a local account in your application vicinity.

<img src="./LocalAccountButton.png" />
Expand All @@ -21,6 +21,22 @@ const YourApp = () => {

```

## Localized Mint

For you smart contract, you can then use a **Localized** extension in order to allow only certain local accounts to call a specific function. For the demo available in the InstateScan explorer: Localized Mint, you can only mint a specific Token like such:

```solidity
contract MyLocalNFT is ERC721, Localized {
string internal _geohash;

constructor(Map map, string memory geohash) Localized(map, geohash) {}

function mint(LocalCaller caller) onlyLocalAccount(caller) {
_safeMint(caller.account)
}
}
```

Deployments:

|Contract|Network|Proxy|Implementation|
Expand Down
15 changes: 0 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11194,14 +11194,6 @@ [email protected]:
loose-envify "^1.1.0"
scheduler "^0.22.0"

react-dom@^18.2.0:
version "18.2.0"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d"
integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==
dependencies:
loose-envify "^1.1.0"
scheduler "^0.23.0"

react-hot-toast@^2.4.1:
version "2.4.1"
resolved "https://registry.yarnpkg.com/react-hot-toast/-/react-hot-toast-2.4.1.tgz#df04295eda8a7b12c4f968e54a61c8d36f4c0994"
Expand Down Expand Up @@ -11666,13 +11658,6 @@ scheduler@^0.22.0:
dependencies:
loose-envify "^1.1.0"

scheduler@^0.23.0:
version "0.23.0"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe"
integrity sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==
dependencies:
loose-envify "^1.1.0"

[email protected], scrypt-js@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312"
Expand Down

0 comments on commit f29b4be

Please sign in to comment.