Add Account framework (#5657)

This commit is contained in:
Ernesto García
2025-06-02 08:22:57 -06:00
committed by GitHub
parent 88962fb5ab
commit 83d2a247be
38 changed files with 3086 additions and 46 deletions

View File

@ -1,5 +1,6 @@
const { ethers } = require('hardhat');
const { shouldBehaveLikeERC1271 } = require('./ERC1271.behavior');
const { NonNativeSigner, P256SigningKey, RSASHA256SigningKey } = require('../../helpers/signers');
describe('ERC7739', function () {
describe('for an ECDSA signer', function () {
@ -10,4 +11,28 @@ describe('ERC7739', function () {
shouldBehaveLikeERC1271({ erc7739: true });
});
describe('for a P256 signer', function () {
before(async function () {
this.signer = new NonNativeSigner(P256SigningKey.random());
this.mock = await ethers.deployContract('ERC7739P256Mock', [
this.signer.signingKey.publicKey.qx,
this.signer.signingKey.publicKey.qy,
]);
});
shouldBehaveLikeERC1271({ erc7739: true });
});
describe('for an RSA signer', function () {
before(async function () {
this.signer = new NonNativeSigner(RSASHA256SigningKey.random());
this.mock = await ethers.deployContract('ERC7739RSAMock', [
this.signer.signingKey.publicKey.e,
this.signer.signingKey.publicKey.n,
]);
});
shouldBehaveLikeERC1271({ erc7739: true });
});
});