────────────────────────────────────────────────────────────────────
TRANSACTION TYPES
────────────────────────────────────────────────────────────────────
1. CREATE - Deploy contract (address depends on deployer + nonce)
2. CREATE2 - Deploy contract (address is deterministic/predictable)
3. CALL - Call a function on existing contract
4. DELEGATECALL - Call using caller's storage (used by proxies internally)
Transaction Types Explained
1. CREATE
// Regular contract deployment
new MyContract(arg1, arg2);
json{
"transactionType": "CREATE",
"to": null, // ◄── null means contract creation
"contractAddress": "0x..."
}
2. CREATE2
// Deterministic deployment via factory
// Foundry does this automatically for libraries
json{
"transactionType": "CREATE2",
"to": "0x4e59b448...", // ◄── Factory address
"contractAddress": "0x..."
}
3. CALL
// Function call on existing contract
provider.setStablecoin(usdcAddress);
json{
"transactionType": "CALL",
"to": "0xa729b836...", // ◄── Contract being called
"function": "setStablecoin(address)",
"arguments": ["0x1c7D4B19..."]
}
4. DELEGATECALL (Internal, not in broadcast)
// Used by proxies - executes code in caller's context
// You won't see this in transactions, it's internal
proxy.delegatecall(implementation, data);
Top comments (0)