
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.