* Return the deployed bytecode or null if no bytecode is found.
()
| 666 | * Return the deployed bytecode or null if no bytecode is found. |
| 667 | */ |
| 668 | async getDeployedCode() { |
| 669 | const provider = getProvider(this.runner); |
| 670 | assert(provider, "runner does not support .provider", "UNSUPPORTED_OPERATION", { operation: "getDeployedCode" }); |
| 671 | const code = await provider.getCode(await this.getAddress()); |
| 672 | if (code === "0x") { |
| 673 | return null; |
| 674 | } |
| 675 | return code; |
| 676 | } |
| 677 | /** |
| 678 | * Resolve to this Contract once the bytecode has been deployed, or |
| 679 | * resolve immediately if already deployed. |
no test coverage detected