Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
github.com/daveappleton/multi_nft
the contracts in contracts/flat are the final ones because they will be verified
private sales implement royalty splits
pool
pool
So token#1 can have a different token split from token#2
initial sales
creator1 = { beneficiary: creator, share: 500 }
patron1 = { beneficiary: patron, share: 500 }
secondary sales
creator1R = { beneficiary: creator, share: 750 }
patron1R = { beneficiary: patron, share: 250 }
first sale
buyer spends 0.5125 (1.025)
seller gains 0.45 (0.9)
patron gets 0.025 (0.05) 500
creator gets 0.025 (0.05) 500
minty gets 0.0125 (0.025)
second sale
buyer spend 0.5125 (1.025)
seller gains 0.45 (0.9)
patron gets 0.0125 (0.025) 250
creator gets 0.0375 (0.075) 750
minty gets 0.0125 (0.025)
creator2 = { beneficiary: creator, share: 500 }
musician2 = { beneficiary: musician, share: 300 }
patron2 = { beneficiary: patron, share: 200 }
creator2R = { beneficiary: creator, share: 700 }
musician2R = { beneficiary: musician, share: 200 }
patron2R = { beneficiary: patron, share: 100 }
first sale
buyer spend 1.025
seller gains 0.9
patron gets 0.02 200
creator gets 0.05 500
musician gets 0.03 300
minty gets 0.025
secondary sale
buyer spend 1.025
seller gains 0.9
patron gets 0.01 100
creator gets 0.07 700
musician gets 0.02 200
minty gets 0.025
Assuming
[creator1,patron1]
the initial share (see above)[creator1R,patron1R]
resale share"C+P"
- name of this Poolm1155 = await M1155.deploy(
artistAddress,
saleContractAddress,
[locking1.address,locking2.address],
"You need to be a MINTY patron or TEST PROJECT patron",
100,
[creator1,patron1],
[creator1R,patron1R],
"C+P"
)
Adding another pool
await m1155.connect(addr1).addPools([creator2,musician2,patron2],[creator2R,musician2R,patron2R],"C+P+M")
Putting a new item for sale
sale.offerNew(
m1155.address, // token contract
11, // tokenId
"hash", // URI hash
180, // quantity
ethers.utils.parseEther("0.205"), // unit price
1 // poolID
)
Resale does not need to know the poolID
sale.offerResale(
m1155.address, // token contract
11, // tokenId
5, // quantity
ethers.utils.parseEther("0.205") // unit price
)
window.ethereum.request({
method: 'wallet_addEthereumChain',
params: [
{
chainId: '0x38',
chainName: 'Binance Smart Chain',
nativeCurrency: { name: 'BNB', symbol: 'BNB', decimals: 18 },
rpcUrls: ['https://bsc-dataseed.binance.org/'],
blockExplorerUrls: ['https://bscscan.com/']
}
]
}
``
FAQs
Unknown package
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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.