Skip to content

Commit

Permalink
connector 0.3.30 & paymaster
Browse files Browse the repository at this point in the history
  • Loading branch information
notV4l committed Jun 24, 2024
1 parent 93deed1 commit aa1fc06
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 14 deletions.
2 changes: 1 addition & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"create-events": "./bin/generateEvents.cjs"
},
"dependencies": {
"@cartridge/connector": "^0.3.28",
"@cartridge/connector": "^0.3.30",
"@chakra-ui/anatomy": "^2.1.1",
"@chakra-ui/react": "^2.8.1",
"@dojoengine/core": "0.7.4",
Expand Down
18 changes: 9 additions & 9 deletions web/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 13 additions & 4 deletions web/src/components/wallet/StarknetProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
useNetwork,
} from "@starknet-react/core";
import { ReactNode, useState } from "react";
import { RpcProvider } from "starknet";
import { RpcProvider, shortString } from "starknet";
import CartridgeConnector from "@cartridge/connector";

export const walletInstallLinks = {
Expand Down Expand Up @@ -49,7 +49,6 @@ export function customJsonRpcProvider(selectedChain: DojoChainConfig): ChainProv
}

function getConnectorsForChain(selectedChain: DojoChainConfig) {

switch (selectedChain.name) {
case "SEPOLIA":
return [cartridgeConnector];
Expand Down Expand Up @@ -93,11 +92,13 @@ import manifestRyoSepolia from "../../manifests/ryosepolia/manifest.json";
const cartridgeConnector = new CartridgeConnector(
[
{
target: manifestRyoSepolia.contracts.find((c) => c.name === "rollyourown::_mocks::paper_mock::paper_mock")!.address,
target: manifestRyoSepolia.contracts.find((c) => c.name === "rollyourown::_mocks::paper_mock::paper_mock")!
.address,
method: "faucet",
},
{
target: manifestRyoSepolia.contracts.find((c) => c.name === "rollyourown::_mocks::paper_mock::paper_mock")!.address,
target: manifestRyoSepolia.contracts.find((c) => c.name === "rollyourown::_mocks::paper_mock::paper_mock")!
.address,
method: "approve",
},
{
Expand All @@ -121,9 +122,17 @@ const cartridgeConnector = new CartridgeConnector(
.address,
method: "register_score",
},
{
target: manifestRyoSepolia.contracts.find((c) => c.name === "rollyourown::systems::laundromat::laundromat")!
.address,
method: "claim",
},
],
{
url: "https://x.cartridge.gg",
theme: "dope-wars",
paymaster: {
caller: shortString.encodeShortString("ANY_CALLER"),
},
},
) as unknown as InjectedConnector;

0 comments on commit aa1fc06

Please sign in to comment.