Closed BurnWW closed 4 months ago
Hi @BurnWW
You can use configuration for kusama
, polkadot
and westend
by only passing networkName.
All snap rpc method will work in this way.
https://github.com/ChainSafe/metamask-snap-polkadot/blob/master/packages/snap/src/configuration/predefined.ts
Optionally you can override it with any custom network, not all rpc methods will work with all rpc providers in this custom configuration.
Westend example
await window.ethereum.request({
method: "wallet_invokeSnap",
params: {
snapId: snapId,
request: {
method: "configure",
params: {
configuration: {
networkName: "westend"
}
}
}
}
}
})
Example Acala
await window.ethereum.request({
method: "wallet_invokeSnap",
params: {
snapId: snapId,
request: {
method: "configure",
params: {
configuration: {
networkName: "acala",
wsRpcUrl: "https://rpc.evm.acala.network",
addressPrefix: 10,
unit: {
image: "",
symbol: "ACA",
decimals: 12
}
}
}
}
}
})
The installation and execution went extremely well for me, however, I am uncertain about invoking a custom pallet’s method. Could you please offer an instance of how to properly call a custom pallet?,Thank you very much.