Research on Bytecode Rewriting and Upgrading of Smart Contracts