Skip to content

Instantly share code, notes, and snippets.

@pythonpete32
Created September 27, 2022 10:12
Show Gist options
  • Save pythonpete32/b79fb32783f918987425a256c9746667 to your computer and use it in GitHub Desktop.
Save pythonpete32/b79fb32783f918987425a256c9746667 to your computer and use it in GitHub Desktop.
forwarding path through dao
let to, calldata, action
// to be executed from voting
to = target.address
calldata = target.interface.encodeFunctionData('increment', [])
action = { to, calldata }
const votingScript = encodeCallScript([action])
// to be executed from tokenManager
to = voting.address
calldata = voting.interface.encodeFunctionData('newVote(bytes,string)', [votingScript,'Test Vote'])
action = { to, calldata }
const tmScript = encodeCallScript([action])
await tm.forward(tmScript)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment