
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.
@redstone-finance/casper-connector
Advanced tools
[](https://discord.gg/2CT6hN6C) [](https://twitter.com/intent/follow?screen_name=redstone_defi
RedStone proposes a completely new modular design where data is first put into a data availability layer and then fetched on-chain. This allows us to broadcast a large number of assets at high frequency to a cheaper layer and put it on-chain only when required by the protocol.
The @redstone-finance/casper-connector
module implements an alternative design of providing oracle data to smart
contracts. Instead of constantly persisting data on the Casper network storage (by data providers), the information is
brought on-chain only when needed (by end users). Until that moment data remains in the decentralised cache layer, which
is powered by RedStone light cache gateways and streamr data broadcasting protocol. Data is transferred to the Casper
network by end users. The information integrity is verified on-chain through signature checking.
Here also you can find the description of the whole RedStone Oracle model.
1.68.2
.
First, you need to import the connector code to your project
// Typescript
import {
PriceAdapterCasperContractConnector,
makeCasperConnection,
} from "@redstone-finance/casper-connector";
// or: import { PriceRelayAdapterCasperContractConnector } from "@redstone-finance/casper-connector";
import { ContractParamsProvider } from "@redstone-finance/sdk";
// Javascript
const {
PriceAdapterCasperContractConnector,
makeCasperConnection,
// or: PriceRelayAdapterCasperContractConnector
} = require("@redstone-finance/casper-connector");
const { ContractParamsProvider } = require("@redstone-finance/sdk");
Then you can invoke the contract methods described above pointing to the selected RedStone data service and requested data feeds.
const prices = new PriceAdapterCasperContractConnector(
makeCasperConnection(yourConfig),
yourContractPackageHash
);
/* or const prices = new PriceRelayAdapterCasperContractConnector(
yourWalletOrProvider,
yourContractAddress
);
*/
const paramsProvider = new ContractParamsProvider({
dataServiceId: "redstone-main-demo",
uniqueSignersCount: 1,
dataPackagesIds: ["ETH", "BTC"],
});
The yourConfig
param is required. The example value can be found in
the test/e2e/config.ts file.
Now you can access any of the contract's methods by invoking the code:
(await prices.getAdapter()).getPricesFromPayload(paramsProvider); // the method is available only for PriceRelayAdapterCasperContractConnector
(await prices.getAdapter()).writePricesFromPayloadToContract(paramsProvider);
(await prices.getAdapter()).readPricesFromContract(paramsProvider);
(await prices.getAdapter()).readTimestampFromContract();
yarn install
The Casper Accelerate Grant Program has been created to exclusively support projects and developers building on the Casper Public Mainnet to grow and secure the Casper Network. Read more here
RedStone Casper connector is an open-source and free software released under the BUSL-1.1 License.
FAQs
[](https://discord.gg/2CT6hN6C) [](https://twitter.com/intent/follow?screen_name=redstone_defi
The npm package @redstone-finance/casper-connector receives a total of 11 weekly downloads. As such, @redstone-finance/casper-connector popularity was classified as not popular.
We found that @redstone-finance/casper-connector demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.