abstract |
A method for A method for supporting smart contracts in a blockchain network, wherein the blockchain network is a distributed blockchain network having nodes, wherein each node that validates transactions runs a virtual machine for executing a smart contract, wherein a contract rewriting framework system is provided, wherein said contract rewriting framework system comprises a vulnerability detection tool, a rewriter tool and a deployment component, the method comprising: obtaining, by the deployment component, a permission to upgrade a smart contract, wherein said permission is granted to the deployment component by a creator and/or owner of the smart contract during a creation phase of the smart contract; retrieving, by the contract rewriting framework system, the smart contract from the blockchain network, wherein the smart contract is passed to the vulnerability detection tool; detecting, by the vulnerability detection tool, a vulnerability in the smart contract, wherein the vulnerability detection tool determines a type of the vulnerability and an instruction location of the vulnerability; rewriting, by the rewriter tool, the smart contract to include a patch for fixing the vulnerability, wherein a patched smart contract is generated by the rewriter tool based on the type of the vulnerability and the instruction location of the vulnerability; issuing, by the deployment component, an upgrade transaction including the patched smart contract to the blockchain network, such that the patched smart contract is deployed in the blockchain network. Furthermore, a corresponding contract rewriting framework system is disclosed. |