Skip to content

Instantly share code, notes, and snippets.

@Bijan-Massoumi
Created November 17, 2023 12:36
Show Gist options
  • Save Bijan-Massoumi/98ad62198108cb153084ab1b8ab792b3 to your computer and use it in GitHub Desktop.
Save Bijan-Massoumi/98ad62198108cb153084ab1b8ab792b3 to your computer and use it in GitHub Desktop.
bmassoumi@Bijans-MacBook-Pro eth-nyc-protocol % yarn run deployStage
yarn run v1.22.19
$ forge script script/deployStage.s.sol --rpc-url $RPC --broadcast -vvvv --no-storage-caching
[⠒] Compiling...
[⠆] Compiling 1 files with 0.8.19
[⠰] Solc 0.8.19 finished in 1.21s
Compiler run successful with warnings:
Warning (2072): Unused local variable.
--> src/SubscriptionKeys.sol:610:9:
|
610 | bytes32 h = keccak256(abi.encode(pc[j], bytes32(0)));
| ^^^^^^^^^
Traces:
[4574459] DeployUpdated::run()
├─ [0] VM::envAddress("OWNER_PUBLIC_KEY") [staticcall]
│ └─ ← <env var value>
├─ [0] VM::envUint("GOERLI_PRIVATE_KEY") [staticcall]
│ └─ ← <env var value>
├─ [0] VM::addr(73464747345674982469938061026992622247731622515636600952965970926359352835715 [7.346e76]) [staticcall]
│ └─ ← 0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C
├─ [0] VM::envUint("TEST_ACCOUNT_1_PRIVATE_KEY") [staticcall]
│ └─ ← <env var value>
├─ [0] VM::addr(5795402840189225882886695608452696287481391646514774704357302203371665873768 [5.795e75]) [staticcall]
│ └─ ← 0xD483F8a0156E48e58670121377eD95060a862297
├─ [0] VM::envUint("TEST_ACCOUNT_2_PRIVATE_KEY") [staticcall]
│ └─ ← <env var value>
├─ [0] VM::addr(60402837132990250975246707805624726089728175798317829623861948678443051121212 [6.04e76]) [staticcall]
│ └─ ← 0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272
├─ [0] VM::startBroadcast(73464747345674982469938061026992622247731622515636600952965970926359352835715 [7.346e76])
│ └─ ← ()
├─ [3008537] → new SubscriptionKeys@0x85F27145b4bb11DD843fb4ede1b90F3786aCfB9A
│ ├─ emit OwnershipTransferred(previousOwner: 0x0000000000000000000000000000000000000000, newOwner: 0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C)
│ └─ ← 14466 bytes of code
├─ [22533] SubscriptionKeys::setProtocolFeePercent(50000000000000000 [5e16])
│ └─ ← ()
├─ [22532] SubscriptionKeys::setSubscriptionRate(100000000000000000 [1e17])
│ └─ ← ()
├─ [22747] SubscriptionKeys::setProtocolFeeDestination(0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266)
│ └─ ← ()
├─ [22622] SubscriptionKeys::setLiquidationPenalty(150000000000000000 [1.5e17])
│ └─ ← ()
├─ [170538] SubscriptionKeys::initializeKeySubject()
│ ├─ [0] console::log("loghash", 0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C) [staticcall]
│ │ └─ ← ()
│ ├─ [0] console::log(0x1be1765de5e0d18bd5bed6884d3500373fa573312a6b97e64404390087473f95) [staticcall]
│ │ └─ ← ()
│ ├─ [0] console::f5b1bba9(0000000000000000000000000000000000000000000000000000000065563092) [staticcall]
│ │ └─ ← ()
│ ├─ emit NewInitializedKeySubject(keySubject: 0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C)
│ └─ ← ()
├─ [0] VM::stopBroadcast()
│ └─ ← ()
├─ [0] VM::startBroadcast(5795402840189225882886695608452696287481391646514774704357302203371665873768 [5.795e75])
│ └─ ← ()
├─ [168038] SubscriptionKeys::initializeKeySubject()
│ ├─ [0] console::log("loghash", 0xD483F8a0156E48e58670121377eD95060a862297) [staticcall]
│ │ └─ ← ()
│ ├─ [0] console::log(0x1be1765de5e0d18bd5bed6884d3500373fa573312a6b97e64404390087473f95) [staticcall]
│ │ └─ ← ()
│ ├─ [0] console::f5b1bba9(0000000000000000000000000000000000000000000000000000000065563092) [staticcall]
│ │ └─ ← ()
│ ├─ emit NewInitializedKeySubject(keySubject: 0xD483F8a0156E48e58670121377eD95060a862297)
│ └─ ← ()
├─ [2553] SubscriptionKeys::keySupply(0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C) [staticcall]
│ └─ ← 0
├─ [1430] SubscriptionKeys::getPrice(0, 3) [staticcall]
│ └─ ← 312500000000000 [3.125e14]
├─ [608] SubscriptionKeys::getProtocalFee(312500000000000 [3.125e14]) [staticcall]
│ └─ ← 15625000000000 [1.562e13]
├─ [7917] SubscriptionKeys::getPoolRequirementForBuy(0xD483F8a0156E48e58670121377eD95060a862297, 0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C, 3) [staticcall]
│ └─ ← 168750000000000 [1.687e14]
├─ [2659] SubscriptionKeys::getSubscriptionPool(0xD483F8a0156E48e58670121377eD95060a862297) [staticcall]
│ └─ ← 0
├─ [1328] SubscriptionKeys::getPriceProof(0xD483F8a0156E48e58670121377eD95060a862297) [staticcall]
│ └─ ← []
├─ [218144] SubscriptionKeys::buyKeys{value: 496875000000000}(0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C, 3, [])
│ ├─ [0] console::log("test-keysubject", 0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C) [staticcall]
│ │ └─ ← ()
│ ├─ [0] console::log("test-trader", 0xD483F8a0156E48e58670121377eD95060a862297) [staticcall]
│ │ └─ ← ()
│ ├─ [0] console::log("F5 user", 0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C) [staticcall]
│ │ └─ ← ()
│ ├─ [0] console::log(0x1be1765de5e0d18bd5bed6884d3500373fa573312a6b97e64404390087473f95) [staticcall]
│ │ └─ ← ()
│ ├─ emit PoolAdjusted(keySubject: 0xD483F8a0156E48e58670121377eD95060a862297, newPool: 168750000000000 [1.687e14])
│ ├─ emit Trade(trader: 0xD483F8a0156E48e58670121377eD95060a862297, subject: 0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C, isBuy: true, keyAmount: 3, ethAmount: 312500000000000 [3.125e14], supply: 3)
│ ├─ [0] 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266::fallback{value: 15625000000000}()
│ │ └─ ← ()
│ └─ ← ()
├─ [0] VM::stopBroadcast()
│ └─ ← ()
├─ [0] VM::startBroadcast(5795402840189225882886695608452696287481391646514774704357302203371665873768 [5.795e75])
│ └─ ← ()
├─ [2553] SubscriptionKeys::keySupply(0xD483F8a0156E48e58670121377eD95060a862297) [staticcall]
│ └─ ← 0
├─ [1430] SubscriptionKeys::getPrice(0, 3) [staticcall]
│ └─ ← 312500000000000 [3.125e14]
├─ [608] SubscriptionKeys::getProtocalFee(312500000000000 [3.125e14]) [staticcall]
│ └─ ← 15625000000000 [1.562e13]
├─ [9719] SubscriptionKeys::getPoolRequirementForBuy(0xD483F8a0156E48e58670121377eD95060a862297, 0xD483F8a0156E48e58670121377eD95060a862297, 3) [staticcall]
│ └─ ← 337500000000000 [3.375e14]
├─ [659] SubscriptionKeys::getSubscriptionPool(0xD483F8a0156E48e58670121377eD95060a862297) [staticcall]
│ └─ ← 168750000000000 [1.687e14]
├─ [6122] SubscriptionKeys::getPriceProof(0xD483F8a0156E48e58670121377eD95060a862297) [staticcall]
│ └─ ← [Proof({ keySubject: 0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C, pcs: [PriceChange({ price: 0, rate: 100000000000000000 [1e17], startTimestamp: 1700147346 [1.7e9], index: 0 })] })]
├─ [190129] SubscriptionKeys::buyKeys{value: 496875000000000}(0xD483F8a0156E48e58670121377eD95060a862297, 3, [Proof({ keySubject: 0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C, pcs: [PriceChange({ price: 0, rate: 100000000000000000 [1e17], startTimestamp: 1700147346 [1.7e9], index: 0 })] })])
│ ├─ [0] console::log("test-keysubject", 0xD483F8a0156E48e58670121377eD95060a862297) [staticcall]
│ │ └─ ← ()
│ ├─ [0] console::log("test-trader", 0xD483F8a0156E48e58670121377eD95060a862297) [staticcall]
│ │ └─ ← ()
│ ├─ [0] console::log("F5 user", 0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C) [staticcall]
│ │ └─ ← ()
│ ├─ [0] console::log(0x1be1765de5e0d18bd5bed6884d3500373fa573312a6b97e64404390087473f95) [staticcall]
│ │ └─ ← ()
│ ├─ [0] console::f5b1bba9(0000000000000000000000000000000000000000000000000000000065563092) [staticcall]
│ │ └─ ← ()
│ ├─ [0] console::log("computed hash") [staticcall]
│ │ └─ ← ()
│ ├─ [0] console::log(0x1be1765de5e0d18bd5bed6884d3500373fa573312a6b97e64404390087473f95) [staticcall]
│ │ └─ ← ()
│ ├─ [0] 0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C::fallback()
│ │ └─ ← ()
│ ├─ emit FeesCollected(trader: 0xD483F8a0156E48e58670121377eD95060a862297, keySubject: 0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C, amount: 0)
│ ├─ emit PoolAdjusted(keySubject: 0xD483F8a0156E48e58670121377eD95060a862297, newPool: 337500000000000 [3.375e14])
│ ├─ emit Trade(trader: 0xD483F8a0156E48e58670121377eD95060a862297, subject: 0xD483F8a0156E48e58670121377eD95060a862297, isBuy: true, keyAmount: 3, ethAmount: 312500000000000 [3.125e14], supply: 3)
│ ├─ [0] 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266::fallback{value: 15625000000000}()
│ │ └─ ← ()
│ └─ ← ()
├─ [0] VM::stopBroadcast()
│ └─ ← ()
├─ [0] VM::startBroadcast(60402837132990250975246707805624726089728175798317829623861948678443051121212 [6.04e76])
│ └─ ← ()
├─ [168038] SubscriptionKeys::initializeKeySubject()
│ ├─ [0] console::log("loghash", 0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272) [staticcall]
│ │ └─ ← ()
│ ├─ [0] console::log(0x1be1765de5e0d18bd5bed6884d3500373fa573312a6b97e64404390087473f95) [staticcall]
│ │ └─ ← ()
│ ├─ [0] console::f5b1bba9(0000000000000000000000000000000000000000000000000000000065563092) [staticcall]
│ │ └─ ← ()
│ ├─ emit NewInitializedKeySubject(keySubject: 0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272)
│ └─ ← ()
├─ [553] SubscriptionKeys::keySupply(0xD483F8a0156E48e58670121377eD95060a862297) [staticcall]
│ └─ ← 3
├─ [2035] SubscriptionKeys::getPrice(3, 3) [staticcall]
│ └─ ← 3125000000000000 [3.125e15]
├─ [608] SubscriptionKeys::getProtocalFee(3125000000000000 [3.125e15]) [staticcall]
│ └─ ← 156250000000000 [1.562e14]
├─ [7917] SubscriptionKeys::getPoolRequirementForBuy(0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272, 0xD483F8a0156E48e58670121377eD95060a862297, 3) [staticcall]
│ └─ ← 675000000000000 [6.75e14]
├─ [2659] SubscriptionKeys::getSubscriptionPool(0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272) [staticcall]
│ └─ ← 0
├─ [1328] SubscriptionKeys::getPriceProof(0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272) [staticcall]
│ └─ ← []
├─ [176449] SubscriptionKeys::buyKeys{value: 3956250000000000}(0xD483F8a0156E48e58670121377eD95060a862297, 3, [])
│ ├─ [0] console::log("test-keysubject", 0xD483F8a0156E48e58670121377eD95060a862297) [staticcall]
│ │ └─ ← ()
│ ├─ [0] console::log("test-trader", 0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272) [staticcall]
│ │ └─ ← ()
│ ├─ [0] console::log("F5 user", 0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C) [staticcall]
│ │ └─ ← ()
│ ├─ [0] console::log(0x1be1765de5e0d18bd5bed6884d3500373fa573312a6b97e64404390087473f95) [staticcall]
│ │ └─ ← ()
│ ├─ emit PoolAdjusted(keySubject: 0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272, newPool: 675000000000000 [6.75e14])
│ ├─ emit Trade(trader: 0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272, subject: 0xD483F8a0156E48e58670121377eD95060a862297, isBuy: true, keyAmount: 3, ethAmount: 3125000000000000 [3.125e15], supply: 6)
│ ├─ [0] 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266::fallback{value: 156250000000000}()
│ │ └─ ← ()
│ └─ ← ()
├─ [2553] SubscriptionKeys::keySupply(0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272) [staticcall]
│ └─ ← 0
├─ [1430] SubscriptionKeys::getPrice(0, 3) [staticcall]
│ └─ ← 312500000000000 [3.125e14]
├─ [608] SubscriptionKeys::getProtocalFee(312500000000000 [3.125e14]) [staticcall]
│ └─ ← 15625000000000 [1.562e13]
├─ [9719] SubscriptionKeys::getPoolRequirementForBuy(0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272, 0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272, 3) [staticcall]
│ └─ ← 843750000000000 [8.437e14]
├─ [659] SubscriptionKeys::getSubscriptionPool(0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272) [staticcall]
│ └─ ← 675000000000000 [6.75e14]
├─ [6122] SubscriptionKeys::getPriceProof(0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272) [staticcall]
│ └─ ← [Proof({ keySubject: 0xD483F8a0156E48e58670121377eD95060a862297, pcs: [PriceChange({ price: 0, rate: 100000000000000000 [1e17], startTimestamp: 1700147346 [1.7e9], index: 0 })] })]
├─ [190129] SubscriptionKeys::buyKeys{value: 496875000000000}(0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272, 3, [Proof({ keySubject: 0xD483F8a0156E48e58670121377eD95060a862297, pcs: [PriceChange({ price: 0, rate: 100000000000000000 [1e17], startTimestamp: 1700147346 [1.7e9], index: 0 })] })])
│ ├─ [0] console::log("test-keysubject", 0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272) [staticcall]
│ │ └─ ← ()
│ ├─ [0] console::log("test-trader", 0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272) [staticcall]
│ │ └─ ← ()
│ ├─ [0] console::log("F5 user", 0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C) [staticcall]
│ │ └─ ← ()
│ ├─ [0] console::log(0x1be1765de5e0d18bd5bed6884d3500373fa573312a6b97e64404390087473f95) [staticcall]
│ │ └─ ← ()
│ ├─ [0] console::f5b1bba9(0000000000000000000000000000000000000000000000000000000065563092) [staticcall]
│ │ └─ ← ()
│ ├─ [0] console::log("computed hash") [staticcall]
│ │ └─ ← ()
│ ├─ [0] console::log(0x1be1765de5e0d18bd5bed6884d3500373fa573312a6b97e64404390087473f95) [staticcall]
│ │ └─ ← ()
│ ├─ [0] 0xD483F8a0156E48e58670121377eD95060a862297::fallback()
│ │ └─ ← ()
│ ├─ emit FeesCollected(trader: 0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272, keySubject: 0xD483F8a0156E48e58670121377eD95060a862297, amount: 0)
│ ├─ emit PoolAdjusted(keySubject: 0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272, newPool: 843750000000000 [8.437e14])
│ ├─ emit Trade(trader: 0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272, subject: 0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272, isBuy: true, keyAmount: 3, ethAmount: 312500000000000 [3.125e14], supply: 3)
│ ├─ [0] 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266::fallback{value: 15625000000000}()
│ │ └─ ← ()
│ └─ ← ()
├─ [0] VM::stopBroadcast()
│ └─ ← ()
└─ ← ()
Script ran successfully.
== Logs ==
loghash 0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C
0x1be1765de5e0d18bd5bed6884d3500373fa573312a6b97e64404390087473f95
1700147346
loghash 0xD483F8a0156E48e58670121377eD95060a862297
0x1be1765de5e0d18bd5bed6884d3500373fa573312a6b97e64404390087473f95
1700147346
test-keysubject 0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C
test-trader 0xD483F8a0156E48e58670121377eD95060a862297
F5 user 0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C
0x1be1765de5e0d18bd5bed6884d3500373fa573312a6b97e64404390087473f95
test-keysubject 0xD483F8a0156E48e58670121377eD95060a862297
test-trader 0xD483F8a0156E48e58670121377eD95060a862297
F5 user 0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C
0x1be1765de5e0d18bd5bed6884d3500373fa573312a6b97e64404390087473f95
1700147346
computed hash
0x1be1765de5e0d18bd5bed6884d3500373fa573312a6b97e64404390087473f95
loghash 0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272
0x1be1765de5e0d18bd5bed6884d3500373fa573312a6b97e64404390087473f95
1700147346
test-keysubject 0xD483F8a0156E48e58670121377eD95060a862297
test-trader 0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272
F5 user 0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C
0x1be1765de5e0d18bd5bed6884d3500373fa573312a6b97e64404390087473f95
test-keysubject 0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272
test-trader 0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272
F5 user 0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C
0x1be1765de5e0d18bd5bed6884d3500373fa573312a6b97e64404390087473f95
1700147346
computed hash
0x1be1765de5e0d18bd5bed6884d3500373fa573312a6b97e64404390087473f95
EIP-3855 is not supported in one or more of the RPCs used.
Unsupported Chain IDs: 420.
Contracts deployed with a Solidity version equal or higher than 0.8.20 might not work properly.
For more information, please see https://eips.ethereum.org/EIPS/eip-3855
## Setting up 1 EVM.
==========================
Simulated On-chain Traces:
[3290921] → new SubscriptionKeys@0x85F27145b4bb11DD843fb4ede1b90F3786aCfB9A
├─ emit OwnershipTransferred(previousOwner: 0x0000000000000000000000000000000000000000, newOwner: 0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C)
└─ ← 14466 bytes of code
[51508] SubscriptionKeys::setProtocolFeePercent(50000000000000000 [5e16])
└─ ← ()
[48658] SubscriptionKeys::setSubscriptionRate(100000000000000000 [1e17])
└─ ← ()
[51951] SubscriptionKeys::setProtocolFeeDestination(0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266)
└─ ← ()
[48753] SubscriptionKeys::setLiquidationPenalty(150000000000000000 [1.5e17])
└─ ← ()
[217802] SubscriptionKeys::initializeKeySubject()
├─ [0] console::log("loghash", 0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C) [staticcall]
│ └─ ← ()
├─ [0] console::log(0x65423826a80883d245e8e50ff98d59ab274d4f3776f51d18d3e9ca5f909f9678) [staticcall]
│ └─ ← ()
├─ [0] console::f5b1bba9(00000000000000000000000000000000000000000000000000000000655630cc) [staticcall]
│ └─ ← ()
├─ emit NewInitializedKeySubject(keySubject: 0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C)
└─ ← ()
[217802] SubscriptionKeys::initializeKeySubject()
├─ [0] console::log("loghash", 0xD483F8a0156E48e58670121377eD95060a862297) [staticcall]
│ └─ ← ()
├─ [0] console::log(0x65423826a80883d245e8e50ff98d59ab274d4f3776f51d18d3e9ca5f909f9678) [staticcall]
│ └─ ← ()
├─ [0] console::f5b1bba9(00000000000000000000000000000000000000000000000000000000655630cc) [staticcall]
│ └─ ← ()
├─ emit NewInitializedKeySubject(keySubject: 0xD483F8a0156E48e58670121377eD95060a862297)
└─ ← ()
[287495] SubscriptionKeys::buyKeys{value: 496875000000000}(0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C, 3, [])
├─ [0] console::log("test-keysubject", 0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C) [staticcall]
│ └─ ← ()
├─ [0] console::log("test-trader", 0xD483F8a0156E48e58670121377eD95060a862297) [staticcall]
│ └─ ← ()
├─ [0] console::log("F5 user", 0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C) [staticcall]
│ └─ ← ()
├─ [0] console::log(0x65423826a80883d245e8e50ff98d59ab274d4f3776f51d18d3e9ca5f909f9678) [staticcall]
│ └─ ← ()
├─ emit PoolAdjusted(keySubject: 0xD483F8a0156E48e58670121377eD95060a862297, newPool: 168750000000000 [1.687e14])
├─ emit Trade(trader: 0xD483F8a0156E48e58670121377eD95060a862297, subject: 0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C, isBuy: true, keyAmount: 3, ethAmount: 312500000000000 [3.125e14], supply: 3)
├─ [0] 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266::fallback{value: 15625000000000}()
│ └─ ← ()
└─ ← ()
[62026] SubscriptionKeys::buyKeys{value: 496875000000000}(0xD483F8a0156E48e58670121377eD95060a862297, 3, [Proof({ keySubject: 0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C, pcs: [PriceChange({ price: 0, rate: 100000000000000000 [1e17], startTimestamp: 1700147346 [1.7e9], index: 0 })] })])
├─ [0] console::log("test-keysubject", 0xD483F8a0156E48e58670121377eD95060a862297) [staticcall]
│ └─ ← ()
├─ [0] console::log("test-trader", 0xD483F8a0156E48e58670121377eD95060a862297) [staticcall]
│ └─ ← ()
├─ [0] console::log("F5 user", 0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C) [staticcall]
│ └─ ← ()
├─ [0] console::log(0x65423826a80883d245e8e50ff98d59ab274d4f3776f51d18d3e9ca5f909f9678) [staticcall]
│ └─ ← ()
├─ [0] console::f5b1bba9(0000000000000000000000000000000000000000000000000000000065563092) [staticcall]
│ └─ ← ()
├─ [0] console::log("computed hash") [staticcall]
│ └─ ← ()
├─ [0] console::log(0x1be1765de5e0d18bd5bed6884d3500373fa573312a6b97e64404390087473f95) [staticcall]
│ └─ ← ()
└─ ← InvalidProof(0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C, 0x65423826a80883d245e8e50ff98d59ab274d4f3776f51d18d3e9ca5f909f9678, 0x1be1765de5e0d18bd5bed6884d3500373fa573312a6b97e64404390087473f95)
[217802] SubscriptionKeys::initializeKeySubject()
├─ [0] console::log("loghash", 0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272) [staticcall]
│ └─ ← ()
├─ [0] console::log(0x65423826a80883d245e8e50ff98d59ab274d4f3776f51d18d3e9ca5f909f9678) [staticcall]
│ └─ ← ()
├─ [0] console::f5b1bba9(00000000000000000000000000000000000000000000000000000000655630cc) [staticcall]
│ └─ ← ()
├─ emit NewInitializedKeySubject(keySubject: 0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272)
└─ ← ()
[289620] SubscriptionKeys::buyKeys{value: 3956250000000000}(0xD483F8a0156E48e58670121377eD95060a862297, 3, [])
├─ [0] console::log("test-keysubject", 0xD483F8a0156E48e58670121377eD95060a862297) [staticcall]
│ └─ ← ()
├─ [0] console::log("test-trader", 0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272) [staticcall]
│ └─ ← ()
├─ [0] console::log("F5 user", 0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C) [staticcall]
│ └─ ← ()
├─ [0] console::log(0x65423826a80883d245e8e50ff98d59ab274d4f3776f51d18d3e9ca5f909f9678) [staticcall]
│ └─ ← ()
├─ emit PoolAdjusted(keySubject: 0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272, newPool: 3628125000000000 [3.628e15])
├─ emit Trade(trader: 0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272, subject: 0xD483F8a0156E48e58670121377eD95060a862297, isBuy: true, keyAmount: 3, ethAmount: 312500000000000 [3.125e14], supply: 3)
├─ [0] 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266::fallback{value: 15625000000000}()
│ └─ ← ()
└─ ← ()
[66026] SubscriptionKeys::buyKeys{value: 496875000000000}(0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272, 3, [Proof({ keySubject: 0xD483F8a0156E48e58670121377eD95060a862297, pcs: [PriceChange({ price: 0, rate: 100000000000000000 [1e17], startTimestamp: 1700147346 [1.7e9], index: 0 })] })])
├─ [0] console::log("test-keysubject", 0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272) [staticcall]
│ └─ ← ()
├─ [0] console::log("test-trader", 0x5cdAe81bC5997A9959aE239750F3a2eC9bdE3272) [staticcall]
│ └─ ← ()
├─ [0] console::log("F5 user", 0xF5886Bc3f1d3d6A6a44788f93eF7195fcDd6e38C) [staticcall]
│ └─ ← ()
├─ [0] console::log(0x65423826a80883d245e8e50ff98d59ab274d4f3776f51d18d3e9ca5f909f9678) [staticcall]
│ └─ ← ()
├─ [0] console::f5b1bba9(0000000000000000000000000000000000000000000000000000000065563092) [staticcall]
│ └─ ← ()
├─ [0] console::log("computed hash") [staticcall]
│ └─ ← ()
├─ [0] console::log(0x1be1765de5e0d18bd5bed6884d3500373fa573312a6b97e64404390087473f95) [staticcall]
│ └─ ← ()
└─ ← InvalidProof(0xD483F8a0156E48e58670121377eD95060a862297, 0x65423826a80883d245e8e50ff98d59ab274d4f3776f51d18d3e9ca5f909f9678, 0x1be1765de5e0d18bd5bed6884d3500373fa573312a6b97e64404390087473f95)
Error:
Transaction failed when running the on-chain simulation. Check the trace above for more information.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment