You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This project demonstrates a basic Foundry use case. It comes with a contract generated by [OpenZeppelin Wizard](https://wizard.openzeppelin.com/), a test for that contract, and a script that deploys that contract.␊
1365
+
␊
1366
+
## Installing Foundry␊
1367
+
␊
1368
+
See [Foundry installation guide](https://book.getfoundry.sh/getting-started/installation).␊
1369
+
␊
1370
+
## Initializing the project␊
1371
+
␊
1372
+
\`\`\`␊
1373
+
bash setup.sh␊
1374
+
\`\`\`␊
1375
+
␊
1376
+
## Testing the contract␊
1377
+
␊
1378
+
\`\`\`␊
1379
+
forge test --force␊
1380
+
\`\`\`␊
1381
+
␊
1382
+
## Deploying the contract␊
1383
+
␊
1384
+
You can simulate a deployment by running the script:␊
1385
+
␊
1386
+
\`\`\`␊
1387
+
forge script script/MyAccount.s.sol --force␊
1388
+
\`\`\`␊
1389
+
␊
1390
+
See [Solidity scripting guide](https://book.getfoundry.sh/guides/scripting-with-solidity) for more information.␊
1391
+
`,
1392
+
`// SPDX-License-Identifier: MIT␊
1393
+
pragma solidity ^0.8.27;␊
1394
+
␊
1395
+
import {Script} from "forge-std/Script.sol";␊
1396
+
import {console} from "forge-std/console.sol";␊
1397
+
import {ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";␊
1398
+
import {MyAccount} from "src/MyAccount.sol";␊
1399
+
␊
1400
+
contract MyAccountScript is Script {␊
1401
+
function setUp() public {}␊
1402
+
␊
1403
+
function run() public {␊
1404
+
// TODO: Set addresses for the variables below, then uncomment the following section:␊
1405
+
/*␊
1406
+
vm.startBroadcast();␊
1407
+
address signer = <Set signer address here>;␊
1408
+
MyAccount implementation = new MyAccount();␊
1409
+
address proxy = address(new ERC1967Proxy(␊
1410
+
address(implementation),␊
1411
+
abi.encodeCall(MyAccount.initialize, (signer))␊
1412
+
));␊
1413
+
MyAccount instance = MyAccount(payable(proxy));␊
1414
+
console.log("Proxy deployed to %s", address(instance));␊
1415
+
vm.stopBroadcast();␊
1416
+
*/␊
1417
+
}␊
1418
+
}␊
1419
+
`,
1420
+
`// SPDX-License-Identifier: MIT␊
1421
+
// Compatible with OpenZeppelin Contracts ^5.4.0␊
1422
+
pragma solidity ^0.8.27;␊
1423
+
␊
1424
+
import {Account} from "@openzeppelin/contracts/account/Account.sol";␊
1425
+
import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊
1426
+
import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊
1427
+
import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊
1428
+
import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊
1429
+
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊
1430
+
import {SignerECDSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerECDSAUpgradeable.sol";␊
1431
+
import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊
0 commit comments