0

For example, I am taking one function function transferAddresses() in my contract contract one{} from where I am taking number of addresses in array. Now I want to transfer the whole data of the array to another solidity file's contract. What should I do?

  • How can anyone relate to your question with no code shown??? – goodvibration Feb 13 at 7:44
  • I don't have any code yet. I just want to implement given problem definition that how do I pass an array from one contract .sol file to another in any particular function, that's why I've added my assumption that my contract is one my function is transferAddresses. – Rudrika Feb 13 at 9:58
  • OK, then the answer is that you simply declare the function to take an array as input, and you pass an array when you call this function. Did that help you to solve your problem? I am guessing not, because it is not backed by a concrete coding example. Why? Because you haven't provided any code, so I cannot refer to it and add the missing part or fix an existing part! – goodvibration Feb 13 at 10:20
  • Can you inherit the contracts ? – Uahmed Feb 13 at 15:47
  • no.... actually I have upgradable smart contract...in which I want to add this kind of functionality....that's why my old and new contracts are in different file. – Rudrika Feb 14 at 4:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.