Skip to content

Commit eff9c7a

Browse files
committed
chore: fix getCode
Signed-off-by: nikolay <n.atanasow94@gmail.com>
1 parent e22ad04 commit eff9c7a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/relay/src/lib/services/ethService/contractService/ContractService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ export class ContractService implements IContractService {
210210
address: string,
211211
blockNumber: string | null,
212212
requestDetails: RequestDetails,
213-
): Promise<string | null> {
213+
): Promise<string> {
214214
const requestIdPrefix = requestDetails.formattedRequestId;
215215
if (!this.common.isBlockParamValid(blockNumber)) {
216216
throw predefined.UNKNOWN_BLOCK(
@@ -250,7 +250,7 @@ export class ContractService implements IContractService {
250250
} else if (result.type === constants.TYPE_CONTRACT) {
251251
if (result.entity.runtime_bytecode !== constants.EMPTY_HEX) {
252252

253-
// Might be removed by another PR related to the getCode improvements
253+
// Might be removed by another PR related to the getCode improvements - https://github.com/hiero-ledger/hiero-json-rpc-relay/pull/3698
254254
//
255255
// const prohibitedOpcodes = ['CALLCODE', 'DELEGATECALL', 'SELFDESTRUCT', 'SUICIDE'];
256256
// const opcodes = disassemble(result?.entity.runtime_bytecode);

packages/relay/src/lib/services/ethService/contractService/IContractService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export interface IContractService {
2222
/**
2323
* Returns the compiled smart contract code at a given address.
2424
*/
25-
getCode: (address: string, blockNumber: string | null, requestDetails: RequestDetails) => Promise<string | null>;
25+
getCode: (address: string, blockNumber: string | null, requestDetails: RequestDetails) => Promise<string>;
2626

2727
/**
2828
* Returns an array of all logs matching the filter criteria.

0 commit comments

Comments
 (0)