
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
@setheum.js/setters
Advanced tools
setters.js SDK implements a web3 provider to allow existing Ethereum dApp to be able to interact with [Setheum EVM](https://github.com/Setheum-Labs/Setheum/tree/master/lib-serml/evm).
setters.js SDK implements a web3 provider to allow existing Ethereum dApp to be able to interact with Setheum EVM.
yarn
Most of the api of setters.js is compatible with ethers.js. If you are not familiar with ethers.js, you can start by looking at its documentation
The Provider provides some api for interacting with nodes and is an instance of ethers.js AbstractProvider.
new Provider( apiOptions )
apiOptions has the same parameters as when creating an instance of apiPromise for polkadot.js
import { options } from "@setheum.js/api";
import { Provider } from "@setheum.js/setters";
import { WsProvider } from "@polkadot/api";
const evmprovider = new Provider(
options({
provider: new WsProvider("ws://localhost:9944")
})
);
The Wallet class inherits Signer and can sign transactions and messages using a private key.
new Wallet( privateKey , provider? , keyringPair? )
"privateKey" is the private key of evm's account. "provider" is an instance of Provider. "keyringPair" is a key pair for polkadot. If the "keyringPair" is empty, a key pair will be generated from the "privateKey".
import { Wallet } from "@setheum.js/setters";
const wallet = new Wallet("0xaa397267eaee48b2262a973fdcab384a758f39a3ad8708025cfb675bb9effc20", provider)
Use "keyringpair" to bind an evm account generated by "privateKey".
wallet.claimEvmAccounts()
import { deployContract } from "ethereum-waffle";
import ERC20Abi from "../build/ERC20Abi.json";
import { TestAccountSigningKey, Provider, Signer } from "@setheum.js/setters";
import { WsProvider } from "@polkadot/api";
import { createTestPairs } from "@polkadot/keyring/testingPairs";
const provider = new Provider({
provider: new WsProvider("ws://127.0.0.1:9944"),
});
const testPairs = createTestPairs();
const signingKey = new TestAccountSigningKey(provider.api.registry);
signingKey.addKeyringPair(Object.values(testPairs));
const wallet = new Signer(provider, testPairs.alice.address, signingKey)
const tokenInstance = await deployContract(master, ERC20Abi, [1000]);
FAQs
setters.js SDK implements a web3 provider to allow existing Ethereum dApp to be able to interact with [Setheum EVM](https://github.com/Setheum-Labs/Setheum/tree/master/lib-serml/evm).
We found that @setheum.js/setters demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.