Working tree is now the canonical repo. Off-chain play-money + trustless on-chain (FPMM AMM + CLOB via UMA settlement), AI market factory, creator/social/distribution, mobile shell + push, one-command demo + deploy-kit. Secrets excluded (see ENV-AND-KEYS.md). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
13 lines
316 B
JavaScript
13 lines
316 B
JavaScript
function computeCreate2Address (saltHex, bytecode, deployer) {
|
|
return web3.utils.toChecksumAddress(`0x${web3.utils.sha3(`0x${[
|
|
'ff',
|
|
deployer,
|
|
saltHex,
|
|
web3.utils.soliditySha3(bytecode),
|
|
].map(x => x.replace(/0x/, '')).join('')}`).slice(-40)}`);
|
|
}
|
|
|
|
module.exports = {
|
|
computeCreate2Address,
|
|
};
|