Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
eac-ico-starter
Advanced tools
Note: Operational on the Kovan and Ropsten testnets. Mainnet release coming soon.
This JavaScript library allows you to easily schedule Ethereum transactions to happen in the future using Ethereum Alarm Clock.
You can create a scheduling functionality that, for the end user, will be just one button.
The primary use case is ICO contribution scheduling.
dist/js/eac-schedule.js
into your page.function getOptions() {
var FEE = '2242000000000000'; // IN WEI
function successHandler(result) {
var transactionHash = result.transactionHash;
$('#txhash').html(transactionHash);
$('#success-info').show();
}
return {
callValue: '100000000000000000', // WEI
toAddress: '0x1332283369b529aaae2ba378189814b3fe3d6f6b',
windowStart: '1518530927', // UNIX TIMESTAMP
windowSize: 86400, // in seconds
callGasAmount: 200000,
callMethodSignature: 'buyRecipient(address)', // signature of a method you wish to call
callMethodArguments: ['0xe87529a6123a74320e13a6dabf3606630683c029'], // parameter values, in this example user wallet address
fee: FEE, // fee for scheduling paid for using EAC
sendButtonSelector: '#send-btn',
enabledInfoSelector: '#enabled-info', // show when MetaMask is enabled
disabledInfoSelector: '#disabled-info', // show when there is no MetaMask
lockedInfoSelector: '#locked-info', // show when MetaMask is locked
wrongNetworkInfoSelector: '#wrong-network-info', // show when MetaMask network is different than networkId
successHandler // callback when transaction has been scheduled,
networkId: 42 // id of the Ethereum network for the scheduling functionality
};
}
window.ScheduleSetup().then(function() {
var Schedule = new window.Schedule(getOptions());
});
callValue
: string
- Future transaction value in Wei. Say contribution amount of the user is 1 ETH. In that case, you should pass '1000000000000000000'
, which is 10**18
.
toAddress
: string
- Address to send the future transaction to. In terms of ICOs, it should be a smart contract address which has a method to buy tokens.
windowStart
: number
- UNIX timestamp when the window for execution will be open. It should usually be the time after the start of the ICO, so that when the contribution is sent, it will be accepted by the smart contract.
windowSize
: number
- Size of the execution window in seconds for the transaction.
callMethodSignature
: string
- Signature of the contract method you wish to call. This method should exist in the smart contract with the toAddress
address.
callMethodArguments
: array
- Array of arguments to pass to a smart contract method call.
fee
: string
- Fee (in Wei) paid to Ethereum Alarm Clock maintainers for using scheduling.
sendButtonSelector
: string
- CSS selector for the button that, when clicked, will try to send a MetaMask transaction that will schedule the contribution.
enabledInfoSelector
: string
- CSS selector for the container that will be shown when MetaMask is enabled.
disabledInfoSelector
: string
- CSS selector for the container that will be shown when MetaMask is disabled.
lockedInfoSelector
: string
- CSS selector for the container that will be shown when MetaMask is locked.
wrongNetworkInfoSelector
: string
- CSS selector for the container that will be shown when MetaMask network is different than networkId
.
successHandler
: function(result)
- Function that will be called when a transaction has been sent. First argument is an object that contains the transactionHash
.
networkId
: number
- ID of the Ethereum network scheduling should work on. By default it is 1
- which is main net, 42
is Kovan.
npm install
- Install all NodeJS dependenciesnpm run dev
- Run the dev serverlocalhost:8080
in your browserThis is a way to see access the demo locally and adjust the parameters to your specific contract use case.
To create a production bundle please run: npm run build
.
Please use npm run test
to execute tests.
FAQs
[](https://github.com/chronologic)
The npm package eac-ico-starter receives a total of 1 weekly downloads. As such, eac-ico-starter popularity was classified as not popular.
We found that eac-ico-starter 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.