
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@intercoin/fundcontract
Advanced tools
Deployment can be done in several ways:
produce.In all cases, parameters need to be specified:
| name | type | description | example |
|---|---|---|---|
| _sellingToken | address | address of the ITR token | 0x6Ef5febbD2A56FAb23f18a69d3fB9F4E2A70440B |
| _timestamps | uint256[] | array of timestamps (GMT) | [1609459200, 1614556800, 1619827200] |
| _prices | uint256[] | array of prices for the exchange in ETH (multiplied by 1e8) | [12000000, 15000000, 18000000] |
| _endTime | uint256 | the time after which the exchange will be stopped | 1630454400 |
| _thresholds | uint256[] | thresholds of ETH (in wei) that trigger bonuses for group members | [10000000000000000000, 25000000000000000000, 50000000000000000000] |
| _bonuses | uint256[] | bonuses in percentages (multiplied by 100), e.g., 10%, 20%, 30% or 0.1, 0.2, 0.5 | [10, 20, 50] |
| _ownerCanWithdraw | enum(never, afterEndTime, anytime) | an option representing the owner's ability to withdraw tokens left in the contract | 1 |
| _whitelistData | {address contractAddress, bytes4 method, uint8 role, bool useWhitelist;} | settings for the whitelist. The exchange can only be accessed by whitelisted individuals. For more information, see the Intercoin/Whitelist repository. In example "internal whitelist" | [0x0000000000000000000000000000000000000000,0x95a8c58d,0x4,true] |
Once installed, methods can be used for exchange.
| Method Name | Called By | Description |
|---|---|---|
| getConfig | Anyone | Retrieves data with which the contract was initialized. |
| receive | Anyone | An internal method triggered when the contract receives ETH. It exchanges ETH for tokens. |
| getGroupBonus | Anyone | Retrieves the current group bonus. |
| getTokenPrice | Anyone | Retrieves the current token price. |
| withdraw | Owner | Withdraws a specified amount of tokens to a given address. |
| withdrawAll | Owner | Withdraws all tokens to the owner (sender). |
| claim | Owner | Claims a specified amount of ETH to a given address. |
| claimAll | Owner | Claims all ETH to the owner (sender). |
| setGroup | Owner | Links participants to a group. |
Returns the parameters with which the contract was initialized.
Parameters:
| name | type | description |
|---|---|---|
| groupName | string | The name of the group. |
Returns the group bonus as a uint.
Returns the token price as a uint.
Parameters:
| name | type | description |
|---|---|---|
| amount | uint256 | The amount of tokens to withdraw. |
| addr | address | The address to send the tokens to. |
Withdraws all tokens to the owner.
Parameters:
| name | type | description |
|---|---|---|
| amount | uint256 | The amount of tokens to claim. |
| addr | address | The address to send the tokens to. |
Claims all ETH to the owner (sender).
Parameters:
| name | type | description |
|---|---|---|
| addresses | address[] | The addresses that need to be linked with the group. |
| groupName | string | The name of the group. If the group doesn't exist, it will be created. |
sellingToken to the contract.sellingToken until the endTime expires or the contract has enough tokens to return.We have created a contract that sends additional tokens to a group of people who contribute more than the specified thresholds. For example:
After 10 ETH - 10% bonus
After 25 ETH - 20% bonus
After 50 ETH - 50% bonus
So the initial parameters will be:
thresholds = [10_000000000000000000, 25_000000000000000000, 50_000000000000000000]
bonuses = [10, 20, 50]
Here, the thresholds are set in wei and the bonuses are multiplied by 100.
For a better understanding of the math, let's take the variable price_ETH_TOKEN = 10000000 (0.5 ETH = 1 ITR).
| action | person | total contributed, ETH | bonus tokens contributed, ITR | got by transaction, ITR | Total balance, ITR | "BestGroup" Total, ETH | "BestGroup#2" Bonus, % | ||||||
| old | new | old | new | main | bonus | Total, ETH | Bonus, % | Total, ETH | Bonus, % | ||||
| 1 | Setup the same group "BestGroup"(setGroup) for Person#1,Person#2 | 0.0 | 0.0 | 0.0 | 0.0 | ||||||||
| 2 | Person#1 contributed $5,000 | Person#1 | 0 | 5.0 | 0.0 | 0.0 | 10.0 | 0.0 | 10.0 | 5.0 | 0.0 | 0.0 | 0.0 |
| Person#2 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | ||||||
| Person#3 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | ||||||
| Person#4 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | ||||||
| 3 | Person#1 contributed $7,000 | Person#1 | 5.0 | 12.0 | 0.0 | 2.4 | 14.0 | 2.4 | 26.4 | 12.0 | 10.0 | 0.0 | 0.0 |
| Person#2 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | ||||||
| Person#3 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | ||||||
| Person#4 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | ||||||
| 4 | Person#2 contributed 25 ETH | Person#1 | 12.0 | 12.0 | 2.4 | 4.8 | 0.0 | 2.4 | 28.8 | 37.0 | 20.0 | 0.0 | 0.0 |
| Person#2 | 0.0 | 25.0 | 0.0 | 10.0 | 50.0 | 10.0 | 60.0 | ||||||
| Person#3 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | ||||||
| Person#4 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | ||||||
| 5 | Setup the same group "BestGroup"(setGroup) for Person#3 | 37.0 | 20.0 | 0.0 | 0.0 | ||||||||
| 6 | Person#3 contributed $25,000 | Person#1 | 12.0 | 12.0 | 4.8 | 12.0 | 0.0 | 7.2 | 36.0 | 62.0 | 50.0 | 0.0 | 0.0 |
| Person#2 | 25.0 | 25.0 | 10.0 | 25.0 | 0.0 | 15.0 | 75.0 | ||||||
| Person#3 | 0.0 | 25.0 | 0.0 | 25.0 | 50.0 | 25.0 | 75.0 | ||||||
| Person#4 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | ||||||
| 7 | Person#4 without any group contributed 25 ETH | Person#1 | 12.0 | 12.0 | 4.8 | 12.0 | 0.0 | 7.2 | 36.0 | 62.0 | 50.0 | 0.0 | 0.0 |
| Person#2 | 25.0 | 25.0 | 10.0 | 25.0 | 0.0 | 15.0 | 75.0 | ||||||
| Person#3 | 0.0 | 25.0 | 0.0 | 25.0 | 50.0 | 25.0 | 75.0 | ||||||
| Person#4 | 0.0 | 25.0 | 0.0 | 0.0 | 50.0 | 0.0 | 50.0 | ||||||
| 8 | Setup the same group "BestGroup#2"(setGroup) for Person#4 | 62.0 | 50.0 | 25.0 | 20.0 | ||||||||
| 10 | Finally | Person#1 | 12.0 | 12.0 | 4.8 | 12.0 | 0 | 7.2 | 36.0 | 62.0 | 50.0 | 25.0 | 20.0 |
| Person#2 | 25.0 | 25.0 | 10.0 | 25.0 | 0.0 | 15.0 | 75.0 | ||||||
| Person#3 | 0.0 | 25.0 | 0.0 | 25.0 | 50.0 | 25.0 | 75.0 | ||||||
| Person#4 | 25.0 | 25.0 | 50.0 | 10.0 | 0.0 | 0.0 | 60.0 |
FAQs
## Installation
We found that @intercoin/fundcontract 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.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.