GetContractVariables should respect changes
Closed this issue · 1 comments
skas102 commented
Function GetContractVariables
should respect the changes made to the variables.
skas102 commented
func (c *Context) findChangeByIndex(index int) *Change {
for _, change := range c.changes {
i, _ := change.GetChange()
if i == index {
return &change
}
}
return nil
}
// Check if variables are overwritten, if so return the change instead of the initial value
change := c.findChangeByIndex(index)
if change != nil {
variable = change.value
}