Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

142
Views
El objetivo es implementar un convertidor de bytes a bytes para que las estructuras puedan pasarlas de un contrato a otro en forma de bytes.

Dado el siguiente conjunto de contratos, el objetivo es implementar un convertidor de bytes a bytes para que las estructuras puedan pasarlas de un contrato a otro en forma de bytes. Suponga que los contratos de almacenamiento y controlador tienen diferentes direcciones en la red. StructDefiner nunca se implementa por sí solo y se usa como parte de Storage o Controller.

 // SPDX-License-Identifier: MIT pragma solidity ^0.8.12; contract StructDefiner { struct MyStruct { uint256 someField; address someAddress; uint128 someOtherfield; uint128 oneMoreField; } } contract Storage { StructDefiner.MyStruct[] internal structs; function getStructByIdx(uint256 idx) external view returns (bytes memory) { assembly { //Your code } } } contract Controller { Storage internal storag; constructor(address _storage) { storag = Storage(_storage); } function getStruct(uint256 idx) public view returns (StructDefiner.MyStruct memory myStruct) { bytes memory _myStruct = storag.getStructByIdx(idx); assembly { //your code } } } I am a beginner in solidity and assembly language please give me some idea how I can solve this problem.
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!