
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.
@resolverworks/ezccip
Advanced tools
Turnkey EIP-3668: CCIP-Read Handler for ENS and arbitrary functions.
$ npm i @resolverworks/ezccip
✓
"tor"
— resolverworks/TheOffchainResolver.sol"ens"
— ensdomains/offchain-resolver and ccip.tools"raw"
— raw response (EVM Gateway, testing, etc.)enableENSIP10()
drop-in support for resolverworks/enson.js Record-typeresolve(name, multicall([...]))
multicall([resolve(name, ...), ...])
multicall([resolve(name, multicall([...])), ...])
serve()
to quickly launch a servernpm run start
— starts a CCIP-Read server for TOR protocol using serve()
setText("ccip.context", "0xd00d726b2aD6C81E894DC6B87BE6Ce9c5572D2cd http://localhost:8016")
ezccip.raffy.xyz
(Mainnet)
0xd00d726b2aD6C81E894DC6B87BE6Ce9c5572D2cd https://raffy.xyz/ezccip/
ezccip.eth
(Sepolia)
0xd00d726b2aD6C81E894DC6B87BE6Ce9c5572D2cd https://raffy.xyz/ezccip/s
Create an instance and register some handlers.
import {EZCCIP} from '@resolverworks/ezccip';
let ezccip = new EZCCIP();
// implement an arbitrary function
ezccip.register('add(uint256, uint256) returns (uint256)', ([a, b]) => [a + b]);
// implement a wildcard ENSIP-10 resolver
// which handles resolve() automatically
ezccip.enableENSIP10(async (name, context) => {
return {
async text(key) {
switch (key) {
case 'name': return 'Raffy';
case 'avatar': return 'https://raffy.antistupid.com/ens.jpg';
}
},
};
});
// more complicated example
let abi = new ethers.Interface([
'function f(bytes32 x) return (string)',
'function g(uint256 a, uint256 b) return (uint256)',
]);
ezccip.register(abi, { // register multiple functions at once using existing ABI
async ['f()']([x], context, history) { // match function by signature
history.show = [context.sender]; // replace arguments of f(...) in logger
history.name = 'Chonk'; // rename f() to Chonk() in logger
return [context.calldata]; // echo incoming calldata
},
async ['0xe2179b8e']([a, b], context) { // match by selector
context.protocol = "tor"; // override signing protocol
return ethers.toBeHex(1337n, 32); // return raw encoded result
}
});
When your server has a request for CCIP-Read, use EZCCIP to produce a response.
let {sender, data: calldata} = JSON.parse(req.body); // ABI-encoded request in JSON from EIP-3668
let {data, history} = await ezccip.handleRead(sender, calldata, {
protocol: 'tor', // default, tor requires signingKey + resolver
signingKey, // your private key
resolver, // address of the TOR
});
reply.json({data}); // ABI-encoded response in JSON for EIP-3668
console.log(history.toString()); // description of response
GET
, POST
, or query directlycontext
carries useful information about the incoming requesthistory
collects information as the response is generatedStart a simple server for an EZCCIP instance or a function representing the enableENSIP10()
handler.
let {http} = await serve(ezccip); // see types for more configuration
// ...
http.close();
// minimal example:
// return fixed text() for any name
await serve(() => { text: () => 'Raffy' });
serve()
will bind requests to the sender
if the protocol needs a target and no resolver
was provided.resolvers
mapping to pair endpoint suffixes to specific contract deployments.
s
to correspond to the Sepolia deployment, which makes requests to the modified endpoint http://localhost:8016/s
target that contract, regardless of sender.endpoint
↔ contract
pairing is required to support wrapped CCIP calls!Apply ENSIP-10 calldata
to a Record
-object and generate the corresponding ABI-encoded response. This is a free-function.
let record = {
text(key) { if (key == 'name') return 'raffy'; }
addr(type) { if (type == 60) return '0x1234'; }
};
let calldata = '0x...'; // encodeFunctionData('text', ['name']);
let res = await processENSIP10(record, calldata); // encodeFunctionResult('text', ['raffy']);
FAQs
Turnkey CCIP-Read Handler
We found that @resolverworks/ezccip demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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.