[SOLVED] Smart contract execution error

Hi, I’ve developed a new smart contract for testing purposes.
This is what I did:

contract LogoVote =

record state = { 
	urls : map(int, string)}

function init() = { urls = {} }

public function getLogo(index : int) : string =
	state.urls[index]

public stateful function setLogo(index: int, url : string) = 
	put(state { urls[index] = url })

When I compile it, it’s ok. I deployed it ok also. But when trying to call function setLogo with this params 1,“www.google.com” I get this response:
{“data”:{“reason”:“Parse errors\nline 14, column 41: Unexpected token id”}}

Does anybody know where’s the error? Am I doing something wrong?

Thanks in advance!

Hi @jruiz,

Try calling the function without using double quotes on the string parameter.
Instead of “www.google.com” use www.google.com.

2 Likes

That made the trick! Thank you very much!

1 Like