Closed jigglyjams closed 3 months ago
implemented by https://github.com/nance-eth/nance-interface/commit/a998e4841ff1f10bc1831b6be2b31a926e0c99b1
here's the some code details I found:
state_override
update threshold of that Safe contract to be one, it means there's only one owner
the signature 0x0000...address...1
we pass as signatures
will be interpreted as "approved hash", it's valid as long as msg.sender == address
. check contract code below
else if (v == 1) {
// If v is 1 then it is an approved hash
// When handling approved hashes the address of the approver is encoded into r
currentOwner = address(uint160(uint256(r)));
// Hashes are automatically approved by the sender of the message or when they have been pre-approved via a separate transaction
if (executor != currentOwner && approvedHashes[currentOwner][dataHash] == 0) revertWithError("GS025");
}
Integrate state overrides into Tenderly API call so we can match safe.global's way of simulation
to
should be the Safe address itself as wellnance-ts implementation: https://github.com/nance-eth/nance-ts/blob/04536ea7f0db251ad83272f1a3c92fb5fe892e38/src/tenderly/tenderlyHandler.ts#L76
checkout example https://dashboard.tenderly.co/public/safe/safe-apps/simulator/939a1c7a-887e-44d4-80a3-09a6a9c7349c