Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Quickly develop decentralized applications compatible with multiple chains.
easydapp
基于一套统一的API快速开发兼容多条链的区块链应用
$ npm install easydapp –save
import { createEasydapp } from 'easydapp';
const dapp = createEasydapp({
// 公链类型eth/ont/neo/…
type: 'eth',
appid: 'Dapp Sample',
httpProvider: 'https://kovan.infura.io/v3/47e9cbe62fd645f5a20ee72f1854481c',
contract: {
// 合约地址(https://kovan.etherscan.io/address/0x8ee20844a883fb484e7416e6f8a8a69870c3ee00)
address: '0x8ee20844a883fb484e7416e6f8a8a69870c3ee00',
// 合约程序接口定义
jsonInterface: require('./examples/simple-storage/eth/abi.json')
}
});
或仅根据模块所需使用
import { ETHEasydapp } from 'easydapp/dist/eth';
const dapp = new ETHEasydapp({
appid: 'Dapp Sample',
httpProvider: 'https://kovan.infura.io/v3/47e9cbe62fd645f5a20ee72f1854481c',
contract: {
address: '0x8ee20844a883fb484e7416e6f8a8a69870c3ee00',
jsonInterface: require('./examples/simple-storage/eth/abi.json')
}
});
const network = await dapp.getNetwork();
// network: 42 (kovan)
const accounts = await dapp.getAccounts();
// accounts: ['0x00…00']
const balance = await dapp.getBalance();
// balance: 0
const receipt = await sendTransaction({
from: '0x00…00',
to: '0x00…01',
value: '0',
});
// receipt: TransactionReceipt
Contract
const result = await dapp.contract.invoke('contractMethod1', ['arg1'])
// result: Error (contractMethod1 is not defined)
const result = await dapp.contract.invoke('set', [toHex('1')])
// result: Success
// Or
dapp.contract.register('set', [toHex])
dapp.contract.register('other', [toHex, toWei, reverseHex, utf8ToHex], {
address: '0x00000..000',
jsonInterface: […]
})
const result1 = await dapp.contract.dispatch('set', ['1'])
const result2 = await dapp.contract.dispatch('other', ['1', '0', '0', 'Some text'])
FAQs
Quickly develop decentralized applications compatible with multiple chains.
We found that easydapp demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.