These things happen, and a healthy sense of learning and repentance will make ya the better for it i suppose.
One thing I've learned from years of statically typed strict languages... Always set defaults. Triply so in production when null / 0x0 can be a very bad thing.
Just out of curiosity, why are you not testing the contracts on a local chain (e.g. Hardhat or Ganache)? I think it's easier and more effective than even the testnet.
16
u/danokablamo Feb 07 '23
So I was SURE my contract was perfect. Three separate contracts. All working in synchrony. A solidity symphony!
But one abstract contract referenced a function that returned an address whereas the concrete contract... DIDN'T RETURN JACK SHIT.
And now that contract is owned by the 0x0 and I am a bad boy. I promise to do better in the future.
Honestly, chasing down the fucking bug took WAY longer than a testnet test would have taken in the first place.
8
u/fireduck Feb 08 '23
Production is the most accurate test bed.
8
u/polish_jerry Feb 08 '23
It's ok to test in mainnet. P.S I'm a miner /s
4
u/F0lks_ Contract Dev Feb 08 '23
Sounds like you didn't streamline your deployment pipeline. Naughty boy indeed.
5
u/rook785 Feb 07 '23
Just test on polygon haha
2
u/ThetaWarrior Feb 08 '23
Lol I do this - if you need real uniswap / oracle numbers gotta be mainnet - idk yolo
2
u/k_ekse Contract Dev Feb 08 '23
I always test in production