make upgrade, error: Ownable: caller is not the owner
lokichoggio opened this issue · comments
lokichoggio commented
make upgrade
[⠆] Compiling...
No files changed, compilation skipped
Traces:
[639098] → new DevOpsTools@0x84eA74d481Ee0A5332c457a4d796187F6Ba67fEB
└─ ← 3192 bytes of code
[1023877] → new UpgradeBox@0x5b73C5498c1E3b4dbA84de0F1833c4a029d90519
└─ ← 4893 bytes of code
[831827] UpgradeBox::run()
├─ [35809] DevOpsTools::e374cdf1(00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000007a69000000000000000000000000000000000000000000000000000000000000000c4552433139363750726f78790000000000000000000000000000000000000000) [delegatecall]
│ ├─ [0] VM::ffi([pwd])
│ │ └─ ← 0x2f55736572732f77656e64796361742f676f2f7372632f6769746875622f73656c662f666f756e6472792f666f756e6472792d75706772616465732d663233
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← 0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000053331333337000000000000000000000000000000000000000000000000000000
│ ├─ [0] VM::ffi([bash, foundry-upgrades-f23/lib/foundry-devops/src/get_recent_deployment.sh, ERC1967Proxy, 31337, foundry-upgrades-f23//broadcast])
│ │ └─ ← 0xc3e53f4d16ae77db1c982e75a937b9f60fe63690
│ ├─ [0] console::log(Return Data:) [staticcall]
│ │ └─ ← ()
│ ├─ [0] console::log(0xc3e53f4d16ae77db1c982e75a937b9f60fe63690) [staticcall]
│ │ └─ ← ()
│ └─ ← 0x000000000000000000000000c3e53f4d16ae77db1c982e75a937b9f60fe63690
├─ [0] VM::startBroadcast()
│ └─ ← ()
├─ [727112] → new BoxV2@0x9E545E3C0baAB3E08CdfD552C960A1050f373042
│ ├─ emit Initialized(version: 255)
│ └─ ← 3514 bytes of code
├─ [0] VM::stopBroadcast()
│ └─ ← ()
├─ [0] VM::startBroadcast()
│ └─ ← ()
├─ [7784] 0xc3e53F4d16Ae77Db1c982e75a937B9f60FE63690::upgradeTo(BoxV2: [0x9E545E3C0baAB3E08CdfD552C960A1050f373042])
│ ├─ [2873] 0xE6E340D132b5f46d1e472DebcD681B2aBc16e57E::upgradeTo(BoxV2: [0x9E545E3C0baAB3E08CdfD552C960A1050f373042]) [delegatecall]
│ │ └─ ← "Ownable: caller is not the owner"
│ └─ ← "Ownable: caller is not the owner"
└─ ← "Ownable: caller is not the owner"
== Logs ==
Return Data:
0xc3e53f4d16ae77db1c982e75a937b9f60fe63690
Error:
Ownable: caller is not the owner
lokichoggio commented
Patrick Collins commented
what does your make upgrade
do? That's not in the repo here.
lokichoggio commented
what does your
make upgrade
do? That's not in the repo here.
here is my Makefile.
-include .env
.PHONY: all test clean deploy fund help install snapshot format anvil
DEFAULT_ANVIL_KEY := 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
help:
@echo "Usage:"
@echo " make deploy [ARGS=...]\n example: make deploy ARGS=\"--network sepolia\""
@echo ""
@echo " make fund [ARGS=...]\n example: make deploy ARGS=\"--network sepolia\""
all: clean remove install update build
# Clean the repo
clean :; forge clean
# Remove modules
remove :; rm -rf .gitmodules && rm -rf .git/modules/* && rm -rf lib && touch .gitmodules && git add . && git commit -m "modules"
install :; forge install Cyfrin/foundry-devops@0.0.11 --no-commit && forge install foundry-rs/forge-std@v1.5.3 --no-commit && forge install openzeppelin/openzeppelin-contracts@v4.8.3 --no-commit
# Update Dependencies
update:; forge update
build:; forge build
test :; forge test
snapshot :; forge snapshot
format :; forge fmt
anvil :; anvil -m 'test test test test test test test test test test test junk' --steps-tracing --block-time 1
NETWORK_ARGS := --rpc-url http://localhost:8545 --private-key $(DEFAULT_ANVIL_KEY) --broadcast
ifeq ($(findstring --network sepolia,$(ARGS)),--network sepolia)
NETWORK_ARGS := --rpc-url $(SEPOLIA_RPC_URL) --private-key $(PRIVATE_KEY) --broadcast --verify --etherscan-api-key $(ETHERSCAN_API_KEY) -vvvvv
endif
deploy:
@forge script script/DeployBox.s.sol:DeployBox $(NETWORK_ARGS)
upgrade:
@forge script script/UpgradeBox.s.sol:UpgradeBox $(NETWORK_ARGS)
Iftikhar uddin commented
Patrick Collins commented
Wow I'm an idiot, I forgot to call initialize
!!
I've updated this in 23c8e554c11df34e96033384117ac9fd602039fd
, can you try now?
Iftikhar uddin commented
Thanks, just tested the make deploy
and it's working fine now 👍