feat: Implement Permit2

- Retrieve allowance data from an RPC
- Encode approvals:
  - Create PermitSingle (and PermitDetails)
  - Use alloy eip712 to get signing hash on typed data
  - Sign data
- Add chrono and alloy eip712 and signer-local to Cargo.toml

--- don't change below this line ---
ENG-4063 Took 1 hour 58 minutes

Took 18 seconds

Took 32 seconds

Took 9 seconds

Took 1 minute


Took 32 minutes
This commit is contained in:
Diana Carvalho
2025-01-21 18:26:44 +00:00
parent 7bfd6c981c
commit ce9ae49e6f
5 changed files with 1330 additions and 55 deletions

View File

@@ -72,8 +72,7 @@ impl<S: StrategySelector, A: UserApprovalsManager> RouterEncoder<S, A> for EVMRo
owner: solution.sender.clone(),
});
}
Ok(self
.approvals_manager
.encode_approvals(approvals))
self.approvals_manager
.encode_approvals(approvals)
}
}