Giovanni S | Flow (2024-06-27)
I'm running to an issue running accessing a contract value in a Crescendo transaction - 9900f1b3e3d1c2ac98b4d70662b6e24506dc7ef745854f5467da1eeca4bae52f
I need to access the dereferenced EVMAddress value in order to encode it. I also tried dereferencing in e971eb7ebfb42f2774032c98bb4be710626fb1cd8c838667af42b30a0d6e8cfb with
*
operator but I'm getting an error
Anyone know how I should be accessing contract fields by value now?8 Replies
I've created a thread for your message. Please continue any relevant discussion in this thread.
You can rename this thread using
/title <new title>
If this is a technical question that others may benefit from, considering also asking it on Stackoverflow: https://stackoverflow.com/questions/ask?tags=onflow-cadenceI checked in on this FLIP but couldn't find an example
https://github.com/onflow/flips/blob/main/cadence/20240612-import-contract-as-reference.md
cc @turbolent @Supun
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
EVM.encodeABI
takes an array of values as [AnyStruct]
but only certain types can be encoded such that they're interprettable by EVM as compatible bytecode. These valid types include EVMAddress but I'm assuming that passing a reference to an EVMAddress is a different type.
In the original transaction without dereferencing, I get this error
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
Ah yeah, that makese sense. Is there a correct way to access the contract field or is this a bug?
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
Ah, got it. Thank you