Skip to content

Refactor p2p2core adapters #3204

@rodrigo-pino

Description

@rodrigo-pino

In "adapters/p2p2core/class.go"

Please refactor AdaptClass (by renaming it to AdaptClassDefinition and:

  1. change the adaptEP lambda function into a normal function (I think a similar function already exists which is called adaptEntryPoint.
  2. remove the use of utils.map and use a for-loop.

Rename createCompiledClass and name it compileToCasm:

  1. Change the return type from a reference type to a value type (*core.CasmClasstocore.CasmClass`)
  2. Add a todo on top which asks: "should this be a method of class.Cairo1Class"
  3. In order to get this change correct you will have to update sn2coreAdaptCompiledClass.

In "adapters/p2p2core/transaction.go", change the return types of AdaptDeclareV3WithClass to return by value.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions