From 57d84104a9dd0467e0d9d9bdd98a44de9968e0ff Mon Sep 17 00:00:00 2001 From: dmarzzz Date: Fri, 5 Jan 2024 01:33:42 -0500 Subject: [PATCH 01/14] working forge tests --- examples/712/L1/README.md | 3 + examples/712/L1/src/NFTEE.sol | 77 +++++++++++++ examples/712/L1/test/NFTEE.t.sol | 56 ++++++++++ examples/712/SUAVE/src/712Emitter.sol | 95 ++++++++++++++++ examples/712/SUAVE/test/712Emitter.t.sol | 60 +++++++++++ examples/712/main.go | 131 +++++++++++++++++++++++ 6 files changed, 422 insertions(+) create mode 100644 examples/712/L1/README.md create mode 100644 examples/712/L1/src/NFTEE.sol create mode 100644 examples/712/L1/test/NFTEE.t.sol create mode 100644 examples/712/SUAVE/src/712Emitter.sol create mode 100644 examples/712/SUAVE/test/712Emitter.t.sol create mode 100644 examples/712/main.go diff --git a/examples/712/L1/README.md b/examples/712/L1/README.md new file mode 100644 index 0000000..7f7174b --- /dev/null +++ b/examples/712/L1/README.md @@ -0,0 +1,3 @@ +# Deposit + +The source code referenced in Foundry tutorial [Testing EIP-712 Signatures](https://book.getfoundry.sh/tutorials/testing-eip712.html) diff --git a/examples/712/L1/src/NFTEE.sol b/examples/712/L1/src/NFTEE.sol new file mode 100644 index 0000000..2afca48 --- /dev/null +++ b/examples/712/L1/src/NFTEE.sol @@ -0,0 +1,77 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.13; + +import {ERC721} from "solmate/tokens/ERC721.sol"; + +/// @title NFTMinter +/// @notice Contract to mint ERC-721 tokens with a signed EIP-712 message +contract SuaveNFT is ERC721 { + // Event declarations + event NFTMintedEvent(address indexed recipient, uint256 indexed tokenId); + + // EIP-712 Domain Separator + bytes32 public DOMAIN_SEPARATOR; + + // EIP-712 TypeHash + bytes32 public constant MINT_TYPEHASH = + keccak256("Mint(string name,string symbol,uint256 tokenId,address recipient)"); + + // Authorized signer's address + address public authorizedSigner; + + // NFT Details + string public constant NAME = "SUAVE_NFT"; + string public constant SYMBOL = "NFTEE"; + string public constant TOKEN_URI = "IPFS_URL"; + + constructor(address _authorizedSigner) ERC721(NAME, SYMBOL) { + authorizedSigner = _authorizedSigner; + + // Initialize DOMAIN_SEPARATOR with EIP-712 domain separator, specific to your contract + DOMAIN_SEPARATOR = keccak256( + abi.encode( + keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), + keccak256(bytes(NAME)), + keccak256(bytes(SYMBOL)), + block.chainid, + address(this) + ) + ); + } + + // Mint NFT with a signed EIP-712 message + function mintNFTWithSignature(uint256 tokenId, address recipient, uint8 v, bytes32 r, bytes32 s) external { + require(verifyEIP712Signature(tokenId, recipient, v, r, s), "INVALID_SIGNATURE"); + + _safeMint(recipient, tokenId); + + emit NFTMintedEvent(recipient, tokenId); + } + + // Verify EIP-712 signature + function verifyEIP712Signature(uint256 tokenId, address recipient, uint8 v, bytes32 r, bytes32 s) + internal + view + returns (bool) + { + bytes32 digest = keccak256( + abi.encodePacked( + "\x19\x01", + DOMAIN_SEPARATOR, + keccak256( + abi.encode(MINT_TYPEHASH, keccak256(bytes(NAME)), keccak256(bytes(SYMBOL)), tokenId, recipient) + ) + ) + ); + + address recovered = ecrecover(digest, v, r, s); + + return recovered == authorizedSigner; + } + + // Token URI implementation + function tokenURI(uint256 tokenId) public view override returns (string memory) { + require(_ownerOf[tokenId] != address(0), "NOT_MINTED"); + return TOKEN_URI; + } +} diff --git a/examples/712/L1/test/NFTEE.t.sol b/examples/712/L1/test/NFTEE.t.sol new file mode 100644 index 0000000..c1a1cc8 --- /dev/null +++ b/examples/712/L1/test/NFTEE.t.sol @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.13; + +import "forge-std/Test.sol"; +import "../src/NFTEE.sol"; + +contract SuaveNFTTest is Test { + uint256 internal signerPrivateKey; + address internal signerPubKey; + SuaveNFT suaveNFT; + + function setUp() public { + signerPrivateKey = 0xA11CE; + signerPubKey = vm.addr(signerPrivateKey); + suaveNFT = new SuaveNFT(signerPubKey); + } + + function testMintNFTWithSignature() public { + uint256 tokenId = 1; + address recipient = 0xE0f5206BBD039e7b0592d8918820024e2a7437b9; + uint8 v; + bytes32 r; + bytes32 s; + + // Prepare the EIP-712 signature + { + bytes32 DOMAIN_SEPARATOR = suaveNFT.DOMAIN_SEPARATOR(); + bytes32 structHash = keccak256( + abi.encode( + suaveNFT.MINT_TYPEHASH(), // Use MINT_TYPEHASH from the contract + keccak256(bytes(suaveNFT.NAME())), // Use NAME constant from the contract + keccak256(bytes(suaveNFT.SYMBOL())), // Use SYMBOL constant from the contract + tokenId, + recipient + ) + ); + bytes32 digest = keccak256(abi.encodePacked("\x19\x01", DOMAIN_SEPARATOR, structHash)); + // example forge logs for debugging 712 + // console.logBytes32(DOMAIN_SEPARATOR); + // console.logBytes32(suaveNFT.MINT_TYPEHASH()); + // console.logBytes32(keccak256(bytes(suaveNFT.NAME()))); + // console.logBytes32(keccak256(bytes(suaveNFT.SYMBOL()))); + // console.logBytes32(digest); + + // Sign the digest + (v, r, s) = vm.sign(signerPrivateKey, digest); + } + + // Mint the NFT + suaveNFT.mintNFTWithSignature(tokenId, recipient, v, r, s); + + // Assertions + assertEq(suaveNFT.ownerOf(tokenId), recipient); + assertEq(suaveNFT.tokenURI(tokenId), "IPFS_URL"); + } +} diff --git a/examples/712/SUAVE/src/712Emitter.sol b/examples/712/SUAVE/src/712Emitter.sol new file mode 100644 index 0000000..5c32fd8 --- /dev/null +++ b/examples/712/SUAVE/src/712Emitter.sol @@ -0,0 +1,95 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.13; + +import "../../../../lib/suave-std/src/suavelib/Suave.sol"; + +contract Emitter { + // Constants matching those in SuaveNFT + string private constant NAME = "SUAVE_NFT"; + string private constant SYMBOL = "NFTEE"; + bytes32 private constant MINT_TYPEHASH = 0x686aa0ee2a8dd75ace6f66b3a5e79d3dfd8e25e05a5e494bb85e72214ab37880; + bytes32 private constant DOMAIN_SEPARATOR = 0x617661b7ab13ce21150e0a39abe5834762b356e3c643f10c28a3c9331025604a; + string private cstoreKey = "NFTEE:v0:PrivateKey"; + + // Private key variable + Suave.DataId public privateKeyDataID; + address public owner; + + // Constructor to initialize owner + constructor() { + owner = msg.sender; + } + + function getPrivateKeyDataIDBytes() public view returns (bytes16) { + return Suave.DataId.unwrap(privateKeyDataID); + } + + // function to fetch private key from confidential input portion of Confidential Compute Request + function fetchConfidentialPrivateKey() public returns (bytes memory) { + require(Suave.isConfidential()); + + bytes memory confidentialInputs = Suave.confidentialInputs(); + return abi.decode(confidentialInputs, (bytes)); + } + + event PrivateKeyUpdateEvent(Suave.DataId dataID); + + // setPrivateKey is the onchain portion of the Confidential Compute Request + // inside we need to store our reference to our private key for future use + // we must do this because setPrivateKey() is offchain and can't directly store onchain without this + function setPrivateKey(Suave.DataId dataID) public { + require(msg.sender == owner, "only owner can update"); + privateKeyDataID = dataID; + emit PrivateKeyUpdateEvent(dataID); + } + + // offchain portion of Confidential Compute Request to update privateKey + function updatePrivateKey() public returns (bytes memory) { + require(Suave.isConfidential()); + require(msg.sender == owner, "only owner can update"); + + bytes memory privateKey = this.fetchConfidentialPrivateKey(); + + // create permissions for data record + address[] memory peekers = new address[](1); + peekers[0] = address(this); + + address[] memory allowedStores = new address[](1); + allowedStores[0] = 0xC8df3686b4Afb2BB53e60EAe97EF043FE03Fb829; // using the wildcard address for allowedStores + + // store private key in conf data store + Suave.DataRecord memory record = Suave.newDataRecord(0, peekers, allowedStores, cstoreKey); + + Suave.confidentialStore(record.id, cstoreKey, privateKey); + + // return calback to emit data ID onchain + return bytes.concat(this.setPrivateKey.selector, abi.encode(record.id)); + } + + event NFTEEApproval(bytes signedMessage); + + function emitSignedMintApproval(bytes memory msg) public { + emit NFTEEApproval(msg); + } + + // Function to sign and emit a signed EIP 712 digest for minting an NFTEE on L1 + function signL1MintApproval(uint256 tokenId, address recipient) public view returns (bytes memory) { + require(Suave.isConfidential()); + require(Suave.DataId.unwrap(privateKeyDataID) != bytes16(0), "private key is not set"); + + // Create the EIP-712 digest using the same structure as in SuaveNFT + bytes32 structHash = + keccak256(abi.encode(MINT_TYPEHASH, keccak256(bytes(NAME)), keccak256(bytes(SYMBOL)), tokenId, recipient)); + + bytes32 digestHash = keccak256(abi.encodePacked("\x19\x01", DOMAIN_SEPARATOR, structHash)); + + // Convert bytes32 digest to bytes + bytes memory digest = abi.encodePacked(digestHash); + + bytes memory signerPrivateKey = Suave.confidentialRetrieve(privateKeyDataID, cstoreKey); + + bytes memory msgBytes = Suave.signMessage(digest, string(signerPrivateKey)); + + return bytes.concat(this.emitSignedMintApproval.selector, abi.encode(msgBytes)); + } +} diff --git a/examples/712/SUAVE/test/712Emitter.t.sol b/examples/712/SUAVE/test/712Emitter.t.sol new file mode 100644 index 0000000..ef50508 --- /dev/null +++ b/examples/712/SUAVE/test/712Emitter.t.sol @@ -0,0 +1,60 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.13; + +import "forge-std/Test.sol"; +import "../src/712Emitter.sol"; + +contract EmitterTest is Test { + Emitter emitter; + address internal owner; + + event NFTEEApproval(bytes signedMessage); + + function setUp() public { + owner = address(this); // Setting the test contract as the owner for testing + emitter = new Emitter(); + } + + function testOwnerInitialization() public { + assertEq(emitter.owner(), owner, "Owner should be initialized correctly"); + } + + function testSetPrivateKey() public { + // Mock DataId and set private key + bytes16 dataIDValue = bytes16(0x1234567890abcdef1234567890abcdef); // Ensure it's 16 bytes + Suave.DataId dataID = Suave.DataId.wrap(dataIDValue); + emitter.setPrivateKey(dataID); + + // Assertion to check if private key was set + // Note: Requires getter for privateKeyDataID or event validation + bytes16 expectedDataIDBytes = Suave.DataId.unwrap(dataID); + bytes16 actualDataIDBytes = emitter.getPrivateKeyDataIDBytes(); + assertEq(actualDataIDBytes, expectedDataIDBytes, "Private key DataID should match"); + } + + function testSignL1MintApproval() public { + // can't actually test this atm + } + + function testEmitSignedMintApproval() public { + bytes memory message = "test message"; + + // Start recording logs + vm.recordLogs(); + + // Call the function to test + emitter.emitSignedMintApproval(message); + + // Get the recorded logs + Vm.Log[] memory logs = vm.getRecordedLogs(); + + // Ensure at least one event was emitted + assert(logs.length > 0); // This line is updated + + // Decode the event data - the structure depends on the event signature + (bytes memory loggedMessage) = abi.decode(logs[0].data, (bytes)); + + // Assertions to validate the event data + assertEq(loggedMessage, message, "Emitted message should match the input message"); + } +} diff --git a/examples/712/main.go b/examples/712/main.go new file mode 100644 index 0000000..2720937 --- /dev/null +++ b/examples/712/main.go @@ -0,0 +1,131 @@ +package main + +import ( + "bytes" + "encoding/json" + "fmt" + "io" + "log" + "math/big" + "net/http" + + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/flashbots/suapp-examples/framework" + "golang.org/x/crypto/sha3" +) + +const MINT_TYPEHASH = "0x686aa0ee2a8dd75ace6f66b3a5e79d3dfd8e25e05a5e494bb85e72214ab37880" +const DOMAIN_SEPARATOR = "0x617661b7ab13ce21150e0a39abe5834762b356e3c643f10c28a3c9331025604a" +const NAME_HASH = keccak256([]byte("SUAVE_NFT")) +const SYMBOL_HASH = keccak256([]byte("NFTEE")) + +func main() { + relayerURL := "localhost:1234" + go func() { + log.Fatal(http.ListenAndServe(relayerURL, &relayHandlerExample{})) + }() + + fr := framework.New() + contract := fr.DeployContract("path/to/Emitter.json") + + testAddr := framework.GeneratePrivKey() + fundBalance := big.NewInt(100000000000000000) + fr.FundAccount(testAddr.Address(), fundBalance) + + privateKeyData := []byte("some_private_key_data") + contractAddr := contract.Ref(testAddr) + receipt := contractAddr.SendTransaction("setPrivateKey", []interface{}{privateKeyData}, nil) + + if receipt.Failed() { + log.Fatalf("setPrivateKey transaction failed: %v", receipt.Err) + } + + tokenId := big.NewInt(1) + recipient := common.HexToAddress("0x123...") + + receipt = contractAddr.SendTransaction("signL1MintApproval", []interface{}{tokenId, recipient}, nil) + + if receipt.Failed() { + log.Fatalf("signL1MintApproval transaction failed: %v", receipt.Err) + } + + nfteeApprovalEvent := &NFTEEApproval{} + if err := nfteeApprovalEvent.Unpack(receipt.Logs[0]); err != nil { + panic(err) + } + + tokenIdPadded := leftPadBytes(tokenId.Bytes(), 32) + recipientPadded := recipient.Bytes() + + valid := ValidateEIP712Message(nfteeApprovalEvent.SignedMessage, tokenIdPadded, recipientPadded) + if !valid { + log.Fatal("EIP-712 message validation failed") + } +} + +type NFTEEApproval struct { + SignedMessage []byte +} + +func (na *NFTEEApproval) Unpack(log *types.Log) error { + na.SignedMessage = log.Data + return nil +} + +type relayHandlerExample struct{} + +func (rl *relayHandlerExample) ServeHTTP(w http.ResponseWriter, r *http.Request) { + bodyBytes, err := io.ReadAll(r.Body) + if err != nil { + panic(err) + } + fmt.Println(string(bodyBytes)) +} + +func keccak256(data ...[]byte) []byte { + hasher := sha3.NewLegacyKeccak256() + for _, b := range data { + hasher.Write(b) + } + return hasher.Sum(nil) +} + +func encodePacked(data ...[]byte) []byte { + var packed []byte + for _, b := range data { + packed = append(packed, b...) + } + return packed +} + +func ValidateEIP712Message(signedMessage, tokenId, recipient []byte) bool { + tokenIdHash := keccak256(tokenId) + recipientHash := keccak256(recipient) + + structHash := keccak256(encodePacked( + MINT_TYPEHASH, + NAME_HASH, + SYMBOL_HASH, + tokenIdHash, + recipientHash, + )) + + digestHash := keccak256(encodePacked( + []byte("\x19\x01"), + DOMAIN_SEPARATOR, + structHash, + )) + + return bytes.Equal(digestHash, signedMessage) +} + +func leftPadBytes(slice []byte, l int) []byte { + if len(slice) == l { + return slice + } + padded := make([]byte, l) + copy(padded[l-len(slice):], slice) + return padded +} From bb7252c5cf58af4a83ee238ef228b1dd1f6bf1d6 Mon Sep 17 00:00:00 2001 From: dmarzzz Date: Sat, 6 Jan 2024 13:29:45 -0500 Subject: [PATCH 02/14] working rigil signed msg go script --- examples/712/SUAVE/src/712Emitter.sol | 25 ++++++---- examples/712/main.go | 70 ++++++++++++++++----------- 2 files changed, 58 insertions(+), 37 deletions(-) diff --git a/examples/712/SUAVE/src/712Emitter.sol b/examples/712/SUAVE/src/712Emitter.sol index 5c32fd8..bb1badc 100644 --- a/examples/712/SUAVE/src/712Emitter.sol +++ b/examples/712/SUAVE/src/712Emitter.sol @@ -29,16 +29,16 @@ contract Emitter { require(Suave.isConfidential()); bytes memory confidentialInputs = Suave.confidentialInputs(); - return abi.decode(confidentialInputs, (bytes)); + return confidentialInputs; } event PrivateKeyUpdateEvent(Suave.DataId dataID); // setPrivateKey is the onchain portion of the Confidential Compute Request // inside we need to store our reference to our private key for future use - // we must do this because setPrivateKey() is offchain and can't directly store onchain without this + // we must do this because updatePrivateKey() is offchain and can't directly store onchain without this function setPrivateKey(Suave.DataId dataID) public { - require(msg.sender == owner, "only owner can update"); + // require(msg.sender == owner, "only owner can update"); privateKeyDataID = dataID; emit PrivateKeyUpdateEvent(dataID); } @@ -46,7 +46,7 @@ contract Emitter { // offchain portion of Confidential Compute Request to update privateKey function updatePrivateKey() public returns (bytes memory) { require(Suave.isConfidential()); - require(msg.sender == owner, "only owner can update"); + // // require(msg.sender == owner, "only owner can update"); bytes memory privateKey = this.fetchConfidentialPrivateKey(); @@ -72,19 +72,24 @@ contract Emitter { emit NFTEEApproval(msg); } - // Function to sign and emit a signed EIP 712 digest for minting an NFTEE on L1 - function signL1MintApproval(uint256 tokenId, address recipient) public view returns (bytes memory) { - require(Suave.isConfidential()); + // Function to create EIP-712 digest + function createEIP712Digest(uint256 tokenId, address recipient) public view returns (bytes memory) { require(Suave.DataId.unwrap(privateKeyDataID) != bytes16(0), "private key is not set"); - // Create the EIP-712 digest using the same structure as in SuaveNFT bytes32 structHash = keccak256(abi.encode(MINT_TYPEHASH, keccak256(bytes(NAME)), keccak256(bytes(SYMBOL)), tokenId, recipient)); bytes32 digestHash = keccak256(abi.encodePacked("\x19\x01", DOMAIN_SEPARATOR, structHash)); - // Convert bytes32 digest to bytes - bytes memory digest = abi.encodePacked(digestHash); + return abi.encodePacked(digestHash); + } + + // Function to sign and emit a signed EIP 712 digest for minting an NFTEE on L1 + function signL1MintApproval(uint256 tokenId, address recipient) public view returns (bytes memory) { + require(Suave.isConfidential()); + require(Suave.DataId.unwrap(privateKeyDataID) != bytes16(0), "private key is not set"); + + bytes memory digest = createEIP712Digest(tokenId, recipient); bytes memory signerPrivateKey = Suave.confidentialRetrieve(privateKeyDataID, cstoreKey); diff --git a/examples/712/main.go b/examples/712/main.go index 2720937..2bc39af 100644 --- a/examples/712/main.go +++ b/examples/712/main.go @@ -2,76 +2,87 @@ package main import ( "bytes" - "encoding/json" + "encoding/hex" "fmt" "io" "log" "math/big" "net/http" + "strings" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/crypto" "github.com/flashbots/suapp-examples/framework" "golang.org/x/crypto/sha3" ) const MINT_TYPEHASH = "0x686aa0ee2a8dd75ace6f66b3a5e79d3dfd8e25e05a5e494bb85e72214ab37880" const DOMAIN_SEPARATOR = "0x617661b7ab13ce21150e0a39abe5834762b356e3c643f10c28a3c9331025604a" -const NAME_HASH = keccak256([]byte("SUAVE_NFT")) -const SYMBOL_HASH = keccak256([]byte("NFTEE")) func main() { + relayerURL := "localhost:1234" go func() { log.Fatal(http.ListenAndServe(relayerURL, &relayHandlerExample{})) }() fr := framework.New() - contract := fr.DeployContract("path/to/Emitter.json") + contract := fr.DeployContract("712Emitter.sol/Emitter.json") - testAddr := framework.GeneratePrivKey() + privKey := framework.GeneratePrivKey() + testAddr := privKey.Address() fundBalance := big.NewInt(100000000000000000) - fr.FundAccount(testAddr.Address(), fundBalance) + fr.FundAccount(testAddr, fundBalance) - privateKeyData := []byte("some_private_key_data") - contractAddr := contract.Ref(testAddr) - receipt := contractAddr.SendTransaction("setPrivateKey", []interface{}{privateKeyData}, nil) + contractAddr := contract.Ref(privKey) + skHex := hex.EncodeToString(crypto.FromECDSA(privKey.Priv)) - if receipt.Failed() { - log.Fatalf("setPrivateKey transaction failed: %v", receipt.Err) - } + receipt := contractAddr.SendTransaction("updatePrivateKey", []interface{}{}, []byte(skHex)) tokenId := big.NewInt(1) - recipient := common.HexToAddress("0x123...") - receipt = contractAddr.SendTransaction("signL1MintApproval", []interface{}{tokenId, recipient}, nil) + // Call createEIP712Digest to generate digestHash + digestHash := contract.Call("createEIP712Digest", []interface{}{tokenId, testAddr}) - if receipt.Failed() { - log.Fatalf("signL1MintApproval transaction failed: %v", receipt.Err) + // Sign the digest in Go + signature, err := crypto.Sign(digestHash[0].([]byte), privKey.Priv) + if err != nil { + log.Fatalf("Error signing message: %v", err) } + // Call signL1MintApproval and compare signatures + receipt = contractAddr.SendTransaction("signL1MintApproval", []interface{}{tokenId, testAddr}, nil) nfteeApprovalEvent := &NFTEEApproval{} if err := nfteeApprovalEvent.Unpack(receipt.Logs[0]); err != nil { panic(err) } - tokenIdPadded := leftPadBytes(tokenId.Bytes(), 32) - recipientPadded := recipient.Bytes() + fmt.Println(signature) + fmt.Println(nfteeApprovalEvent.SignedMessage) - valid := ValidateEIP712Message(nfteeApprovalEvent.SignedMessage, tokenIdPadded, recipientPadded) - if !valid { - log.Fatal("EIP-712 message validation failed") + if !bytes.Equal(signature, nfteeApprovalEvent.SignedMessage) { + log.Fatal("Signed messages do not match") + } else { + fmt.Println("Signed messages match") } } +// NFTEEApprovalEventABI is the ABI of the NFTEEApproval event. +var NFTEEApprovalEventABI = `[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes","name":"signedMessage","type":"bytes"}],"name":"NFTEEApproval","type":"event"}]` + type NFTEEApproval struct { SignedMessage []byte } func (na *NFTEEApproval) Unpack(log *types.Log) error { - na.SignedMessage = log.Data - return nil + eventABI, err := abi.JSON(strings.NewReader(NFTEEApprovalEventABI)) + if err != nil { + return err + } + + return eventABI.UnpackIntoInterface(na, "NFTEEApproval", log.Data) } type relayHandlerExample struct{} @@ -103,18 +114,23 @@ func encodePacked(data ...[]byte) []byte { func ValidateEIP712Message(signedMessage, tokenId, recipient []byte) bool { tokenIdHash := keccak256(tokenId) recipientHash := keccak256(recipient) + nameHash := keccak256([]byte("SUAVE_NFT")) + symbolHash := keccak256([]byte("NFTEE")) + + mintTypeHashBytes := common.FromHex(MINT_TYPEHASH) + domainSeparatorBytes := common.FromHex(DOMAIN_SEPARATOR) structHash := keccak256(encodePacked( - MINT_TYPEHASH, - NAME_HASH, - SYMBOL_HASH, + mintTypeHashBytes, + nameHash, + symbolHash, tokenIdHash, recipientHash, )) digestHash := keccak256(encodePacked( []byte("\x19\x01"), - DOMAIN_SEPARATOR, + domainSeparatorBytes, structHash, )) From 3b681f067b37003c38f097861ebb25cd6145601b Mon Sep 17 00:00:00 2001 From: dmarzzz Date: Sat, 6 Jan 2024 18:28:47 -0500 Subject: [PATCH 03/14] working go script + sol files but w/ static domain hash --- examples/712/L1/src/NFTEE.sol | 31 ++-- examples/712/L1/test/NFTEE.t.sol | 10 +- examples/712/SUAVE/src/712Emitter.sol | 3 +- examples/712/main.go | 221 ++++++++++++++++++-------- 4 files changed, 178 insertions(+), 87 deletions(-) diff --git a/examples/712/L1/src/NFTEE.sol b/examples/712/L1/src/NFTEE.sol index 2afca48..0ff9bda 100644 --- a/examples/712/L1/src/NFTEE.sol +++ b/examples/712/L1/src/NFTEE.sol @@ -10,11 +10,12 @@ contract SuaveNFT is ERC721 { event NFTMintedEvent(address indexed recipient, uint256 indexed tokenId); // EIP-712 Domain Separator - bytes32 public DOMAIN_SEPARATOR; + // keccak256(abi.encode(keccak256("EIP712Domain(string name,string symbol,uint256 chainId,address verifyingContract)"),keccak256(bytes(NAME)),keccak256(bytes(SYMBOL)),block.chainid,address(this)) + bytes32 public DOMAIN_SEPARATOR = 0x07c5db21fddca4952bc7dee96ea945c5702afed160b9697111b37b16b1289b89; // EIP-712 TypeHash - bytes32 public constant MINT_TYPEHASH = - keccak256("Mint(string name,string symbol,uint256 tokenId,address recipient)"); + // keccak256("Mint(string name,string symbol,uint256 tokenId,address recipient)"); + bytes32 public constant MINT_TYPEHASH = 0x686aa0ee2a8dd75ace6f66b3a5e79d3dfd8e25e05a5e494bb85e72214ab37880; // Authorized signer's address address public authorizedSigner; @@ -27,16 +28,16 @@ contract SuaveNFT is ERC721 { constructor(address _authorizedSigner) ERC721(NAME, SYMBOL) { authorizedSigner = _authorizedSigner; - // Initialize DOMAIN_SEPARATOR with EIP-712 domain separator, specific to your contract - DOMAIN_SEPARATOR = keccak256( - abi.encode( - keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), - keccak256(bytes(NAME)), - keccak256(bytes(SYMBOL)), - block.chainid, - address(this) - ) - ); + // // Initialize DOMAIN_SEPARATOR with EIP-712 domain separator, specific to your contract + // DOMAIN_SEPARATOR = keccak256( + // abi.encode( + // keccak256("EIP712Domain(string name,string symbol,uint256 chainId,address verifyingContract)"), + // keccak256(bytes(NAME)), + // keccak256(bytes(SYMBOL)), + // block.chainid, + // address(this) + // ) + // ); } // Mint NFT with a signed EIP-712 message @@ -54,7 +55,7 @@ contract SuaveNFT is ERC721 { view returns (bool) { - bytes32 digest = keccak256( + bytes32 digestHash = keccak256( abi.encodePacked( "\x19\x01", DOMAIN_SEPARATOR, @@ -64,7 +65,7 @@ contract SuaveNFT is ERC721 { ) ); - address recovered = ecrecover(digest, v, r, s); + address recovered = ecrecover(digestHash, v, r, s); return recovered == authorizedSigner; } diff --git a/examples/712/L1/test/NFTEE.t.sol b/examples/712/L1/test/NFTEE.t.sol index c1a1cc8..0aef1fb 100644 --- a/examples/712/L1/test/NFTEE.t.sol +++ b/examples/712/L1/test/NFTEE.t.sol @@ -36,11 +36,11 @@ contract SuaveNFTTest is Test { ); bytes32 digest = keccak256(abi.encodePacked("\x19\x01", DOMAIN_SEPARATOR, structHash)); // example forge logs for debugging 712 - // console.logBytes32(DOMAIN_SEPARATOR); - // console.logBytes32(suaveNFT.MINT_TYPEHASH()); - // console.logBytes32(keccak256(bytes(suaveNFT.NAME()))); - // console.logBytes32(keccak256(bytes(suaveNFT.SYMBOL()))); - // console.logBytes32(digest); + console.logBytes32(DOMAIN_SEPARATOR); + console.logBytes32(suaveNFT.MINT_TYPEHASH()); + console.logBytes32(keccak256(bytes(suaveNFT.NAME()))); + console.logBytes32(keccak256(bytes(suaveNFT.SYMBOL()))); + console.logBytes32(digest); // Sign the digest (v, r, s) = vm.sign(signerPrivateKey, digest); diff --git a/examples/712/SUAVE/src/712Emitter.sol b/examples/712/SUAVE/src/712Emitter.sol index bb1badc..598e33f 100644 --- a/examples/712/SUAVE/src/712Emitter.sol +++ b/examples/712/SUAVE/src/712Emitter.sol @@ -8,7 +8,7 @@ contract Emitter { string private constant NAME = "SUAVE_NFT"; string private constant SYMBOL = "NFTEE"; bytes32 private constant MINT_TYPEHASH = 0x686aa0ee2a8dd75ace6f66b3a5e79d3dfd8e25e05a5e494bb85e72214ab37880; - bytes32 private constant DOMAIN_SEPARATOR = 0x617661b7ab13ce21150e0a39abe5834762b356e3c643f10c28a3c9331025604a; + bytes32 private constant DOMAIN_SEPARATOR = 0x07c5db21fddca4952bc7dee96ea945c5702afed160b9697111b37b16b1289b89; string private cstoreKey = "NFTEE:v0:PrivateKey"; // Private key variable @@ -78,7 +78,6 @@ contract Emitter { bytes32 structHash = keccak256(abi.encode(MINT_TYPEHASH, keccak256(bytes(NAME)), keccak256(bytes(SYMBOL)), tokenId, recipient)); - bytes32 digestHash = keccak256(abi.encodePacked("\x19\x01", DOMAIN_SEPARATOR, structHash)); return abi.encodePacked(digestHash); diff --git a/examples/712/main.go b/examples/712/main.go index 2bc39af..3f241cb 100644 --- a/examples/712/main.go +++ b/examples/712/main.go @@ -2,6 +2,8 @@ package main import ( "bytes" + "context" + "crypto/ecdsa" "encoding/hex" "fmt" "io" @@ -11,18 +13,47 @@ import ( "strings" "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/ethclient" "github.com/flashbots/suapp-examples/framework" - "golang.org/x/crypto/sha3" ) -const MINT_TYPEHASH = "0x686aa0ee2a8dd75ace6f66b3a5e79d3dfd8e25e05a5e494bb85e72214ab37880" -const DOMAIN_SEPARATOR = "0x617661b7ab13ce21150e0a39abe5834762b356e3c643f10c28a3c9331025604a" +// Constants +const ( + MINT_TYPEHASH = "0x686aa0ee2a8dd75ace6f66b3a5e79d3dfd8e25e05a5e494bb85e72214ab37880" + DOMAIN_SEPARATOR = "0x617661b7ab13ce21150e0a39abe5834762b356e3c643f10c28a3c9331025604a" + ethRPCURL = "https://eth-goerli.g.alchemy.com/v2/FXjSPpH91SDIgA6ES9TavZauY6NAlOFn" +) func main() { + // TODO : + // - clean up priv key handling + // - add dynamic domain seperator handling i.e. pass it to the SUAVE contract + + // Deploy SUAVE L1 Contract + suaveContractAddress, suaveTxHash, suaveSignerAddr, suaveSig, privKey := deploySuaveContract() + + fmt.Printf("SUAVE Contract deployed at: %s\n", suaveContractAddress.Hex()) + fmt.Printf("SUAVE Transaction Hash: %s\n", suaveTxHash.Hex()) + fmt.Printf("SUAVE Signer Address: %s\n", suaveSignerAddr.Hex()) + + // Deploy Ethereum L1 Contract with SUAVE signer address + ethContractAddress, ethTxHash, ok := deployEthContract(suaveSignerAddr, suaveSig, privKey) + + fmt.Printf("Ethereum Contract deployed at: %s\n", ethContractAddress.Hex()) + fmt.Printf("Ethereum Transaction Hash: %s\n", ethTxHash.Hex()) + + if !ok { + panic("NFT minting on L1 failed") + } + +} + +func deploySuaveContract() (common.Address, common.Hash, common.Address, []byte, *ecdsa.PrivateKey) { relayerURL := "localhost:1234" go func() { log.Fatal(http.ListenAndServe(relayerURL, &relayHandlerExample{})) @@ -31,10 +62,10 @@ func main() { fr := framework.New() contract := fr.DeployContract("712Emitter.sol/Emitter.json") - privKey := framework.GeneratePrivKey() - testAddr := privKey.Address() + privKey := framework.NewPrivKeyFromHex("abc") + addr := privKey.Address() fundBalance := big.NewInt(100000000000000000) - fr.FundAccount(testAddr, fundBalance) + fr.FundAccount(addr, fundBalance) contractAddr := contract.Ref(privKey) skHex := hex.EncodeToString(crypto.FromECDSA(privKey.Priv)) @@ -44,29 +75,130 @@ func main() { tokenId := big.NewInt(1) // Call createEIP712Digest to generate digestHash - digestHash := contract.Call("createEIP712Digest", []interface{}{tokenId, testAddr}) - - // Sign the digest in Go - signature, err := crypto.Sign(digestHash[0].([]byte), privKey.Priv) - if err != nil { - log.Fatalf("Error signing message: %v", err) - } + digestHash := contract.Call("createEIP712Digest", []interface{}{tokenId, addr}) // Call signL1MintApproval and compare signatures - receipt = contractAddr.SendTransaction("signL1MintApproval", []interface{}{tokenId, testAddr}, nil) + receipt = contractAddr.SendTransaction("signL1MintApproval", []interface{}{tokenId, addr}, nil) nfteeApprovalEvent := &NFTEEApproval{} if err := nfteeApprovalEvent.Unpack(receipt.Logs[0]); err != nil { panic(err) } - fmt.Println(signature) - fmt.Println(nfteeApprovalEvent.SignedMessage) + // Sign the digest in Go + goSignature, err := crypto.Sign(digestHash[0].([]byte), privKey.Priv) + if err != nil { + log.Fatalf("Error signing message: %v", err) + } - if !bytes.Equal(signature, nfteeApprovalEvent.SignedMessage) { + if !bytes.Equal(goSignature, nfteeApprovalEvent.SignedMessage) { log.Fatal("Signed messages do not match") } else { fmt.Println("Signed messages match") } + + // Extract the signature from SUAVE transaction logs + var signature []byte + if len(receipt.Logs) > 0 { + nfteeApprovalEvent := &NFTEEApproval{} + if err := nfteeApprovalEvent.Unpack(receipt.Logs[0]); err != nil { + log.Fatalf("Error unpacking logs: %v", err) + } + signature = nfteeApprovalEvent.SignedMessage + } + + return contractAddr.Address(), receipt.TxHash, addr, signature, privKey.Priv +} + +func deployEthContract(suaveSignerAddr common.Address, suaveSignature []byte, privKey *ecdsa.PrivateKey) (common.Address, common.Hash, bool) { + ethClient, err := ethclient.Dial(ethRPCURL) + if err != nil { + log.Fatalf("Failed to connect to the Ethereum client: %v", err) + } + + auth, err := bind.NewKeyedTransactorWithChainID(privKey, big.NewInt(5)) // Chain ID for Ethereum Goerli + if err != nil { + log.Fatalf("Failed to create authorized transactor: %v", err) + } + + artifact, err := framework.ReadArtifact("NFTEE.sol/SuaveNFT.json") + if err != nil { + panic(err) + } + + // Deploy contract with SUAVE signer address as a constructor argument + _, tx, _, err := bind.DeployContract(auth, *artifact.Abi, artifact.Code, ethClient, suaveSignerAddr) + if err != nil { + log.Fatalf("Failed to deploy new contract: %v", err) + } + + // Wait for the transaction to be mined + fmt.Println("Waiting for contract deployment transaction to be mined...") + receipt, err := bind.WaitMined(context.Background(), ethClient, tx) + if err != nil { + log.Fatalf("Error waiting for contract deployment transaction to be mined: %v", err) + } + + if receipt.Status != types.ReceiptStatusSuccessful { + log.Printf("Contract deployment transaction failed: receipt status %v", receipt.Status) + return common.Address{}, common.Hash{}, false + } + + fmt.Println("Contract deployed, address:", receipt.ContractAddress.Hex()) + + // Mint NFT with the signature from SUAVE + tokenId := big.NewInt(1) + fmt.Printf("intended NFT recipient : and %s ID : %d \n", suaveSignerAddr, tokenId) + isMinted, err := mintNFTWithSignature(receipt.ContractAddress, tokenId, suaveSignerAddr, suaveSignature, ethClient, auth, artifact.Abi) + if err != nil { + log.Printf("Error minting NFT: %v", err) + return receipt.ContractAddress, tx.Hash(), false + } + + return receipt.ContractAddress, tx.Hash(), isMinted +} + +func mintNFTWithSignature(contractAddress common.Address, tokenId *big.Int, recipient common.Address, signature []byte, client *ethclient.Client, auth *bind.TransactOpts, sabi *abi.ABI) (bool, error) { + + contract := bind.NewBoundContract(contractAddress, *sabi, client, client, client) + + if len(signature) != 65 { + return false, fmt.Errorf("signature must be 65 bytes long") + } + + // Extract r, s, and v + r := [32]byte{} + s := [32]byte{} + copy(r[:], signature[:32]) // First 32 bytes + copy(s[:], signature[32:64]) // Next 32 bytes + + v := signature[64] // Last byte + + // Ethereum signatures are [R || S || V] + // Where V is 0 or 1, it must be adjusted to 27 or 28 + if v == 0 || v == 1 { + v += 27 + } + + fmt.Printf("intended NFT recipient : and %s ID : %d \n", recipient, tokenId) + tx, err := contract.Transact(auth, "mintNFTWithSignature", tokenId, recipient, v, r, s) + if err != nil { + return false, fmt.Errorf("mintNFTWithSignature transaction failed: %v", err) + } + + // Wait for the transaction to be mined + fmt.Println("Waiting for mint transaction to be mined...") + receipt, err := bind.WaitMined(context.Background(), client, tx) + if err != nil { + return false, fmt.Errorf("waiting for mint transaction mining failed: %v", err) + } + + if receipt.Status != types.ReceiptStatusSuccessful { + log.Printf("Mint transaction failed: receipt status %v", receipt.Status) + return false, nil + } + + fmt.Println("NFT minted successfully, transaction hash:", receipt.TxHash.Hex()) + return true, nil } // NFTEEApprovalEventABI is the ABI of the NFTEEApproval event. @@ -85,24 +217,6 @@ func (na *NFTEEApproval) Unpack(log *types.Log) error { return eventABI.UnpackIntoInterface(na, "NFTEEApproval", log.Data) } -type relayHandlerExample struct{} - -func (rl *relayHandlerExample) ServeHTTP(w http.ResponseWriter, r *http.Request) { - bodyBytes, err := io.ReadAll(r.Body) - if err != nil { - panic(err) - } - fmt.Println(string(bodyBytes)) -} - -func keccak256(data ...[]byte) []byte { - hasher := sha3.NewLegacyKeccak256() - for _, b := range data { - hasher.Write(b) - } - return hasher.Sum(nil) -} - func encodePacked(data ...[]byte) []byte { var packed []byte for _, b := range data { @@ -111,37 +225,14 @@ func encodePacked(data ...[]byte) []byte { return packed } -func ValidateEIP712Message(signedMessage, tokenId, recipient []byte) bool { - tokenIdHash := keccak256(tokenId) - recipientHash := keccak256(recipient) - nameHash := keccak256([]byte("SUAVE_NFT")) - symbolHash := keccak256([]byte("NFTEE")) - - mintTypeHashBytes := common.FromHex(MINT_TYPEHASH) - domainSeparatorBytes := common.FromHex(DOMAIN_SEPARATOR) - - structHash := keccak256(encodePacked( - mintTypeHashBytes, - nameHash, - symbolHash, - tokenIdHash, - recipientHash, - )) - - digestHash := keccak256(encodePacked( - []byte("\x19\x01"), - domainSeparatorBytes, - structHash, - )) - - return bytes.Equal(digestHash, signedMessage) +type relayHandlerExample struct { } -func leftPadBytes(slice []byte, l int) []byte { - if len(slice) == l { - return slice +func (rl *relayHandlerExample) ServeHTTP(w http.ResponseWriter, r *http.Request) { + bodyBytes, err := io.ReadAll(r.Body) + if err != nil { + panic(err) } - padded := make([]byte, l) - copy(padded[l-len(slice):], slice) - return padded + + fmt.Println(string(bodyBytes)) } From e8daecd4f38bca72462bc429cf792abecdf8aa59 Mon Sep 17 00:00:00 2001 From: dmarzzz Date: Sun, 7 Jan 2024 21:08:18 -0500 Subject: [PATCH 04/14] clean up and add readme --- examples/712/L1/README.md | 3 - examples/712/README.md | 29 + examples/712/SUAVE/src/712Emitter.sol | 2 - examples/712/main.go | 53 +- lib/solmate/.gas-snapshot | 222 +++ lib/solmate/.gitattributes | 2 + lib/solmate/.github/pull_request_template.md | 13 + lib/solmate/.github/workflows/tests.yml | 29 + lib/solmate/.gitignore | 3 + lib/solmate/.gitmodules | 3 + lib/solmate/.prettierignore | 1 + lib/solmate/.prettierrc | 14 + lib/solmate/.vscode/settings.json | 9 + lib/solmate/LICENSE | 661 ++++++ lib/solmate/README.md | 66 + .../audits/v6-Fixed-Point-Solutions.pdf | Bin 0 -> 170456 bytes lib/solmate/foundry.toml | 7 + lib/solmate/lib/ds-test/.gitignore | 3 + lib/solmate/lib/ds-test/LICENSE | 674 +++++++ lib/solmate/lib/ds-test/Makefile | 14 + lib/solmate/lib/ds-test/default.nix | 4 + lib/solmate/lib/ds-test/demo/demo.sol | 223 +++ lib/solmate/lib/ds-test/src/test.sol | 469 +++++ lib/solmate/package-lock.json | 125 ++ lib/solmate/package.json | 20 + lib/solmate/src/auth/Auth.sol | 64 + lib/solmate/src/auth/Owned.sol | 44 + .../auth/authorities/MultiRolesAuthority.sol | 123 ++ .../src/auth/authorities/RolesAuthority.sol | 108 + lib/solmate/src/mixins/ERC4626.sol | 183 ++ lib/solmate/src/test/Auth.t.sol | 192 ++ lib/solmate/src/test/Bytes32AddressLib.t.sol | 22 + lib/solmate/src/test/CREATE3.t.sol | 74 + lib/solmate/src/test/DSTestPlus.t.sol | 72 + lib/solmate/src/test/ERC1155.t.sol | 1773 +++++++++++++++++ lib/solmate/src/test/ERC20.t.sol | 529 +++++ lib/solmate/src/test/ERC4626.t.sol | 446 +++++ lib/solmate/src/test/ERC721.t.sol | 727 +++++++ lib/solmate/src/test/FixedPointMathLib.t.sol | 277 +++ .../src/test/MultiRolesAuthority.t.sol | 321 +++ lib/solmate/src/test/Owned.t.sol | 40 + lib/solmate/src/test/ReentrancyGuard.t.sol | 56 + lib/solmate/src/test/RolesAuthority.t.sol | 148 ++ lib/solmate/src/test/SSTORE2.t.sol | 152 ++ lib/solmate/src/test/SafeCastLib.t.sol | 197 ++ lib/solmate/src/test/SafeTransferLib.t.sol | 610 ++++++ lib/solmate/src/test/WETH.t.sol | 146 ++ .../src/test/utils/DSInvariantTest.sol | 16 + lib/solmate/src/test/utils/DSTestPlus.sol | 179 ++ lib/solmate/src/test/utils/Hevm.sol | 107 + .../src/test/utils/mocks/MockAuthChild.sol | 12 + .../src/test/utils/mocks/MockAuthority.sol | 20 + .../src/test/utils/mocks/MockERC1155.sol | 42 + .../src/test/utils/mocks/MockERC20.sol | 20 + .../src/test/utils/mocks/MockERC4626.sol | 28 + .../src/test/utils/mocks/MockERC721.sol | 30 + .../src/test/utils/mocks/MockOwned.sol | 12 + .../utils/weird-tokens/MissingReturnToken.sol | 83 + .../utils/weird-tokens/ReturnsFalseToken.sol | 61 + .../weird-tokens/ReturnsGarbageToken.sol | 115 ++ .../weird-tokens/ReturnsTooLittleToken.sol | 70 + .../weird-tokens/ReturnsTooMuchToken.sol | 98 + .../utils/weird-tokens/ReturnsTwoToken.sol | 61 + .../utils/weird-tokens/RevertingToken.sol | 61 + lib/solmate/src/tokens/ERC1155.sol | 257 +++ lib/solmate/src/tokens/ERC20.sol | 206 ++ lib/solmate/src/tokens/ERC721.sol | 231 +++ lib/solmate/src/tokens/WETH.sol | 35 + lib/solmate/src/utils/Bytes32AddressLib.sol | 14 + lib/solmate/src/utils/CREATE3.sol | 82 + lib/solmate/src/utils/FixedPointMathLib.sol | 222 +++ lib/solmate/src/utils/ReentrancyGuard.sol | 19 + lib/solmate/src/utils/SSTORE2.sol | 99 + lib/solmate/src/utils/SafeCastLib.sol | 61 + lib/solmate/src/utils/SafeTransferLib.sol | 126 ++ remappings.txt | 2 + 76 files changed, 11291 insertions(+), 31 deletions(-) delete mode 100644 examples/712/L1/README.md create mode 100644 examples/712/README.md create mode 100644 lib/solmate/.gas-snapshot create mode 100644 lib/solmate/.gitattributes create mode 100644 lib/solmate/.github/pull_request_template.md create mode 100644 lib/solmate/.github/workflows/tests.yml create mode 100644 lib/solmate/.gitignore create mode 100644 lib/solmate/.gitmodules create mode 100644 lib/solmate/.prettierignore create mode 100644 lib/solmate/.prettierrc create mode 100644 lib/solmate/.vscode/settings.json create mode 100644 lib/solmate/LICENSE create mode 100644 lib/solmate/README.md create mode 100644 lib/solmate/audits/v6-Fixed-Point-Solutions.pdf create mode 100644 lib/solmate/foundry.toml create mode 100644 lib/solmate/lib/ds-test/.gitignore create mode 100644 lib/solmate/lib/ds-test/LICENSE create mode 100644 lib/solmate/lib/ds-test/Makefile create mode 100644 lib/solmate/lib/ds-test/default.nix create mode 100644 lib/solmate/lib/ds-test/demo/demo.sol create mode 100644 lib/solmate/lib/ds-test/src/test.sol create mode 100644 lib/solmate/package-lock.json create mode 100644 lib/solmate/package.json create mode 100644 lib/solmate/src/auth/Auth.sol create mode 100644 lib/solmate/src/auth/Owned.sol create mode 100644 lib/solmate/src/auth/authorities/MultiRolesAuthority.sol create mode 100644 lib/solmate/src/auth/authorities/RolesAuthority.sol create mode 100644 lib/solmate/src/mixins/ERC4626.sol create mode 100644 lib/solmate/src/test/Auth.t.sol create mode 100644 lib/solmate/src/test/Bytes32AddressLib.t.sol create mode 100644 lib/solmate/src/test/CREATE3.t.sol create mode 100644 lib/solmate/src/test/DSTestPlus.t.sol create mode 100644 lib/solmate/src/test/ERC1155.t.sol create mode 100644 lib/solmate/src/test/ERC20.t.sol create mode 100644 lib/solmate/src/test/ERC4626.t.sol create mode 100644 lib/solmate/src/test/ERC721.t.sol create mode 100644 lib/solmate/src/test/FixedPointMathLib.t.sol create mode 100644 lib/solmate/src/test/MultiRolesAuthority.t.sol create mode 100644 lib/solmate/src/test/Owned.t.sol create mode 100644 lib/solmate/src/test/ReentrancyGuard.t.sol create mode 100644 lib/solmate/src/test/RolesAuthority.t.sol create mode 100644 lib/solmate/src/test/SSTORE2.t.sol create mode 100644 lib/solmate/src/test/SafeCastLib.t.sol create mode 100644 lib/solmate/src/test/SafeTransferLib.t.sol create mode 100644 lib/solmate/src/test/WETH.t.sol create mode 100644 lib/solmate/src/test/utils/DSInvariantTest.sol create mode 100644 lib/solmate/src/test/utils/DSTestPlus.sol create mode 100644 lib/solmate/src/test/utils/Hevm.sol create mode 100644 lib/solmate/src/test/utils/mocks/MockAuthChild.sol create mode 100644 lib/solmate/src/test/utils/mocks/MockAuthority.sol create mode 100644 lib/solmate/src/test/utils/mocks/MockERC1155.sol create mode 100644 lib/solmate/src/test/utils/mocks/MockERC20.sol create mode 100644 lib/solmate/src/test/utils/mocks/MockERC4626.sol create mode 100644 lib/solmate/src/test/utils/mocks/MockERC721.sol create mode 100644 lib/solmate/src/test/utils/mocks/MockOwned.sol create mode 100644 lib/solmate/src/test/utils/weird-tokens/MissingReturnToken.sol create mode 100644 lib/solmate/src/test/utils/weird-tokens/ReturnsFalseToken.sol create mode 100644 lib/solmate/src/test/utils/weird-tokens/ReturnsGarbageToken.sol create mode 100644 lib/solmate/src/test/utils/weird-tokens/ReturnsTooLittleToken.sol create mode 100644 lib/solmate/src/test/utils/weird-tokens/ReturnsTooMuchToken.sol create mode 100644 lib/solmate/src/test/utils/weird-tokens/ReturnsTwoToken.sol create mode 100644 lib/solmate/src/test/utils/weird-tokens/RevertingToken.sol create mode 100644 lib/solmate/src/tokens/ERC1155.sol create mode 100644 lib/solmate/src/tokens/ERC20.sol create mode 100644 lib/solmate/src/tokens/ERC721.sol create mode 100644 lib/solmate/src/tokens/WETH.sol create mode 100644 lib/solmate/src/utils/Bytes32AddressLib.sol create mode 100644 lib/solmate/src/utils/CREATE3.sol create mode 100644 lib/solmate/src/utils/FixedPointMathLib.sol create mode 100644 lib/solmate/src/utils/ReentrancyGuard.sol create mode 100644 lib/solmate/src/utils/SSTORE2.sol create mode 100644 lib/solmate/src/utils/SafeCastLib.sol create mode 100644 lib/solmate/src/utils/SafeTransferLib.sol create mode 100644 remappings.txt diff --git a/examples/712/L1/README.md b/examples/712/L1/README.md deleted file mode 100644 index 7f7174b..0000000 --- a/examples/712/L1/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Deposit - -The source code referenced in Foundry tutorial [Testing EIP-712 Signatures](https://book.getfoundry.sh/tutorials/testing-eip712.html) diff --git a/examples/712/README.md b/examples/712/README.md new file mode 100644 index 0000000..356088b --- /dev/null +++ b/examples/712/README.md @@ -0,0 +1,29 @@ +# NFTEE - EIP712 Minting Example + +This SUAPP example showcases how you can write a SUAPP to generate a 712 signature on SUAVE that can then ben sent to a contract on Eth L1 which allows you to mint an NFT. + +## Usage +## Solidity +Like all examples in this repo: +```sh +forge build +``` +## Go Script +Before running you need to fill in some values: +- `PRIV_KEY`: Valid ECDSA Private Key with L1 Eth. (Hexadecimal format) +- `ETH_RPC_URL`: Ethereum L1 testnet RPC URL. +- `ETH_CHAIN_ID`: Chain Id of the L1 you're testing on. + +To run the script, execute the following command in your terminal: + +```sh +go run main.go +``` + +## Notes +- The `DOMAIN_SEPARATOR` and `MINT_TYPEHASH` are currently hard coded, you will need to make this dynamic for you prod application. Also Accepting PRs! +- Ensure that the Ethereum Goerli testnet account associated with the provided private key has sufficient ETH to cover transaction fees. +- The script currently targets the Goerli testnet. For mainnet deployment, update the `ETH_RPC_URL` and `ETH_CHAIN_ID` appropriately, and ensure that the account has sufficient mainnet ETH. + +# 712 +The source code for creating the 712 Signature is based off [Testing EIP-712 Signatures](https://book.getfoundry.sh/tutorials/testing-eip712.html). diff --git a/examples/712/SUAVE/src/712Emitter.sol b/examples/712/SUAVE/src/712Emitter.sol index 598e33f..1852d29 100644 --- a/examples/712/SUAVE/src/712Emitter.sol +++ b/examples/712/SUAVE/src/712Emitter.sol @@ -38,7 +38,6 @@ contract Emitter { // inside we need to store our reference to our private key for future use // we must do this because updatePrivateKey() is offchain and can't directly store onchain without this function setPrivateKey(Suave.DataId dataID) public { - // require(msg.sender == owner, "only owner can update"); privateKeyDataID = dataID; emit PrivateKeyUpdateEvent(dataID); } @@ -46,7 +45,6 @@ contract Emitter { // offchain portion of Confidential Compute Request to update privateKey function updatePrivateKey() public returns (bytes memory) { require(Suave.isConfidential()); - // // require(msg.sender == owner, "only owner can update"); bytes memory privateKey = this.fetchConfidentialPrivateKey(); diff --git a/examples/712/main.go b/examples/712/main.go index 3f241cb..6f44ef3 100644 --- a/examples/712/main.go +++ b/examples/712/main.go @@ -21,39 +21,43 @@ import ( "github.com/flashbots/suapp-examples/framework" ) -// Constants const ( + // Deployment specific + PRIV_KEY = "VALID_PRIVATE_KEY" // FILL IN TO RUN EXAMPLE + ETH_RPC_URL = "VALID_ETH_L1_RPC_URL" // FILL IN TO RUN EXAMPLE + + // Contract Specific MINT_TYPEHASH = "0x686aa0ee2a8dd75ace6f66b3a5e79d3dfd8e25e05a5e494bb85e72214ab37880" DOMAIN_SEPARATOR = "0x617661b7ab13ce21150e0a39abe5834762b356e3c643f10c28a3c9331025604a" - ethRPCURL = "https://eth-goerli.g.alchemy.com/v2/FXjSPpH91SDIgA6ES9TavZauY6NAlOFn" + ETH_CHAIN_ID = 5 + NFTEE_TOKEN_ID = 1 ) func main() { - - // TODO : - // - clean up priv key handling - // - add dynamic domain seperator handling i.e. pass it to the SUAVE contract + // create private key to be used on SUAVE and Eth L1 + privKey := framework.NewPrivKeyFromHex("VALID_PRIVATE_KEY") + fmt.Printf("SUAVE Signer Address: %s\n", privKey.Address()) // Deploy SUAVE L1 Contract - suaveContractAddress, suaveTxHash, suaveSignerAddr, suaveSig, privKey := deploySuaveContract() + suaveContractAddress, suaveTxHash, suaveSig := deploySuaveContract(privKey) fmt.Printf("SUAVE Contract deployed at: %s\n", suaveContractAddress.Hex()) fmt.Printf("SUAVE Transaction Hash: %s\n", suaveTxHash.Hex()) - fmt.Printf("SUAVE Signer Address: %s\n", suaveSignerAddr.Hex()) - // Deploy Ethereum L1 Contract with SUAVE signer address - ethContractAddress, ethTxHash, ok := deployEthContract(suaveSignerAddr, suaveSig, privKey) + // Deploy Ethereum L1 Contract and Mint NFT + ethContractAddress, ethTxHash, ok := deployEthContractAndMint(privKey.Address(), suaveSig, privKey.Priv) fmt.Printf("Ethereum Contract deployed at: %s\n", ethContractAddress.Hex()) fmt.Printf("Ethereum Transaction Hash: %s\n", ethTxHash.Hex()) + // Check if NFT was minted if !ok { - panic("NFT minting on L1 failed") + panic("NFTEE minting on L1 failed") } } -func deploySuaveContract() (common.Address, common.Hash, common.Address, []byte, *ecdsa.PrivateKey) { +func deploySuaveContract(privKey *framework.PrivKey) (common.Address, common.Hash, []byte) { relayerURL := "localhost:1234" go func() { log.Fatal(http.ListenAndServe(relayerURL, &relayHandlerExample{})) @@ -62,7 +66,6 @@ func deploySuaveContract() (common.Address, common.Hash, common.Address, []byte, fr := framework.New() contract := fr.DeployContract("712Emitter.sol/Emitter.json") - privKey := framework.NewPrivKeyFromHex("abc") addr := privKey.Address() fundBalance := big.NewInt(100000000000000000) fr.FundAccount(addr, fundBalance) @@ -72,7 +75,7 @@ func deploySuaveContract() (common.Address, common.Hash, common.Address, []byte, receipt := contractAddr.SendTransaction("updatePrivateKey", []interface{}{}, []byte(skHex)) - tokenId := big.NewInt(1) + tokenId := big.NewInt(NFTEE_TOKEN_ID) // Call createEIP712Digest to generate digestHash digestHash := contract.Call("createEIP712Digest", []interface{}{tokenId, addr}) @@ -106,16 +109,16 @@ func deploySuaveContract() (common.Address, common.Hash, common.Address, []byte, signature = nfteeApprovalEvent.SignedMessage } - return contractAddr.Address(), receipt.TxHash, addr, signature, privKey.Priv + return contractAddr.Address(), receipt.TxHash, signature } -func deployEthContract(suaveSignerAddr common.Address, suaveSignature []byte, privKey *ecdsa.PrivateKey) (common.Address, common.Hash, bool) { - ethClient, err := ethclient.Dial(ethRPCURL) +func deployEthContractAndMint(suaveSignerAddr common.Address, suaveSignature []byte, privKey *ecdsa.PrivateKey) (common.Address, common.Hash, bool) { + ethClient, err := ethclient.Dial(ETH_RPC_URL) if err != nil { log.Fatalf("Failed to connect to the Ethereum client: %v", err) } - auth, err := bind.NewKeyedTransactorWithChainID(privKey, big.NewInt(5)) // Chain ID for Ethereum Goerli + auth, err := bind.NewKeyedTransactorWithChainID(privKey, big.NewInt(ETH_CHAIN_ID)) // Chain ID for Goerli if err != nil { log.Fatalf("Failed to create authorized transactor: %v", err) } @@ -131,11 +134,11 @@ func deployEthContract(suaveSignerAddr common.Address, suaveSignature []byte, pr log.Fatalf("Failed to deploy new contract: %v", err) } - // Wait for the transaction to be mined - fmt.Println("Waiting for contract deployment transaction to be mined...") + // Wait for the transaction to be included + fmt.Println("Waiting for contract deployment transaction to be included...") receipt, err := bind.WaitMined(context.Background(), ethClient, tx) if err != nil { - log.Fatalf("Error waiting for contract deployment transaction to be mined: %v", err) + log.Fatalf("Error waiting for contract deployment transaction to be included: %v", err) } if receipt.Status != types.ReceiptStatusSuccessful { @@ -146,8 +149,7 @@ func deployEthContract(suaveSignerAddr common.Address, suaveSignature []byte, pr fmt.Println("Contract deployed, address:", receipt.ContractAddress.Hex()) // Mint NFT with the signature from SUAVE - tokenId := big.NewInt(1) - fmt.Printf("intended NFT recipient : and %s ID : %d \n", suaveSignerAddr, tokenId) + tokenId := big.NewInt(NFTEE_TOKEN_ID) isMinted, err := mintNFTWithSignature(receipt.ContractAddress, tokenId, suaveSignerAddr, suaveSignature, ethClient, auth, artifact.Abi) if err != nil { log.Printf("Error minting NFT: %v", err) @@ -179,14 +181,13 @@ func mintNFTWithSignature(contractAddress common.Address, tokenId *big.Int, reci v += 27 } - fmt.Printf("intended NFT recipient : and %s ID : %d \n", recipient, tokenId) tx, err := contract.Transact(auth, "mintNFTWithSignature", tokenId, recipient, v, r, s) if err != nil { return false, fmt.Errorf("mintNFTWithSignature transaction failed: %v", err) } - // Wait for the transaction to be mined - fmt.Println("Waiting for mint transaction to be mined...") + // Wait for the transaction to be included + fmt.Println("Waiting for mint transaction to be included...") receipt, err := bind.WaitMined(context.Background(), client, tx) if err != nil { return false, fmt.Errorf("waiting for mint transaction mining failed: %v", err) diff --git a/lib/solmate/.gas-snapshot b/lib/solmate/.gas-snapshot new file mode 100644 index 0000000..14772d2 --- /dev/null +++ b/lib/solmate/.gas-snapshot @@ -0,0 +1,222 @@ +AuthTest:testCallFunctionAsOwner() (gas: 29871) +AuthTest:testCallFunctionWithPermissiveAuthority() (gas: 124249) +AuthTest:testFailCallFunctionAsNonOwner() (gas: 15491) +AuthTest:testFailCallFunctionAsOwnerWithOutOfOrderAuthority() (gas: 136021) +AuthTest:testFailCallFunctionWithRestrictiveAuthority() (gas: 129201) +AuthTest:testFailSetAuthorityAsNonOwner() (gas: 18260) +AuthTest:testFailSetAuthorityWithRestrictiveAuthority() (gas: 129078) +AuthTest:testFailSetOwnerAsNonOwner() (gas: 15609) +AuthTest:testFailSetOwnerAsOwnerWithOutOfOrderAuthority() (gas: 136161) +AuthTest:testFailSetOwnerWithRestrictiveAuthority() (gas: 129242) +AuthTest:testSetAuthorityAsOwner() (gas: 32302) +AuthTest:testSetAuthorityAsOwnerWithOutOfOrderAuthority() (gas: 226396) +AuthTest:testSetAuthorityWithPermissiveAuthority() (gas: 125963) +AuthTest:testSetOwnerAsOwner() (gas: 15298) +AuthTest:testSetOwnerWithPermissiveAuthority() (gas: 127884) +Bytes32AddressLibTest:testFillLast12Bytes() (gas: 223) +Bytes32AddressLibTest:testFromLast20Bytes() (gas: 191) +CREATE3Test:testDeployERC20() (gas: 852410) +CREATE3Test:testFailDoubleDeployDifferentBytecode() (gas: 9079256848778914164) +CREATE3Test:testFailDoubleDeploySameBytecode() (gas: 9079256848778906218) +DSTestPlusTest:testBound() (gas: 14208) +DSTestPlusTest:testBrutalizeMemory() (gas: 823) +DSTestPlusTest:testFailBoundMinBiggerThanMax() (gas: 309) +DSTestPlusTest:testRelApproxEqBothZeroesPasses() (gas: 413) +ERC1155Test:testApproveAll() (gas: 31009) +ERC1155Test:testBatchBalanceOf() (gas: 157631) +ERC1155Test:testBatchBurn() (gas: 151074) +ERC1155Test:testBatchMintToEOA() (gas: 137337) +ERC1155Test:testBatchMintToERC1155Recipient() (gas: 942650) +ERC1155Test:testBurn() (gas: 38598) +ERC1155Test:testFailBalanceOfBatchWithArrayMismatch() (gas: 7933) +ERC1155Test:testFailBatchBurnInsufficientBalance() (gas: 136156) +ERC1155Test:testFailBatchBurnWithArrayLengthMismatch() (gas: 135542) +ERC1155Test:testFailBatchMintToNonERC1155Recipient() (gas: 167292) +ERC1155Test:testFailBatchMintToRevertingERC1155Recipient() (gas: 358811) +ERC1155Test:testFailBatchMintToWrongReturnDataERC1155Recipient() (gas: 310743) +ERC1155Test:testFailBatchMintToZero() (gas: 131737) +ERC1155Test:testFailBatchMintWithArrayMismatch() (gas: 9600) +ERC1155Test:testFailBurnInsufficientBalance() (gas: 34852) +ERC1155Test:testFailMintToNonERC155Recipient() (gas: 68191) +ERC1155Test:testFailMintToRevertingERC155Recipient() (gas: 259435) +ERC1155Test:testFailMintToWrongReturnDataERC155Recipient() (gas: 259389) +ERC1155Test:testFailMintToZero() (gas: 33705) +ERC1155Test:testFailSafeBatchTransferFromToNonERC1155Recipient() (gas: 321377) +ERC1155Test:testFailSafeBatchTransferFromToRevertingERC1155Recipient() (gas: 512956) +ERC1155Test:testFailSafeBatchTransferFromToWrongReturnDataERC1155Recipient() (gas: 464847) +ERC1155Test:testFailSafeBatchTransferFromToZero() (gas: 286556) +ERC1155Test:testFailSafeBatchTransferFromWithArrayLengthMismatch() (gas: 162674) +ERC1155Test:testFailSafeBatchTransferInsufficientBalance() (gas: 163555) +ERC1155Test:testFailSafeTransferFromInsufficientBalance() (gas: 63245) +ERC1155Test:testFailSafeTransferFromSelfInsufficientBalance() (gas: 34297) +ERC1155Test:testFailSafeTransferFromToNonERC155Recipient() (gas: 96510) +ERC1155Test:testFailSafeTransferFromToRevertingERC1155Recipient() (gas: 287731) +ERC1155Test:testFailSafeTransferFromToWrongReturnDataERC1155Recipient() (gas: 239587) +ERC1155Test:testFailSafeTransferFromToZero() (gas: 62014) +ERC1155Test:testMintToEOA() (gas: 34765) +ERC1155Test:testMintToERC1155Recipient() (gas: 608328) +ERC1155Test:testSafeBatchTransferFromToEOA() (gas: 297822) +ERC1155Test:testSafeBatchTransferFromToERC1155Recipient() (gas: 1122274) +ERC1155Test:testSafeTransferFromSelf() (gas: 64177) +ERC1155Test:testSafeTransferFromToEOA() (gas: 93167) +ERC1155Test:testSafeTransferFromToERC1155Recipient() (gas: 686500) +ERC20Test:testApprove() (gas: 31058) +ERC20Test:testBurn() (gas: 56970) +ERC20Test:testFailPermitBadDeadline() (gas: 36924) +ERC20Test:testFailPermitBadNonce() (gas: 36874) +ERC20Test:testFailPermitPastDeadline() (gas: 10938) +ERC20Test:testFailPermitReplay() (gas: 66285) +ERC20Test:testFailTransferFromInsufficientAllowance() (gas: 80882) +ERC20Test:testFailTransferFromInsufficientBalance() (gas: 81358) +ERC20Test:testFailTransferInsufficientBalance() (gas: 52806) +ERC20Test:testInfiniteApproveTransferFrom() (gas: 89793) +ERC20Test:testMint() (gas: 53746) +ERC20Test:testPermit() (gas: 63193) +ERC20Test:testTransfer() (gas: 60272) +ERC20Test:testTransferFrom() (gas: 83777) +ERC4626Test:testFailDepositWithNoApproval() (gas: 13351) +ERC4626Test:testFailDepositWithNotEnoughApproval() (gas: 86987) +ERC4626Test:testFailDepositZero() (gas: 7774) +ERC4626Test:testFailMintWithNoApproval() (gas: 13296) +ERC4626Test:testFailRedeemWithNoShareAmount() (gas: 32339) +ERC4626Test:testFailRedeemWithNotEnoughShareAmount() (gas: 203632) +ERC4626Test:testFailRedeemZero() (gas: 7961) +ERC4626Test:testFailWithdrawWithNoUnderlyingAmount() (gas: 32292) +ERC4626Test:testFailWithdrawWithNotEnoughUnderlyingAmount() (gas: 203615) +ERC4626Test:testMintZero() (gas: 54598) +ERC4626Test:testMultipleMintDepositRedeemWithdraw() (gas: 411940) +ERC4626Test:testVaultInteractionsForSomeoneElse() (gas: 286247) +ERC4626Test:testWithdrawZero() (gas: 52465) +ERC721Test:testApprove() (gas: 78427) +ERC721Test:testApproveAll() (gas: 31063) +ERC721Test:testApproveBurn() (gas: 65550) +ERC721Test:testBurn() (gas: 46107) +ERC721Test:testFailApproveUnAuthorized() (gas: 55598) +ERC721Test:testFailApproveUnMinted() (gas: 10236) +ERC721Test:testFailBalanceOfZeroAddress() (gas: 5555) +ERC721Test:testFailBurnUnMinted() (gas: 7857) +ERC721Test:testFailDoubleBurn() (gas: 58943) +ERC721Test:testFailDoubleMint() (gas: 53286) +ERC721Test:testFailMintToZero() (gas: 5753) +ERC721Test:testFailOwnerOfUnminted() (gas: 7609) +ERC721Test:testFailSafeMintToERC721RecipientWithWrongReturnData() (gas: 159076) +ERC721Test:testFailSafeMintToERC721RecipientWithWrongReturnDataWithData() (gas: 159831) +ERC721Test:testFailSafeMintToNonERC721Recipient() (gas: 89210) +ERC721Test:testFailSafeMintToNonERC721RecipientWithData() (gas: 89995) +ERC721Test:testFailSafeMintToRevertingERC721Recipient() (gas: 204743) +ERC721Test:testFailSafeMintToRevertingERC721RecipientWithData() (gas: 205517) +ERC721Test:testFailSafeTransferFromToERC721RecipientWithWrongReturnData() (gas: 187276) +ERC721Test:testFailSafeTransferFromToERC721RecipientWithWrongReturnDataWithData() (gas: 187728) +ERC721Test:testFailSafeTransferFromToNonERC721Recipient() (gas: 117413) +ERC721Test:testFailSafeTransferFromToNonERC721RecipientWithData() (gas: 117872) +ERC721Test:testFailSafeTransferFromToRevertingERC721Recipient() (gas: 233009) +ERC721Test:testFailSafeTransferFromToRevertingERC721RecipientWithData() (gas: 233396) +ERC721Test:testFailTransferFromNotOwner() (gas: 57872) +ERC721Test:testFailTransferFromToZero() (gas: 53381) +ERC721Test:testFailTransferFromUnOwned() (gas: 8000) +ERC721Test:testFailTransferFromWrongFrom() (gas: 53361) +ERC721Test:testMint() (gas: 54336) +ERC721Test:testSafeMintToEOA() (gas: 56993) +ERC721Test:testSafeMintToERC721Recipient() (gas: 381737) +ERC721Test:testSafeMintToERC721RecipientWithData() (gas: 402881) +ERC721Test:testSafeTransferFromToEOA() (gas: 95666) +ERC721Test:testSafeTransferFromToERC721Recipient() (gas: 440251) +ERC721Test:testSafeTransferFromToERC721RecipientWithData() (gas: 461049) +ERC721Test:testTransferFrom() (gas: 86347) +ERC721Test:testTransferFromApproveAll() (gas: 92898) +ERC721Test:testTransferFromSelf() (gas: 64776) +FixedPointMathLibTest:testDivWadDown() (gas: 864) +FixedPointMathLibTest:testDivWadDownEdgeCases() (gas: 423) +FixedPointMathLibTest:testDivWadUp() (gas: 981) +FixedPointMathLibTest:testDivWadUpEdgeCases() (gas: 482) +FixedPointMathLibTest:testFailDivWadDownZeroDenominator() (gas: 362) +FixedPointMathLibTest:testFailDivWadUpZeroDenominator() (gas: 342) +FixedPointMathLibTest:testFailMulDivDownZeroDenominator() (gas: 316) +FixedPointMathLibTest:testFailMulDivUpZeroDenominator() (gas: 317) +FixedPointMathLibTest:testMulDivDown() (gas: 1861) +FixedPointMathLibTest:testMulDivDownEdgeCases() (gas: 751) +FixedPointMathLibTest:testMulDivUp() (gas: 2273) +FixedPointMathLibTest:testMulDivUpEdgeCases() (gas: 846) +FixedPointMathLibTest:testMulWadDown() (gas: 821) +FixedPointMathLibTest:testMulWadDownEdgeCases() (gas: 886) +FixedPointMathLibTest:testMulWadUp() (gas: 959) +FixedPointMathLibTest:testMulWadUpEdgeCases() (gas: 1002) +FixedPointMathLibTest:testRPow() (gas: 2142) +FixedPointMathLibTest:testSqrt() (gas: 2537) +MultiRolesAuthorityTest:testCanCallPublicCapability() (gas: 34292) +MultiRolesAuthorityTest:testCanCallWithAuthorizedRole() (gas: 80556) +MultiRolesAuthorityTest:testCanCallWithCustomAuthority() (gas: 422681) +MultiRolesAuthorityTest:testCanCallWithCustomAuthorityOverridesPublicCapability() (gas: 247674) +MultiRolesAuthorityTest:testCanCallWithCustomAuthorityOverridesUserWithRole() (gas: 256845) +MultiRolesAuthorityTest:testSetPublicCapabilities() (gas: 27762) +MultiRolesAuthorityTest:testSetRoleCapabilities() (gas: 28985) +MultiRolesAuthorityTest:testSetRoles() (gas: 29006) +MultiRolesAuthorityTest:testSetTargetCustomAuthority() (gas: 27976) +OwnedTest:testCallFunctionAsNonOwner() (gas: 11311) +OwnedTest:testCallFunctionAsOwner() (gas: 10479) +OwnedTest:testSetOwner() (gas: 13035) +ReentrancyGuardTest:testFailUnprotectedCall() (gas: 45665) +ReentrancyGuardTest:testNoReentrancy() (gas: 7515) +ReentrancyGuardTest:testProtectedCall() (gas: 32949) +RolesAuthorityTest:testCanCallPublicCapability() (gas: 33336) +RolesAuthorityTest:testCanCallWithAuthorizedRole() (gas: 79601) +RolesAuthorityTest:testSetPublicCapabilities() (gas: 29183) +RolesAuthorityTest:testSetRoleCapabilities() (gas: 30258) +RolesAuthorityTest:testSetRoles() (gas: 28986) +SSTORE2Test:testFailReadInvalidPointer() (gas: 2927) +SSTORE2Test:testFailReadInvalidPointerCustomBounds() (gas: 3099) +SSTORE2Test:testFailReadInvalidPointerCustomStartBound() (gas: 3004) +SSTORE2Test:testFailWriteReadEmptyOutOfBounds() (gas: 34470) +SSTORE2Test:testFailWriteReadOutOfBounds() (gas: 34426) +SSTORE2Test:testFailWriteReadOutOfStartBound() (gas: 34362) +SSTORE2Test:testWriteRead() (gas: 53497) +SSTORE2Test:testWriteReadCustomBounds() (gas: 34869) +SSTORE2Test:testWriteReadCustomStartBound() (gas: 34740) +SSTORE2Test:testWriteReadEmptyBound() (gas: 34677) +SSTORE2Test:testWriteReadFullBoundedRead() (gas: 53672) +SSTORE2Test:testWriteReadFullStartBound() (gas: 34764) +SafeCastLibTest:testFailSafeCastTo128() (gas: 321) +SafeCastLibTest:testFailSafeCastTo160() (gas: 342) +SafeCastLibTest:testFailSafeCastTo192() (gas: 344) +SafeCastLibTest:testFailSafeCastTo224() (gas: 343) +SafeCastLibTest:testFailSafeCastTo248() (gas: 365) +SafeCastLibTest:testFailSafeCastTo32() (gas: 364) +SafeCastLibTest:testFailSafeCastTo64() (gas: 321) +SafeCastLibTest:testFailSafeCastTo8() (gas: 296) +SafeCastLibTest:testFailSafeCastTo96() (gas: 321) +SafeCastLibTest:testSafeCastTo128() (gas: 449) +SafeCastLibTest:testSafeCastTo160() (gas: 470) +SafeCastLibTest:testSafeCastTo192() (gas: 471) +SafeCastLibTest:testSafeCastTo224() (gas: 491) +SafeCastLibTest:testSafeCastTo248() (gas: 427) +SafeCastLibTest:testSafeCastTo32() (gas: 471) +SafeCastLibTest:testSafeCastTo64() (gas: 470) +SafeCastLibTest:testSafeCastTo8() (gas: 469) +SafeCastLibTest:testSafeCastTo96() (gas: 469) +SafeTransferLibTest:testApproveWithMissingReturn() (gas: 30751) +SafeTransferLibTest:testApproveWithNonContract() (gas: 3035) +SafeTransferLibTest:testApproveWithReturnsTooMuch() (gas: 31134) +SafeTransferLibTest:testApproveWithStandardERC20() (gas: 30882) +SafeTransferLibTest:testFailApproveWithReturnsFalse() (gas: 5627) +SafeTransferLibTest:testFailApproveWithReturnsTooLittle() (gas: 5568) +SafeTransferLibTest:testFailApproveWithReverting() (gas: 5502) +SafeTransferLibTest:testFailTransferETHToContractWithoutFallback() (gas: 7244) +SafeTransferLibTest:testFailTransferFromWithReturnsFalse() (gas: 13663) +SafeTransferLibTest:testFailTransferFromWithReturnsTooLittle() (gas: 13544) +SafeTransferLibTest:testFailTransferFromWithReverting() (gas: 9757) +SafeTransferLibTest:testFailTransferWithReturnsFalse() (gas: 8532) +SafeTransferLibTest:testFailTransferWithReturnsTooLittle() (gas: 8538) +SafeTransferLibTest:testFailTransferWithReverting() (gas: 8494) +SafeTransferLibTest:testTransferETH() (gas: 34592) +SafeTransferLibTest:testTransferFromWithMissingReturn() (gas: 49188) +SafeTransferLibTest:testTransferFromWithNonContract() (gas: 3035) +SafeTransferLibTest:testTransferFromWithReturnsTooMuch() (gas: 49812) +SafeTransferLibTest:testTransferFromWithStandardERC20() (gas: 47605) +SafeTransferLibTest:testTransferWithMissingReturn() (gas: 36669) +SafeTransferLibTest:testTransferWithNonContract() (gas: 3012) +SafeTransferLibTest:testTransferWithReturnsTooMuch() (gas: 37115) +SafeTransferLibTest:testTransferWithStandardERC20() (gas: 36699) +WETHTest:testDeposit() (gas: 63260) +WETHTest:testFallbackDeposit() (gas: 63524) +WETHTest:testPartialWithdraw() (gas: 73281) +WETHTest:testWithdraw() (gas: 54360) diff --git a/lib/solmate/.gitattributes b/lib/solmate/.gitattributes new file mode 100644 index 0000000..e664563 --- /dev/null +++ b/lib/solmate/.gitattributes @@ -0,0 +1,2 @@ +*.sol linguist-language=Solidity +.gas-snapshot linguist-language=Julia \ No newline at end of file diff --git a/lib/solmate/.github/pull_request_template.md b/lib/solmate/.github/pull_request_template.md new file mode 100644 index 0000000..5cca391 --- /dev/null +++ b/lib/solmate/.github/pull_request_template.md @@ -0,0 +1,13 @@ +## Description + +Describe the changes made in your pull request here. + +## Checklist + +Ensure you completed **all of the steps** below before submitting your pull request: + +- [ ] Ran `forge snapshot`? +- [ ] Ran `npm run lint`? +- [ ] Ran `forge test`? + +_Pull requests with an incomplete checklist will be thrown out._ diff --git a/lib/solmate/.github/workflows/tests.yml b/lib/solmate/.github/workflows/tests.yml new file mode 100644 index 0000000..2a29890 --- /dev/null +++ b/lib/solmate/.github/workflows/tests.yml @@ -0,0 +1,29 @@ +name: Tests + +on: [push, pull_request] + +jobs: + tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Install Foundry + uses: onbjerg/foundry-toolchain@v1 + with: + version: nightly + + - name: Install dependencies + run: forge install + + - name: Check contract sizes + run: forge build --sizes + + - name: Check gas snapshots + run: forge snapshot --check + + - name: Run tests + run: forge test + env: + # Only fuzz intensely if we're running this action on a push to main or for a PR going into main: + FOUNDRY_PROFILE: ${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && 'intense' }} diff --git a/lib/solmate/.gitignore b/lib/solmate/.gitignore new file mode 100644 index 0000000..5dfe93f --- /dev/null +++ b/lib/solmate/.gitignore @@ -0,0 +1,3 @@ +/cache +/node_modules +/out \ No newline at end of file diff --git a/lib/solmate/.gitmodules b/lib/solmate/.gitmodules new file mode 100644 index 0000000..e124719 --- /dev/null +++ b/lib/solmate/.gitmodules @@ -0,0 +1,3 @@ +[submodule "lib/ds-test"] + path = lib/ds-test + url = https://github.com/dapphub/ds-test diff --git a/lib/solmate/.prettierignore b/lib/solmate/.prettierignore new file mode 100644 index 0000000..7951405 --- /dev/null +++ b/lib/solmate/.prettierignore @@ -0,0 +1 @@ +lib \ No newline at end of file diff --git a/lib/solmate/.prettierrc b/lib/solmate/.prettierrc new file mode 100644 index 0000000..15ae8a7 --- /dev/null +++ b/lib/solmate/.prettierrc @@ -0,0 +1,14 @@ +{ + "tabWidth": 2, + "printWidth": 100, + + "overrides": [ + { + "files": "*.sol", + "options": { + "tabWidth": 4, + "printWidth": 120 + } + } + ] +} diff --git a/lib/solmate/.vscode/settings.json b/lib/solmate/.vscode/settings.json new file mode 100644 index 0000000..74939be --- /dev/null +++ b/lib/solmate/.vscode/settings.json @@ -0,0 +1,9 @@ +{ + "solidity.packageDefaultDependenciesContractsDirectory": "src", + "solidity.packageDefaultDependenciesDirectory": "lib", + "solidity.compileUsingRemoteVersion": "v0.8.10", + "search.exclude": { "lib": true }, + "files.associations": { + ".gas-snapshot": "julia" + } +} diff --git a/lib/solmate/LICENSE b/lib/solmate/LICENSE new file mode 100644 index 0000000..29ebfa5 --- /dev/null +++ b/lib/solmate/LICENSE @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. \ No newline at end of file diff --git a/lib/solmate/README.md b/lib/solmate/README.md new file mode 100644 index 0000000..58b207c --- /dev/null +++ b/lib/solmate/README.md @@ -0,0 +1,66 @@ +# solmate + +**Modern**, **opinionated**, and **gas optimized** building blocks for **smart contract development**. + +## Contracts + +```ml +auth +├─ Owned — "Simple single owner authorization" +├─ Auth — "Flexible and updatable auth pattern" +├─ authorities +│ ├─ RolesAuthority — "Role based Authority that supports up to 256 roles" +│ ├─ MultiRolesAuthority — "Flexible and target agnostic role based Authority" +mixins +├─ ERC4626 — "Minimal ERC4626 tokenized Vault implementation" +tokens +├─ WETH — "Minimalist and modern Wrapped Ether implementation" +├─ ERC20 — "Modern and gas efficient ERC20 + EIP-2612 implementation" +├─ ERC721 — "Modern, minimalist, and gas efficient ERC721 implementation" +├─ ERC1155 — "Minimalist and gas efficient standard ERC1155 implementation" +utils +├─ SSTORE2 - "Library for cheaper reads and writes to persistent storage" +├─ CREATE3 — "Deploy to deterministic addresses without an initcode factor" +├─ SafeCastLib - "Safe unsigned integer casting lib that reverts on overflow" +├─ ReentrancyGuard — "Gas optimized reentrancy protection for smart contracts" +├─ FixedPointMathLib — "Arithmetic library with operations for fixed-point numbers" +├─ Bytes32AddressLib — "Library for converting between addresses and bytes32 values" +├─ SafeTransferLib — "Safe ERC20/ETH transfer lib that handles missing return values" +``` + +## Safety + +This is **experimental software** and is provided on an "as is" and "as available" basis. + +While each [major release has been audited](audits), these contracts are **not designed with user safety** in mind: + +- There are implicit invariants these contracts expect to hold. +- **You can easily shoot yourself in the foot if you're not careful.** +- You should thoroughly read each contract you plan to use top to bottom. + +We **do not give any warranties** and **will not be liable for any loss** incurred through any use of this codebase. + +## Installation + +To install with [**Foundry**](https://github.com/gakonst/foundry): + +```sh +forge install rari-capital/solmate +``` + +To install with [**Hardhat**](https://github.com/nomiclabs/hardhat) or [**Truffle**](https://github.com/trufflesuite/truffle): + +```sh +npm install @rari-capital/solmate +``` + +## Acknowledgements + +These contracts were inspired by or directly modified from many sources, primarily: + +- [Gnosis](https://github.com/gnosis/gp-v2-contracts) +- [Uniswap](https://github.com/Uniswap/uniswap-lib) +- [Dappsys](https://github.com/dapphub/dappsys) +- [Dappsys V2](https://github.com/dapp-org/dappsys-v2) +- [0xSequence](https://github.com/0xSequence) +- [OpenZeppelin](https://github.com/OpenZeppelin/openzeppelin-contracts) diff --git a/lib/solmate/audits/v6-Fixed-Point-Solutions.pdf b/lib/solmate/audits/v6-Fixed-Point-Solutions.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5c4243425bf4fdaef1dcd87eceb2365ba97bd6f0 GIT binary patch literal 170456 zcmZsDc{r4B*tTsfQ~fM?N~vb1vFME`}r>DKAr;Gg!FL|V*nTM;Lx2?Sg`1+cYwIY}U z<)W#HGIDiw1Y-*yfCpYWtA|2MguhyFflavY_ER5UrY@jnrzd`RW*zavP+GbSiy@Eu+s<>ldR|No!$$p6hs zxb0?-QnWC&akjVh0>iv*yf!{L>0<2&MiZUvysn~-C?7^D8rwTLUiAWhgV~R}UU&7t zyII?Uv4-|HoowyT8X17mXRJN1p)|nkXTicwUY=(59>-l>++1&fgFR9S39tViTw>nu!xG9=3x~b9h9e+hrP86@)m8pXsmI_==QLt;-aJkgX6(* z82HM1=nyLQTFgmJQT>(i$LDg94zU_S5=Xx`_3=J%DLna8U4vh;^d7Fq>)HG7lSSWE zb(*BgcW&J!7PWb=sX~AB0qz~;`hu04w?>7$o zchlaCVXuy*l`Fl4zmqw+fGL+Oo<{?R{bpuC zKc3E0$P;X>IiGszX74ohaYyl(@WQ$d*BhR;|)7A`O*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75u5D91*8G!HqKlQ@vKnP(UjtJq1sC5v5 zf;tZ(lVEP!*7G2kjf0SpaGPan>pBvSNJ8o*;Q$<5fw!CoQ3x~xRBwnApM0aB>@?GxN{Iu>&Qe@tYB6jOn%(zFPRL%w*Vo7 zd0Qy^0CWt<06;<60zfF-lR*L=r2{0vtVx7k7#qkOK@iM!MXUpeXiUP_h=kk=5Yd=~ z`!gy>00~b*VhD~D9vLeDHW_6L2_hqL0FVirRdMtAyS_kVR15%!2%>C;$PijaLETjl zu1&}sfjGFDAoPMT2@fr!P>`4e@pu#_K|BeCD-aK$Y7U$=5T%1aAR%iVNFd{p_X8w= z$QprzHZL{O4*2j0J}6`Ys=jQNXY@J{rn4h#25@B5Isn}VDF8efqxMoz{fz?S0O1=PKQgLs zL2xNS)*%RwNA_uWF9nB;9|RClc!A*m1Be{qH?JxJ_pl5PBJ{#C0uqz3j0p4Dx5NsM zBT#Ut^9U3WVIQ7IBqL`FSOy~R3?6R3Frj{{4k8(k?5lWqh9V=d0n0$-d;rfwL}Xup zWe~Ct;^Fpz?5ps6fCG@e0U!bTM=m|wtR0=syJ3zVl|AX`d;ZT^Pu9@I#RCiHZF3rg i|9UywxnN;a|C|inJ*?e4{+tWp(_uVfL`7Bg)&2$4o#Cti literal 0 HcmV?d00001 diff --git a/lib/solmate/foundry.toml b/lib/solmate/foundry.toml new file mode 100644 index 0000000..8a4fd22 --- /dev/null +++ b/lib/solmate/foundry.toml @@ -0,0 +1,7 @@ +[default] +solc = "0.8.10" +bytecode_hash = "none" +optimizer_runs = 1000000 + +[intense] +fuzz_runs = 10000 diff --git a/lib/solmate/lib/ds-test/.gitignore b/lib/solmate/lib/ds-test/.gitignore new file mode 100644 index 0000000..63f0b2c --- /dev/null +++ b/lib/solmate/lib/ds-test/.gitignore @@ -0,0 +1,3 @@ +/.dapple +/build +/out diff --git a/lib/solmate/lib/ds-test/LICENSE b/lib/solmate/lib/ds-test/LICENSE new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/lib/solmate/lib/ds-test/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/lib/solmate/lib/ds-test/Makefile b/lib/solmate/lib/ds-test/Makefile new file mode 100644 index 0000000..661dac4 --- /dev/null +++ b/lib/solmate/lib/ds-test/Makefile @@ -0,0 +1,14 @@ +all:; dapp build + +test: + -dapp --use solc:0.4.23 build + -dapp --use solc:0.4.26 build + -dapp --use solc:0.5.17 build + -dapp --use solc:0.6.12 build + -dapp --use solc:0.7.5 build + +demo: + DAPP_SRC=demo dapp --use solc:0.7.5 build + -hevm dapp-test --verbose 3 + +.PHONY: test demo diff --git a/lib/solmate/lib/ds-test/default.nix b/lib/solmate/lib/ds-test/default.nix new file mode 100644 index 0000000..cf65419 --- /dev/null +++ b/lib/solmate/lib/ds-test/default.nix @@ -0,0 +1,4 @@ +{ solidityPackage, dappsys }: solidityPackage { + name = "ds-test"; + src = ./src; +} diff --git a/lib/solmate/lib/ds-test/demo/demo.sol b/lib/solmate/lib/ds-test/demo/demo.sol new file mode 100644 index 0000000..d3a7d81 --- /dev/null +++ b/lib/solmate/lib/ds-test/demo/demo.sol @@ -0,0 +1,223 @@ +// SPDX-License-Identifier: GPL-3.0-or-later +pragma solidity >=0.4.23; + +import "../src/test.sol"; + +contract DemoTest is DSTest { + function test_this() public pure { + require(true); + } + function test_logs() public { + emit log("-- log(string)"); + emit log("a string"); + + emit log("-- log_named_uint(string, uint)"); + log_named_uint("uint", 512); + + emit log("-- log_named_int(string, int)"); + log_named_int("int", -512); + + emit log("-- log_named_address(string, address)"); + log_named_address("address", address(this)); + + emit log("-- log_named_bytes32(string, bytes32)"); + log_named_bytes32("bytes32", "a string"); + + emit log("-- log_named_bytes(string, bytes)"); + log_named_bytes("bytes", hex"cafefe"); + + emit log("-- log_named_string(string, string)"); + log_named_string("string", "a string"); + + emit log("-- log_named_decimal_uint(string, uint, uint)"); + log_named_decimal_uint("decimal uint", 1.0e18, 18); + + emit log("-- log_named_decimal_int(string, int, uint)"); + log_named_decimal_int("decimal int", -1.0e18, 18); + } + event log_old_named_uint(bytes32,uint); + function test_old_logs() public { + log_old_named_uint("key", 500); + log_named_bytes32("bkey", "val"); + } + function test_trace() public view { + this.echo("string 1", "string 2"); + } + function test_multiline() public { + emit log("a multiline\\n" "string"); + emit log("a multiline " "string"); + log_bytes("a string"); + log_bytes("a multiline\n" "string"); + log_bytes("a multiline\\n" "string"); + emit log(unicode"Ώ"); + logs(hex"0000"); + log_named_bytes("0x0000", hex"0000"); + logs(hex"ff"); + } + function echo(string memory s1, string memory s2) public pure + returns (string memory, string memory) + { + return (s1, s2); + } + + function prove_this(uint x) public { + log_named_uint("sym x", x); + assertGt(x + 1, 0); + } + + function test_logn() public { + assembly { + log0(0x01, 0x02) + log1(0x01, 0x02, 0x03) + log2(0x01, 0x02, 0x03, 0x04) + log3(0x01, 0x02, 0x03, 0x04, 0x05) + } + } + + event MyEvent(uint, uint indexed, uint, uint indexed); + function test_events() public { + emit MyEvent(1, 2, 3, 4); + } + + function test_asserts() public { + string memory err = "this test has failed!"; + emit log("## assertTrue(bool)\n"); + assertTrue(false); + emit log("\n"); + assertTrue(false, err); + + emit log("\n## assertEq(address,address)\n"); + assertEq(address(this), msg.sender); + emit log("\n"); + assertEq(address(this), msg.sender, err); + + emit log("\n## assertEq32(bytes32,bytes32)\n"); + assertEq32("bytes 1", "bytes 2"); + emit log("\n"); + assertEq32("bytes 1", "bytes 2", err); + + emit log("\n## assertEq(bytes32,bytes32)\n"); + assertEq32("bytes 1", "bytes 2"); + emit log("\n"); + assertEq32("bytes 1", "bytes 2", err); + + emit log("\n## assertEq(uint,uint)\n"); + assertEq(uint(0), 1); + emit log("\n"); + assertEq(uint(0), 1, err); + + emit log("\n## assertEq(int,int)\n"); + assertEq(-1, -2); + emit log("\n"); + assertEq(-1, -2, err); + + emit log("\n## assertEqDecimal(int,int,uint)\n"); + assertEqDecimal(-1.0e18, -1.1e18, 18); + emit log("\n"); + assertEqDecimal(-1.0e18, -1.1e18, 18, err); + + emit log("\n## assertEqDecimal(uint,uint,uint)\n"); + assertEqDecimal(uint(1.0e18), 1.1e18, 18); + emit log("\n"); + assertEqDecimal(uint(1.0e18), 1.1e18, 18, err); + + emit log("\n## assertGt(uint,uint)\n"); + assertGt(uint(0), 0); + emit log("\n"); + assertGt(uint(0), 0, err); + + emit log("\n## assertGt(int,int)\n"); + assertGt(-1, -1); + emit log("\n"); + assertGt(-1, -1, err); + + emit log("\n## assertGtDecimal(int,int,uint)\n"); + assertGtDecimal(-2.0e18, -1.1e18, 18); + emit log("\n"); + assertGtDecimal(-2.0e18, -1.1e18, 18, err); + + emit log("\n## assertGtDecimal(uint,uint,uint)\n"); + assertGtDecimal(uint(1.0e18), 1.1e18, 18); + emit log("\n"); + assertGtDecimal(uint(1.0e18), 1.1e18, 18, err); + + emit log("\n## assertGe(uint,uint)\n"); + assertGe(uint(0), 1); + emit log("\n"); + assertGe(uint(0), 1, err); + + emit log("\n## assertGe(int,int)\n"); + assertGe(-1, 0); + emit log("\n"); + assertGe(-1, 0, err); + + emit log("\n## assertGeDecimal(int,int,uint)\n"); + assertGeDecimal(-2.0e18, -1.1e18, 18); + emit log("\n"); + assertGeDecimal(-2.0e18, -1.1e18, 18, err); + + emit log("\n## assertGeDecimal(uint,uint,uint)\n"); + assertGeDecimal(uint(1.0e18), 1.1e18, 18); + emit log("\n"); + assertGeDecimal(uint(1.0e18), 1.1e18, 18, err); + + emit log("\n## assertLt(uint,uint)\n"); + assertLt(uint(0), 0); + emit log("\n"); + assertLt(uint(0), 0, err); + + emit log("\n## assertLt(int,int)\n"); + assertLt(-1, -1); + emit log("\n"); + assertLt(-1, -1, err); + + emit log("\n## assertLtDecimal(int,int,uint)\n"); + assertLtDecimal(-1.0e18, -1.1e18, 18); + emit log("\n"); + assertLtDecimal(-1.0e18, -1.1e18, 18, err); + + emit log("\n## assertLtDecimal(uint,uint,uint)\n"); + assertLtDecimal(uint(2.0e18), 1.1e18, 18); + emit log("\n"); + assertLtDecimal(uint(2.0e18), 1.1e18, 18, err); + + emit log("\n## assertLe(uint,uint)\n"); + assertLe(uint(1), 0); + emit log("\n"); + assertLe(uint(1), 0, err); + + emit log("\n## assertLe(int,int)\n"); + assertLe(0, -1); + emit log("\n"); + assertLe(0, -1, err); + + emit log("\n## assertLeDecimal(int,int,uint)\n"); + assertLeDecimal(-1.0e18, -1.1e18, 18); + emit log("\n"); + assertLeDecimal(-1.0e18, -1.1e18, 18, err); + + emit log("\n## assertLeDecimal(uint,uint,uint)\n"); + assertLeDecimal(uint(2.0e18), 1.1e18, 18); + emit log("\n"); + assertLeDecimal(uint(2.0e18), 1.1e18, 18, err); + + emit log("\n## assertEq(string,string)\n"); + string memory s1 = "string 1"; + string memory s2 = "string 2"; + assertEq(s1, s2); + emit log("\n"); + assertEq(s1, s2, err); + + emit log("\n## assertEq0(bytes,bytes)\n"); + assertEq0(hex"abcdef01", hex"abcdef02"); + log("\n"); + assertEq0(hex"abcdef01", hex"abcdef02", err); + } +} + +contract DemoTestWithSetUp { + function setUp() public { + } + function test_pass() public pure { + } +} diff --git a/lib/solmate/lib/ds-test/src/test.sol b/lib/solmate/lib/ds-test/src/test.sol new file mode 100644 index 0000000..515a3bd --- /dev/null +++ b/lib/solmate/lib/ds-test/src/test.sol @@ -0,0 +1,469 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +pragma solidity >=0.5.0; + +contract DSTest { + event log (string); + event logs (bytes); + + event log_address (address); + event log_bytes32 (bytes32); + event log_int (int); + event log_uint (uint); + event log_bytes (bytes); + event log_string (string); + + event log_named_address (string key, address val); + event log_named_bytes32 (string key, bytes32 val); + event log_named_decimal_int (string key, int val, uint decimals); + event log_named_decimal_uint (string key, uint val, uint decimals); + event log_named_int (string key, int val); + event log_named_uint (string key, uint val); + event log_named_bytes (string key, bytes val); + event log_named_string (string key, string val); + + bool public IS_TEST = true; + bool private _failed; + + address constant HEVM_ADDRESS = + address(bytes20(uint160(uint256(keccak256('hevm cheat code'))))); + + modifier mayRevert() { _; } + modifier testopts(string memory) { _; } + + function failed() public returns (bool) { + if (_failed) { + return _failed; + } else { + bool globalFailed = false; + if (hasHEVMContext()) { + (, bytes memory retdata) = HEVM_ADDRESS.call( + abi.encodePacked( + bytes4(keccak256("load(address,bytes32)")), + abi.encode(HEVM_ADDRESS, bytes32("failed")) + ) + ); + globalFailed = abi.decode(retdata, (bool)); + } + return globalFailed; + } + } + + function fail() internal { + if (hasHEVMContext()) { + (bool status, ) = HEVM_ADDRESS.call( + abi.encodePacked( + bytes4(keccak256("store(address,bytes32,bytes32)")), + abi.encode(HEVM_ADDRESS, bytes32("failed"), bytes32(uint256(0x01))) + ) + ); + status; // Silence compiler warnings + } + _failed = true; + } + + function hasHEVMContext() internal view returns (bool) { + uint256 hevmCodeSize = 0; + assembly { + hevmCodeSize := extcodesize(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D) + } + return hevmCodeSize > 0; + } + + modifier logs_gas() { + uint startGas = gasleft(); + _; + uint endGas = gasleft(); + emit log_named_uint("gas", startGas - endGas); + } + + function assertTrue(bool condition) internal { + if (!condition) { + emit log("Error: Assertion Failed"); + fail(); + } + } + + function assertTrue(bool condition, string memory err) internal { + if (!condition) { + emit log_named_string("Error", err); + assertTrue(condition); + } + } + + function assertEq(address a, address b) internal { + if (a != b) { + emit log("Error: a == b not satisfied [address]"); + emit log_named_address(" Expected", b); + emit log_named_address(" Actual", a); + fail(); + } + } + function assertEq(address a, address b, string memory err) internal { + if (a != b) { + emit log_named_string ("Error", err); + assertEq(a, b); + } + } + + function assertEq(bytes32 a, bytes32 b) internal { + if (a != b) { + emit log("Error: a == b not satisfied [bytes32]"); + emit log_named_bytes32(" Expected", b); + emit log_named_bytes32(" Actual", a); + fail(); + } + } + function assertEq(bytes32 a, bytes32 b, string memory err) internal { + if (a != b) { + emit log_named_string ("Error", err); + assertEq(a, b); + } + } + function assertEq32(bytes32 a, bytes32 b) internal { + assertEq(a, b); + } + function assertEq32(bytes32 a, bytes32 b, string memory err) internal { + assertEq(a, b, err); + } + + function assertEq(int a, int b) internal { + if (a != b) { + emit log("Error: a == b not satisfied [int]"); + emit log_named_int(" Expected", b); + emit log_named_int(" Actual", a); + fail(); + } + } + function assertEq(int a, int b, string memory err) internal { + if (a != b) { + emit log_named_string("Error", err); + assertEq(a, b); + } + } + function assertEq(uint a, uint b) internal { + if (a != b) { + emit log("Error: a == b not satisfied [uint]"); + emit log_named_uint(" Expected", b); + emit log_named_uint(" Actual", a); + fail(); + } + } + function assertEq(uint a, uint b, string memory err) internal { + if (a != b) { + emit log_named_string("Error", err); + assertEq(a, b); + } + } + function assertEqDecimal(int a, int b, uint decimals) internal { + if (a != b) { + emit log("Error: a == b not satisfied [decimal int]"); + emit log_named_decimal_int(" Expected", b, decimals); + emit log_named_decimal_int(" Actual", a, decimals); + fail(); + } + } + function assertEqDecimal(int a, int b, uint decimals, string memory err) internal { + if (a != b) { + emit log_named_string("Error", err); + assertEqDecimal(a, b, decimals); + } + } + function assertEqDecimal(uint a, uint b, uint decimals) internal { + if (a != b) { + emit log("Error: a == b not satisfied [decimal uint]"); + emit log_named_decimal_uint(" Expected", b, decimals); + emit log_named_decimal_uint(" Actual", a, decimals); + fail(); + } + } + function assertEqDecimal(uint a, uint b, uint decimals, string memory err) internal { + if (a != b) { + emit log_named_string("Error", err); + assertEqDecimal(a, b, decimals); + } + } + + function assertGt(uint a, uint b) internal { + if (a <= b) { + emit log("Error: a > b not satisfied [uint]"); + emit log_named_uint(" Value a", a); + emit log_named_uint(" Value b", b); + fail(); + } + } + function assertGt(uint a, uint b, string memory err) internal { + if (a <= b) { + emit log_named_string("Error", err); + assertGt(a, b); + } + } + function assertGt(int a, int b) internal { + if (a <= b) { + emit log("Error: a > b not satisfied [int]"); + emit log_named_int(" Value a", a); + emit log_named_int(" Value b", b); + fail(); + } + } + function assertGt(int a, int b, string memory err) internal { + if (a <= b) { + emit log_named_string("Error", err); + assertGt(a, b); + } + } + function assertGtDecimal(int a, int b, uint decimals) internal { + if (a <= b) { + emit log("Error: a > b not satisfied [decimal int]"); + emit log_named_decimal_int(" Value a", a, decimals); + emit log_named_decimal_int(" Value b", b, decimals); + fail(); + } + } + function assertGtDecimal(int a, int b, uint decimals, string memory err) internal { + if (a <= b) { + emit log_named_string("Error", err); + assertGtDecimal(a, b, decimals); + } + } + function assertGtDecimal(uint a, uint b, uint decimals) internal { + if (a <= b) { + emit log("Error: a > b not satisfied [decimal uint]"); + emit log_named_decimal_uint(" Value a", a, decimals); + emit log_named_decimal_uint(" Value b", b, decimals); + fail(); + } + } + function assertGtDecimal(uint a, uint b, uint decimals, string memory err) internal { + if (a <= b) { + emit log_named_string("Error", err); + assertGtDecimal(a, b, decimals); + } + } + + function assertGe(uint a, uint b) internal { + if (a < b) { + emit log("Error: a >= b not satisfied [uint]"); + emit log_named_uint(" Value a", a); + emit log_named_uint(" Value b", b); + fail(); + } + } + function assertGe(uint a, uint b, string memory err) internal { + if (a < b) { + emit log_named_string("Error", err); + assertGe(a, b); + } + } + function assertGe(int a, int b) internal { + if (a < b) { + emit log("Error: a >= b not satisfied [int]"); + emit log_named_int(" Value a", a); + emit log_named_int(" Value b", b); + fail(); + } + } + function assertGe(int a, int b, string memory err) internal { + if (a < b) { + emit log_named_string("Error", err); + assertGe(a, b); + } + } + function assertGeDecimal(int a, int b, uint decimals) internal { + if (a < b) { + emit log("Error: a >= b not satisfied [decimal int]"); + emit log_named_decimal_int(" Value a", a, decimals); + emit log_named_decimal_int(" Value b", b, decimals); + fail(); + } + } + function assertGeDecimal(int a, int b, uint decimals, string memory err) internal { + if (a < b) { + emit log_named_string("Error", err); + assertGeDecimal(a, b, decimals); + } + } + function assertGeDecimal(uint a, uint b, uint decimals) internal { + if (a < b) { + emit log("Error: a >= b not satisfied [decimal uint]"); + emit log_named_decimal_uint(" Value a", a, decimals); + emit log_named_decimal_uint(" Value b", b, decimals); + fail(); + } + } + function assertGeDecimal(uint a, uint b, uint decimals, string memory err) internal { + if (a < b) { + emit log_named_string("Error", err); + assertGeDecimal(a, b, decimals); + } + } + + function assertLt(uint a, uint b) internal { + if (a >= b) { + emit log("Error: a < b not satisfied [uint]"); + emit log_named_uint(" Value a", a); + emit log_named_uint(" Value b", b); + fail(); + } + } + function assertLt(uint a, uint b, string memory err) internal { + if (a >= b) { + emit log_named_string("Error", err); + assertLt(a, b); + } + } + function assertLt(int a, int b) internal { + if (a >= b) { + emit log("Error: a < b not satisfied [int]"); + emit log_named_int(" Value a", a); + emit log_named_int(" Value b", b); + fail(); + } + } + function assertLt(int a, int b, string memory err) internal { + if (a >= b) { + emit log_named_string("Error", err); + assertLt(a, b); + } + } + function assertLtDecimal(int a, int b, uint decimals) internal { + if (a >= b) { + emit log("Error: a < b not satisfied [decimal int]"); + emit log_named_decimal_int(" Value a", a, decimals); + emit log_named_decimal_int(" Value b", b, decimals); + fail(); + } + } + function assertLtDecimal(int a, int b, uint decimals, string memory err) internal { + if (a >= b) { + emit log_named_string("Error", err); + assertLtDecimal(a, b, decimals); + } + } + function assertLtDecimal(uint a, uint b, uint decimals) internal { + if (a >= b) { + emit log("Error: a < b not satisfied [decimal uint]"); + emit log_named_decimal_uint(" Value a", a, decimals); + emit log_named_decimal_uint(" Value b", b, decimals); + fail(); + } + } + function assertLtDecimal(uint a, uint b, uint decimals, string memory err) internal { + if (a >= b) { + emit log_named_string("Error", err); + assertLtDecimal(a, b, decimals); + } + } + + function assertLe(uint a, uint b) internal { + if (a > b) { + emit log("Error: a <= b not satisfied [uint]"); + emit log_named_uint(" Value a", a); + emit log_named_uint(" Value b", b); + fail(); + } + } + function assertLe(uint a, uint b, string memory err) internal { + if (a > b) { + emit log_named_string("Error", err); + assertLe(a, b); + } + } + function assertLe(int a, int b) internal { + if (a > b) { + emit log("Error: a <= b not satisfied [int]"); + emit log_named_int(" Value a", a); + emit log_named_int(" Value b", b); + fail(); + } + } + function assertLe(int a, int b, string memory err) internal { + if (a > b) { + emit log_named_string("Error", err); + assertLe(a, b); + } + } + function assertLeDecimal(int a, int b, uint decimals) internal { + if (a > b) { + emit log("Error: a <= b not satisfied [decimal int]"); + emit log_named_decimal_int(" Value a", a, decimals); + emit log_named_decimal_int(" Value b", b, decimals); + fail(); + } + } + function assertLeDecimal(int a, int b, uint decimals, string memory err) internal { + if (a > b) { + emit log_named_string("Error", err); + assertLeDecimal(a, b, decimals); + } + } + function assertLeDecimal(uint a, uint b, uint decimals) internal { + if (a > b) { + emit log("Error: a <= b not satisfied [decimal uint]"); + emit log_named_decimal_uint(" Value a", a, decimals); + emit log_named_decimal_uint(" Value b", b, decimals); + fail(); + } + } + function assertLeDecimal(uint a, uint b, uint decimals, string memory err) internal { + if (a > b) { + emit log_named_string("Error", err); + assertGeDecimal(a, b, decimals); + } + } + + function assertEq(string memory a, string memory b) internal { + if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) { + emit log("Error: a == b not satisfied [string]"); + emit log_named_string(" Expected", b); + emit log_named_string(" Actual", a); + fail(); + } + } + function assertEq(string memory a, string memory b, string memory err) internal { + if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) { + emit log_named_string("Error", err); + assertEq(a, b); + } + } + + function checkEq0(bytes memory a, bytes memory b) internal pure returns (bool ok) { + ok = true; + if (a.length == b.length) { + for (uint i = 0; i < a.length; i++) { + if (a[i] != b[i]) { + ok = false; + } + } + } else { + ok = false; + } + } + function assertEq0(bytes memory a, bytes memory b) internal { + if (!checkEq0(a, b)) { + emit log("Error: a == b not satisfied [bytes]"); + emit log_named_bytes(" Expected", b); + emit log_named_bytes(" Actual", a); + fail(); + } + } + function assertEq0(bytes memory a, bytes memory b, string memory err) internal { + if (!checkEq0(a, b)) { + emit log_named_string("Error", err); + assertEq0(a, b); + } + } +} diff --git a/lib/solmate/package-lock.json b/lib/solmate/package-lock.json new file mode 100644 index 0000000..d3bae95 --- /dev/null +++ b/lib/solmate/package-lock.json @@ -0,0 +1,125 @@ +{ + "name": "@rari-capital/solmate", + "version": "6.3.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@solidity-parser/parser": { + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.13.2.tgz", + "integrity": "sha512-RwHnpRnfrnD2MSPveYoPh8nhofEvX7fgjHk1Oq+NNvCcLx4r1js91CO9o+F/F3fBzOCyvm8kKRTriFICX/odWw==", + "dev": true, + "requires": { + "antlr4ts": "^0.5.0-alpha.4" + } + }, + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "antlr4ts": { + "version": "0.5.0-alpha.4", + "resolved": "https://registry.npmjs.org/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz", + "integrity": "sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ==", + "dev": true + }, + "emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "prettier": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.2.tgz", + "integrity": "sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ==", + "dev": true + }, + "prettier-plugin-solidity": { + "version": "1.0.0-beta.16", + "resolved": "https://registry.npmjs.org/prettier-plugin-solidity/-/prettier-plugin-solidity-1.0.0-beta.16.tgz", + "integrity": "sha512-xVBcnoWpe52dNnCCbqPHC9ZrTWXcNfldf852ZD0DBcHDqVMwjHTAPEdfBVy6FczbFpVa8bmxQil+G5XkEz5WHA==", + "dev": true, + "requires": { + "@solidity-parser/parser": "^0.13.2", + "emoji-regex": "^9.2.2", + "escape-string-regexp": "^4.0.0", + "semver": "^7.3.5", + "solidity-comments-extractor": "^0.0.7", + "string-width": "^4.2.2" + } + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "solidity-comments-extractor": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/solidity-comments-extractor/-/solidity-comments-extractor-0.0.7.tgz", + "integrity": "sha512-wciNMLg/Irp8OKGrh3S2tfvZiZ0NEyILfcRCXCD4mp7SgK/i9gzLfhY2hY7VMCQJ3kH9UB9BzNdibIVMchzyYw==", + "dev": true + }, + "string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + } + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } +} diff --git a/lib/solmate/package.json b/lib/solmate/package.json new file mode 100644 index 0000000..c2948ec --- /dev/null +++ b/lib/solmate/package.json @@ -0,0 +1,20 @@ +{ + "name": "@rari-capital/solmate", + "license": "AGPL-3.0-only", + "version": "6.3.0", + "description": "Modern, opinionated and gas optimized building blocks for smart contract development.", + "files": [ + "src/**/*.sol" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/Rari-Capital/solmate.git" + }, + "devDependencies": { + "prettier": "^2.3.1", + "prettier-plugin-solidity": "^1.0.0-beta.13" + }, + "scripts": { + "lint": "prettier --write **.sol" + } +} diff --git a/lib/solmate/src/auth/Auth.sol b/lib/solmate/src/auth/Auth.sol new file mode 100644 index 0000000..48edaa4 --- /dev/null +++ b/lib/solmate/src/auth/Auth.sol @@ -0,0 +1,64 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +/// @notice Provides a flexible and updatable auth pattern which is completely separate from application logic. +/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/Auth.sol) +/// @author Modified from Dappsys (https://github.com/dapphub/ds-auth/blob/master/src/auth.sol) +abstract contract Auth { + event OwnerUpdated(address indexed user, address indexed newOwner); + + event AuthorityUpdated(address indexed user, Authority indexed newAuthority); + + address public owner; + + Authority public authority; + + constructor(address _owner, Authority _authority) { + owner = _owner; + authority = _authority; + + emit OwnerUpdated(msg.sender, _owner); + emit AuthorityUpdated(msg.sender, _authority); + } + + modifier requiresAuth() virtual { + require(isAuthorized(msg.sender, msg.sig), "UNAUTHORIZED"); + + _; + } + + function isAuthorized(address user, bytes4 functionSig) internal view virtual returns (bool) { + Authority auth = authority; // Memoizing authority saves us a warm SLOAD, around 100 gas. + + // Checking if the caller is the owner only after calling the authority saves gas in most cases, but be + // aware that this makes protected functions uncallable even to the owner if the authority is out of order. + return (address(auth) != address(0) && auth.canCall(user, address(this), functionSig)) || user == owner; + } + + function setAuthority(Authority newAuthority) public virtual { + // We check if the caller is the owner first because we want to ensure they can + // always swap out the authority even if it's reverting or using up a lot of gas. + require(msg.sender == owner || authority.canCall(msg.sender, address(this), msg.sig)); + + authority = newAuthority; + + emit AuthorityUpdated(msg.sender, newAuthority); + } + + function setOwner(address newOwner) public virtual requiresAuth { + owner = newOwner; + + emit OwnerUpdated(msg.sender, newOwner); + } +} + +/// @notice A generic interface for a contract which provides authorization data to an Auth instance. +/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/Auth.sol) +/// @author Modified from Dappsys (https://github.com/dapphub/ds-auth/blob/master/src/auth.sol) +interface Authority { + function canCall( + address user, + address target, + bytes4 functionSig + ) external view returns (bool); +} diff --git a/lib/solmate/src/auth/Owned.sol b/lib/solmate/src/auth/Owned.sol new file mode 100644 index 0000000..415d845 --- /dev/null +++ b/lib/solmate/src/auth/Owned.sol @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +/// @notice Simple single owner authorization mixin. +/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/Owned.sol) +abstract contract Owned { + /*////////////////////////////////////////////////////////////// + EVENTS + //////////////////////////////////////////////////////////////*/ + + event OwnerUpdated(address indexed user, address indexed newOwner); + + /*////////////////////////////////////////////////////////////// + OWNERSHIP STORAGE + //////////////////////////////////////////////////////////////*/ + + address public owner; + + modifier onlyOwner() virtual { + require(msg.sender == owner, "UNAUTHORIZED"); + + _; + } + + /*////////////////////////////////////////////////////////////// + CONSTRUCTOR + //////////////////////////////////////////////////////////////*/ + + constructor(address _owner) { + owner = _owner; + + emit OwnerUpdated(address(0), _owner); + } + + /*////////////////////////////////////////////////////////////// + OWNERSHIP LOGIC + //////////////////////////////////////////////////////////////*/ + + function setOwner(address newOwner) public virtual onlyOwner { + owner = newOwner; + + emit OwnerUpdated(msg.sender, newOwner); + } +} diff --git a/lib/solmate/src/auth/authorities/MultiRolesAuthority.sol b/lib/solmate/src/auth/authorities/MultiRolesAuthority.sol new file mode 100644 index 0000000..8ecd3cd --- /dev/null +++ b/lib/solmate/src/auth/authorities/MultiRolesAuthority.sol @@ -0,0 +1,123 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +import {Auth, Authority} from "../Auth.sol"; + +/// @notice Flexible and target agnostic role based Authority that supports up to 256 roles. +/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/authorities/MultiRolesAuthority.sol) +contract MultiRolesAuthority is Auth, Authority { + /*////////////////////////////////////////////////////////////// + EVENTS + //////////////////////////////////////////////////////////////*/ + + event UserRoleUpdated(address indexed user, uint8 indexed role, bool enabled); + + event PublicCapabilityUpdated(bytes4 indexed functionSig, bool enabled); + + event RoleCapabilityUpdated(uint8 indexed role, bytes4 indexed functionSig, bool enabled); + + event TargetCustomAuthorityUpdated(address indexed target, Authority indexed authority); + + /*////////////////////////////////////////////////////////////// + CONSTRUCTOR + //////////////////////////////////////////////////////////////*/ + + constructor(address _owner, Authority _authority) Auth(_owner, _authority) {} + + /*////////////////////////////////////////////////////////////// + CUSTOM TARGET AUTHORITY STORAGE + //////////////////////////////////////////////////////////////*/ + + mapping(address => Authority) public getTargetCustomAuthority; + + /*////////////////////////////////////////////////////////////// + ROLE/USER STORAGE + //////////////////////////////////////////////////////////////*/ + + mapping(address => bytes32) public getUserRoles; + + mapping(bytes4 => bool) public isCapabilityPublic; + + mapping(bytes4 => bytes32) public getRolesWithCapability; + + function doesUserHaveRole(address user, uint8 role) public view virtual returns (bool) { + return (uint256(getUserRoles[user]) >> role) & 1 != 0; + } + + function doesRoleHaveCapability(uint8 role, bytes4 functionSig) public view virtual returns (bool) { + return (uint256(getRolesWithCapability[functionSig]) >> role) & 1 != 0; + } + + /*////////////////////////////////////////////////////////////// + AUTHORIZATION LOGIC + //////////////////////////////////////////////////////////////*/ + + function canCall( + address user, + address target, + bytes4 functionSig + ) public view virtual override returns (bool) { + Authority customAuthority = getTargetCustomAuthority[target]; + + if (address(customAuthority) != address(0)) return customAuthority.canCall(user, target, functionSig); + + return + isCapabilityPublic[functionSig] || bytes32(0) != getUserRoles[user] & getRolesWithCapability[functionSig]; + } + + /*/////////////////////////////////////////////////////////////// + CUSTOM TARGET AUTHORITY CONFIGURATION LOGIC + //////////////////////////////////////////////////////////////*/ + + function setTargetCustomAuthority(address target, Authority customAuthority) public virtual requiresAuth { + getTargetCustomAuthority[target] = customAuthority; + + emit TargetCustomAuthorityUpdated(target, customAuthority); + } + + /*////////////////////////////////////////////////////////////// + PUBLIC CAPABILITY CONFIGURATION LOGIC + //////////////////////////////////////////////////////////////*/ + + function setPublicCapability(bytes4 functionSig, bool enabled) public virtual requiresAuth { + isCapabilityPublic[functionSig] = enabled; + + emit PublicCapabilityUpdated(functionSig, enabled); + } + + /*////////////////////////////////////////////////////////////// + USER ROLE ASSIGNMENT LOGIC + //////////////////////////////////////////////////////////////*/ + + function setUserRole( + address user, + uint8 role, + bool enabled + ) public virtual requiresAuth { + if (enabled) { + getUserRoles[user] |= bytes32(1 << role); + } else { + getUserRoles[user] &= ~bytes32(1 << role); + } + + emit UserRoleUpdated(user, role, enabled); + } + + /*////////////////////////////////////////////////////////////// + ROLE CAPABILITY CONFIGURATION LOGIC + //////////////////////////////////////////////////////////////*/ + + function setRoleCapability( + uint8 role, + bytes4 functionSig, + bool enabled + ) public virtual requiresAuth { + if (enabled) { + getRolesWithCapability[functionSig] |= bytes32(1 << role); + } else { + getRolesWithCapability[functionSig] &= ~bytes32(1 << role); + } + + emit RoleCapabilityUpdated(role, functionSig, enabled); + } +} diff --git a/lib/solmate/src/auth/authorities/RolesAuthority.sol b/lib/solmate/src/auth/authorities/RolesAuthority.sol new file mode 100644 index 0000000..afefe1a --- /dev/null +++ b/lib/solmate/src/auth/authorities/RolesAuthority.sol @@ -0,0 +1,108 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +import {Auth, Authority} from "../Auth.sol"; + +/// @notice Role based Authority that supports up to 256 roles. +/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/authorities/RolesAuthority.sol) +/// @author Modified from Dappsys (https://github.com/dapphub/ds-roles/blob/master/src/roles.sol) +contract RolesAuthority is Auth, Authority { + /*////////////////////////////////////////////////////////////// + EVENTS + //////////////////////////////////////////////////////////////*/ + + event UserRoleUpdated(address indexed user, uint8 indexed role, bool enabled); + + event PublicCapabilityUpdated(address indexed target, bytes4 indexed functionSig, bool enabled); + + event RoleCapabilityUpdated(uint8 indexed role, address indexed target, bytes4 indexed functionSig, bool enabled); + + /*////////////////////////////////////////////////////////////// + CONSTRUCTOR + //////////////////////////////////////////////////////////////*/ + + constructor(address _owner, Authority _authority) Auth(_owner, _authority) {} + + /*////////////////////////////////////////////////////////////// + ROLE/USER STORAGE + //////////////////////////////////////////////////////////////*/ + + mapping(address => bytes32) public getUserRoles; + + mapping(address => mapping(bytes4 => bool)) public isCapabilityPublic; + + mapping(address => mapping(bytes4 => bytes32)) public getRolesWithCapability; + + function doesUserHaveRole(address user, uint8 role) public view virtual returns (bool) { + return (uint256(getUserRoles[user]) >> role) & 1 != 0; + } + + function doesRoleHaveCapability( + uint8 role, + address target, + bytes4 functionSig + ) public view virtual returns (bool) { + return (uint256(getRolesWithCapability[target][functionSig]) >> role) & 1 != 0; + } + + /*////////////////////////////////////////////////////////////// + AUTHORIZATION LOGIC + //////////////////////////////////////////////////////////////*/ + + function canCall( + address user, + address target, + bytes4 functionSig + ) public view virtual override returns (bool) { + return + isCapabilityPublic[target][functionSig] || + bytes32(0) != getUserRoles[user] & getRolesWithCapability[target][functionSig]; + } + + /*////////////////////////////////////////////////////////////// + ROLE CAPABILITY CONFIGURATION LOGIC + //////////////////////////////////////////////////////////////*/ + + function setPublicCapability( + address target, + bytes4 functionSig, + bool enabled + ) public virtual requiresAuth { + isCapabilityPublic[target][functionSig] = enabled; + + emit PublicCapabilityUpdated(target, functionSig, enabled); + } + + function setRoleCapability( + uint8 role, + address target, + bytes4 functionSig, + bool enabled + ) public virtual requiresAuth { + if (enabled) { + getRolesWithCapability[target][functionSig] |= bytes32(1 << role); + } else { + getRolesWithCapability[target][functionSig] &= ~bytes32(1 << role); + } + + emit RoleCapabilityUpdated(role, target, functionSig, enabled); + } + + /*////////////////////////////////////////////////////////////// + USER ROLE ASSIGNMENT LOGIC + //////////////////////////////////////////////////////////////*/ + + function setUserRole( + address user, + uint8 role, + bool enabled + ) public virtual requiresAuth { + if (enabled) { + getUserRoles[user] |= bytes32(1 << role); + } else { + getUserRoles[user] &= ~bytes32(1 << role); + } + + emit UserRoleUpdated(user, role, enabled); + } +} diff --git a/lib/solmate/src/mixins/ERC4626.sol b/lib/solmate/src/mixins/ERC4626.sol new file mode 100644 index 0000000..704e0d4 --- /dev/null +++ b/lib/solmate/src/mixins/ERC4626.sol @@ -0,0 +1,183 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +import {ERC20} from "../tokens/ERC20.sol"; +import {SafeTransferLib} from "../utils/SafeTransferLib.sol"; +import {FixedPointMathLib} from "../utils/FixedPointMathLib.sol"; + +/// @notice Minimal ERC4626 tokenized Vault implementation. +/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/mixins/ERC4626.sol) +abstract contract ERC4626 is ERC20 { + using SafeTransferLib for ERC20; + using FixedPointMathLib for uint256; + + /*////////////////////////////////////////////////////////////// + EVENTS + //////////////////////////////////////////////////////////////*/ + + event Deposit(address indexed caller, address indexed owner, uint256 assets, uint256 shares); + + event Withdraw( + address indexed caller, + address indexed receiver, + address indexed owner, + uint256 assets, + uint256 shares + ); + + /*////////////////////////////////////////////////////////////// + IMMUTABLES + //////////////////////////////////////////////////////////////*/ + + ERC20 public immutable asset; + + constructor( + ERC20 _asset, + string memory _name, + string memory _symbol + ) ERC20(_name, _symbol, _asset.decimals()) { + asset = _asset; + } + + /*////////////////////////////////////////////////////////////// + DEPOSIT/WITHDRAWAL LOGIC + //////////////////////////////////////////////////////////////*/ + + function deposit(uint256 assets, address receiver) public virtual returns (uint256 shares) { + // Check for rounding error since we round down in previewDeposit. + require((shares = previewDeposit(assets)) != 0, "ZERO_SHARES"); + + // Need to transfer before minting or ERC777s could reenter. + asset.safeTransferFrom(msg.sender, address(this), assets); + + _mint(receiver, shares); + + emit Deposit(msg.sender, receiver, assets, shares); + + afterDeposit(assets, shares); + } + + function mint(uint256 shares, address receiver) public virtual returns (uint256 assets) { + assets = previewMint(shares); // No need to check for rounding error, previewMint rounds up. + + // Need to transfer before minting or ERC777s could reenter. + asset.safeTransferFrom(msg.sender, address(this), assets); + + _mint(receiver, shares); + + emit Deposit(msg.sender, receiver, assets, shares); + + afterDeposit(assets, shares); + } + + function withdraw( + uint256 assets, + address receiver, + address owner + ) public virtual returns (uint256 shares) { + shares = previewWithdraw(assets); // No need to check for rounding error, previewWithdraw rounds up. + + if (msg.sender != owner) { + uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals. + + if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares; + } + + beforeWithdraw(assets, shares); + + _burn(owner, shares); + + emit Withdraw(msg.sender, receiver, owner, assets, shares); + + asset.safeTransfer(receiver, assets); + } + + function redeem( + uint256 shares, + address receiver, + address owner + ) public virtual returns (uint256 assets) { + if (msg.sender != owner) { + uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals. + + if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares; + } + + // Check for rounding error since we round down in previewRedeem. + require((assets = previewRedeem(shares)) != 0, "ZERO_ASSETS"); + + beforeWithdraw(assets, shares); + + _burn(owner, shares); + + emit Withdraw(msg.sender, receiver, owner, assets, shares); + + asset.safeTransfer(receiver, assets); + } + + /*////////////////////////////////////////////////////////////// + ACCOUNTING LOGIC + //////////////////////////////////////////////////////////////*/ + + function totalAssets() public view virtual returns (uint256); + + function convertToShares(uint256 assets) public view virtual returns (uint256) { + uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero. + + return supply == 0 ? assets : assets.mulDivDown(supply, totalAssets()); + } + + function convertToAssets(uint256 shares) public view virtual returns (uint256) { + uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero. + + return supply == 0 ? shares : shares.mulDivDown(totalAssets(), supply); + } + + function previewDeposit(uint256 assets) public view virtual returns (uint256) { + return convertToShares(assets); + } + + function previewMint(uint256 shares) public view virtual returns (uint256) { + uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero. + + return supply == 0 ? shares : shares.mulDivUp(totalAssets(), supply); + } + + function previewWithdraw(uint256 assets) public view virtual returns (uint256) { + uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero. + + return supply == 0 ? assets : assets.mulDivUp(supply, totalAssets()); + } + + function previewRedeem(uint256 shares) public view virtual returns (uint256) { + return convertToAssets(shares); + } + + /*////////////////////////////////////////////////////////////// + DEPOSIT/WITHDRAWAL LIMIT LOGIC + //////////////////////////////////////////////////////////////*/ + + function maxDeposit(address) public view virtual returns (uint256) { + return type(uint256).max; + } + + function maxMint(address) public view virtual returns (uint256) { + return type(uint256).max; + } + + function maxWithdraw(address owner) public view virtual returns (uint256) { + return convertToAssets(balanceOf[owner]); + } + + function maxRedeem(address owner) public view virtual returns (uint256) { + return balanceOf[owner]; + } + + /*////////////////////////////////////////////////////////////// + INTERNAL HOOKS LOGIC + //////////////////////////////////////////////////////////////*/ + + function beforeWithdraw(uint256 assets, uint256 shares) internal virtual {} + + function afterDeposit(uint256 assets, uint256 shares) internal virtual {} +} diff --git a/lib/solmate/src/test/Auth.t.sol b/lib/solmate/src/test/Auth.t.sol new file mode 100644 index 0000000..19a6b84 --- /dev/null +++ b/lib/solmate/src/test/Auth.t.sol @@ -0,0 +1,192 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity 0.8.10; + +import {DSTestPlus} from "./utils/DSTestPlus.sol"; +import {MockAuthChild} from "./utils/mocks/MockAuthChild.sol"; +import {MockAuthority} from "./utils/mocks/MockAuthority.sol"; + +import {Authority} from "../auth/Auth.sol"; + +contract OutOfOrderAuthority is Authority { + function canCall( + address, + address, + bytes4 + ) public pure override returns (bool) { + revert("OUT_OF_ORDER"); + } +} + +contract AuthTest is DSTestPlus { + MockAuthChild mockAuthChild; + + function setUp() public { + mockAuthChild = new MockAuthChild(); + } + + function testSetOwnerAsOwner() public { + mockAuthChild.setOwner(address(0xBEEF)); + assertEq(mockAuthChild.owner(), address(0xBEEF)); + } + + function testSetAuthorityAsOwner() public { + mockAuthChild.setAuthority(Authority(address(0xBEEF))); + assertEq(address(mockAuthChild.authority()), address(0xBEEF)); + } + + function testCallFunctionAsOwner() public { + mockAuthChild.updateFlag(); + } + + function testSetOwnerWithPermissiveAuthority() public { + mockAuthChild.setAuthority(new MockAuthority(true)); + mockAuthChild.setOwner(address(0)); + mockAuthChild.setOwner(address(this)); + } + + function testSetAuthorityWithPermissiveAuthority() public { + mockAuthChild.setAuthority(new MockAuthority(true)); + mockAuthChild.setOwner(address(0)); + mockAuthChild.setAuthority(Authority(address(0xBEEF))); + } + + function testCallFunctionWithPermissiveAuthority() public { + mockAuthChild.setAuthority(new MockAuthority(true)); + mockAuthChild.setOwner(address(0)); + mockAuthChild.updateFlag(); + } + + function testSetAuthorityAsOwnerWithOutOfOrderAuthority() public { + mockAuthChild.setAuthority(new OutOfOrderAuthority()); + mockAuthChild.setAuthority(new MockAuthority(true)); + } + + function testFailSetOwnerAsNonOwner() public { + mockAuthChild.setOwner(address(0)); + mockAuthChild.setOwner(address(0xBEEF)); + } + + function testFailSetAuthorityAsNonOwner() public { + mockAuthChild.setOwner(address(0)); + mockAuthChild.setAuthority(Authority(address(0xBEEF))); + } + + function testFailCallFunctionAsNonOwner() public { + mockAuthChild.setOwner(address(0)); + mockAuthChild.updateFlag(); + } + + function testFailSetOwnerWithRestrictiveAuthority() public { + mockAuthChild.setAuthority(new MockAuthority(false)); + mockAuthChild.setOwner(address(0)); + mockAuthChild.setOwner(address(this)); + } + + function testFailSetAuthorityWithRestrictiveAuthority() public { + mockAuthChild.setAuthority(new MockAuthority(false)); + mockAuthChild.setOwner(address(0)); + mockAuthChild.setAuthority(Authority(address(0xBEEF))); + } + + function testFailCallFunctionWithRestrictiveAuthority() public { + mockAuthChild.setAuthority(new MockAuthority(false)); + mockAuthChild.setOwner(address(0)); + mockAuthChild.updateFlag(); + } + + function testFailSetOwnerAsOwnerWithOutOfOrderAuthority() public { + mockAuthChild.setAuthority(new OutOfOrderAuthority()); + mockAuthChild.setOwner(address(0)); + } + + function testFailCallFunctionAsOwnerWithOutOfOrderAuthority() public { + mockAuthChild.setAuthority(new OutOfOrderAuthority()); + mockAuthChild.updateFlag(); + } + + function testSetOwnerAsOwner(address newOwner) public { + mockAuthChild.setOwner(newOwner); + assertEq(mockAuthChild.owner(), newOwner); + } + + function testSetAuthorityAsOwner(Authority newAuthority) public { + mockAuthChild.setAuthority(newAuthority); + assertEq(address(mockAuthChild.authority()), address(newAuthority)); + } + + function testSetOwnerWithPermissiveAuthority(address deadOwner, address newOwner) public { + if (deadOwner == address(this)) deadOwner = address(0); + + mockAuthChild.setAuthority(new MockAuthority(true)); + mockAuthChild.setOwner(deadOwner); + mockAuthChild.setOwner(newOwner); + } + + function testSetAuthorityWithPermissiveAuthority(address deadOwner, Authority newAuthority) public { + if (deadOwner == address(this)) deadOwner = address(0); + + mockAuthChild.setAuthority(new MockAuthority(true)); + mockAuthChild.setOwner(deadOwner); + mockAuthChild.setAuthority(newAuthority); + } + + function testCallFunctionWithPermissiveAuthority(address deadOwner) public { + if (deadOwner == address(this)) deadOwner = address(0); + + mockAuthChild.setAuthority(new MockAuthority(true)); + mockAuthChild.setOwner(deadOwner); + mockAuthChild.updateFlag(); + } + + function testFailSetOwnerAsNonOwner(address deadOwner, address newOwner) public { + if (deadOwner == address(this)) deadOwner = address(0); + + mockAuthChild.setOwner(deadOwner); + mockAuthChild.setOwner(newOwner); + } + + function testFailSetAuthorityAsNonOwner(address deadOwner, Authority newAuthority) public { + if (deadOwner == address(this)) deadOwner = address(0); + + mockAuthChild.setOwner(deadOwner); + mockAuthChild.setAuthority(newAuthority); + } + + function testFailCallFunctionAsNonOwner(address deadOwner) public { + if (deadOwner == address(this)) deadOwner = address(0); + + mockAuthChild.setOwner(deadOwner); + mockAuthChild.updateFlag(); + } + + function testFailSetOwnerWithRestrictiveAuthority(address deadOwner, address newOwner) public { + if (deadOwner == address(this)) deadOwner = address(0); + + mockAuthChild.setAuthority(new MockAuthority(false)); + mockAuthChild.setOwner(deadOwner); + mockAuthChild.setOwner(newOwner); + } + + function testFailSetAuthorityWithRestrictiveAuthority(address deadOwner, Authority newAuthority) public { + if (deadOwner == address(this)) deadOwner = address(0); + + mockAuthChild.setAuthority(new MockAuthority(false)); + mockAuthChild.setOwner(deadOwner); + mockAuthChild.setAuthority(newAuthority); + } + + function testFailCallFunctionWithRestrictiveAuthority(address deadOwner) public { + if (deadOwner == address(this)) deadOwner = address(0); + + mockAuthChild.setAuthority(new MockAuthority(false)); + mockAuthChild.setOwner(deadOwner); + mockAuthChild.updateFlag(); + } + + function testFailSetOwnerAsOwnerWithOutOfOrderAuthority(address deadOwner) public { + if (deadOwner == address(this)) deadOwner = address(0); + + mockAuthChild.setAuthority(new OutOfOrderAuthority()); + mockAuthChild.setOwner(deadOwner); + } +} diff --git a/lib/solmate/src/test/Bytes32AddressLib.t.sol b/lib/solmate/src/test/Bytes32AddressLib.t.sol new file mode 100644 index 0000000..0a85b14 --- /dev/null +++ b/lib/solmate/src/test/Bytes32AddressLib.t.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity 0.8.10; + +import {DSTestPlus} from "./utils/DSTestPlus.sol"; + +import {Bytes32AddressLib} from "../utils/Bytes32AddressLib.sol"; + +contract Bytes32AddressLibTest is DSTestPlus { + function testFillLast12Bytes() public { + assertEq( + Bytes32AddressLib.fillLast12Bytes(0xfEEDFaCEcaFeBEEFfEEDFACecaFEBeeFfeEdfAce), + 0xfeedfacecafebeeffeedfacecafebeeffeedface000000000000000000000000 + ); + } + + function testFromLast20Bytes() public { + assertEq( + Bytes32AddressLib.fromLast20Bytes(0xfeedfacecafebeeffeedfacecafebeeffeedfacecafebeeffeedfacecafebeef), + 0xCAfeBeefFeedfAceCAFeBEEffEEDfaCecafEBeeF + ); + } +} diff --git a/lib/solmate/src/test/CREATE3.t.sol b/lib/solmate/src/test/CREATE3.t.sol new file mode 100644 index 0000000..8120632 --- /dev/null +++ b/lib/solmate/src/test/CREATE3.t.sol @@ -0,0 +1,74 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity 0.8.10; + +import {WETH} from "../tokens/WETH.sol"; +import {DSTestPlus} from "./utils/DSTestPlus.sol"; +import {MockERC20} from "./utils/mocks/MockERC20.sol"; +import {MockAuthChild} from "./utils/mocks/MockAuthChild.sol"; + +import {CREATE3} from "../utils/CREATE3.sol"; + +contract CREATE3Test is DSTestPlus { + function testDeployERC20() public { + bytes32 salt = keccak256(bytes("A salt!")); + + MockERC20 deployed = MockERC20( + CREATE3.deploy( + salt, + abi.encodePacked(type(MockERC20).creationCode, abi.encode("Mock Token", "MOCK", 18)), + 0 + ) + ); + + assertEq(address(deployed), CREATE3.getDeployed(salt)); + + assertEq(deployed.name(), "Mock Token"); + assertEq(deployed.symbol(), "MOCK"); + assertEq(deployed.decimals(), 18); + } + + function testFailDoubleDeploySameBytecode() public { + bytes32 salt = keccak256(bytes("Salty...")); + + CREATE3.deploy(salt, type(MockAuthChild).creationCode, 0); + CREATE3.deploy(salt, type(MockAuthChild).creationCode, 0); + } + + function testFailDoubleDeployDifferentBytecode() public { + bytes32 salt = keccak256(bytes("and sweet!")); + + CREATE3.deploy(salt, type(WETH).creationCode, 0); + CREATE3.deploy(salt, type(MockAuthChild).creationCode, 0); + } + + function testDeployERC20( + bytes32 salt, + string calldata name, + string calldata symbol, + uint8 decimals + ) public { + MockERC20 deployed = MockERC20( + CREATE3.deploy(salt, abi.encodePacked(type(MockERC20).creationCode, abi.encode(name, symbol, decimals)), 0) + ); + + assertEq(address(deployed), CREATE3.getDeployed(salt)); + + assertEq(deployed.name(), name); + assertEq(deployed.symbol(), symbol); + assertEq(deployed.decimals(), decimals); + } + + function testFailDoubleDeploySameBytecode(bytes32 salt, bytes calldata bytecode) public { + CREATE3.deploy(salt, bytecode, 0); + CREATE3.deploy(salt, bytecode, 0); + } + + function testFailDoubleDeployDifferentBytecode( + bytes32 salt, + bytes calldata bytecode1, + bytes calldata bytecode2 + ) public { + CREATE3.deploy(salt, bytecode1, 0); + CREATE3.deploy(salt, bytecode2, 0); + } +} diff --git a/lib/solmate/src/test/DSTestPlus.t.sol b/lib/solmate/src/test/DSTestPlus.t.sol new file mode 100644 index 0000000..8487f84 --- /dev/null +++ b/lib/solmate/src/test/DSTestPlus.t.sol @@ -0,0 +1,72 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity 0.8.10; + +import {DSTestPlus} from "./utils/DSTestPlus.sol"; + +contract DSTestPlusTest is DSTestPlus { + function testBound() public { + assertEq(bound(0, 69, 69), 69); + assertEq(bound(0, 68, 69), 68); + assertEq(bound(5, 0, 4), 0); + assertEq(bound(9999, 1337, 6666), 6006); + assertEq(bound(0, type(uint256).max - 6, type(uint256).max), type(uint256).max - 6); + assertEq(bound(6, type(uint256).max - 6, type(uint256).max), type(uint256).max); + } + + function testFailBoundMinBiggerThanMax() public { + bound(5, 100, 10); + } + + function testRelApproxEqBothZeroesPasses() public { + assertRelApproxEq(0, 0, 1e18); + assertRelApproxEq(0, 0, 0); + } + + function testBound( + uint256 num, + uint256 min, + uint256 max + ) public { + if (min > max) (min, max) = (max, min); + + uint256 bounded = bound(num, min, max); + + assertGe(bounded, min); + assertLe(bounded, max); + } + + function testFailBoundMinBiggerThanMax( + uint256 num, + uint256 min, + uint256 max + ) public { + if (max == min) { + unchecked { + min++; // Overflow is handled below. + } + } + + if (max > min) (min, max) = (max, min); + + bound(num, min, max); + } + + function testBrutalizeMemory() public brutalizeMemory("FEEDFACECAFEBEEFFEEDFACECAFEBEEF") { + bytes32 scratchSpace1; + bytes32 scratchSpace2; + bytes32 freeMem1; + bytes32 freeMem2; + + assembly { + scratchSpace1 := mload(0) + scratchSpace2 := mload(32) + freeMem1 := mload(mload(0x40)) + freeMem2 := mload(add(mload(0x40), 32)) + } + + assertGt(uint256(freeMem1), 0); + assertGt(uint256(freeMem2), 0); + assertGt(uint256(scratchSpace1), 0); + assertGt(uint256(scratchSpace2), 0); + } +} diff --git a/lib/solmate/src/test/ERC1155.t.sol b/lib/solmate/src/test/ERC1155.t.sol new file mode 100644 index 0000000..c3d3dec --- /dev/null +++ b/lib/solmate/src/test/ERC1155.t.sol @@ -0,0 +1,1773 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity 0.8.10; + +import {DSTestPlus} from "./utils/DSTestPlus.sol"; +import {DSInvariantTest} from "./utils/DSInvariantTest.sol"; + +import {MockERC1155} from "./utils/mocks/MockERC1155.sol"; + +import {ERC1155TokenReceiver} from "../tokens/ERC1155.sol"; + +contract ERC1155Recipient is ERC1155TokenReceiver { + address public operator; + address public from; + uint256 public id; + uint256 public amount; + bytes public mintData; + + function onERC1155Received( + address _operator, + address _from, + uint256 _id, + uint256 _amount, + bytes calldata _data + ) public override returns (bytes4) { + operator = _operator; + from = _from; + id = _id; + amount = _amount; + mintData = _data; + + return ERC1155TokenReceiver.onERC1155Received.selector; + } + + address public batchOperator; + address public batchFrom; + uint256[] internal _batchIds; + uint256[] internal _batchAmounts; + bytes public batchData; + + function batchIds() external view returns (uint256[] memory) { + return _batchIds; + } + + function batchAmounts() external view returns (uint256[] memory) { + return _batchAmounts; + } + + function onERC1155BatchReceived( + address _operator, + address _from, + uint256[] calldata _ids, + uint256[] calldata _amounts, + bytes calldata _data + ) external override returns (bytes4) { + batchOperator = _operator; + batchFrom = _from; + _batchIds = _ids; + _batchAmounts = _amounts; + batchData = _data; + + return ERC1155TokenReceiver.onERC1155BatchReceived.selector; + } +} + +contract RevertingERC1155Recipient is ERC1155TokenReceiver { + function onERC1155Received( + address, + address, + uint256, + uint256, + bytes calldata + ) public pure override returns (bytes4) { + revert(string(abi.encodePacked(ERC1155TokenReceiver.onERC1155Received.selector))); + } + + function onERC1155BatchReceived( + address, + address, + uint256[] calldata, + uint256[] calldata, + bytes calldata + ) external pure override returns (bytes4) { + revert(string(abi.encodePacked(ERC1155TokenReceiver.onERC1155BatchReceived.selector))); + } +} + +contract WrongReturnDataERC1155Recipient is ERC1155TokenReceiver { + function onERC1155Received( + address, + address, + uint256, + uint256, + bytes calldata + ) public pure override returns (bytes4) { + return 0xCAFEBEEF; + } + + function onERC1155BatchReceived( + address, + address, + uint256[] calldata, + uint256[] calldata, + bytes calldata + ) external pure override returns (bytes4) { + return 0xCAFEBEEF; + } +} + +contract NonERC1155Recipient {} + +contract ERC1155Test is DSTestPlus, ERC1155TokenReceiver { + MockERC1155 token; + + mapping(address => mapping(uint256 => uint256)) public userMintAmounts; + mapping(address => mapping(uint256 => uint256)) public userTransferOrBurnAmounts; + + function setUp() public { + token = new MockERC1155(); + } + + function testMintToEOA() public { + token.mint(address(0xBEEF), 1337, 1, ""); + + assertEq(token.balanceOf(address(0xBEEF), 1337), 1); + } + + function testMintToERC1155Recipient() public { + ERC1155Recipient to = new ERC1155Recipient(); + + token.mint(address(to), 1337, 1, "testing 123"); + + assertEq(token.balanceOf(address(to), 1337), 1); + + assertEq(to.operator(), address(this)); + assertEq(to.from(), address(0)); + assertEq(to.id(), 1337); + assertBytesEq(to.mintData(), "testing 123"); + } + + function testBatchMintToEOA() public { + uint256[] memory ids = new uint256[](5); + ids[0] = 1337; + ids[1] = 1338; + ids[2] = 1339; + ids[3] = 1340; + ids[4] = 1341; + + uint256[] memory amounts = new uint256[](5); + amounts[0] = 100; + amounts[1] = 200; + amounts[2] = 300; + amounts[3] = 400; + amounts[4] = 500; + + token.batchMint(address(0xBEEF), ids, amounts, ""); + + assertEq(token.balanceOf(address(0xBEEF), 1337), 100); + assertEq(token.balanceOf(address(0xBEEF), 1338), 200); + assertEq(token.balanceOf(address(0xBEEF), 1339), 300); + assertEq(token.balanceOf(address(0xBEEF), 1340), 400); + assertEq(token.balanceOf(address(0xBEEF), 1341), 500); + } + + function testBatchMintToERC1155Recipient() public { + ERC1155Recipient to = new ERC1155Recipient(); + + uint256[] memory ids = new uint256[](5); + ids[0] = 1337; + ids[1] = 1338; + ids[2] = 1339; + ids[3] = 1340; + ids[4] = 1341; + + uint256[] memory amounts = new uint256[](5); + amounts[0] = 100; + amounts[1] = 200; + amounts[2] = 300; + amounts[3] = 400; + amounts[4] = 500; + + token.batchMint(address(to), ids, amounts, "testing 123"); + + assertEq(to.batchOperator(), address(this)); + assertEq(to.batchFrom(), address(0)); + assertUintArrayEq(to.batchIds(), ids); + assertUintArrayEq(to.batchAmounts(), amounts); + assertBytesEq(to.batchData(), "testing 123"); + + assertEq(token.balanceOf(address(to), 1337), 100); + assertEq(token.balanceOf(address(to), 1338), 200); + assertEq(token.balanceOf(address(to), 1339), 300); + assertEq(token.balanceOf(address(to), 1340), 400); + assertEq(token.balanceOf(address(to), 1341), 500); + } + + function testBurn() public { + token.mint(address(0xBEEF), 1337, 100, ""); + + token.burn(address(0xBEEF), 1337, 70); + + assertEq(token.balanceOf(address(0xBEEF), 1337), 30); + } + + function testBatchBurn() public { + uint256[] memory ids = new uint256[](5); + ids[0] = 1337; + ids[1] = 1338; + ids[2] = 1339; + ids[3] = 1340; + ids[4] = 1341; + + uint256[] memory mintAmounts = new uint256[](5); + mintAmounts[0] = 100; + mintAmounts[1] = 200; + mintAmounts[2] = 300; + mintAmounts[3] = 400; + mintAmounts[4] = 500; + + uint256[] memory burnAmounts = new uint256[](5); + burnAmounts[0] = 50; + burnAmounts[1] = 100; + burnAmounts[2] = 150; + burnAmounts[3] = 200; + burnAmounts[4] = 250; + + token.batchMint(address(0xBEEF), ids, mintAmounts, ""); + + token.batchBurn(address(0xBEEF), ids, burnAmounts); + + assertEq(token.balanceOf(address(0xBEEF), 1337), 50); + assertEq(token.balanceOf(address(0xBEEF), 1338), 100); + assertEq(token.balanceOf(address(0xBEEF), 1339), 150); + assertEq(token.balanceOf(address(0xBEEF), 1340), 200); + assertEq(token.balanceOf(address(0xBEEF), 1341), 250); + } + + function testApproveAll() public { + token.setApprovalForAll(address(0xBEEF), true); + + assertTrue(token.isApprovedForAll(address(this), address(0xBEEF))); + } + + function testSafeTransferFromToEOA() public { + address from = address(0xABCD); + + token.mint(from, 1337, 100, ""); + + hevm.prank(from); + token.setApprovalForAll(address(this), true); + + token.safeTransferFrom(from, address(0xBEEF), 1337, 70, ""); + + assertEq(token.balanceOf(address(0xBEEF), 1337), 70); + assertEq(token.balanceOf(from, 1337), 30); + } + + function testSafeTransferFromToERC1155Recipient() public { + ERC1155Recipient to = new ERC1155Recipient(); + + address from = address(0xABCD); + + token.mint(from, 1337, 100, ""); + + hevm.prank(from); + token.setApprovalForAll(address(this), true); + + token.safeTransferFrom(from, address(to), 1337, 70, "testing 123"); + + assertEq(to.operator(), address(this)); + assertEq(to.from(), from); + assertEq(to.id(), 1337); + assertBytesEq(to.mintData(), "testing 123"); + + assertEq(token.balanceOf(address(to), 1337), 70); + assertEq(token.balanceOf(from, 1337), 30); + } + + function testSafeTransferFromSelf() public { + token.mint(address(this), 1337, 100, ""); + + token.safeTransferFrom(address(this), address(0xBEEF), 1337, 70, ""); + + assertEq(token.balanceOf(address(0xBEEF), 1337), 70); + assertEq(token.balanceOf(address(this), 1337), 30); + } + + function testSafeBatchTransferFromToEOA() public { + address from = address(0xABCD); + + uint256[] memory ids = new uint256[](5); + ids[0] = 1337; + ids[1] = 1338; + ids[2] = 1339; + ids[3] = 1340; + ids[4] = 1341; + + uint256[] memory mintAmounts = new uint256[](5); + mintAmounts[0] = 100; + mintAmounts[1] = 200; + mintAmounts[2] = 300; + mintAmounts[3] = 400; + mintAmounts[4] = 500; + + uint256[] memory transferAmounts = new uint256[](5); + transferAmounts[0] = 50; + transferAmounts[1] = 100; + transferAmounts[2] = 150; + transferAmounts[3] = 200; + transferAmounts[4] = 250; + + token.batchMint(from, ids, mintAmounts, ""); + + hevm.prank(from); + token.setApprovalForAll(address(this), true); + + token.safeBatchTransferFrom(from, address(0xBEEF), ids, transferAmounts, ""); + + assertEq(token.balanceOf(from, 1337), 50); + assertEq(token.balanceOf(address(0xBEEF), 1337), 50); + + assertEq(token.balanceOf(from, 1338), 100); + assertEq(token.balanceOf(address(0xBEEF), 1338), 100); + + assertEq(token.balanceOf(from, 1339), 150); + assertEq(token.balanceOf(address(0xBEEF), 1339), 150); + + assertEq(token.balanceOf(from, 1340), 200); + assertEq(token.balanceOf(address(0xBEEF), 1340), 200); + + assertEq(token.balanceOf(from, 1341), 250); + assertEq(token.balanceOf(address(0xBEEF), 1341), 250); + } + + function testSafeBatchTransferFromToERC1155Recipient() public { + address from = address(0xABCD); + + ERC1155Recipient to = new ERC1155Recipient(); + + uint256[] memory ids = new uint256[](5); + ids[0] = 1337; + ids[1] = 1338; + ids[2] = 1339; + ids[3] = 1340; + ids[4] = 1341; + + uint256[] memory mintAmounts = new uint256[](5); + mintAmounts[0] = 100; + mintAmounts[1] = 200; + mintAmounts[2] = 300; + mintAmounts[3] = 400; + mintAmounts[4] = 500; + + uint256[] memory transferAmounts = new uint256[](5); + transferAmounts[0] = 50; + transferAmounts[1] = 100; + transferAmounts[2] = 150; + transferAmounts[3] = 200; + transferAmounts[4] = 250; + + token.batchMint(from, ids, mintAmounts, ""); + + hevm.prank(from); + token.setApprovalForAll(address(this), true); + + token.safeBatchTransferFrom(from, address(to), ids, transferAmounts, "testing 123"); + + assertEq(to.batchOperator(), address(this)); + assertEq(to.batchFrom(), from); + assertUintArrayEq(to.batchIds(), ids); + assertUintArrayEq(to.batchAmounts(), transferAmounts); + assertBytesEq(to.batchData(), "testing 123"); + + assertEq(token.balanceOf(from, 1337), 50); + assertEq(token.balanceOf(address(to), 1337), 50); + + assertEq(token.balanceOf(from, 1338), 100); + assertEq(token.balanceOf(address(to), 1338), 100); + + assertEq(token.balanceOf(from, 1339), 150); + assertEq(token.balanceOf(address(to), 1339), 150); + + assertEq(token.balanceOf(from, 1340), 200); + assertEq(token.balanceOf(address(to), 1340), 200); + + assertEq(token.balanceOf(from, 1341), 250); + assertEq(token.balanceOf(address(to), 1341), 250); + } + + function testBatchBalanceOf() public { + address[] memory tos = new address[](5); + tos[0] = address(0xBEEF); + tos[1] = address(0xCAFE); + tos[2] = address(0xFACE); + tos[3] = address(0xDEAD); + tos[4] = address(0xFEED); + + uint256[] memory ids = new uint256[](5); + ids[0] = 1337; + ids[1] = 1338; + ids[2] = 1339; + ids[3] = 1340; + ids[4] = 1341; + + token.mint(address(0xBEEF), 1337, 100, ""); + token.mint(address(0xCAFE), 1338, 200, ""); + token.mint(address(0xFACE), 1339, 300, ""); + token.mint(address(0xDEAD), 1340, 400, ""); + token.mint(address(0xFEED), 1341, 500, ""); + + uint256[] memory balances = token.balanceOfBatch(tos, ids); + + assertEq(balances[0], 100); + assertEq(balances[1], 200); + assertEq(balances[2], 300); + assertEq(balances[3], 400); + assertEq(balances[4], 500); + } + + function testFailMintToZero() public { + token.mint(address(0), 1337, 1, ""); + } + + function testFailMintToNonERC155Recipient() public { + token.mint(address(new NonERC1155Recipient()), 1337, 1, ""); + } + + function testFailMintToRevertingERC155Recipient() public { + token.mint(address(new RevertingERC1155Recipient()), 1337, 1, ""); + } + + function testFailMintToWrongReturnDataERC155Recipient() public { + token.mint(address(new RevertingERC1155Recipient()), 1337, 1, ""); + } + + function testFailBurnInsufficientBalance() public { + token.mint(address(0xBEEF), 1337, 70, ""); + token.burn(address(0xBEEF), 1337, 100); + } + + function testFailSafeTransferFromInsufficientBalance() public { + address from = address(0xABCD); + + token.mint(from, 1337, 70, ""); + + hevm.prank(from); + token.setApprovalForAll(address(this), true); + + token.safeTransferFrom(from, address(0xBEEF), 1337, 100, ""); + } + + function testFailSafeTransferFromSelfInsufficientBalance() public { + token.mint(address(this), 1337, 70, ""); + token.safeTransferFrom(address(this), address(0xBEEF), 1337, 100, ""); + } + + function testFailSafeTransferFromToZero() public { + token.mint(address(this), 1337, 100, ""); + token.safeTransferFrom(address(this), address(0), 1337, 70, ""); + } + + function testFailSafeTransferFromToNonERC155Recipient() public { + token.mint(address(this), 1337, 100, ""); + token.safeTransferFrom(address(this), address(new NonERC1155Recipient()), 1337, 70, ""); + } + + function testFailSafeTransferFromToRevertingERC1155Recipient() public { + token.mint(address(this), 1337, 100, ""); + token.safeTransferFrom(address(this), address(new RevertingERC1155Recipient()), 1337, 70, ""); + } + + function testFailSafeTransferFromToWrongReturnDataERC1155Recipient() public { + token.mint(address(this), 1337, 100, ""); + token.safeTransferFrom(address(this), address(new WrongReturnDataERC1155Recipient()), 1337, 70, ""); + } + + function testFailSafeBatchTransferInsufficientBalance() public { + address from = address(0xABCD); + + uint256[] memory ids = new uint256[](5); + ids[0] = 1337; + ids[1] = 1338; + ids[2] = 1339; + ids[3] = 1340; + ids[4] = 1341; + + uint256[] memory mintAmounts = new uint256[](5); + + mintAmounts[0] = 50; + mintAmounts[1] = 100; + mintAmounts[2] = 150; + mintAmounts[3] = 200; + mintAmounts[4] = 250; + + uint256[] memory transferAmounts = new uint256[](5); + transferAmounts[0] = 100; + transferAmounts[1] = 200; + transferAmounts[2] = 300; + transferAmounts[3] = 400; + transferAmounts[4] = 500; + + token.batchMint(from, ids, mintAmounts, ""); + + hevm.prank(from); + token.setApprovalForAll(address(this), true); + + token.safeBatchTransferFrom(from, address(0xBEEF), ids, transferAmounts, ""); + } + + function testFailSafeBatchTransferFromToZero() public { + address from = address(0xABCD); + + uint256[] memory ids = new uint256[](5); + ids[0] = 1337; + ids[1] = 1338; + ids[2] = 1339; + ids[3] = 1340; + ids[4] = 1341; + + uint256[] memory mintAmounts = new uint256[](5); + mintAmounts[0] = 100; + mintAmounts[1] = 200; + mintAmounts[2] = 300; + mintAmounts[3] = 400; + mintAmounts[4] = 500; + + uint256[] memory transferAmounts = new uint256[](5); + transferAmounts[0] = 50; + transferAmounts[1] = 100; + transferAmounts[2] = 150; + transferAmounts[3] = 200; + transferAmounts[4] = 250; + + token.batchMint(from, ids, mintAmounts, ""); + + hevm.prank(from); + token.setApprovalForAll(address(this), true); + + token.safeBatchTransferFrom(from, address(0), ids, transferAmounts, ""); + } + + function testFailSafeBatchTransferFromToNonERC1155Recipient() public { + address from = address(0xABCD); + + uint256[] memory ids = new uint256[](5); + ids[0] = 1337; + ids[1] = 1338; + ids[2] = 1339; + ids[3] = 1340; + ids[4] = 1341; + + uint256[] memory mintAmounts = new uint256[](5); + mintAmounts[0] = 100; + mintAmounts[1] = 200; + mintAmounts[2] = 300; + mintAmounts[3] = 400; + mintAmounts[4] = 500; + + uint256[] memory transferAmounts = new uint256[](5); + transferAmounts[0] = 50; + transferAmounts[1] = 100; + transferAmounts[2] = 150; + transferAmounts[3] = 200; + transferAmounts[4] = 250; + + token.batchMint(from, ids, mintAmounts, ""); + + hevm.prank(from); + token.setApprovalForAll(address(this), true); + + token.safeBatchTransferFrom(from, address(new NonERC1155Recipient()), ids, transferAmounts, ""); + } + + function testFailSafeBatchTransferFromToRevertingERC1155Recipient() public { + address from = address(0xABCD); + + uint256[] memory ids = new uint256[](5); + ids[0] = 1337; + ids[1] = 1338; + ids[2] = 1339; + ids[3] = 1340; + ids[4] = 1341; + + uint256[] memory mintAmounts = new uint256[](5); + mintAmounts[0] = 100; + mintAmounts[1] = 200; + mintAmounts[2] = 300; + mintAmounts[3] = 400; + mintAmounts[4] = 500; + + uint256[] memory transferAmounts = new uint256[](5); + transferAmounts[0] = 50; + transferAmounts[1] = 100; + transferAmounts[2] = 150; + transferAmounts[3] = 200; + transferAmounts[4] = 250; + + token.batchMint(from, ids, mintAmounts, ""); + + hevm.prank(from); + token.setApprovalForAll(address(this), true); + + token.safeBatchTransferFrom(from, address(new RevertingERC1155Recipient()), ids, transferAmounts, ""); + } + + function testFailSafeBatchTransferFromToWrongReturnDataERC1155Recipient() public { + address from = address(0xABCD); + + uint256[] memory ids = new uint256[](5); + ids[0] = 1337; + ids[1] = 1338; + ids[2] = 1339; + ids[3] = 1340; + ids[4] = 1341; + + uint256[] memory mintAmounts = new uint256[](5); + mintAmounts[0] = 100; + mintAmounts[1] = 200; + mintAmounts[2] = 300; + mintAmounts[3] = 400; + mintAmounts[4] = 500; + + uint256[] memory transferAmounts = new uint256[](5); + transferAmounts[0] = 50; + transferAmounts[1] = 100; + transferAmounts[2] = 150; + transferAmounts[3] = 200; + transferAmounts[4] = 250; + + token.batchMint(from, ids, mintAmounts, ""); + + hevm.prank(from); + token.setApprovalForAll(address(this), true); + + token.safeBatchTransferFrom(from, address(new WrongReturnDataERC1155Recipient()), ids, transferAmounts, ""); + } + + function testFailSafeBatchTransferFromWithArrayLengthMismatch() public { + address from = address(0xABCD); + + uint256[] memory ids = new uint256[](5); + ids[0] = 1337; + ids[1] = 1338; + ids[2] = 1339; + ids[3] = 1340; + ids[4] = 1341; + + uint256[] memory mintAmounts = new uint256[](5); + mintAmounts[0] = 100; + mintAmounts[1] = 200; + mintAmounts[2] = 300; + mintAmounts[3] = 400; + mintAmounts[4] = 500; + + uint256[] memory transferAmounts = new uint256[](4); + transferAmounts[0] = 50; + transferAmounts[1] = 100; + transferAmounts[2] = 150; + transferAmounts[3] = 200; + + token.batchMint(from, ids, mintAmounts, ""); + + hevm.prank(from); + token.setApprovalForAll(address(this), true); + + token.safeBatchTransferFrom(from, address(0xBEEF), ids, transferAmounts, ""); + } + + function testFailBatchMintToZero() public { + uint256[] memory ids = new uint256[](5); + ids[0] = 1337; + ids[1] = 1338; + ids[2] = 1339; + ids[3] = 1340; + ids[4] = 1341; + + uint256[] memory mintAmounts = new uint256[](5); + mintAmounts[0] = 100; + mintAmounts[1] = 200; + mintAmounts[2] = 300; + mintAmounts[3] = 400; + mintAmounts[4] = 500; + + token.batchMint(address(0), ids, mintAmounts, ""); + } + + function testFailBatchMintToNonERC1155Recipient() public { + NonERC1155Recipient to = new NonERC1155Recipient(); + + uint256[] memory ids = new uint256[](5); + ids[0] = 1337; + ids[1] = 1338; + ids[2] = 1339; + ids[3] = 1340; + ids[4] = 1341; + + uint256[] memory mintAmounts = new uint256[](5); + mintAmounts[0] = 100; + mintAmounts[1] = 200; + mintAmounts[2] = 300; + mintAmounts[3] = 400; + mintAmounts[4] = 500; + + token.batchMint(address(to), ids, mintAmounts, ""); + } + + function testFailBatchMintToRevertingERC1155Recipient() public { + RevertingERC1155Recipient to = new RevertingERC1155Recipient(); + + uint256[] memory ids = new uint256[](5); + ids[0] = 1337; + ids[1] = 1338; + ids[2] = 1339; + ids[3] = 1340; + ids[4] = 1341; + + uint256[] memory mintAmounts = new uint256[](5); + mintAmounts[0] = 100; + mintAmounts[1] = 200; + mintAmounts[2] = 300; + mintAmounts[3] = 400; + mintAmounts[4] = 500; + + token.batchMint(address(to), ids, mintAmounts, ""); + } + + function testFailBatchMintToWrongReturnDataERC1155Recipient() public { + WrongReturnDataERC1155Recipient to = new WrongReturnDataERC1155Recipient(); + + uint256[] memory ids = new uint256[](5); + ids[0] = 1337; + ids[1] = 1338; + ids[2] = 1339; + ids[3] = 1340; + ids[4] = 1341; + + uint256[] memory mintAmounts = new uint256[](5); + mintAmounts[0] = 100; + mintAmounts[1] = 200; + mintAmounts[2] = 300; + mintAmounts[3] = 400; + mintAmounts[4] = 500; + + token.batchMint(address(to), ids, mintAmounts, ""); + } + + function testFailBatchMintWithArrayMismatch() public { + uint256[] memory ids = new uint256[](5); + ids[0] = 1337; + ids[1] = 1338; + ids[2] = 1339; + ids[3] = 1340; + ids[4] = 1341; + + uint256[] memory amounts = new uint256[](4); + amounts[0] = 100; + amounts[1] = 200; + amounts[2] = 300; + amounts[3] = 400; + + token.batchMint(address(0xBEEF), ids, amounts, ""); + } + + function testFailBatchBurnInsufficientBalance() public { + uint256[] memory ids = new uint256[](5); + ids[0] = 1337; + ids[1] = 1338; + ids[2] = 1339; + ids[3] = 1340; + ids[4] = 1341; + + uint256[] memory mintAmounts = new uint256[](5); + mintAmounts[0] = 50; + mintAmounts[1] = 100; + mintAmounts[2] = 150; + mintAmounts[3] = 200; + mintAmounts[4] = 250; + + uint256[] memory burnAmounts = new uint256[](5); + burnAmounts[0] = 100; + burnAmounts[1] = 200; + burnAmounts[2] = 300; + burnAmounts[3] = 400; + burnAmounts[4] = 500; + + token.batchMint(address(0xBEEF), ids, mintAmounts, ""); + + token.batchBurn(address(0xBEEF), ids, burnAmounts); + } + + function testFailBatchBurnWithArrayLengthMismatch() public { + uint256[] memory ids = new uint256[](5); + ids[0] = 1337; + ids[1] = 1338; + ids[2] = 1339; + ids[3] = 1340; + ids[4] = 1341; + + uint256[] memory mintAmounts = new uint256[](5); + mintAmounts[0] = 100; + mintAmounts[1] = 200; + mintAmounts[2] = 300; + mintAmounts[3] = 400; + mintAmounts[4] = 500; + + uint256[] memory burnAmounts = new uint256[](4); + burnAmounts[0] = 50; + burnAmounts[1] = 100; + burnAmounts[2] = 150; + burnAmounts[3] = 200; + + token.batchMint(address(0xBEEF), ids, mintAmounts, ""); + + token.batchBurn(address(0xBEEF), ids, burnAmounts); + } + + function testFailBalanceOfBatchWithArrayMismatch() public view { + address[] memory tos = new address[](5); + tos[0] = address(0xBEEF); + tos[1] = address(0xCAFE); + tos[2] = address(0xFACE); + tos[3] = address(0xDEAD); + tos[4] = address(0xFEED); + + uint256[] memory ids = new uint256[](4); + ids[0] = 1337; + ids[1] = 1338; + ids[2] = 1339; + ids[3] = 1340; + + token.balanceOfBatch(tos, ids); + } + + function testMintToEOA( + address to, + uint256 id, + uint256 amount, + bytes memory mintData + ) public { + if (to == address(0)) to = address(0xBEEF); + + if (uint256(uint160(to)) <= 18 || to.code.length > 0) return; + + token.mint(to, id, amount, mintData); + + assertEq(token.balanceOf(to, id), amount); + } + + function testMintToERC1155Recipient( + uint256 id, + uint256 amount, + bytes memory mintData + ) public { + ERC1155Recipient to = new ERC1155Recipient(); + + token.mint(address(to), id, amount, mintData); + + assertEq(token.balanceOf(address(to), id), amount); + + assertEq(to.operator(), address(this)); + assertEq(to.from(), address(0)); + assertEq(to.id(), id); + assertBytesEq(to.mintData(), mintData); + } + + function testBatchMintToEOA( + address to, + uint256[] memory ids, + uint256[] memory amounts, + bytes memory mintData + ) public { + if (to == address(0)) to = address(0xBEEF); + + if (uint256(uint160(to)) <= 18 || to.code.length > 0) return; + + uint256 minLength = min2(ids.length, amounts.length); + + uint256[] memory normalizedIds = new uint256[](minLength); + uint256[] memory normalizedAmounts = new uint256[](minLength); + + for (uint256 i = 0; i < minLength; i++) { + uint256 id = ids[i]; + + uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[to][id]; + + uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId); + + normalizedIds[i] = id; + normalizedAmounts[i] = mintAmount; + + userMintAmounts[to][id] += mintAmount; + } + + token.batchMint(to, normalizedIds, normalizedAmounts, mintData); + + for (uint256 i = 0; i < normalizedIds.length; i++) { + uint256 id = normalizedIds[i]; + + assertEq(token.balanceOf(to, id), userMintAmounts[to][id]); + } + } + + function testBatchMintToERC1155Recipient( + uint256[] memory ids, + uint256[] memory amounts, + bytes memory mintData + ) public { + ERC1155Recipient to = new ERC1155Recipient(); + + uint256 minLength = min2(ids.length, amounts.length); + + uint256[] memory normalizedIds = new uint256[](minLength); + uint256[] memory normalizedAmounts = new uint256[](minLength); + + for (uint256 i = 0; i < minLength; i++) { + uint256 id = ids[i]; + + uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(to)][id]; + + uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId); + + normalizedIds[i] = id; + normalizedAmounts[i] = mintAmount; + + userMintAmounts[address(to)][id] += mintAmount; + } + + token.batchMint(address(to), normalizedIds, normalizedAmounts, mintData); + + assertEq(to.batchOperator(), address(this)); + assertEq(to.batchFrom(), address(0)); + assertUintArrayEq(to.batchIds(), normalizedIds); + assertUintArrayEq(to.batchAmounts(), normalizedAmounts); + assertBytesEq(to.batchData(), mintData); + + for (uint256 i = 0; i < normalizedIds.length; i++) { + uint256 id = normalizedIds[i]; + + assertEq(token.balanceOf(address(to), id), userMintAmounts[address(to)][id]); + } + } + + function testBurn( + address to, + uint256 id, + uint256 mintAmount, + bytes memory mintData, + uint256 burnAmount + ) public { + if (to == address(0)) to = address(0xBEEF); + + if (uint256(uint160(to)) <= 18 || to.code.length > 0) return; + + burnAmount = bound(burnAmount, 0, mintAmount); + + token.mint(to, id, mintAmount, mintData); + + token.burn(to, id, burnAmount); + + assertEq(token.balanceOf(address(to), id), mintAmount - burnAmount); + } + + function testBatchBurn( + address to, + uint256[] memory ids, + uint256[] memory mintAmounts, + uint256[] memory burnAmounts, + bytes memory mintData + ) public { + if (to == address(0)) to = address(0xBEEF); + + if (uint256(uint160(to)) <= 18 || to.code.length > 0) return; + + uint256 minLength = min3(ids.length, mintAmounts.length, burnAmounts.length); + + uint256[] memory normalizedIds = new uint256[](minLength); + uint256[] memory normalizedMintAmounts = new uint256[](minLength); + uint256[] memory normalizedBurnAmounts = new uint256[](minLength); + + for (uint256 i = 0; i < minLength; i++) { + uint256 id = ids[i]; + + uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(to)][id]; + + normalizedIds[i] = id; + normalizedMintAmounts[i] = bound(mintAmounts[i], 0, remainingMintAmountForId); + normalizedBurnAmounts[i] = bound(burnAmounts[i], 0, normalizedMintAmounts[i]); + + userMintAmounts[address(to)][id] += normalizedMintAmounts[i]; + userTransferOrBurnAmounts[address(to)][id] += normalizedBurnAmounts[i]; + } + + token.batchMint(to, normalizedIds, normalizedMintAmounts, mintData); + + token.batchBurn(to, normalizedIds, normalizedBurnAmounts); + + for (uint256 i = 0; i < normalizedIds.length; i++) { + uint256 id = normalizedIds[i]; + + assertEq(token.balanceOf(to, id), userMintAmounts[to][id] - userTransferOrBurnAmounts[to][id]); + } + } + + function testApproveAll(address to, bool approved) public { + token.setApprovalForAll(to, approved); + + assertBoolEq(token.isApprovedForAll(address(this), to), approved); + } + + function testSafeTransferFromToEOA( + uint256 id, + uint256 mintAmount, + bytes memory mintData, + uint256 transferAmount, + address to, + bytes memory transferData + ) public { + if (to == address(0)) to = address(0xBEEF); + + if (uint256(uint160(to)) <= 18 || to.code.length > 0) return; + + transferAmount = bound(transferAmount, 0, mintAmount); + + address from = address(0xABCD); + + token.mint(from, id, mintAmount, mintData); + + hevm.prank(from); + token.setApprovalForAll(address(this), true); + + token.safeTransferFrom(from, to, id, transferAmount, transferData); + + assertEq(token.balanceOf(to, id), transferAmount); + assertEq(token.balanceOf(from, id), mintAmount - transferAmount); + } + + function testSafeTransferFromToERC1155Recipient( + uint256 id, + uint256 mintAmount, + bytes memory mintData, + uint256 transferAmount, + bytes memory transferData + ) public { + ERC1155Recipient to = new ERC1155Recipient(); + + address from = address(0xABCD); + + transferAmount = bound(transferAmount, 0, mintAmount); + + token.mint(from, id, mintAmount, mintData); + + hevm.prank(from); + token.setApprovalForAll(address(this), true); + + token.safeTransferFrom(from, address(to), id, transferAmount, transferData); + + assertEq(to.operator(), address(this)); + assertEq(to.from(), from); + assertEq(to.id(), id); + assertBytesEq(to.mintData(), transferData); + + assertEq(token.balanceOf(address(to), id), transferAmount); + assertEq(token.balanceOf(from, id), mintAmount - transferAmount); + } + + function testSafeTransferFromSelf( + uint256 id, + uint256 mintAmount, + bytes memory mintData, + uint256 transferAmount, + address to, + bytes memory transferData + ) public { + if (to == address(0)) to = address(0xBEEF); + + if (uint256(uint160(to)) <= 18 || to.code.length > 0) return; + + transferAmount = bound(transferAmount, 0, mintAmount); + + token.mint(address(this), id, mintAmount, mintData); + + token.safeTransferFrom(address(this), to, id, transferAmount, transferData); + + assertEq(token.balanceOf(to, id), transferAmount); + assertEq(token.balanceOf(address(this), id), mintAmount - transferAmount); + } + + function testSafeBatchTransferFromToEOA( + address to, + uint256[] memory ids, + uint256[] memory mintAmounts, + uint256[] memory transferAmounts, + bytes memory mintData, + bytes memory transferData + ) public { + if (to == address(0)) to = address(0xBEEF); + + if (uint256(uint160(to)) <= 18 || to.code.length > 0) return; + + address from = address(0xABCD); + + uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length); + + uint256[] memory normalizedIds = new uint256[](minLength); + uint256[] memory normalizedMintAmounts = new uint256[](minLength); + uint256[] memory normalizedTransferAmounts = new uint256[](minLength); + + for (uint256 i = 0; i < minLength; i++) { + uint256 id = ids[i]; + + uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[from][id]; + + uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId); + uint256 transferAmount = bound(transferAmounts[i], 0, mintAmount); + + normalizedIds[i] = id; + normalizedMintAmounts[i] = mintAmount; + normalizedTransferAmounts[i] = transferAmount; + + userMintAmounts[from][id] += mintAmount; + userTransferOrBurnAmounts[from][id] += transferAmount; + } + + token.batchMint(from, normalizedIds, normalizedMintAmounts, mintData); + + hevm.prank(from); + token.setApprovalForAll(address(this), true); + + token.safeBatchTransferFrom(from, to, normalizedIds, normalizedTransferAmounts, transferData); + + for (uint256 i = 0; i < normalizedIds.length; i++) { + uint256 id = normalizedIds[i]; + + assertEq(token.balanceOf(address(to), id), userTransferOrBurnAmounts[from][id]); + assertEq(token.balanceOf(from, id), userMintAmounts[from][id] - userTransferOrBurnAmounts[from][id]); + } + } + + function testSafeBatchTransferFromToERC1155Recipient( + uint256[] memory ids, + uint256[] memory mintAmounts, + uint256[] memory transferAmounts, + bytes memory mintData, + bytes memory transferData + ) public { + address from = address(0xABCD); + + ERC1155Recipient to = new ERC1155Recipient(); + + uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length); + + uint256[] memory normalizedIds = new uint256[](minLength); + uint256[] memory normalizedMintAmounts = new uint256[](minLength); + uint256[] memory normalizedTransferAmounts = new uint256[](minLength); + + for (uint256 i = 0; i < minLength; i++) { + uint256 id = ids[i]; + + uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[from][id]; + + uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId); + uint256 transferAmount = bound(transferAmounts[i], 0, mintAmount); + + normalizedIds[i] = id; + normalizedMintAmounts[i] = mintAmount; + normalizedTransferAmounts[i] = transferAmount; + + userMintAmounts[from][id] += mintAmount; + userTransferOrBurnAmounts[from][id] += transferAmount; + } + + token.batchMint(from, normalizedIds, normalizedMintAmounts, mintData); + + hevm.prank(from); + token.setApprovalForAll(address(this), true); + + token.safeBatchTransferFrom(from, address(to), normalizedIds, normalizedTransferAmounts, transferData); + + assertEq(to.batchOperator(), address(this)); + assertEq(to.batchFrom(), from); + assertUintArrayEq(to.batchIds(), normalizedIds); + assertUintArrayEq(to.batchAmounts(), normalizedTransferAmounts); + assertBytesEq(to.batchData(), transferData); + + for (uint256 i = 0; i < normalizedIds.length; i++) { + uint256 id = normalizedIds[i]; + uint256 transferAmount = userTransferOrBurnAmounts[from][id]; + + assertEq(token.balanceOf(address(to), id), transferAmount); + assertEq(token.balanceOf(from, id), userMintAmounts[from][id] - transferAmount); + } + } + + function testBatchBalanceOf( + address[] memory tos, + uint256[] memory ids, + uint256[] memory amounts, + bytes memory mintData + ) public { + uint256 minLength = min3(tos.length, ids.length, amounts.length); + + address[] memory normalizedTos = new address[](minLength); + uint256[] memory normalizedIds = new uint256[](minLength); + + for (uint256 i = 0; i < minLength; i++) { + uint256 id = ids[i]; + address to = tos[i] == address(0) ? address(0xBEEF) : tos[i]; + + uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[to][id]; + + normalizedTos[i] = to; + normalizedIds[i] = id; + + uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId); + + token.mint(to, id, mintAmount, mintData); + + userMintAmounts[to][id] += mintAmount; + } + + uint256[] memory balances = token.balanceOfBatch(normalizedTos, normalizedIds); + + for (uint256 i = 0; i < normalizedTos.length; i++) { + assertEq(balances[i], token.balanceOf(normalizedTos[i], normalizedIds[i])); + } + } + + function testFailMintToZero( + uint256 id, + uint256 amount, + bytes memory data + ) public { + token.mint(address(0), id, amount, data); + } + + function testFailMintToNonERC155Recipient( + uint256 id, + uint256 mintAmount, + bytes memory mintData + ) public { + token.mint(address(new NonERC1155Recipient()), id, mintAmount, mintData); + } + + function testFailMintToRevertingERC155Recipient( + uint256 id, + uint256 mintAmount, + bytes memory mintData + ) public { + token.mint(address(new RevertingERC1155Recipient()), id, mintAmount, mintData); + } + + function testFailMintToWrongReturnDataERC155Recipient( + uint256 id, + uint256 mintAmount, + bytes memory mintData + ) public { + token.mint(address(new RevertingERC1155Recipient()), id, mintAmount, mintData); + } + + function testFailBurnInsufficientBalance( + address to, + uint256 id, + uint256 mintAmount, + uint256 burnAmount, + bytes memory mintData + ) public { + burnAmount = bound(burnAmount, mintAmount + 1, type(uint256).max); + + token.mint(to, id, mintAmount, mintData); + token.burn(to, id, burnAmount); + } + + function testFailSafeTransferFromInsufficientBalance( + address to, + uint256 id, + uint256 mintAmount, + uint256 transferAmount, + bytes memory mintData, + bytes memory transferData + ) public { + address from = address(0xABCD); + + transferAmount = bound(transferAmount, mintAmount + 1, type(uint256).max); + + token.mint(from, id, mintAmount, mintData); + + hevm.prank(from); + token.setApprovalForAll(address(this), true); + + token.safeTransferFrom(from, to, id, transferAmount, transferData); + } + + function testFailSafeTransferFromSelfInsufficientBalance( + address to, + uint256 id, + uint256 mintAmount, + uint256 transferAmount, + bytes memory mintData, + bytes memory transferData + ) public { + transferAmount = bound(transferAmount, mintAmount + 1, type(uint256).max); + + token.mint(address(this), id, mintAmount, mintData); + token.safeTransferFrom(address(this), to, id, transferAmount, transferData); + } + + function testFailSafeTransferFromToZero( + uint256 id, + uint256 mintAmount, + uint256 transferAmount, + bytes memory mintData, + bytes memory transferData + ) public { + transferAmount = bound(transferAmount, 0, mintAmount); + + token.mint(address(this), id, mintAmount, mintData); + token.safeTransferFrom(address(this), address(0), id, transferAmount, transferData); + } + + function testFailSafeTransferFromToNonERC155Recipient( + uint256 id, + uint256 mintAmount, + uint256 transferAmount, + bytes memory mintData, + bytes memory transferData + ) public { + transferAmount = bound(transferAmount, 0, mintAmount); + + token.mint(address(this), id, mintAmount, mintData); + token.safeTransferFrom(address(this), address(new NonERC1155Recipient()), id, transferAmount, transferData); + } + + function testFailSafeTransferFromToRevertingERC1155Recipient( + uint256 id, + uint256 mintAmount, + uint256 transferAmount, + bytes memory mintData, + bytes memory transferData + ) public { + transferAmount = bound(transferAmount, 0, mintAmount); + + token.mint(address(this), id, mintAmount, mintData); + token.safeTransferFrom( + address(this), + address(new RevertingERC1155Recipient()), + id, + transferAmount, + transferData + ); + } + + function testFailSafeTransferFromToWrongReturnDataERC1155Recipient( + uint256 id, + uint256 mintAmount, + uint256 transferAmount, + bytes memory mintData, + bytes memory transferData + ) public { + transferAmount = bound(transferAmount, 0, mintAmount); + + token.mint(address(this), id, mintAmount, mintData); + token.safeTransferFrom( + address(this), + address(new WrongReturnDataERC1155Recipient()), + id, + transferAmount, + transferData + ); + } + + function testFailSafeBatchTransferInsufficientBalance( + address to, + uint256[] memory ids, + uint256[] memory mintAmounts, + uint256[] memory transferAmounts, + bytes memory mintData, + bytes memory transferData + ) public { + address from = address(0xABCD); + + uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length); + + if (minLength == 0) revert(); + + uint256[] memory normalizedIds = new uint256[](minLength); + uint256[] memory normalizedMintAmounts = new uint256[](minLength); + uint256[] memory normalizedTransferAmounts = new uint256[](minLength); + + for (uint256 i = 0; i < minLength; i++) { + uint256 id = ids[i]; + + uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[from][id]; + + uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId); + uint256 transferAmount = bound(transferAmounts[i], mintAmount + 1, type(uint256).max); + + normalizedIds[i] = id; + normalizedMintAmounts[i] = mintAmount; + normalizedTransferAmounts[i] = transferAmount; + + userMintAmounts[from][id] += mintAmount; + } + + token.batchMint(from, normalizedIds, normalizedMintAmounts, mintData); + + hevm.prank(from); + token.setApprovalForAll(address(this), true); + + token.safeBatchTransferFrom(from, to, normalizedIds, normalizedTransferAmounts, transferData); + } + + function testFailSafeBatchTransferFromToZero( + uint256[] memory ids, + uint256[] memory mintAmounts, + uint256[] memory transferAmounts, + bytes memory mintData, + bytes memory transferData + ) public { + address from = address(0xABCD); + + uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length); + + uint256[] memory normalizedIds = new uint256[](minLength); + uint256[] memory normalizedMintAmounts = new uint256[](minLength); + uint256[] memory normalizedTransferAmounts = new uint256[](minLength); + + for (uint256 i = 0; i < minLength; i++) { + uint256 id = ids[i]; + + uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[from][id]; + + uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId); + uint256 transferAmount = bound(transferAmounts[i], 0, mintAmount); + + normalizedIds[i] = id; + normalizedMintAmounts[i] = mintAmount; + normalizedTransferAmounts[i] = transferAmount; + + userMintAmounts[from][id] += mintAmount; + } + + token.batchMint(from, normalizedIds, normalizedMintAmounts, mintData); + + hevm.prank(from); + token.setApprovalForAll(address(this), true); + + token.safeBatchTransferFrom(from, address(0), normalizedIds, normalizedTransferAmounts, transferData); + } + + function testFailSafeBatchTransferFromToNonERC1155Recipient( + uint256[] memory ids, + uint256[] memory mintAmounts, + uint256[] memory transferAmounts, + bytes memory mintData, + bytes memory transferData + ) public { + address from = address(0xABCD); + + uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length); + + uint256[] memory normalizedIds = new uint256[](minLength); + uint256[] memory normalizedMintAmounts = new uint256[](minLength); + uint256[] memory normalizedTransferAmounts = new uint256[](minLength); + + for (uint256 i = 0; i < minLength; i++) { + uint256 id = ids[i]; + + uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[from][id]; + + uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId); + uint256 transferAmount = bound(transferAmounts[i], 0, mintAmount); + + normalizedIds[i] = id; + normalizedMintAmounts[i] = mintAmount; + normalizedTransferAmounts[i] = transferAmount; + + userMintAmounts[from][id] += mintAmount; + } + + token.batchMint(from, normalizedIds, normalizedMintAmounts, mintData); + + hevm.prank(from); + token.setApprovalForAll(address(this), true); + + token.safeBatchTransferFrom( + from, + address(new NonERC1155Recipient()), + normalizedIds, + normalizedTransferAmounts, + transferData + ); + } + + function testFailSafeBatchTransferFromToRevertingERC1155Recipient( + uint256[] memory ids, + uint256[] memory mintAmounts, + uint256[] memory transferAmounts, + bytes memory mintData, + bytes memory transferData + ) public { + address from = address(0xABCD); + + uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length); + + uint256[] memory normalizedIds = new uint256[](minLength); + uint256[] memory normalizedMintAmounts = new uint256[](minLength); + uint256[] memory normalizedTransferAmounts = new uint256[](minLength); + + for (uint256 i = 0; i < minLength; i++) { + uint256 id = ids[i]; + + uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[from][id]; + + uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId); + uint256 transferAmount = bound(transferAmounts[i], 0, mintAmount); + + normalizedIds[i] = id; + normalizedMintAmounts[i] = mintAmount; + normalizedTransferAmounts[i] = transferAmount; + + userMintAmounts[from][id] += mintAmount; + } + + token.batchMint(from, normalizedIds, normalizedMintAmounts, mintData); + + hevm.prank(from); + token.setApprovalForAll(address(this), true); + + token.safeBatchTransferFrom( + from, + address(new RevertingERC1155Recipient()), + normalizedIds, + normalizedTransferAmounts, + transferData + ); + } + + function testFailSafeBatchTransferFromToWrongReturnDataERC1155Recipient( + uint256[] memory ids, + uint256[] memory mintAmounts, + uint256[] memory transferAmounts, + bytes memory mintData, + bytes memory transferData + ) public { + address from = address(0xABCD); + + uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length); + + uint256[] memory normalizedIds = new uint256[](minLength); + uint256[] memory normalizedMintAmounts = new uint256[](minLength); + uint256[] memory normalizedTransferAmounts = new uint256[](minLength); + + for (uint256 i = 0; i < minLength; i++) { + uint256 id = ids[i]; + + uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[from][id]; + + uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId); + uint256 transferAmount = bound(transferAmounts[i], 0, mintAmount); + + normalizedIds[i] = id; + normalizedMintAmounts[i] = mintAmount; + normalizedTransferAmounts[i] = transferAmount; + + userMintAmounts[from][id] += mintAmount; + } + + token.batchMint(from, normalizedIds, normalizedMintAmounts, mintData); + + hevm.prank(from); + token.setApprovalForAll(address(this), true); + + token.safeBatchTransferFrom( + from, + address(new WrongReturnDataERC1155Recipient()), + normalizedIds, + normalizedTransferAmounts, + transferData + ); + } + + function testFailSafeBatchTransferFromWithArrayLengthMismatch( + address to, + uint256[] memory ids, + uint256[] memory mintAmounts, + uint256[] memory transferAmounts, + bytes memory mintData, + bytes memory transferData + ) public { + address from = address(0xABCD); + + if (ids.length == transferAmounts.length) revert(); + + token.batchMint(from, ids, mintAmounts, mintData); + + hevm.prank(from); + token.setApprovalForAll(address(this), true); + + token.safeBatchTransferFrom(from, to, ids, transferAmounts, transferData); + } + + function testFailBatchMintToZero( + uint256[] memory ids, + uint256[] memory amounts, + bytes memory mintData + ) public { + uint256 minLength = min2(ids.length, amounts.length); + + uint256[] memory normalizedIds = new uint256[](minLength); + uint256[] memory normalizedAmounts = new uint256[](minLength); + + for (uint256 i = 0; i < minLength; i++) { + uint256 id = ids[i]; + + uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(0)][id]; + + uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId); + + normalizedIds[i] = id; + normalizedAmounts[i] = mintAmount; + + userMintAmounts[address(0)][id] += mintAmount; + } + + token.batchMint(address(0), normalizedIds, normalizedAmounts, mintData); + } + + function testFailBatchMintToNonERC1155Recipient( + uint256[] memory ids, + uint256[] memory amounts, + bytes memory mintData + ) public { + NonERC1155Recipient to = new NonERC1155Recipient(); + + uint256 minLength = min2(ids.length, amounts.length); + + uint256[] memory normalizedIds = new uint256[](minLength); + uint256[] memory normalizedAmounts = new uint256[](minLength); + + for (uint256 i = 0; i < minLength; i++) { + uint256 id = ids[i]; + + uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(to)][id]; + + uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId); + + normalizedIds[i] = id; + normalizedAmounts[i] = mintAmount; + + userMintAmounts[address(to)][id] += mintAmount; + } + + token.batchMint(address(to), normalizedIds, normalizedAmounts, mintData); + } + + function testFailBatchMintToRevertingERC1155Recipient( + uint256[] memory ids, + uint256[] memory amounts, + bytes memory mintData + ) public { + RevertingERC1155Recipient to = new RevertingERC1155Recipient(); + + uint256 minLength = min2(ids.length, amounts.length); + + uint256[] memory normalizedIds = new uint256[](minLength); + uint256[] memory normalizedAmounts = new uint256[](minLength); + + for (uint256 i = 0; i < minLength; i++) { + uint256 id = ids[i]; + + uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(to)][id]; + + uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId); + + normalizedIds[i] = id; + normalizedAmounts[i] = mintAmount; + + userMintAmounts[address(to)][id] += mintAmount; + } + + token.batchMint(address(to), normalizedIds, normalizedAmounts, mintData); + } + + function testFailBatchMintToWrongReturnDataERC1155Recipient( + uint256[] memory ids, + uint256[] memory amounts, + bytes memory mintData + ) public { + WrongReturnDataERC1155Recipient to = new WrongReturnDataERC1155Recipient(); + + uint256 minLength = min2(ids.length, amounts.length); + + uint256[] memory normalizedIds = new uint256[](minLength); + uint256[] memory normalizedAmounts = new uint256[](minLength); + + for (uint256 i = 0; i < minLength; i++) { + uint256 id = ids[i]; + + uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(to)][id]; + + uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId); + + normalizedIds[i] = id; + normalizedAmounts[i] = mintAmount; + + userMintAmounts[address(to)][id] += mintAmount; + } + + token.batchMint(address(to), normalizedIds, normalizedAmounts, mintData); + } + + function testFailBatchMintWithArrayMismatch( + address to, + uint256[] memory ids, + uint256[] memory amounts, + bytes memory mintData + ) public { + if (ids.length == amounts.length) revert(); + + token.batchMint(address(to), ids, amounts, mintData); + } + + function testFailBatchBurnInsufficientBalance( + address to, + uint256[] memory ids, + uint256[] memory mintAmounts, + uint256[] memory burnAmounts, + bytes memory mintData + ) public { + uint256 minLength = min3(ids.length, mintAmounts.length, burnAmounts.length); + + if (minLength == 0) revert(); + + uint256[] memory normalizedIds = new uint256[](minLength); + uint256[] memory normalizedMintAmounts = new uint256[](minLength); + uint256[] memory normalizedBurnAmounts = new uint256[](minLength); + + for (uint256 i = 0; i < minLength; i++) { + uint256 id = ids[i]; + + uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[to][id]; + + normalizedIds[i] = id; + normalizedMintAmounts[i] = bound(mintAmounts[i], 0, remainingMintAmountForId); + normalizedBurnAmounts[i] = bound(burnAmounts[i], normalizedMintAmounts[i] + 1, type(uint256).max); + + userMintAmounts[to][id] += normalizedMintAmounts[i]; + } + + token.batchMint(to, normalizedIds, normalizedMintAmounts, mintData); + + token.batchBurn(to, normalizedIds, normalizedBurnAmounts); + } + + function testFailBatchBurnWithArrayLengthMismatch( + address to, + uint256[] memory ids, + uint256[] memory mintAmounts, + uint256[] memory burnAmounts, + bytes memory mintData + ) public { + if (ids.length == burnAmounts.length) revert(); + + token.batchMint(to, ids, mintAmounts, mintData); + + token.batchBurn(to, ids, burnAmounts); + } + + function testFailBalanceOfBatchWithArrayMismatch(address[] memory tos, uint256[] memory ids) public view { + if (tos.length == ids.length) revert(); + + token.balanceOfBatch(tos, ids); + } +} diff --git a/lib/solmate/src/test/ERC20.t.sol b/lib/solmate/src/test/ERC20.t.sol new file mode 100644 index 0000000..15c6f4a --- /dev/null +++ b/lib/solmate/src/test/ERC20.t.sol @@ -0,0 +1,529 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity 0.8.10; + +import {DSTestPlus} from "./utils/DSTestPlus.sol"; +import {DSInvariantTest} from "./utils/DSInvariantTest.sol"; + +import {MockERC20} from "./utils/mocks/MockERC20.sol"; + +contract ERC20Test is DSTestPlus { + MockERC20 token; + + bytes32 constant PERMIT_TYPEHASH = + keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); + + function setUp() public { + token = new MockERC20("Token", "TKN", 18); + } + + function invariantMetadata() public { + assertEq(token.name(), "Token"); + assertEq(token.symbol(), "TKN"); + assertEq(token.decimals(), 18); + } + + function testMint() public { + token.mint(address(0xBEEF), 1e18); + + assertEq(token.totalSupply(), 1e18); + assertEq(token.balanceOf(address(0xBEEF)), 1e18); + } + + function testBurn() public { + token.mint(address(0xBEEF), 1e18); + token.burn(address(0xBEEF), 0.9e18); + + assertEq(token.totalSupply(), 1e18 - 0.9e18); + assertEq(token.balanceOf(address(0xBEEF)), 0.1e18); + } + + function testApprove() public { + assertTrue(token.approve(address(0xBEEF), 1e18)); + + assertEq(token.allowance(address(this), address(0xBEEF)), 1e18); + } + + function testTransfer() public { + token.mint(address(this), 1e18); + + assertTrue(token.transfer(address(0xBEEF), 1e18)); + assertEq(token.totalSupply(), 1e18); + + assertEq(token.balanceOf(address(this)), 0); + assertEq(token.balanceOf(address(0xBEEF)), 1e18); + } + + function testTransferFrom() public { + address from = address(0xABCD); + + token.mint(from, 1e18); + + hevm.prank(from); + token.approve(address(this), 1e18); + + assertTrue(token.transferFrom(from, address(0xBEEF), 1e18)); + assertEq(token.totalSupply(), 1e18); + + assertEq(token.allowance(from, address(this)), 0); + + assertEq(token.balanceOf(from), 0); + assertEq(token.balanceOf(address(0xBEEF)), 1e18); + } + + function testInfiniteApproveTransferFrom() public { + address from = address(0xABCD); + + token.mint(from, 1e18); + + hevm.prank(from); + token.approve(address(this), type(uint256).max); + + assertTrue(token.transferFrom(from, address(0xBEEF), 1e18)); + assertEq(token.totalSupply(), 1e18); + + assertEq(token.allowance(from, address(this)), type(uint256).max); + + assertEq(token.balanceOf(from), 0); + assertEq(token.balanceOf(address(0xBEEF)), 1e18); + } + + function testPermit() public { + uint256 privateKey = 0xBEEF; + address owner = hevm.addr(privateKey); + + (uint8 v, bytes32 r, bytes32 s) = hevm.sign( + privateKey, + keccak256( + abi.encodePacked( + "\x19\x01", + token.DOMAIN_SEPARATOR(), + keccak256(abi.encode(PERMIT_TYPEHASH, owner, address(0xCAFE), 1e18, 0, block.timestamp)) + ) + ) + ); + + token.permit(owner, address(0xCAFE), 1e18, block.timestamp, v, r, s); + + assertEq(token.allowance(owner, address(0xCAFE)), 1e18); + assertEq(token.nonces(owner), 1); + } + + function testFailTransferInsufficientBalance() public { + token.mint(address(this), 0.9e18); + token.transfer(address(0xBEEF), 1e18); + } + + function testFailTransferFromInsufficientAllowance() public { + address from = address(0xABCD); + + token.mint(from, 1e18); + + hevm.prank(from); + token.approve(address(this), 0.9e18); + + token.transferFrom(from, address(0xBEEF), 1e18); + } + + function testFailTransferFromInsufficientBalance() public { + address from = address(0xABCD); + + token.mint(from, 0.9e18); + + hevm.prank(from); + token.approve(address(this), 1e18); + + token.transferFrom(from, address(0xBEEF), 1e18); + } + + function testFailPermitBadNonce() public { + uint256 privateKey = 0xBEEF; + address owner = hevm.addr(privateKey); + + (uint8 v, bytes32 r, bytes32 s) = hevm.sign( + privateKey, + keccak256( + abi.encodePacked( + "\x19\x01", + token.DOMAIN_SEPARATOR(), + keccak256(abi.encode(PERMIT_TYPEHASH, owner, address(0xCAFE), 1e18, 1, block.timestamp)) + ) + ) + ); + + token.permit(owner, address(0xCAFE), 1e18, block.timestamp, v, r, s); + } + + function testFailPermitBadDeadline() public { + uint256 privateKey = 0xBEEF; + address owner = hevm.addr(privateKey); + + (uint8 v, bytes32 r, bytes32 s) = hevm.sign( + privateKey, + keccak256( + abi.encodePacked( + "\x19\x01", + token.DOMAIN_SEPARATOR(), + keccak256(abi.encode(PERMIT_TYPEHASH, owner, address(0xCAFE), 1e18, 0, block.timestamp)) + ) + ) + ); + + token.permit(owner, address(0xCAFE), 1e18, block.timestamp + 1, v, r, s); + } + + function testFailPermitPastDeadline() public { + uint256 privateKey = 0xBEEF; + address owner = hevm.addr(privateKey); + + (uint8 v, bytes32 r, bytes32 s) = hevm.sign( + privateKey, + keccak256( + abi.encodePacked( + "\x19\x01", + token.DOMAIN_SEPARATOR(), + keccak256(abi.encode(PERMIT_TYPEHASH, owner, address(0xCAFE), 1e18, 0, block.timestamp - 1)) + ) + ) + ); + + token.permit(owner, address(0xCAFE), 1e18, block.timestamp - 1, v, r, s); + } + + function testFailPermitReplay() public { + uint256 privateKey = 0xBEEF; + address owner = hevm.addr(privateKey); + + (uint8 v, bytes32 r, bytes32 s) = hevm.sign( + privateKey, + keccak256( + abi.encodePacked( + "\x19\x01", + token.DOMAIN_SEPARATOR(), + keccak256(abi.encode(PERMIT_TYPEHASH, owner, address(0xCAFE), 1e18, 0, block.timestamp)) + ) + ) + ); + + token.permit(owner, address(0xCAFE), 1e18, block.timestamp, v, r, s); + token.permit(owner, address(0xCAFE), 1e18, block.timestamp, v, r, s); + } + + function testMetadata( + string calldata name, + string calldata symbol, + uint8 decimals + ) public { + MockERC20 tkn = new MockERC20(name, symbol, decimals); + assertEq(tkn.name(), name); + assertEq(tkn.symbol(), symbol); + assertEq(tkn.decimals(), decimals); + } + + function testMint(address from, uint256 amount) public { + token.mint(from, amount); + + assertEq(token.totalSupply(), amount); + assertEq(token.balanceOf(from), amount); + } + + function testBurn( + address from, + uint256 mintAmount, + uint256 burnAmount + ) public { + burnAmount = bound(burnAmount, 0, mintAmount); + + token.mint(from, mintAmount); + token.burn(from, burnAmount); + + assertEq(token.totalSupply(), mintAmount - burnAmount); + assertEq(token.balanceOf(from), mintAmount - burnAmount); + } + + function testApprove(address to, uint256 amount) public { + assertTrue(token.approve(to, amount)); + + assertEq(token.allowance(address(this), to), amount); + } + + function testTransfer(address from, uint256 amount) public { + token.mint(address(this), amount); + + assertTrue(token.transfer(from, amount)); + assertEq(token.totalSupply(), amount); + + if (address(this) == from) { + assertEq(token.balanceOf(address(this)), amount); + } else { + assertEq(token.balanceOf(address(this)), 0); + assertEq(token.balanceOf(from), amount); + } + } + + function testTransferFrom( + address to, + uint256 approval, + uint256 amount + ) public { + amount = bound(amount, 0, approval); + + address from = address(0xABCD); + + token.mint(from, amount); + + hevm.prank(from); + token.approve(address(this), approval); + + assertTrue(token.transferFrom(from, to, amount)); + assertEq(token.totalSupply(), amount); + + uint256 app = from == address(this) || approval == type(uint256).max ? approval : approval - amount; + assertEq(token.allowance(from, address(this)), app); + + if (from == to) { + assertEq(token.balanceOf(from), amount); + } else { + assertEq(token.balanceOf(from), 0); + assertEq(token.balanceOf(to), amount); + } + } + + function testPermit( + uint248 privKey, + address to, + uint256 amount, + uint256 deadline + ) public { + uint256 privateKey = privKey; + if (deadline < block.timestamp) deadline = block.timestamp; + if (privateKey == 0) privateKey = 1; + + address owner = hevm.addr(privateKey); + + (uint8 v, bytes32 r, bytes32 s) = hevm.sign( + privateKey, + keccak256( + abi.encodePacked( + "\x19\x01", + token.DOMAIN_SEPARATOR(), + keccak256(abi.encode(PERMIT_TYPEHASH, owner, to, amount, 0, deadline)) + ) + ) + ); + + token.permit(owner, to, amount, deadline, v, r, s); + + assertEq(token.allowance(owner, to), amount); + assertEq(token.nonces(owner), 1); + } + + function testFailBurnInsufficientBalance( + address to, + uint256 mintAmount, + uint256 burnAmount + ) public { + burnAmount = bound(burnAmount, mintAmount + 1, type(uint256).max); + + token.mint(to, mintAmount); + token.burn(to, burnAmount); + } + + function testFailTransferInsufficientBalance( + address to, + uint256 mintAmount, + uint256 sendAmount + ) public { + sendAmount = bound(sendAmount, mintAmount + 1, type(uint256).max); + + token.mint(address(this), mintAmount); + token.transfer(to, sendAmount); + } + + function testFailTransferFromInsufficientAllowance( + address to, + uint256 approval, + uint256 amount + ) public { + amount = bound(amount, approval + 1, type(uint256).max); + + address from = address(0xABCD); + + token.mint(from, amount); + + hevm.prank(from); + token.approve(address(this), approval); + + token.transferFrom(from, to, amount); + } + + function testFailTransferFromInsufficientBalance( + address to, + uint256 mintAmount, + uint256 sendAmount + ) public { + sendAmount = bound(sendAmount, mintAmount + 1, type(uint256).max); + + address from = address(0xABCD); + + token.mint(from, mintAmount); + + hevm.prank(from); + token.approve(address(this), sendAmount); + + token.transferFrom(from, to, sendAmount); + } + + function testFailPermitBadNonce( + uint256 privateKey, + address to, + uint256 amount, + uint256 deadline, + uint256 nonce + ) public { + if (deadline < block.timestamp) deadline = block.timestamp; + if (privateKey == 0) privateKey = 1; + if (nonce == 0) nonce = 1; + + address owner = hevm.addr(privateKey); + + (uint8 v, bytes32 r, bytes32 s) = hevm.sign( + privateKey, + keccak256( + abi.encodePacked( + "\x19\x01", + token.DOMAIN_SEPARATOR(), + keccak256(abi.encode(PERMIT_TYPEHASH, owner, to, amount, nonce, deadline)) + ) + ) + ); + + token.permit(owner, to, amount, deadline, v, r, s); + } + + function testFailPermitBadDeadline( + uint256 privateKey, + address to, + uint256 amount, + uint256 deadline + ) public { + if (deadline < block.timestamp) deadline = block.timestamp; + if (privateKey == 0) privateKey = 1; + + address owner = hevm.addr(privateKey); + + (uint8 v, bytes32 r, bytes32 s) = hevm.sign( + privateKey, + keccak256( + abi.encodePacked( + "\x19\x01", + token.DOMAIN_SEPARATOR(), + keccak256(abi.encode(PERMIT_TYPEHASH, owner, to, amount, 0, deadline)) + ) + ) + ); + + token.permit(owner, to, amount, deadline + 1, v, r, s); + } + + function testFailPermitPastDeadline( + uint256 privateKey, + address to, + uint256 amount, + uint256 deadline + ) public { + deadline = bound(deadline, 0, block.timestamp - 1); + if (privateKey == 0) privateKey = 1; + + address owner = hevm.addr(privateKey); + + (uint8 v, bytes32 r, bytes32 s) = hevm.sign( + privateKey, + keccak256( + abi.encodePacked( + "\x19\x01", + token.DOMAIN_SEPARATOR(), + keccak256(abi.encode(PERMIT_TYPEHASH, owner, to, amount, 0, deadline)) + ) + ) + ); + + token.permit(owner, to, amount, deadline, v, r, s); + } + + function testFailPermitReplay( + uint256 privateKey, + address to, + uint256 amount, + uint256 deadline + ) public { + if (deadline < block.timestamp) deadline = block.timestamp; + if (privateKey == 0) privateKey = 1; + + address owner = hevm.addr(privateKey); + + (uint8 v, bytes32 r, bytes32 s) = hevm.sign( + privateKey, + keccak256( + abi.encodePacked( + "\x19\x01", + token.DOMAIN_SEPARATOR(), + keccak256(abi.encode(PERMIT_TYPEHASH, owner, to, amount, 0, deadline)) + ) + ) + ); + + token.permit(owner, to, amount, deadline, v, r, s); + token.permit(owner, to, amount, deadline, v, r, s); + } +} + +contract ERC20Invariants is DSTestPlus, DSInvariantTest { + BalanceSum balanceSum; + MockERC20 token; + + function setUp() public { + token = new MockERC20("Token", "TKN", 18); + balanceSum = new BalanceSum(token); + + addTargetContract(address(balanceSum)); + } + + function invariantBalanceSum() public { + assertEq(token.totalSupply(), balanceSum.sum()); + } +} + +contract BalanceSum { + MockERC20 token; + uint256 public sum; + + constructor(MockERC20 _token) { + token = _token; + } + + function mint(address from, uint256 amount) public { + token.mint(from, amount); + sum += amount; + } + + function burn(address from, uint256 amount) public { + token.burn(from, amount); + sum -= amount; + } + + function approve(address to, uint256 amount) public { + token.approve(to, amount); + } + + function transferFrom( + address from, + address to, + uint256 amount + ) public { + token.transferFrom(from, to, amount); + } + + function transfer(address to, uint256 amount) public { + token.transfer(to, amount); + } +} diff --git a/lib/solmate/src/test/ERC4626.t.sol b/lib/solmate/src/test/ERC4626.t.sol new file mode 100644 index 0000000..56a1752 --- /dev/null +++ b/lib/solmate/src/test/ERC4626.t.sol @@ -0,0 +1,446 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity 0.8.10; + +import {DSTestPlus} from "./utils/DSTestPlus.sol"; + +import {MockERC20} from "./utils/mocks/MockERC20.sol"; +import {MockERC4626} from "./utils/mocks/MockERC4626.sol"; + +contract ERC4626Test is DSTestPlus { + MockERC20 underlying; + MockERC4626 vault; + + function setUp() public { + underlying = new MockERC20("Mock Token", "TKN", 18); + vault = new MockERC4626(underlying, "Mock Token Vault", "vwTKN"); + } + + function invariantMetadata() public { + assertEq(vault.name(), "Mock Token Vault"); + assertEq(vault.symbol(), "vwTKN"); + assertEq(vault.decimals(), 18); + } + + function testMetadata(string calldata name, string calldata symbol) public { + MockERC4626 vlt = new MockERC4626(underlying, name, symbol); + assertEq(vlt.name(), name); + assertEq(vlt.symbol(), symbol); + assertEq(address(vlt.asset()), address(underlying)); + } + + function testSingleDepositWithdraw(uint128 amount) public { + if (amount == 0) amount = 1; + + uint256 aliceUnderlyingAmount = amount; + + address alice = address(0xABCD); + + underlying.mint(alice, aliceUnderlyingAmount); + + hevm.prank(alice); + underlying.approve(address(vault), aliceUnderlyingAmount); + assertEq(underlying.allowance(alice, address(vault)), aliceUnderlyingAmount); + + uint256 alicePreDepositBal = underlying.balanceOf(alice); + + hevm.prank(alice); + uint256 aliceShareAmount = vault.deposit(aliceUnderlyingAmount, alice); + + assertEq(vault.afterDepositHookCalledCounter(), 1); + + // Expect exchange rate to be 1:1 on initial deposit. + assertEq(aliceUnderlyingAmount, aliceShareAmount); + assertEq(vault.previewWithdraw(aliceShareAmount), aliceUnderlyingAmount); + assertEq(vault.previewDeposit(aliceUnderlyingAmount), aliceShareAmount); + assertEq(vault.totalSupply(), aliceShareAmount); + assertEq(vault.totalAssets(), aliceUnderlyingAmount); + assertEq(vault.balanceOf(alice), aliceShareAmount); + assertEq(vault.convertToAssets(vault.balanceOf(alice)), aliceUnderlyingAmount); + assertEq(underlying.balanceOf(alice), alicePreDepositBal - aliceUnderlyingAmount); + + hevm.prank(alice); + vault.withdraw(aliceUnderlyingAmount, alice, alice); + + assertEq(vault.beforeWithdrawHookCalledCounter(), 1); + + assertEq(vault.totalAssets(), 0); + assertEq(vault.balanceOf(alice), 0); + assertEq(vault.convertToAssets(vault.balanceOf(alice)), 0); + assertEq(underlying.balanceOf(alice), alicePreDepositBal); + } + + function testSingleMintRedeem(uint128 amount) public { + if (amount == 0) amount = 1; + + uint256 aliceShareAmount = amount; + + address alice = address(0xABCD); + + underlying.mint(alice, aliceShareAmount); + + hevm.prank(alice); + underlying.approve(address(vault), aliceShareAmount); + assertEq(underlying.allowance(alice, address(vault)), aliceShareAmount); + + uint256 alicePreDepositBal = underlying.balanceOf(alice); + + hevm.prank(alice); + uint256 aliceUnderlyingAmount = vault.mint(aliceShareAmount, alice); + + assertEq(vault.afterDepositHookCalledCounter(), 1); + + // Expect exchange rate to be 1:1 on initial mint. + assertEq(aliceShareAmount, aliceUnderlyingAmount); + assertEq(vault.previewWithdraw(aliceShareAmount), aliceUnderlyingAmount); + assertEq(vault.previewDeposit(aliceUnderlyingAmount), aliceShareAmount); + assertEq(vault.totalSupply(), aliceShareAmount); + assertEq(vault.totalAssets(), aliceUnderlyingAmount); + assertEq(vault.balanceOf(alice), aliceUnderlyingAmount); + assertEq(vault.convertToAssets(vault.balanceOf(alice)), aliceUnderlyingAmount); + assertEq(underlying.balanceOf(alice), alicePreDepositBal - aliceUnderlyingAmount); + + hevm.prank(alice); + vault.redeem(aliceShareAmount, alice, alice); + + assertEq(vault.beforeWithdrawHookCalledCounter(), 1); + + assertEq(vault.totalAssets(), 0); + assertEq(vault.balanceOf(alice), 0); + assertEq(vault.convertToAssets(vault.balanceOf(alice)), 0); + assertEq(underlying.balanceOf(alice), alicePreDepositBal); + } + + function testMultipleMintDepositRedeemWithdraw() public { + // Scenario: + // A = Alice, B = Bob + // ________________________________________________________ + // | Vault shares | A share | A assets | B share | B assets | + // |========================================================| + // | 1. Alice mints 2000 shares (costs 2000 tokens) | + // |--------------|---------|----------|---------|----------| + // | 2000 | 2000 | 2000 | 0 | 0 | + // |--------------|---------|----------|---------|----------| + // | 2. Bob deposits 4000 tokens (mints 4000 shares) | + // |--------------|---------|----------|---------|----------| + // | 6000 | 2000 | 2000 | 4000 | 4000 | + // |--------------|---------|----------|---------|----------| + // | 3. Vault mutates by +3000 tokens... | + // | (simulated yield returned from strategy)... | + // |--------------|---------|----------|---------|----------| + // | 6000 | 2000 | 3000 | 4000 | 6000 | + // |--------------|---------|----------|---------|----------| + // | 4. Alice deposits 2000 tokens (mints 1333 shares) | + // |--------------|---------|----------|---------|----------| + // | 7333 | 3333 | 4999 | 4000 | 6000 | + // |--------------|---------|----------|---------|----------| + // | 5. Bob mints 2000 shares (costs 3001 assets) | + // | NOTE: Bob's assets spent got rounded up | + // | NOTE: Alice's vault assets got rounded up | + // |--------------|---------|----------|---------|----------| + // | 9333 | 3333 | 5000 | 6000 | 9000 | + // |--------------|---------|----------|---------|----------| + // | 6. Vault mutates by +3000 tokens... | + // | (simulated yield returned from strategy) | + // | NOTE: Vault holds 17001 tokens, but sum of | + // | assetsOf() is 17000. | + // |--------------|---------|----------|---------|----------| + // | 9333 | 3333 | 6071 | 6000 | 10929 | + // |--------------|---------|----------|---------|----------| + // | 7. Alice redeem 1333 shares (2428 assets) | + // |--------------|---------|----------|---------|----------| + // | 8000 | 2000 | 3643 | 6000 | 10929 | + // |--------------|---------|----------|---------|----------| + // | 8. Bob withdraws 2928 assets (1608 shares) | + // |--------------|---------|----------|---------|----------| + // | 6392 | 2000 | 3643 | 4392 | 8000 | + // |--------------|---------|----------|---------|----------| + // | 9. Alice withdraws 3643 assets (2000 shares) | + // | NOTE: Bob's assets have been rounded back up | + // |--------------|---------|----------|---------|----------| + // | 4392 | 0 | 0 | 4392 | 8001 | + // |--------------|---------|----------|---------|----------| + // | 10. Bob redeem 4392 shares (8001 tokens) | + // |--------------|---------|----------|---------|----------| + // | 0 | 0 | 0 | 0 | 0 | + // |______________|_________|__________|_________|__________| + + address alice = address(0xABCD); + address bob = address(0xDCBA); + + uint256 mutationUnderlyingAmount = 3000; + + underlying.mint(alice, 4000); + + hevm.prank(alice); + underlying.approve(address(vault), 4000); + + assertEq(underlying.allowance(alice, address(vault)), 4000); + + underlying.mint(bob, 7001); + + hevm.prank(bob); + underlying.approve(address(vault), 7001); + + assertEq(underlying.allowance(bob, address(vault)), 7001); + + // 1. Alice mints 2000 shares (costs 2000 tokens) + hevm.prank(alice); + uint256 aliceUnderlyingAmount = vault.mint(2000, alice); + + uint256 aliceShareAmount = vault.previewDeposit(aliceUnderlyingAmount); + assertEq(vault.afterDepositHookCalledCounter(), 1); + + // Expect to have received the requested mint amount. + assertEq(aliceShareAmount, 2000); + assertEq(vault.balanceOf(alice), aliceShareAmount); + assertEq(vault.convertToAssets(vault.balanceOf(alice)), aliceUnderlyingAmount); + assertEq(vault.convertToShares(aliceUnderlyingAmount), vault.balanceOf(alice)); + + // Expect a 1:1 ratio before mutation. + assertEq(aliceUnderlyingAmount, 2000); + + // Sanity check. + assertEq(vault.totalSupply(), aliceShareAmount); + assertEq(vault.totalAssets(), aliceUnderlyingAmount); + + // 2. Bob deposits 4000 tokens (mints 4000 shares) + hevm.prank(bob); + uint256 bobShareAmount = vault.deposit(4000, bob); + uint256 bobUnderlyingAmount = vault.previewWithdraw(bobShareAmount); + assertEq(vault.afterDepositHookCalledCounter(), 2); + + // Expect to have received the requested underlying amount. + assertEq(bobUnderlyingAmount, 4000); + assertEq(vault.balanceOf(bob), bobShareAmount); + assertEq(vault.convertToAssets(vault.balanceOf(bob)), bobUnderlyingAmount); + assertEq(vault.convertToShares(bobUnderlyingAmount), vault.balanceOf(bob)); + + // Expect a 1:1 ratio before mutation. + assertEq(bobShareAmount, bobUnderlyingAmount); + + // Sanity check. + uint256 preMutationShareBal = aliceShareAmount + bobShareAmount; + uint256 preMutationBal = aliceUnderlyingAmount + bobUnderlyingAmount; + assertEq(vault.totalSupply(), preMutationShareBal); + assertEq(vault.totalAssets(), preMutationBal); + assertEq(vault.totalSupply(), 6000); + assertEq(vault.totalAssets(), 6000); + + // 3. Vault mutates by +3000 tokens... | + // (simulated yield returned from strategy)... + // The Vault now contains more tokens than deposited which causes the exchange rate to change. + // Alice share is 33.33% of the Vault, Bob 66.66% of the Vault. + // Alice's share count stays the same but the underlying amount changes from 2000 to 3000. + // Bob's share count stays the same but the underlying amount changes from 4000 to 6000. + underlying.mint(address(vault), mutationUnderlyingAmount); + assertEq(vault.totalSupply(), preMutationShareBal); + assertEq(vault.totalAssets(), preMutationBal + mutationUnderlyingAmount); + assertEq(vault.balanceOf(alice), aliceShareAmount); + assertEq( + vault.convertToAssets(vault.balanceOf(alice)), + aliceUnderlyingAmount + (mutationUnderlyingAmount / 3) * 1 + ); + assertEq(vault.balanceOf(bob), bobShareAmount); + assertEq(vault.convertToAssets(vault.balanceOf(bob)), bobUnderlyingAmount + (mutationUnderlyingAmount / 3) * 2); + + // 4. Alice deposits 2000 tokens (mints 1333 shares) + hevm.prank(alice); + vault.deposit(2000, alice); + + assertEq(vault.totalSupply(), 7333); + assertEq(vault.balanceOf(alice), 3333); + assertEq(vault.convertToAssets(vault.balanceOf(alice)), 4999); + assertEq(vault.balanceOf(bob), 4000); + assertEq(vault.convertToAssets(vault.balanceOf(bob)), 6000); + + // 5. Bob mints 2000 shares (costs 3001 assets) + // NOTE: Bob's assets spent got rounded up + // NOTE: Alices's vault assets got rounded up + hevm.prank(bob); + vault.mint(2000, bob); + + assertEq(vault.totalSupply(), 9333); + assertEq(vault.balanceOf(alice), 3333); + assertEq(vault.convertToAssets(vault.balanceOf(alice)), 5000); + assertEq(vault.balanceOf(bob), 6000); + assertEq(vault.convertToAssets(vault.balanceOf(bob)), 9000); + + // Sanity checks: + // Alice and bob should have spent all their tokens now + assertEq(underlying.balanceOf(alice), 0); + assertEq(underlying.balanceOf(bob), 0); + // Assets in vault: 4k (alice) + 7k (bob) + 3k (yield) + 1 (round up) + assertEq(vault.totalAssets(), 14001); + + // 6. Vault mutates by +3000 tokens + // NOTE: Vault holds 17001 tokens, but sum of assetsOf() is 17000. + underlying.mint(address(vault), mutationUnderlyingAmount); + assertEq(vault.totalAssets(), 17001); + assertEq(vault.convertToAssets(vault.balanceOf(alice)), 6071); + assertEq(vault.convertToAssets(vault.balanceOf(bob)), 10929); + + // 7. Alice redeem 1333 shares (2428 assets) + hevm.prank(alice); + vault.redeem(1333, alice, alice); + + assertEq(underlying.balanceOf(alice), 2428); + assertEq(vault.totalSupply(), 8000); + assertEq(vault.totalAssets(), 14573); + assertEq(vault.balanceOf(alice), 2000); + assertEq(vault.convertToAssets(vault.balanceOf(alice)), 3643); + assertEq(vault.balanceOf(bob), 6000); + assertEq(vault.convertToAssets(vault.balanceOf(bob)), 10929); + + // 8. Bob withdraws 2929 assets (1608 shares) + hevm.prank(bob); + vault.withdraw(2929, bob, bob); + + assertEq(underlying.balanceOf(bob), 2929); + assertEq(vault.totalSupply(), 6392); + assertEq(vault.totalAssets(), 11644); + assertEq(vault.balanceOf(alice), 2000); + assertEq(vault.convertToAssets(vault.balanceOf(alice)), 3643); + assertEq(vault.balanceOf(bob), 4392); + assertEq(vault.convertToAssets(vault.balanceOf(bob)), 8000); + + // 9. Alice withdraws 3643 assets (2000 shares) + // NOTE: Bob's assets have been rounded back up + hevm.prank(alice); + vault.withdraw(3643, alice, alice); + + assertEq(underlying.balanceOf(alice), 6071); + assertEq(vault.totalSupply(), 4392); + assertEq(vault.totalAssets(), 8001); + assertEq(vault.balanceOf(alice), 0); + assertEq(vault.convertToAssets(vault.balanceOf(alice)), 0); + assertEq(vault.balanceOf(bob), 4392); + assertEq(vault.convertToAssets(vault.balanceOf(bob)), 8001); + + // 10. Bob redeem 4392 shares (8001 tokens) + hevm.prank(bob); + vault.redeem(4392, bob, bob); + assertEq(underlying.balanceOf(bob), 10930); + assertEq(vault.totalSupply(), 0); + assertEq(vault.totalAssets(), 0); + assertEq(vault.balanceOf(alice), 0); + assertEq(vault.convertToAssets(vault.balanceOf(alice)), 0); + assertEq(vault.balanceOf(bob), 0); + assertEq(vault.convertToAssets(vault.balanceOf(bob)), 0); + + // Sanity check + assertEq(underlying.balanceOf(address(vault)), 0); + } + + function testFailDepositWithNotEnoughApproval() public { + underlying.mint(address(this), 0.5e18); + underlying.approve(address(vault), 0.5e18); + assertEq(underlying.allowance(address(this), address(vault)), 0.5e18); + + vault.deposit(1e18, address(this)); + } + + function testFailWithdrawWithNotEnoughUnderlyingAmount() public { + underlying.mint(address(this), 0.5e18); + underlying.approve(address(vault), 0.5e18); + + vault.deposit(0.5e18, address(this)); + + vault.withdraw(1e18, address(this), address(this)); + } + + function testFailRedeemWithNotEnoughShareAmount() public { + underlying.mint(address(this), 0.5e18); + underlying.approve(address(vault), 0.5e18); + + vault.deposit(0.5e18, address(this)); + + vault.redeem(1e18, address(this), address(this)); + } + + function testFailWithdrawWithNoUnderlyingAmount() public { + vault.withdraw(1e18, address(this), address(this)); + } + + function testFailRedeemWithNoShareAmount() public { + vault.redeem(1e18, address(this), address(this)); + } + + function testFailDepositWithNoApproval() public { + vault.deposit(1e18, address(this)); + } + + function testFailMintWithNoApproval() public { + vault.mint(1e18, address(this)); + } + + function testFailDepositZero() public { + vault.deposit(0, address(this)); + } + + function testMintZero() public { + vault.mint(0, address(this)); + + assertEq(vault.balanceOf(address(this)), 0); + assertEq(vault.convertToAssets(vault.balanceOf(address(this))), 0); + assertEq(vault.totalSupply(), 0); + assertEq(vault.totalAssets(), 0); + } + + function testFailRedeemZero() public { + vault.redeem(0, address(this), address(this)); + } + + function testWithdrawZero() public { + vault.withdraw(0, address(this), address(this)); + + assertEq(vault.balanceOf(address(this)), 0); + assertEq(vault.convertToAssets(vault.balanceOf(address(this))), 0); + assertEq(vault.totalSupply(), 0); + assertEq(vault.totalAssets(), 0); + } + + function testVaultInteractionsForSomeoneElse() public { + // init 2 users with a 1e18 balance + address alice = address(0xABCD); + address bob = address(0xDCBA); + underlying.mint(alice, 1e18); + underlying.mint(bob, 1e18); + + hevm.prank(alice); + underlying.approve(address(vault), 1e18); + + hevm.prank(bob); + underlying.approve(address(vault), 1e18); + + // alice deposits 1e18 for bob + hevm.prank(alice); + vault.deposit(1e18, bob); + + assertEq(vault.balanceOf(alice), 0); + assertEq(vault.balanceOf(bob), 1e18); + assertEq(underlying.balanceOf(alice), 0); + + // bob mint 1e18 for alice + hevm.prank(bob); + vault.mint(1e18, alice); + assertEq(vault.balanceOf(alice), 1e18); + assertEq(vault.balanceOf(bob), 1e18); + assertEq(underlying.balanceOf(bob), 0); + + // alice redeem 1e18 for bob + hevm.prank(alice); + vault.redeem(1e18, bob, alice); + + assertEq(vault.balanceOf(alice), 0); + assertEq(vault.balanceOf(bob), 1e18); + assertEq(underlying.balanceOf(bob), 1e18); + + // bob withdraw 1e18 for alice + hevm.prank(bob); + vault.withdraw(1e18, alice, bob); + + assertEq(vault.balanceOf(alice), 0); + assertEq(vault.balanceOf(bob), 0); + assertEq(underlying.balanceOf(alice), 1e18); + } +} diff --git a/lib/solmate/src/test/ERC721.t.sol b/lib/solmate/src/test/ERC721.t.sol new file mode 100644 index 0000000..1f2b509 --- /dev/null +++ b/lib/solmate/src/test/ERC721.t.sol @@ -0,0 +1,727 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity 0.8.10; + +import {DSTestPlus} from "./utils/DSTestPlus.sol"; +import {DSInvariantTest} from "./utils/DSInvariantTest.sol"; + +import {MockERC721} from "./utils/mocks/MockERC721.sol"; + +import {ERC721TokenReceiver} from "../tokens/ERC721.sol"; + +contract ERC721Recipient is ERC721TokenReceiver { + address public operator; + address public from; + uint256 public id; + bytes public data; + + function onERC721Received( + address _operator, + address _from, + uint256 _id, + bytes calldata _data + ) public virtual override returns (bytes4) { + operator = _operator; + from = _from; + id = _id; + data = _data; + + return ERC721TokenReceiver.onERC721Received.selector; + } +} + +contract RevertingERC721Recipient is ERC721TokenReceiver { + function onERC721Received( + address, + address, + uint256, + bytes calldata + ) public virtual override returns (bytes4) { + revert(string(abi.encodePacked(ERC721TokenReceiver.onERC721Received.selector))); + } +} + +contract WrongReturnDataERC721Recipient is ERC721TokenReceiver { + function onERC721Received( + address, + address, + uint256, + bytes calldata + ) public virtual override returns (bytes4) { + return 0xCAFEBEEF; + } +} + +contract NonERC721Recipient {} + +contract ERC721Test is DSTestPlus { + MockERC721 token; + + function setUp() public { + token = new MockERC721("Token", "TKN"); + } + + function invariantMetadata() public { + assertEq(token.name(), "Token"); + assertEq(token.symbol(), "TKN"); + } + + function testMint() public { + token.mint(address(0xBEEF), 1337); + + assertEq(token.balanceOf(address(0xBEEF)), 1); + assertEq(token.ownerOf(1337), address(0xBEEF)); + } + + function testBurn() public { + token.mint(address(0xBEEF), 1337); + token.burn(1337); + + assertEq(token.balanceOf(address(0xBEEF)), 0); + + hevm.expectRevert("NOT_MINTED"); + token.ownerOf(1337); + } + + function testApprove() public { + token.mint(address(this), 1337); + + token.approve(address(0xBEEF), 1337); + + assertEq(token.getApproved(1337), address(0xBEEF)); + } + + function testApproveBurn() public { + token.mint(address(this), 1337); + + token.approve(address(0xBEEF), 1337); + + token.burn(1337); + + assertEq(token.balanceOf(address(this)), 0); + assertEq(token.getApproved(1337), address(0)); + + hevm.expectRevert("NOT_MINTED"); + token.ownerOf(1337); + } + + function testApproveAll() public { + token.setApprovalForAll(address(0xBEEF), true); + + assertTrue(token.isApprovedForAll(address(this), address(0xBEEF))); + } + + function testTransferFrom() public { + address from = address(0xABCD); + + token.mint(from, 1337); + + hevm.prank(from); + token.approve(address(this), 1337); + + token.transferFrom(from, address(0xBEEF), 1337); + + assertEq(token.getApproved(1337), address(0)); + assertEq(token.ownerOf(1337), address(0xBEEF)); + assertEq(token.balanceOf(address(0xBEEF)), 1); + assertEq(token.balanceOf(from), 0); + } + + function testTransferFromSelf() public { + token.mint(address(this), 1337); + + token.transferFrom(address(this), address(0xBEEF), 1337); + + assertEq(token.getApproved(1337), address(0)); + assertEq(token.ownerOf(1337), address(0xBEEF)); + assertEq(token.balanceOf(address(0xBEEF)), 1); + assertEq(token.balanceOf(address(this)), 0); + } + + function testTransferFromApproveAll() public { + address from = address(0xABCD); + + token.mint(from, 1337); + + hevm.prank(from); + token.setApprovalForAll(address(this), true); + + token.transferFrom(from, address(0xBEEF), 1337); + + assertEq(token.getApproved(1337), address(0)); + assertEq(token.ownerOf(1337), address(0xBEEF)); + assertEq(token.balanceOf(address(0xBEEF)), 1); + assertEq(token.balanceOf(from), 0); + } + + function testSafeTransferFromToEOA() public { + address from = address(0xABCD); + + token.mint(from, 1337); + + hevm.prank(from); + token.setApprovalForAll(address(this), true); + + token.safeTransferFrom(from, address(0xBEEF), 1337); + + assertEq(token.getApproved(1337), address(0)); + assertEq(token.ownerOf(1337), address(0xBEEF)); + assertEq(token.balanceOf(address(0xBEEF)), 1); + assertEq(token.balanceOf(from), 0); + } + + function testSafeTransferFromToERC721Recipient() public { + address from = address(0xABCD); + ERC721Recipient recipient = new ERC721Recipient(); + + token.mint(from, 1337); + + hevm.prank(from); + token.setApprovalForAll(address(this), true); + + token.safeTransferFrom(from, address(recipient), 1337); + + assertEq(token.getApproved(1337), address(0)); + assertEq(token.ownerOf(1337), address(recipient)); + assertEq(token.balanceOf(address(recipient)), 1); + assertEq(token.balanceOf(from), 0); + + assertEq(recipient.operator(), address(this)); + assertEq(recipient.from(), from); + assertEq(recipient.id(), 1337); + assertBytesEq(recipient.data(), ""); + } + + function testSafeTransferFromToERC721RecipientWithData() public { + address from = address(0xABCD); + ERC721Recipient recipient = new ERC721Recipient(); + + token.mint(from, 1337); + + hevm.prank(from); + token.setApprovalForAll(address(this), true); + + token.safeTransferFrom(from, address(recipient), 1337, "testing 123"); + + assertEq(token.getApproved(1337), address(0)); + assertEq(token.ownerOf(1337), address(recipient)); + assertEq(token.balanceOf(address(recipient)), 1); + assertEq(token.balanceOf(from), 0); + + assertEq(recipient.operator(), address(this)); + assertEq(recipient.from(), from); + assertEq(recipient.id(), 1337); + assertBytesEq(recipient.data(), "testing 123"); + } + + function testSafeMintToEOA() public { + token.safeMint(address(0xBEEF), 1337); + + assertEq(token.ownerOf(1337), address(address(0xBEEF))); + assertEq(token.balanceOf(address(address(0xBEEF))), 1); + } + + function testSafeMintToERC721Recipient() public { + ERC721Recipient to = new ERC721Recipient(); + + token.safeMint(address(to), 1337); + + assertEq(token.ownerOf(1337), address(to)); + assertEq(token.balanceOf(address(to)), 1); + + assertEq(to.operator(), address(this)); + assertEq(to.from(), address(0)); + assertEq(to.id(), 1337); + assertBytesEq(to.data(), ""); + } + + function testSafeMintToERC721RecipientWithData() public { + ERC721Recipient to = new ERC721Recipient(); + + token.safeMint(address(to), 1337, "testing 123"); + + assertEq(token.ownerOf(1337), address(to)); + assertEq(token.balanceOf(address(to)), 1); + + assertEq(to.operator(), address(this)); + assertEq(to.from(), address(0)); + assertEq(to.id(), 1337); + assertBytesEq(to.data(), "testing 123"); + } + + function testFailMintToZero() public { + token.mint(address(0), 1337); + } + + function testFailDoubleMint() public { + token.mint(address(0xBEEF), 1337); + token.mint(address(0xBEEF), 1337); + } + + function testFailBurnUnMinted() public { + token.burn(1337); + } + + function testFailDoubleBurn() public { + token.mint(address(0xBEEF), 1337); + + token.burn(1337); + token.burn(1337); + } + + function testFailApproveUnMinted() public { + token.approve(address(0xBEEF), 1337); + } + + function testFailApproveUnAuthorized() public { + token.mint(address(0xCAFE), 1337); + + token.approve(address(0xBEEF), 1337); + } + + function testFailTransferFromUnOwned() public { + token.transferFrom(address(0xFEED), address(0xBEEF), 1337); + } + + function testFailTransferFromWrongFrom() public { + token.mint(address(0xCAFE), 1337); + + token.transferFrom(address(0xFEED), address(0xBEEF), 1337); + } + + function testFailTransferFromToZero() public { + token.mint(address(this), 1337); + + token.transferFrom(address(this), address(0), 1337); + } + + function testFailTransferFromNotOwner() public { + token.mint(address(0xFEED), 1337); + + token.transferFrom(address(0xFEED), address(0xBEEF), 1337); + } + + function testFailSafeTransferFromToNonERC721Recipient() public { + token.mint(address(this), 1337); + + token.safeTransferFrom(address(this), address(new NonERC721Recipient()), 1337); + } + + function testFailSafeTransferFromToNonERC721RecipientWithData() public { + token.mint(address(this), 1337); + + token.safeTransferFrom(address(this), address(new NonERC721Recipient()), 1337, "testing 123"); + } + + function testFailSafeTransferFromToRevertingERC721Recipient() public { + token.mint(address(this), 1337); + + token.safeTransferFrom(address(this), address(new RevertingERC721Recipient()), 1337); + } + + function testFailSafeTransferFromToRevertingERC721RecipientWithData() public { + token.mint(address(this), 1337); + + token.safeTransferFrom(address(this), address(new RevertingERC721Recipient()), 1337, "testing 123"); + } + + function testFailSafeTransferFromToERC721RecipientWithWrongReturnData() public { + token.mint(address(this), 1337); + + token.safeTransferFrom(address(this), address(new WrongReturnDataERC721Recipient()), 1337); + } + + function testFailSafeTransferFromToERC721RecipientWithWrongReturnDataWithData() public { + token.mint(address(this), 1337); + + token.safeTransferFrom(address(this), address(new WrongReturnDataERC721Recipient()), 1337, "testing 123"); + } + + function testFailSafeMintToNonERC721Recipient() public { + token.safeMint(address(new NonERC721Recipient()), 1337); + } + + function testFailSafeMintToNonERC721RecipientWithData() public { + token.safeMint(address(new NonERC721Recipient()), 1337, "testing 123"); + } + + function testFailSafeMintToRevertingERC721Recipient() public { + token.safeMint(address(new RevertingERC721Recipient()), 1337); + } + + function testFailSafeMintToRevertingERC721RecipientWithData() public { + token.safeMint(address(new RevertingERC721Recipient()), 1337, "testing 123"); + } + + function testFailSafeMintToERC721RecipientWithWrongReturnData() public { + token.safeMint(address(new WrongReturnDataERC721Recipient()), 1337); + } + + function testFailSafeMintToERC721RecipientWithWrongReturnDataWithData() public { + token.safeMint(address(new WrongReturnDataERC721Recipient()), 1337, "testing 123"); + } + + function testFailBalanceOfZeroAddress() public view { + token.balanceOf(address(0)); + } + + function testFailOwnerOfUnminted() public view { + token.ownerOf(1337); + } + + function testMetadata(string memory name, string memory symbol) public { + MockERC721 tkn = new MockERC721(name, symbol); + + assertEq(tkn.name(), name); + assertEq(tkn.symbol(), symbol); + } + + function testMint(address to, uint256 id) public { + if (to == address(0)) to = address(0xBEEF); + + token.mint(to, id); + + assertEq(token.balanceOf(to), 1); + assertEq(token.ownerOf(id), to); + } + + function testBurn(address to, uint256 id) public { + if (to == address(0)) to = address(0xBEEF); + + token.mint(to, id); + token.burn(id); + + assertEq(token.balanceOf(to), 0); + + hevm.expectRevert("NOT_MINTED"); + token.ownerOf(id); + } + + function testApprove(address to, uint256 id) public { + if (to == address(0)) to = address(0xBEEF); + + token.mint(address(this), id); + + token.approve(to, id); + + assertEq(token.getApproved(id), to); + } + + function testApproveBurn(address to, uint256 id) public { + token.mint(address(this), id); + + token.approve(address(to), id); + + token.burn(id); + + assertEq(token.balanceOf(address(this)), 0); + assertEq(token.getApproved(id), address(0)); + + hevm.expectRevert("NOT_MINTED"); + token.ownerOf(id); + } + + function testApproveAll(address to, bool approved) public { + token.setApprovalForAll(to, approved); + + assertBoolEq(token.isApprovedForAll(address(this), to), approved); + } + + function testTransferFrom(uint256 id, address to) public { + address from = address(0xABCD); + + if (to == address(0) || to == from) to = address(0xBEEF); + + token.mint(from, id); + + hevm.prank(from); + token.approve(address(this), id); + + token.transferFrom(from, to, id); + + assertEq(token.getApproved(id), address(0)); + assertEq(token.ownerOf(id), to); + assertEq(token.balanceOf(to), 1); + assertEq(token.balanceOf(from), 0); + } + + function testTransferFromSelf(uint256 id, address to) public { + if (to == address(0) || to == address(this)) to = address(0xBEEF); + + token.mint(address(this), id); + + token.transferFrom(address(this), to, id); + + assertEq(token.getApproved(id), address(0)); + assertEq(token.ownerOf(id), to); + assertEq(token.balanceOf(to), 1); + assertEq(token.balanceOf(address(this)), 0); + } + + function testTransferFromApproveAll(uint256 id, address to) public { + address from = address(0xABCD); + + if (to == address(0) || to == from) to = address(0xBEEF); + + token.mint(from, id); + + hevm.prank(from); + token.setApprovalForAll(address(this), true); + + token.transferFrom(from, to, id); + + assertEq(token.getApproved(id), address(0)); + assertEq(token.ownerOf(id), to); + assertEq(token.balanceOf(to), 1); + assertEq(token.balanceOf(from), 0); + } + + function testSafeTransferFromToEOA(uint256 id, address to) public { + address from = address(0xABCD); + + if (to == address(0) || to == from) to = address(0xBEEF); + + if (uint256(uint160(to)) <= 18 || to.code.length > 0) return; + + token.mint(from, id); + + hevm.prank(from); + token.setApprovalForAll(address(this), true); + + token.safeTransferFrom(from, to, id); + + assertEq(token.getApproved(id), address(0)); + assertEq(token.ownerOf(id), to); + assertEq(token.balanceOf(to), 1); + assertEq(token.balanceOf(from), 0); + } + + function testSafeTransferFromToERC721Recipient(uint256 id) public { + address from = address(0xABCD); + + ERC721Recipient recipient = new ERC721Recipient(); + + token.mint(from, id); + + hevm.prank(from); + token.setApprovalForAll(address(this), true); + + token.safeTransferFrom(from, address(recipient), id); + + assertEq(token.getApproved(id), address(0)); + assertEq(token.ownerOf(id), address(recipient)); + assertEq(token.balanceOf(address(recipient)), 1); + assertEq(token.balanceOf(from), 0); + + assertEq(recipient.operator(), address(this)); + assertEq(recipient.from(), from); + assertEq(recipient.id(), id); + assertBytesEq(recipient.data(), ""); + } + + function testSafeTransferFromToERC721RecipientWithData(uint256 id, bytes calldata data) public { + address from = address(0xABCD); + ERC721Recipient recipient = new ERC721Recipient(); + + token.mint(from, id); + + hevm.prank(from); + token.setApprovalForAll(address(this), true); + + token.safeTransferFrom(from, address(recipient), id, data); + + assertEq(token.getApproved(id), address(0)); + assertEq(token.ownerOf(id), address(recipient)); + assertEq(token.balanceOf(address(recipient)), 1); + assertEq(token.balanceOf(from), 0); + + assertEq(recipient.operator(), address(this)); + assertEq(recipient.from(), from); + assertEq(recipient.id(), id); + assertBytesEq(recipient.data(), data); + } + + function testSafeMintToEOA(uint256 id, address to) public { + if (to == address(0)) to = address(0xBEEF); + + if (uint256(uint160(to)) <= 18 || to.code.length > 0) return; + + token.safeMint(to, id); + + assertEq(token.ownerOf(id), address(to)); + assertEq(token.balanceOf(address(to)), 1); + } + + function testSafeMintToERC721Recipient(uint256 id) public { + ERC721Recipient to = new ERC721Recipient(); + + token.safeMint(address(to), id); + + assertEq(token.ownerOf(id), address(to)); + assertEq(token.balanceOf(address(to)), 1); + + assertEq(to.operator(), address(this)); + assertEq(to.from(), address(0)); + assertEq(to.id(), id); + assertBytesEq(to.data(), ""); + } + + function testSafeMintToERC721RecipientWithData(uint256 id, bytes calldata data) public { + ERC721Recipient to = new ERC721Recipient(); + + token.safeMint(address(to), id, data); + + assertEq(token.ownerOf(id), address(to)); + assertEq(token.balanceOf(address(to)), 1); + + assertEq(to.operator(), address(this)); + assertEq(to.from(), address(0)); + assertEq(to.id(), id); + assertBytesEq(to.data(), data); + } + + function testFailMintToZero(uint256 id) public { + token.mint(address(0), id); + } + + function testFailDoubleMint(uint256 id, address to) public { + if (to == address(0)) to = address(0xBEEF); + + token.mint(to, id); + token.mint(to, id); + } + + function testFailBurnUnMinted(uint256 id) public { + token.burn(id); + } + + function testFailDoubleBurn(uint256 id, address to) public { + if (to == address(0)) to = address(0xBEEF); + + token.mint(to, id); + + token.burn(id); + token.burn(id); + } + + function testFailApproveUnMinted(uint256 id, address to) public { + token.approve(to, id); + } + + function testFailApproveUnAuthorized( + address owner, + uint256 id, + address to + ) public { + if (owner == address(0) || owner == address(this)) owner = address(0xBEEF); + + token.mint(owner, id); + + token.approve(to, id); + } + + function testFailTransferFromUnOwned( + address from, + address to, + uint256 id + ) public { + token.transferFrom(from, to, id); + } + + function testFailTransferFromWrongFrom( + address owner, + address from, + address to, + uint256 id + ) public { + if (owner == address(0)) to = address(0xBEEF); + if (from == owner) revert(); + + token.mint(owner, id); + + token.transferFrom(from, to, id); + } + + function testFailTransferFromToZero(uint256 id) public { + token.mint(address(this), id); + + token.transferFrom(address(this), address(0), id); + } + + function testFailTransferFromNotOwner( + address from, + address to, + uint256 id + ) public { + if (from == address(this)) from = address(0xBEEF); + + token.mint(from, id); + + token.transferFrom(from, to, id); + } + + function testFailSafeTransferFromToNonERC721Recipient(uint256 id) public { + token.mint(address(this), id); + + token.safeTransferFrom(address(this), address(new NonERC721Recipient()), id); + } + + function testFailSafeTransferFromToNonERC721RecipientWithData(uint256 id, bytes calldata data) public { + token.mint(address(this), id); + + token.safeTransferFrom(address(this), address(new NonERC721Recipient()), id, data); + } + + function testFailSafeTransferFromToRevertingERC721Recipient(uint256 id) public { + token.mint(address(this), id); + + token.safeTransferFrom(address(this), address(new RevertingERC721Recipient()), id); + } + + function testFailSafeTransferFromToRevertingERC721RecipientWithData(uint256 id, bytes calldata data) public { + token.mint(address(this), id); + + token.safeTransferFrom(address(this), address(new RevertingERC721Recipient()), id, data); + } + + function testFailSafeTransferFromToERC721RecipientWithWrongReturnData(uint256 id) public { + token.mint(address(this), id); + + token.safeTransferFrom(address(this), address(new WrongReturnDataERC721Recipient()), id); + } + + function testFailSafeTransferFromToERC721RecipientWithWrongReturnDataWithData(uint256 id, bytes calldata data) + public + { + token.mint(address(this), id); + + token.safeTransferFrom(address(this), address(new WrongReturnDataERC721Recipient()), id, data); + } + + function testFailSafeMintToNonERC721Recipient(uint256 id) public { + token.safeMint(address(new NonERC721Recipient()), id); + } + + function testFailSafeMintToNonERC721RecipientWithData(uint256 id, bytes calldata data) public { + token.safeMint(address(new NonERC721Recipient()), id, data); + } + + function testFailSafeMintToRevertingERC721Recipient(uint256 id) public { + token.safeMint(address(new RevertingERC721Recipient()), id); + } + + function testFailSafeMintToRevertingERC721RecipientWithData(uint256 id, bytes calldata data) public { + token.safeMint(address(new RevertingERC721Recipient()), id, data); + } + + function testFailSafeMintToERC721RecipientWithWrongReturnData(uint256 id) public { + token.safeMint(address(new WrongReturnDataERC721Recipient()), id); + } + + function testFailSafeMintToERC721RecipientWithWrongReturnDataWithData(uint256 id, bytes calldata data) public { + token.safeMint(address(new WrongReturnDataERC721Recipient()), id, data); + } + + function testFailOwnerOfUnminted(uint256 id) public view { + token.ownerOf(id); + } +} diff --git a/lib/solmate/src/test/FixedPointMathLib.t.sol b/lib/solmate/src/test/FixedPointMathLib.t.sol new file mode 100644 index 0000000..6e259f7 --- /dev/null +++ b/lib/solmate/src/test/FixedPointMathLib.t.sol @@ -0,0 +1,277 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity 0.8.10; + +import {DSTestPlus} from "./utils/DSTestPlus.sol"; + +import {FixedPointMathLib} from "../utils/FixedPointMathLib.sol"; + +contract FixedPointMathLibTest is DSTestPlus { + function testMulWadDown() public { + assertEq(FixedPointMathLib.mulWadDown(2.5e18, 0.5e18), 1.25e18); + assertEq(FixedPointMathLib.mulWadDown(3e18, 1e18), 3e18); + assertEq(FixedPointMathLib.mulWadDown(369, 271), 0); + } + + function testMulWadDownEdgeCases() public { + assertEq(FixedPointMathLib.mulWadDown(0, 1e18), 0); + assertEq(FixedPointMathLib.mulWadDown(1e18, 0), 0); + assertEq(FixedPointMathLib.mulWadDown(0, 0), 0); + } + + function testMulWadUp() public { + assertEq(FixedPointMathLib.mulWadUp(2.5e18, 0.5e18), 1.25e18); + assertEq(FixedPointMathLib.mulWadUp(3e18, 1e18), 3e18); + assertEq(FixedPointMathLib.mulWadUp(369, 271), 1); + } + + function testMulWadUpEdgeCases() public { + assertEq(FixedPointMathLib.mulWadUp(0, 1e18), 0); + assertEq(FixedPointMathLib.mulWadUp(1e18, 0), 0); + assertEq(FixedPointMathLib.mulWadUp(0, 0), 0); + } + + function testDivWadDown() public { + assertEq(FixedPointMathLib.divWadDown(1.25e18, 0.5e18), 2.5e18); + assertEq(FixedPointMathLib.divWadDown(3e18, 1e18), 3e18); + assertEq(FixedPointMathLib.divWadDown(2, 100000000000000e18), 0); + } + + function testDivWadDownEdgeCases() public { + assertEq(FixedPointMathLib.divWadDown(0, 1e18), 0); + } + + function testFailDivWadDownZeroDenominator() public pure { + FixedPointMathLib.divWadDown(1e18, 0); + } + + function testDivWadUp() public { + assertEq(FixedPointMathLib.divWadUp(1.25e18, 0.5e18), 2.5e18); + assertEq(FixedPointMathLib.divWadUp(3e18, 1e18), 3e18); + assertEq(FixedPointMathLib.divWadUp(2, 100000000000000e18), 1); + } + + function testDivWadUpEdgeCases() public { + assertEq(FixedPointMathLib.divWadUp(0, 1e18), 0); + } + + function testFailDivWadUpZeroDenominator() public pure { + FixedPointMathLib.divWadUp(1e18, 0); + } + + function testMulDivDown() public { + assertEq(FixedPointMathLib.mulDivDown(2.5e27, 0.5e27, 1e27), 1.25e27); + assertEq(FixedPointMathLib.mulDivDown(2.5e18, 0.5e18, 1e18), 1.25e18); + assertEq(FixedPointMathLib.mulDivDown(2.5e8, 0.5e8, 1e8), 1.25e8); + assertEq(FixedPointMathLib.mulDivDown(369, 271, 1e2), 999); + + assertEq(FixedPointMathLib.mulDivDown(1e27, 1e27, 2e27), 0.5e27); + assertEq(FixedPointMathLib.mulDivDown(1e18, 1e18, 2e18), 0.5e18); + assertEq(FixedPointMathLib.mulDivDown(1e8, 1e8, 2e8), 0.5e8); + + assertEq(FixedPointMathLib.mulDivDown(2e27, 3e27, 2e27), 3e27); + assertEq(FixedPointMathLib.mulDivDown(3e18, 2e18, 3e18), 2e18); + assertEq(FixedPointMathLib.mulDivDown(2e8, 3e8, 2e8), 3e8); + } + + function testMulDivDownEdgeCases() public { + assertEq(FixedPointMathLib.mulDivDown(0, 1e18, 1e18), 0); + assertEq(FixedPointMathLib.mulDivDown(1e18, 0, 1e18), 0); + assertEq(FixedPointMathLib.mulDivDown(0, 0, 1e18), 0); + } + + function testFailMulDivDownZeroDenominator() public pure { + FixedPointMathLib.mulDivDown(1e18, 1e18, 0); + } + + function testMulDivUp() public { + assertEq(FixedPointMathLib.mulDivUp(2.5e27, 0.5e27, 1e27), 1.25e27); + assertEq(FixedPointMathLib.mulDivUp(2.5e18, 0.5e18, 1e18), 1.25e18); + assertEq(FixedPointMathLib.mulDivUp(2.5e8, 0.5e8, 1e8), 1.25e8); + assertEq(FixedPointMathLib.mulDivUp(369, 271, 1e2), 1000); + + assertEq(FixedPointMathLib.mulDivUp(1e27, 1e27, 2e27), 0.5e27); + assertEq(FixedPointMathLib.mulDivUp(1e18, 1e18, 2e18), 0.5e18); + assertEq(FixedPointMathLib.mulDivUp(1e8, 1e8, 2e8), 0.5e8); + + assertEq(FixedPointMathLib.mulDivUp(2e27, 3e27, 2e27), 3e27); + assertEq(FixedPointMathLib.mulDivUp(3e18, 2e18, 3e18), 2e18); + assertEq(FixedPointMathLib.mulDivUp(2e8, 3e8, 2e8), 3e8); + } + + function testMulDivUpEdgeCases() public { + assertEq(FixedPointMathLib.mulDivUp(0, 1e18, 1e18), 0); + assertEq(FixedPointMathLib.mulDivUp(1e18, 0, 1e18), 0); + assertEq(FixedPointMathLib.mulDivUp(0, 0, 1e18), 0); + } + + function testFailMulDivUpZeroDenominator() public pure { + FixedPointMathLib.mulDivUp(1e18, 1e18, 0); + } + + function testRPow() public { + assertEq(FixedPointMathLib.rpow(2e27, 2, 1e27), 4e27); + assertEq(FixedPointMathLib.rpow(2e18, 2, 1e18), 4e18); + assertEq(FixedPointMathLib.rpow(2e8, 2, 1e8), 4e8); + assertEq(FixedPointMathLib.rpow(8, 3, 1), 512); + } + + function testSqrt() public { + assertEq(FixedPointMathLib.sqrt(0), 0); + assertEq(FixedPointMathLib.sqrt(1), 1); + assertEq(FixedPointMathLib.sqrt(2704), 52); + assertEq(FixedPointMathLib.sqrt(110889), 333); + assertEq(FixedPointMathLib.sqrt(32239684), 5678); + } + + function testMulWadDown(uint256 x, uint256 y) public { + // Ignore cases where x * y overflows. + unchecked { + if (x != 0 && (x * y) / x != y) return; + } + + assertEq(FixedPointMathLib.mulWadDown(x, y), (x * y) / 1e18); + } + + function testFailMulWadDownOverflow(uint256 x, uint256 y) public pure { + // Ignore cases where x * y does not overflow. + unchecked { + if ((x * y) / x == y) revert(); + } + + FixedPointMathLib.mulWadDown(x, y); + } + + function testMulWadUp(uint256 x, uint256 y) public { + // Ignore cases where x * y overflows. + unchecked { + if (x != 0 && (x * y) / x != y) return; + } + + assertEq(FixedPointMathLib.mulWadUp(x, y), x * y == 0 ? 0 : (x * y - 1) / 1e18 + 1); + } + + function testFailMulWadUpOverflow(uint256 x, uint256 y) public pure { + // Ignore cases where x * y does not overflow. + unchecked { + if ((x * y) / x == y) revert(); + } + + FixedPointMathLib.mulWadUp(x, y); + } + + function testDivWadDown(uint256 x, uint256 y) public { + // Ignore cases where x * WAD overflows or y is 0. + unchecked { + if (y == 0 || (x != 0 && (x * 1e18) / 1e18 != x)) return; + } + + assertEq(FixedPointMathLib.divWadDown(x, y), (x * 1e18) / y); + } + + function testFailDivWadDownOverflow(uint256 x, uint256 y) public pure { + // Ignore cases where x * WAD does not overflow or y is 0. + unchecked { + if (y == 0 || (x * 1e18) / 1e18 == x) revert(); + } + + FixedPointMathLib.divWadDown(x, y); + } + + function testFailDivWadDownZeroDenominator(uint256 x) public pure { + FixedPointMathLib.divWadDown(x, 0); + } + + function testDivWadUp(uint256 x, uint256 y) public { + // Ignore cases where x * WAD overflows or y is 0. + unchecked { + if (y == 0 || (x != 0 && (x * 1e18) / 1e18 != x)) return; + } + + assertEq(FixedPointMathLib.divWadUp(x, y), x == 0 ? 0 : (x * 1e18 - 1) / y + 1); + } + + function testFailDivWadUpOverflow(uint256 x, uint256 y) public pure { + // Ignore cases where x * WAD does not overflow or y is 0. + unchecked { + if (y == 0 || (x * 1e18) / 1e18 == x) revert(); + } + + FixedPointMathLib.divWadUp(x, y); + } + + function testFailDivWadUpZeroDenominator(uint256 x) public pure { + FixedPointMathLib.divWadUp(x, 0); + } + + function testMulDivDown( + uint256 x, + uint256 y, + uint256 denominator + ) public { + // Ignore cases where x * y overflows or denominator is 0. + unchecked { + if (denominator == 0 || (x != 0 && (x * y) / x != y)) return; + } + + assertEq(FixedPointMathLib.mulDivDown(x, y, denominator), (x * y) / denominator); + } + + function testFailMulDivDownOverflow( + uint256 x, + uint256 y, + uint256 denominator + ) public pure { + // Ignore cases where x * y does not overflow or denominator is 0. + unchecked { + if (denominator == 0 || (x * y) / x == y) revert(); + } + + FixedPointMathLib.mulDivDown(x, y, denominator); + } + + function testFailMulDivDownZeroDenominator(uint256 x, uint256 y) public pure { + FixedPointMathLib.mulDivDown(x, y, 0); + } + + function testMulDivUp( + uint256 x, + uint256 y, + uint256 denominator + ) public { + // Ignore cases where x * y overflows or denominator is 0. + unchecked { + if (denominator == 0 || (x != 0 && (x * y) / x != y)) return; + } + + assertEq(FixedPointMathLib.mulDivUp(x, y, denominator), x * y == 0 ? 0 : (x * y - 1) / denominator + 1); + } + + function testFailMulDivUpOverflow( + uint256 x, + uint256 y, + uint256 denominator + ) public pure { + // Ignore cases where x * y does not overflow or denominator is 0. + unchecked { + if (denominator == 0 || (x * y) / x == y) revert(); + } + + FixedPointMathLib.mulDivUp(x, y, denominator); + } + + function testFailMulDivUpZeroDenominator(uint256 x, uint256 y) public pure { + FixedPointMathLib.mulDivUp(x, y, 0); + } + + function testSqrt(uint256 x) public { + uint256 root = FixedPointMathLib.sqrt(x); + uint256 next = root + 1; + + // Ignore cases where next * next overflows. + unchecked { + if (next * next < next) return; + } + + assertTrue(root * root <= x && next * next > x); + } +} diff --git a/lib/solmate/src/test/MultiRolesAuthority.t.sol b/lib/solmate/src/test/MultiRolesAuthority.t.sol new file mode 100644 index 0000000..8530887 --- /dev/null +++ b/lib/solmate/src/test/MultiRolesAuthority.t.sol @@ -0,0 +1,321 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity 0.8.10; + +import {DSTestPlus} from "./utils/DSTestPlus.sol"; +import {MockAuthority} from "./utils/mocks/MockAuthority.sol"; + +import {Authority} from "../auth/Auth.sol"; + +import {MultiRolesAuthority} from "../auth/authorities/MultiRolesAuthority.sol"; + +contract MultiRolesAuthorityTest is DSTestPlus { + MultiRolesAuthority multiRolesAuthority; + + function setUp() public { + multiRolesAuthority = new MultiRolesAuthority(address(this), Authority(address(0))); + } + + function testSetRoles() public { + assertFalse(multiRolesAuthority.doesUserHaveRole(address(0xBEEF), 0)); + + multiRolesAuthority.setUserRole(address(0xBEEF), 0, true); + assertTrue(multiRolesAuthority.doesUserHaveRole(address(0xBEEF), 0)); + + multiRolesAuthority.setUserRole(address(0xBEEF), 0, false); + assertFalse(multiRolesAuthority.doesUserHaveRole(address(0xBEEF), 0)); + } + + function testSetRoleCapabilities() public { + assertFalse(multiRolesAuthority.doesRoleHaveCapability(0, 0xBEEFCAFE)); + + multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, true); + assertTrue(multiRolesAuthority.doesRoleHaveCapability(0, 0xBEEFCAFE)); + + multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, false); + assertFalse(multiRolesAuthority.doesRoleHaveCapability(0, 0xBEEFCAFE)); + } + + function testSetPublicCapabilities() public { + assertFalse(multiRolesAuthority.isCapabilityPublic(0xBEEFCAFE)); + + multiRolesAuthority.setPublicCapability(0xBEEFCAFE, true); + assertTrue(multiRolesAuthority.isCapabilityPublic(0xBEEFCAFE)); + + multiRolesAuthority.setPublicCapability(0xBEEFCAFE, false); + assertFalse(multiRolesAuthority.isCapabilityPublic(0xBEEFCAFE)); + } + + function testSetTargetCustomAuthority() public { + assertEq(address(multiRolesAuthority.getTargetCustomAuthority(address(0xBEEF))), address(0)); + + multiRolesAuthority.setTargetCustomAuthority(address(0xBEEF), Authority(address(0xCAFE))); + assertEq(address(multiRolesAuthority.getTargetCustomAuthority(address(0xBEEF))), address(0xCAFE)); + + multiRolesAuthority.setTargetCustomAuthority(address(0xBEEF), Authority(address(0))); + assertEq(address(multiRolesAuthority.getTargetCustomAuthority(address(0xBEEF))), address(0)); + } + + function testCanCallWithAuthorizedRole() public { + assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + multiRolesAuthority.setUserRole(address(0xBEEF), 0, true); + assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, true); + assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, false); + assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, true); + assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + multiRolesAuthority.setUserRole(address(0xBEEF), 0, false); + assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + } + + function testCanCallPublicCapability() public { + assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + multiRolesAuthority.setPublicCapability(0xBEEFCAFE, true); + assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + multiRolesAuthority.setPublicCapability(0xBEEFCAFE, false); + assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + } + + function testCanCallWithCustomAuthority() public { + assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(false)); + assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(true)); + assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(false)); + assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), Authority(address(0))); + assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(true)); + assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + } + + function testCanCallWithCustomAuthorityOverridesPublicCapability() public { + assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + multiRolesAuthority.setPublicCapability(0xBEEFCAFE, true); + assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(false)); + assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(true)); + assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + multiRolesAuthority.setPublicCapability(0xBEEFCAFE, false); + assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), Authority(address(0))); + assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + multiRolesAuthority.setPublicCapability(0xBEEFCAFE, true); + assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + } + + function testCanCallWithCustomAuthorityOverridesUserWithRole() public { + assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + multiRolesAuthority.setUserRole(address(0xBEEF), 0, true); + assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, true); + assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(false)); + assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(true)); + assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + multiRolesAuthority.setUserRole(address(0xBEEF), 0, false); + assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), Authority(address(0))); + assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + multiRolesAuthority.setUserRole(address(0xBEEF), 0, true); + assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, false); + assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + multiRolesAuthority.setUserRole(address(0xBEEF), 0, false); + assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + } + + function testSetRoles(address user, uint8 role) public { + assertFalse(multiRolesAuthority.doesUserHaveRole(user, role)); + + multiRolesAuthority.setUserRole(user, role, true); + assertTrue(multiRolesAuthority.doesUserHaveRole(user, role)); + + multiRolesAuthority.setUserRole(user, role, false); + assertFalse(multiRolesAuthority.doesUserHaveRole(user, role)); + } + + function testSetRoleCapabilities(uint8 role, bytes4 functionSig) public { + assertFalse(multiRolesAuthority.doesRoleHaveCapability(role, functionSig)); + + multiRolesAuthority.setRoleCapability(role, functionSig, true); + assertTrue(multiRolesAuthority.doesRoleHaveCapability(role, functionSig)); + + multiRolesAuthority.setRoleCapability(role, functionSig, false); + assertFalse(multiRolesAuthority.doesRoleHaveCapability(role, functionSig)); + } + + function testSetPublicCapabilities(bytes4 functionSig) public { + assertFalse(multiRolesAuthority.isCapabilityPublic(functionSig)); + + multiRolesAuthority.setPublicCapability(functionSig, true); + assertTrue(multiRolesAuthority.isCapabilityPublic(functionSig)); + + multiRolesAuthority.setPublicCapability(functionSig, false); + assertFalse(multiRolesAuthority.isCapabilityPublic(functionSig)); + } + + function testSetTargetCustomAuthority(address user, Authority customAuthority) public { + assertEq(address(multiRolesAuthority.getTargetCustomAuthority(user)), address(0)); + + multiRolesAuthority.setTargetCustomAuthority(user, customAuthority); + assertEq(address(multiRolesAuthority.getTargetCustomAuthority(user)), address(customAuthority)); + + multiRolesAuthority.setTargetCustomAuthority(user, Authority(address(0))); + assertEq(address(multiRolesAuthority.getTargetCustomAuthority(user)), address(0)); + } + + function testCanCallWithAuthorizedRole( + address user, + uint8 role, + address target, + bytes4 functionSig + ) public { + assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); + + multiRolesAuthority.setUserRole(user, role, true); + assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); + + multiRolesAuthority.setRoleCapability(role, functionSig, true); + assertTrue(multiRolesAuthority.canCall(user, target, functionSig)); + + multiRolesAuthority.setRoleCapability(role, functionSig, false); + assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); + + multiRolesAuthority.setRoleCapability(role, functionSig, true); + assertTrue(multiRolesAuthority.canCall(user, target, functionSig)); + + multiRolesAuthority.setUserRole(user, role, false); + assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); + } + + function testCanCallPublicCapability( + address user, + address target, + bytes4 functionSig + ) public { + assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); + + multiRolesAuthority.setPublicCapability(functionSig, true); + assertTrue(multiRolesAuthority.canCall(user, target, functionSig)); + + multiRolesAuthority.setPublicCapability(functionSig, false); + assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); + } + + function testCanCallWithCustomAuthority( + address user, + address target, + bytes4 functionSig + ) public { + assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); + + multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(false)); + assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); + + multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(true)); + assertTrue(multiRolesAuthority.canCall(user, target, functionSig)); + + multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(false)); + assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); + + multiRolesAuthority.setTargetCustomAuthority(target, Authority(address(0))); + assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); + + multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(true)); + assertTrue(multiRolesAuthority.canCall(user, target, functionSig)); + } + + function testCanCallWithCustomAuthorityOverridesPublicCapability( + address user, + address target, + bytes4 functionSig + ) public { + assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); + + multiRolesAuthority.setPublicCapability(functionSig, true); + assertTrue(multiRolesAuthority.canCall(user, target, functionSig)); + + multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(false)); + assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); + + multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(true)); + assertTrue(multiRolesAuthority.canCall(user, target, functionSig)); + + multiRolesAuthority.setPublicCapability(functionSig, false); + assertTrue(multiRolesAuthority.canCall(user, target, functionSig)); + + multiRolesAuthority.setTargetCustomAuthority(target, Authority(address(0))); + assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); + + multiRolesAuthority.setPublicCapability(functionSig, true); + assertTrue(multiRolesAuthority.canCall(user, target, functionSig)); + } + + function testCanCallWithCustomAuthorityOverridesUserWithRole( + address user, + uint8 role, + address target, + bytes4 functionSig + ) public { + assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); + + multiRolesAuthority.setUserRole(user, role, true); + assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); + + multiRolesAuthority.setRoleCapability(role, functionSig, true); + assertTrue(multiRolesAuthority.canCall(user, target, functionSig)); + + multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(false)); + assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); + + multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(true)); + assertTrue(multiRolesAuthority.canCall(user, target, functionSig)); + + multiRolesAuthority.setUserRole(user, role, false); + assertTrue(multiRolesAuthority.canCall(user, target, functionSig)); + + multiRolesAuthority.setTargetCustomAuthority(target, Authority(address(0))); + assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); + + multiRolesAuthority.setUserRole(user, role, true); + assertTrue(multiRolesAuthority.canCall(user, target, functionSig)); + + multiRolesAuthority.setRoleCapability(role, functionSig, false); + assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); + + multiRolesAuthority.setUserRole(user, role, false); + assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); + } +} diff --git a/lib/solmate/src/test/Owned.t.sol b/lib/solmate/src/test/Owned.t.sol new file mode 100644 index 0000000..6c30c10 --- /dev/null +++ b/lib/solmate/src/test/Owned.t.sol @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity 0.8.10; + +import {DSTestPlus} from "./utils/DSTestPlus.sol"; +import {MockOwned} from "./utils/mocks/MockOwned.sol"; + +contract OwnedTest is DSTestPlus { + MockOwned mockOwned; + + function setUp() public { + mockOwned = new MockOwned(); + } + + function testSetOwner() public { + testSetOwner(address(0xBEEF)); + } + + function testCallFunctionAsNonOwner() public { + testCallFunctionAsNonOwner(address(0)); + } + + function testCallFunctionAsOwner() public { + mockOwned.updateFlag(); + } + + function testSetOwner(address newOwner) public { + mockOwned.setOwner(newOwner); + + assertEq(mockOwned.owner(), newOwner); + } + + function testCallFunctionAsNonOwner(address owner) public { + hevm.assume(owner != address(this)); + + mockOwned.setOwner(owner); + + hevm.expectRevert("UNAUTHORIZED"); + mockOwned.updateFlag(); + } +} diff --git a/lib/solmate/src/test/ReentrancyGuard.t.sol b/lib/solmate/src/test/ReentrancyGuard.t.sol new file mode 100644 index 0000000..eb8a36c --- /dev/null +++ b/lib/solmate/src/test/ReentrancyGuard.t.sol @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity 0.8.10; + +import {DSTestPlus} from "./utils/DSTestPlus.sol"; + +import {ReentrancyGuard} from "../utils/ReentrancyGuard.sol"; + +contract RiskyContract is ReentrancyGuard { + uint256 public enterTimes; + + function unprotectedCall() public { + enterTimes++; + + if (enterTimes > 1) return; + + protectedCall(); + } + + function protectedCall() public nonReentrant { + enterTimes++; + + if (enterTimes > 1) return; + + protectedCall(); + } + + function overprotectedCall() public nonReentrant {} +} + +contract ReentrancyGuardTest is DSTestPlus { + RiskyContract riskyContract; + + function setUp() public { + riskyContract = new RiskyContract(); + } + + function invariantReentrancyStatusAlways1() public { + assertEq(uint256(hevm.load(address(riskyContract), 0)), 1); + } + + function testFailUnprotectedCall() public { + riskyContract.unprotectedCall(); + + assertEq(riskyContract.enterTimes(), 1); + } + + function testProtectedCall() public { + try riskyContract.protectedCall() { + fail("Reentrancy Guard Failed To Stop Attacker"); + } catch {} + } + + function testNoReentrancy() public { + riskyContract.overprotectedCall(); + } +} diff --git a/lib/solmate/src/test/RolesAuthority.t.sol b/lib/solmate/src/test/RolesAuthority.t.sol new file mode 100644 index 0000000..88c43fc --- /dev/null +++ b/lib/solmate/src/test/RolesAuthority.t.sol @@ -0,0 +1,148 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity 0.8.10; + +import {DSTestPlus} from "./utils/DSTestPlus.sol"; +import {MockAuthority} from "./utils/mocks/MockAuthority.sol"; + +import {Authority} from "../auth/Auth.sol"; + +import {RolesAuthority} from "../auth/authorities/RolesAuthority.sol"; + +contract RolesAuthorityTest is DSTestPlus { + RolesAuthority rolesAuthority; + + function setUp() public { + rolesAuthority = new RolesAuthority(address(this), Authority(address(0))); + } + + function testSetRoles() public { + assertFalse(rolesAuthority.doesUserHaveRole(address(0xBEEF), 0)); + + rolesAuthority.setUserRole(address(0xBEEF), 0, true); + assertTrue(rolesAuthority.doesUserHaveRole(address(0xBEEF), 0)); + + rolesAuthority.setUserRole(address(0xBEEF), 0, false); + assertFalse(rolesAuthority.doesUserHaveRole(address(0xBEEF), 0)); + } + + function testSetRoleCapabilities() public { + assertFalse(rolesAuthority.doesRoleHaveCapability(0, address(0xCAFE), 0xBEEFCAFE)); + + rolesAuthority.setRoleCapability(0, address(0xCAFE), 0xBEEFCAFE, true); + assertTrue(rolesAuthority.doesRoleHaveCapability(0, address(0xCAFE), 0xBEEFCAFE)); + + rolesAuthority.setRoleCapability(0, address(0xCAFE), 0xBEEFCAFE, false); + assertFalse(rolesAuthority.doesRoleHaveCapability(0, address(0xCAFE), 0xBEEFCAFE)); + } + + function testSetPublicCapabilities() public { + assertFalse(rolesAuthority.isCapabilityPublic(address(0xCAFE), 0xBEEFCAFE)); + + rolesAuthority.setPublicCapability(address(0xCAFE), 0xBEEFCAFE, true); + assertTrue(rolesAuthority.isCapabilityPublic(address(0xCAFE), 0xBEEFCAFE)); + + rolesAuthority.setPublicCapability(address(0xCAFE), 0xBEEFCAFE, false); + assertFalse(rolesAuthority.isCapabilityPublic(address(0xCAFE), 0xBEEFCAFE)); + } + + function testCanCallWithAuthorizedRole() public { + assertFalse(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + rolesAuthority.setUserRole(address(0xBEEF), 0, true); + assertFalse(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + rolesAuthority.setRoleCapability(0, address(0xCAFE), 0xBEEFCAFE, true); + assertTrue(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + rolesAuthority.setRoleCapability(0, address(0xCAFE), 0xBEEFCAFE, false); + assertFalse(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + rolesAuthority.setRoleCapability(0, address(0xCAFE), 0xBEEFCAFE, true); + assertTrue(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + rolesAuthority.setUserRole(address(0xBEEF), 0, false); + assertFalse(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + } + + function testCanCallPublicCapability() public { + assertFalse(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + rolesAuthority.setPublicCapability(address(0xCAFE), 0xBEEFCAFE, true); + assertTrue(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + + rolesAuthority.setPublicCapability(address(0xCAFE), 0xBEEFCAFE, false); + assertFalse(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); + } + + function testSetRoles(address user, uint8 role) public { + assertFalse(rolesAuthority.doesUserHaveRole(user, role)); + + rolesAuthority.setUserRole(user, role, true); + assertTrue(rolesAuthority.doesUserHaveRole(user, role)); + + rolesAuthority.setUserRole(user, role, false); + assertFalse(rolesAuthority.doesUserHaveRole(user, role)); + } + + function testSetRoleCapabilities( + uint8 role, + address target, + bytes4 functionSig + ) public { + assertFalse(rolesAuthority.doesRoleHaveCapability(role, target, functionSig)); + + rolesAuthority.setRoleCapability(role, target, functionSig, true); + assertTrue(rolesAuthority.doesRoleHaveCapability(role, target, functionSig)); + + rolesAuthority.setRoleCapability(role, target, functionSig, false); + assertFalse(rolesAuthority.doesRoleHaveCapability(role, target, functionSig)); + } + + function testSetPublicCapabilities(address target, bytes4 functionSig) public { + assertFalse(rolesAuthority.isCapabilityPublic(target, functionSig)); + + rolesAuthority.setPublicCapability(target, functionSig, true); + assertTrue(rolesAuthority.isCapabilityPublic(target, functionSig)); + + rolesAuthority.setPublicCapability(target, functionSig, false); + assertFalse(rolesAuthority.isCapabilityPublic(target, functionSig)); + } + + function testCanCallWithAuthorizedRole( + address user, + uint8 role, + address target, + bytes4 functionSig + ) public { + assertFalse(rolesAuthority.canCall(user, target, functionSig)); + + rolesAuthority.setUserRole(user, role, true); + assertFalse(rolesAuthority.canCall(user, target, functionSig)); + + rolesAuthority.setRoleCapability(role, target, functionSig, true); + assertTrue(rolesAuthority.canCall(user, target, functionSig)); + + rolesAuthority.setRoleCapability(role, target, functionSig, false); + assertFalse(rolesAuthority.canCall(user, target, functionSig)); + + rolesAuthority.setRoleCapability(role, target, functionSig, true); + assertTrue(rolesAuthority.canCall(user, target, functionSig)); + + rolesAuthority.setUserRole(user, role, false); + assertFalse(rolesAuthority.canCall(user, target, functionSig)); + } + + function testCanCallPublicCapability( + address user, + address target, + bytes4 functionSig + ) public { + assertFalse(rolesAuthority.canCall(user, target, functionSig)); + + rolesAuthority.setPublicCapability(target, functionSig, true); + assertTrue(rolesAuthority.canCall(user, target, functionSig)); + + rolesAuthority.setPublicCapability(target, functionSig, false); + assertFalse(rolesAuthority.canCall(user, target, functionSig)); + } +} diff --git a/lib/solmate/src/test/SSTORE2.t.sol b/lib/solmate/src/test/SSTORE2.t.sol new file mode 100644 index 0000000..5dbe196 --- /dev/null +++ b/lib/solmate/src/test/SSTORE2.t.sol @@ -0,0 +1,152 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity 0.8.10; + +import {DSTestPlus} from "./utils/DSTestPlus.sol"; + +import {SSTORE2} from "../utils/SSTORE2.sol"; + +contract SSTORE2Test is DSTestPlus { + function testWriteRead() public { + bytes memory testBytes = abi.encode("this is a test"); + + address pointer = SSTORE2.write(testBytes); + + assertBytesEq(SSTORE2.read(pointer), testBytes); + } + + function testWriteReadFullStartBound() public { + assertBytesEq(SSTORE2.read(SSTORE2.write(hex"11223344"), 0), hex"11223344"); + } + + function testWriteReadCustomStartBound() public { + assertBytesEq(SSTORE2.read(SSTORE2.write(hex"11223344"), 1), hex"223344"); + } + + function testWriteReadFullBoundedRead() public { + bytes memory testBytes = abi.encode("this is a test"); + + assertBytesEq(SSTORE2.read(SSTORE2.write(testBytes), 0, testBytes.length), testBytes); + } + + function testWriteReadCustomBounds() public { + assertBytesEq(SSTORE2.read(SSTORE2.write(hex"11223344"), 1, 3), hex"2233"); + } + + function testWriteReadEmptyBound() public { + SSTORE2.read(SSTORE2.write(hex"11223344"), 3, 3); + } + + function testFailReadInvalidPointer() public view { + SSTORE2.read(DEAD_ADDRESS); + } + + function testFailReadInvalidPointerCustomStartBound() public view { + SSTORE2.read(DEAD_ADDRESS, 1); + } + + function testFailReadInvalidPointerCustomBounds() public view { + SSTORE2.read(DEAD_ADDRESS, 2, 4); + } + + function testFailWriteReadOutOfStartBound() public { + SSTORE2.read(SSTORE2.write(hex"11223344"), 41000); + } + + function testFailWriteReadEmptyOutOfBounds() public { + SSTORE2.read(SSTORE2.write(hex"11223344"), 42000, 42000); + } + + function testFailWriteReadOutOfBounds() public { + SSTORE2.read(SSTORE2.write(hex"11223344"), 41000, 42000); + } + + function testWriteRead(bytes calldata testBytes, bytes calldata brutalizeWith) + public + brutalizeMemory(brutalizeWith) + { + assertBytesEq(SSTORE2.read(SSTORE2.write(testBytes)), testBytes); + } + + function testWriteReadCustomStartBound( + bytes calldata testBytes, + uint256 startIndex, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + if (testBytes.length == 0) return; + + startIndex = bound(startIndex, 0, testBytes.length); + + assertBytesEq(SSTORE2.read(SSTORE2.write(testBytes), startIndex), bytes(testBytes[startIndex:])); + } + + function testWriteReadCustomBounds( + bytes calldata testBytes, + uint256 startIndex, + uint256 endIndex, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + if (testBytes.length == 0) return; + + endIndex = bound(endIndex, 0, testBytes.length); + startIndex = bound(startIndex, 0, testBytes.length); + + if (startIndex > endIndex) return; + + assertBytesEq( + SSTORE2.read(SSTORE2.write(testBytes), startIndex, endIndex), + bytes(testBytes[startIndex:endIndex]) + ); + } + + function testFailReadInvalidPointer(address pointer, bytes calldata brutalizeWith) + public + view + brutalizeMemory(brutalizeWith) + { + if (pointer.code.length > 0) revert(); + + SSTORE2.read(pointer); + } + + function testFailReadInvalidPointerCustomStartBound( + address pointer, + uint256 startIndex, + bytes calldata brutalizeWith + ) public view brutalizeMemory(brutalizeWith) { + if (pointer.code.length > 0) revert(); + + SSTORE2.read(pointer, startIndex); + } + + function testFailReadInvalidPointerCustomBounds( + address pointer, + uint256 startIndex, + uint256 endIndex, + bytes calldata brutalizeWith + ) public view brutalizeMemory(brutalizeWith) { + if (pointer.code.length > 0) revert(); + + SSTORE2.read(pointer, startIndex, endIndex); + } + + function testFailWriteReadCustomStartBoundOutOfRange( + bytes calldata testBytes, + uint256 startIndex, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + startIndex = bound(startIndex, testBytes.length + 1, type(uint256).max); + + SSTORE2.read(SSTORE2.write(testBytes), startIndex); + } + + function testFailWriteReadCustomBoundsOutOfRange( + bytes calldata testBytes, + uint256 startIndex, + uint256 endIndex, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + endIndex = bound(endIndex, testBytes.length + 1, type(uint256).max); + + SSTORE2.read(SSTORE2.write(testBytes), startIndex, endIndex); + } +} diff --git a/lib/solmate/src/test/SafeCastLib.t.sol b/lib/solmate/src/test/SafeCastLib.t.sol new file mode 100644 index 0000000..48a2a76 --- /dev/null +++ b/lib/solmate/src/test/SafeCastLib.t.sol @@ -0,0 +1,197 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity 0.8.10; + +import {DSTestPlus} from "./utils/DSTestPlus.sol"; + +import {SafeCastLib} from "../utils/SafeCastLib.sol"; + +contract SafeCastLibTest is DSTestPlus { + function testSafeCastTo248() public { + assertEq(SafeCastLib.safeCastTo248(2.5e45), 2.5e45); + assertEq(SafeCastLib.safeCastTo248(2.5e27), 2.5e27); + } + + function testSafeCastTo224() public { + assertEq(SafeCastLib.safeCastTo224(2.5e36), 2.5e36); + assertEq(SafeCastLib.safeCastTo224(2.5e27), 2.5e27); + } + + function testSafeCastTo192() public { + assertEq(SafeCastLib.safeCastTo192(2.5e36), 2.5e36); + assertEq(SafeCastLib.safeCastTo192(2.5e27), 2.5e27); + } + + function testSafeCastTo160() public { + assertEq(SafeCastLib.safeCastTo160(2.5e36), 2.5e36); + assertEq(SafeCastLib.safeCastTo160(2.5e27), 2.5e27); + } + + function testSafeCastTo128() public { + assertEq(SafeCastLib.safeCastTo128(2.5e27), 2.5e27); + assertEq(SafeCastLib.safeCastTo128(2.5e18), 2.5e18); + } + + function testSafeCastTo96() public { + assertEq(SafeCastLib.safeCastTo96(2.5e18), 2.5e18); + assertEq(SafeCastLib.safeCastTo96(2.5e17), 2.5e17); + } + + function testSafeCastTo64() public { + assertEq(SafeCastLib.safeCastTo64(2.5e18), 2.5e18); + assertEq(SafeCastLib.safeCastTo64(2.5e17), 2.5e17); + } + + function testSafeCastTo32() public { + assertEq(SafeCastLib.safeCastTo32(2.5e8), 2.5e8); + assertEq(SafeCastLib.safeCastTo32(2.5e7), 2.5e7); + } + + function testSafeCastTo8() public { + assertEq(SafeCastLib.safeCastTo8(100), 100); + assertEq(SafeCastLib.safeCastTo8(250), 250); + } + + function testFailSafeCastTo248() public pure { + SafeCastLib.safeCastTo248(type(uint248).max + 1); + } + + function testFailSafeCastTo224() public pure { + SafeCastLib.safeCastTo224(type(uint224).max + 1); + } + + function testFailSafeCastTo192() public pure { + SafeCastLib.safeCastTo192(type(uint192).max + 1); + } + + function testFailSafeCastTo160() public pure { + SafeCastLib.safeCastTo160(type(uint160).max + 1); + } + + function testFailSafeCastTo128() public pure { + SafeCastLib.safeCastTo128(type(uint128).max + 1); + } + + function testFailSafeCastTo96() public pure { + SafeCastLib.safeCastTo96(type(uint96).max + 1); + } + + function testFailSafeCastTo64() public pure { + SafeCastLib.safeCastTo64(type(uint64).max + 1); + } + + function testFailSafeCastTo32() public pure { + SafeCastLib.safeCastTo32(type(uint32).max + 1); + } + + function testFailSafeCastTo8() public pure { + SafeCastLib.safeCastTo8(type(uint8).max + 1); + } + + function testSafeCastTo248(uint256 x) public { + x = bound(x, 0, type(uint248).max); + + assertEq(SafeCastLib.safeCastTo248(x), x); + } + + function testSafeCastTo224(uint256 x) public { + x = bound(x, 0, type(uint224).max); + + assertEq(SafeCastLib.safeCastTo224(x), x); + } + + function testSafeCastTo192(uint256 x) public { + x = bound(x, 0, type(uint192).max); + + assertEq(SafeCastLib.safeCastTo192(x), x); + } + + function testSafeCastTo160(uint256 x) public { + x = bound(x, 0, type(uint160).max); + + assertEq(SafeCastLib.safeCastTo160(x), x); + } + + function testSafeCastTo128(uint256 x) public { + x = bound(x, 0, type(uint128).max); + + assertEq(SafeCastLib.safeCastTo128(x), x); + } + + function testSafeCastTo96(uint256 x) public { + x = bound(x, 0, type(uint96).max); + + assertEq(SafeCastLib.safeCastTo96(x), x); + } + + function testSafeCastTo64(uint256 x) public { + x = bound(x, 0, type(uint64).max); + + assertEq(SafeCastLib.safeCastTo64(x), x); + } + + function testSafeCastTo32(uint256 x) public { + x = bound(x, 0, type(uint32).max); + + assertEq(SafeCastLib.safeCastTo32(x), x); + } + + function testSafeCastTo8(uint256 x) public { + x = bound(x, 0, type(uint8).max); + + assertEq(SafeCastLib.safeCastTo8(x), x); + } + + function testFailSafeCastTo248(uint256 x) public { + x = bound(x, type(uint248).max + 1, type(uint256).max); + + SafeCastLib.safeCastTo248(x); + } + + function testFailSafeCastTo224(uint256 x) public { + x = bound(x, type(uint224).max + 1, type(uint256).max); + + SafeCastLib.safeCastTo224(x); + } + + function testFailSafeCastTo192(uint256 x) public { + x = bound(x, type(uint192).max + 1, type(uint256).max); + + SafeCastLib.safeCastTo192(x); + } + + function testFailSafeCastTo160(uint256 x) public { + x = bound(x, type(uint160).max + 1, type(uint256).max); + + SafeCastLib.safeCastTo160(x); + } + + function testFailSafeCastTo128(uint256 x) public { + x = bound(x, type(uint128).max + 1, type(uint256).max); + + SafeCastLib.safeCastTo128(x); + } + + function testFailSafeCastTo96(uint256 x) public { + x = bound(x, type(uint96).max + 1, type(uint256).max); + + SafeCastLib.safeCastTo96(x); + } + + function testFailSafeCastTo64(uint256 x) public { + x = bound(x, type(uint64).max + 1, type(uint256).max); + + SafeCastLib.safeCastTo64(x); + } + + function testFailSafeCastTo32(uint256 x) public { + x = bound(x, type(uint32).max + 1, type(uint256).max); + + SafeCastLib.safeCastTo32(x); + } + + function testFailSafeCastTo8(uint256 x) public { + x = bound(x, type(uint8).max + 1, type(uint256).max); + + SafeCastLib.safeCastTo8(x); + } +} diff --git a/lib/solmate/src/test/SafeTransferLib.t.sol b/lib/solmate/src/test/SafeTransferLib.t.sol new file mode 100644 index 0000000..ebae33a --- /dev/null +++ b/lib/solmate/src/test/SafeTransferLib.t.sol @@ -0,0 +1,610 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity 0.8.10; + +import {MockERC20} from "./utils/mocks/MockERC20.sol"; +import {RevertingToken} from "./utils/weird-tokens/RevertingToken.sol"; +import {ReturnsTwoToken} from "./utils/weird-tokens/ReturnsTwoToken.sol"; +import {ReturnsFalseToken} from "./utils/weird-tokens/ReturnsFalseToken.sol"; +import {MissingReturnToken} from "./utils/weird-tokens/MissingReturnToken.sol"; +import {ReturnsTooMuchToken} from "./utils/weird-tokens/ReturnsTooMuchToken.sol"; +import {ReturnsGarbageToken} from "./utils/weird-tokens/ReturnsGarbageToken.sol"; +import {ReturnsTooLittleToken} from "./utils/weird-tokens/ReturnsTooLittleToken.sol"; + +import {DSTestPlus} from "./utils/DSTestPlus.sol"; + +import {ERC20} from "../tokens/ERC20.sol"; +import {SafeTransferLib} from "../utils/SafeTransferLib.sol"; + +contract SafeTransferLibTest is DSTestPlus { + RevertingToken reverting; + ReturnsTwoToken returnsTwo; + ReturnsFalseToken returnsFalse; + MissingReturnToken missingReturn; + ReturnsTooMuchToken returnsTooMuch; + ReturnsGarbageToken returnsGarbage; + ReturnsTooLittleToken returnsTooLittle; + + MockERC20 erc20; + + function setUp() public { + reverting = new RevertingToken(); + returnsTwo = new ReturnsTwoToken(); + returnsFalse = new ReturnsFalseToken(); + missingReturn = new MissingReturnToken(); + returnsTooMuch = new ReturnsTooMuchToken(); + returnsGarbage = new ReturnsGarbageToken(); + returnsTooLittle = new ReturnsTooLittleToken(); + + erc20 = new MockERC20("StandardToken", "ST", 18); + erc20.mint(address(this), type(uint256).max); + } + + function testTransferWithMissingReturn() public { + verifySafeTransfer(address(missingReturn), address(0xBEEF), 1e18); + } + + function testTransferWithStandardERC20() public { + verifySafeTransfer(address(erc20), address(0xBEEF), 1e18); + } + + function testTransferWithReturnsTooMuch() public { + verifySafeTransfer(address(returnsTooMuch), address(0xBEEF), 1e18); + } + + function testTransferWithNonContract() public { + SafeTransferLib.safeTransfer(ERC20(address(0xBADBEEF)), address(0xBEEF), 1e18); + } + + function testTransferFromWithMissingReturn() public { + verifySafeTransferFrom(address(missingReturn), address(0xFEED), address(0xBEEF), 1e18); + } + + function testTransferFromWithStandardERC20() public { + verifySafeTransferFrom(address(erc20), address(0xFEED), address(0xBEEF), 1e18); + } + + function testTransferFromWithReturnsTooMuch() public { + verifySafeTransferFrom(address(returnsTooMuch), address(0xFEED), address(0xBEEF), 1e18); + } + + function testTransferFromWithNonContract() public { + SafeTransferLib.safeTransferFrom(ERC20(address(0xBADBEEF)), address(0xFEED), address(0xBEEF), 1e18); + } + + function testApproveWithMissingReturn() public { + verifySafeApprove(address(missingReturn), address(0xBEEF), 1e18); + } + + function testApproveWithStandardERC20() public { + verifySafeApprove(address(erc20), address(0xBEEF), 1e18); + } + + function testApproveWithReturnsTooMuch() public { + verifySafeApprove(address(returnsTooMuch), address(0xBEEF), 1e18); + } + + function testApproveWithNonContract() public { + SafeTransferLib.safeApprove(ERC20(address(0xBADBEEF)), address(0xBEEF), 1e18); + } + + function testTransferETH() public { + SafeTransferLib.safeTransferETH(address(0xBEEF), 1e18); + } + + function testFailTransferWithReturnsFalse() public { + verifySafeTransfer(address(returnsFalse), address(0xBEEF), 1e18); + } + + function testFailTransferWithReverting() public { + verifySafeTransfer(address(reverting), address(0xBEEF), 1e18); + } + + function testFailTransferWithReturnsTooLittle() public { + verifySafeTransfer(address(returnsTooLittle), address(0xBEEF), 1e18); + } + + function testFailTransferFromWithReturnsFalse() public { + verifySafeTransferFrom(address(returnsFalse), address(0xFEED), address(0xBEEF), 1e18); + } + + function testFailTransferFromWithReverting() public { + verifySafeTransferFrom(address(reverting), address(0xFEED), address(0xBEEF), 1e18); + } + + function testFailTransferFromWithReturnsTooLittle() public { + verifySafeTransferFrom(address(returnsTooLittle), address(0xFEED), address(0xBEEF), 1e18); + } + + function testFailApproveWithReturnsFalse() public { + verifySafeApprove(address(returnsFalse), address(0xBEEF), 1e18); + } + + function testFailApproveWithReverting() public { + verifySafeApprove(address(reverting), address(0xBEEF), 1e18); + } + + function testFailApproveWithReturnsTooLittle() public { + verifySafeApprove(address(returnsTooLittle), address(0xBEEF), 1e18); + } + + function testTransferWithMissingReturn( + address to, + uint256 amount, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + verifySafeTransfer(address(missingReturn), to, amount); + } + + function testTransferWithStandardERC20( + address to, + uint256 amount, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + verifySafeTransfer(address(erc20), to, amount); + } + + function testTransferWithReturnsTooMuch( + address to, + uint256 amount, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + verifySafeTransfer(address(returnsTooMuch), to, amount); + } + + function testTransferWithGarbage( + address to, + uint256 amount, + bytes memory garbage, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + if ( + (garbage.length < 32 || + (garbage[0] != 0 || + garbage[1] != 0 || + garbage[2] != 0 || + garbage[3] != 0 || + garbage[4] != 0 || + garbage[5] != 0 || + garbage[6] != 0 || + garbage[7] != 0 || + garbage[8] != 0 || + garbage[9] != 0 || + garbage[10] != 0 || + garbage[11] != 0 || + garbage[12] != 0 || + garbage[13] != 0 || + garbage[14] != 0 || + garbage[15] != 0 || + garbage[16] != 0 || + garbage[17] != 0 || + garbage[18] != 0 || + garbage[19] != 0 || + garbage[20] != 0 || + garbage[21] != 0 || + garbage[22] != 0 || + garbage[23] != 0 || + garbage[24] != 0 || + garbage[25] != 0 || + garbage[26] != 0 || + garbage[27] != 0 || + garbage[28] != 0 || + garbage[29] != 0 || + garbage[30] != 0 || + garbage[31] != bytes1(0x01))) && garbage.length != 0 + ) return; + + returnsGarbage.setGarbage(garbage); + + verifySafeTransfer(address(returnsGarbage), to, amount); + } + + function testTransferWithNonContract( + address nonContract, + address to, + uint256 amount, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + if (uint256(uint160(nonContract)) <= 18 || nonContract.code.length > 0) return; + + SafeTransferLib.safeTransfer(ERC20(nonContract), to, amount); + } + + function testFailTransferETHToContractWithoutFallback() public { + SafeTransferLib.safeTransferETH(address(this), 1e18); + } + + function testTransferFromWithMissingReturn( + address from, + address to, + uint256 amount, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + verifySafeTransferFrom(address(missingReturn), from, to, amount); + } + + function testTransferFromWithStandardERC20( + address from, + address to, + uint256 amount, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + verifySafeTransferFrom(address(erc20), from, to, amount); + } + + function testTransferFromWithReturnsTooMuch( + address from, + address to, + uint256 amount, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + verifySafeTransferFrom(address(returnsTooMuch), from, to, amount); + } + + function testTransferFromWithGarbage( + address from, + address to, + uint256 amount, + bytes memory garbage, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + if ( + (garbage.length < 32 || + (garbage[0] != 0 || + garbage[1] != 0 || + garbage[2] != 0 || + garbage[3] != 0 || + garbage[4] != 0 || + garbage[5] != 0 || + garbage[6] != 0 || + garbage[7] != 0 || + garbage[8] != 0 || + garbage[9] != 0 || + garbage[10] != 0 || + garbage[11] != 0 || + garbage[12] != 0 || + garbage[13] != 0 || + garbage[14] != 0 || + garbage[15] != 0 || + garbage[16] != 0 || + garbage[17] != 0 || + garbage[18] != 0 || + garbage[19] != 0 || + garbage[20] != 0 || + garbage[21] != 0 || + garbage[22] != 0 || + garbage[23] != 0 || + garbage[24] != 0 || + garbage[25] != 0 || + garbage[26] != 0 || + garbage[27] != 0 || + garbage[28] != 0 || + garbage[29] != 0 || + garbage[30] != 0 || + garbage[31] != bytes1(0x01))) && garbage.length != 0 + ) return; + + returnsGarbage.setGarbage(garbage); + + verifySafeTransferFrom(address(returnsGarbage), from, to, amount); + } + + function testTransferFromWithNonContract( + address nonContract, + address from, + address to, + uint256 amount, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + if (uint256(uint160(nonContract)) <= 18 || nonContract.code.length > 0) return; + + SafeTransferLib.safeTransferFrom(ERC20(nonContract), from, to, amount); + } + + function testApproveWithMissingReturn( + address to, + uint256 amount, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + verifySafeApprove(address(missingReturn), to, amount); + } + + function testApproveWithStandardERC20( + address to, + uint256 amount, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + verifySafeApprove(address(erc20), to, amount); + } + + function testApproveWithReturnsTooMuch( + address to, + uint256 amount, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + verifySafeApprove(address(returnsTooMuch), to, amount); + } + + function testApproveWithGarbage( + address to, + uint256 amount, + bytes memory garbage, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + if ( + (garbage.length < 32 || + (garbage[0] != 0 || + garbage[1] != 0 || + garbage[2] != 0 || + garbage[3] != 0 || + garbage[4] != 0 || + garbage[5] != 0 || + garbage[6] != 0 || + garbage[7] != 0 || + garbage[8] != 0 || + garbage[9] != 0 || + garbage[10] != 0 || + garbage[11] != 0 || + garbage[12] != 0 || + garbage[13] != 0 || + garbage[14] != 0 || + garbage[15] != 0 || + garbage[16] != 0 || + garbage[17] != 0 || + garbage[18] != 0 || + garbage[19] != 0 || + garbage[20] != 0 || + garbage[21] != 0 || + garbage[22] != 0 || + garbage[23] != 0 || + garbage[24] != 0 || + garbage[25] != 0 || + garbage[26] != 0 || + garbage[27] != 0 || + garbage[28] != 0 || + garbage[29] != 0 || + garbage[30] != 0 || + garbage[31] != bytes1(0x01))) && garbage.length != 0 + ) return; + + returnsGarbage.setGarbage(garbage); + + verifySafeApprove(address(returnsGarbage), to, amount); + } + + function testApproveWithNonContract( + address nonContract, + address to, + uint256 amount, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + if (uint256(uint160(nonContract)) <= 18 || nonContract.code.length > 0) return; + + SafeTransferLib.safeApprove(ERC20(nonContract), to, amount); + } + + function testTransferETH( + address recipient, + uint256 amount, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + // Transferring to msg.sender can fail because it's possible to overflow their ETH balance as it begins non-zero. + if (recipient.code.length > 0 || uint256(uint160(recipient)) <= 18 || recipient == msg.sender) return; + + amount = bound(amount, 0, address(this).balance); + + SafeTransferLib.safeTransferETH(recipient, amount); + } + + function testFailTransferWithReturnsFalse( + address to, + uint256 amount, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + verifySafeTransfer(address(returnsFalse), to, amount); + } + + function testFailTransferWithReverting( + address to, + uint256 amount, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + verifySafeTransfer(address(reverting), to, amount); + } + + function testFailTransferWithReturnsTooLittle( + address to, + uint256 amount, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + verifySafeTransfer(address(returnsTooLittle), to, amount); + } + + function testFailTransferWithReturnsTwo( + address to, + uint256 amount, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + verifySafeTransfer(address(returnsTwo), to, amount); + } + + function testFailTransferWithGarbage( + address to, + uint256 amount, + bytes memory garbage, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + require(garbage.length != 0 && (garbage.length < 32 || garbage[31] != bytes1(0x01))); + + returnsGarbage.setGarbage(garbage); + + verifySafeTransfer(address(returnsGarbage), to, amount); + } + + function testFailTransferFromWithReturnsFalse( + address from, + address to, + uint256 amount, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + verifySafeTransferFrom(address(returnsFalse), from, to, amount); + } + + function testFailTransferFromWithReverting( + address from, + address to, + uint256 amount, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + verifySafeTransferFrom(address(reverting), from, to, amount); + } + + function testFailTransferFromWithReturnsTooLittle( + address from, + address to, + uint256 amount, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + verifySafeTransferFrom(address(returnsTooLittle), from, to, amount); + } + + function testFailTransferFromWithReturnsTwo( + address from, + address to, + uint256 amount, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + verifySafeTransferFrom(address(returnsTwo), from, to, amount); + } + + function testFailTransferFromWithGarbage( + address from, + address to, + uint256 amount, + bytes memory garbage, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + require(garbage.length != 0 && (garbage.length < 32 || garbage[31] != bytes1(0x01))); + + returnsGarbage.setGarbage(garbage); + + verifySafeTransferFrom(address(returnsGarbage), from, to, amount); + } + + function testFailApproveWithReturnsFalse( + address to, + uint256 amount, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + verifySafeApprove(address(returnsFalse), to, amount); + } + + function testFailApproveWithReverting( + address to, + uint256 amount, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + verifySafeApprove(address(reverting), to, amount); + } + + function testFailApproveWithReturnsTooLittle( + address to, + uint256 amount, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + verifySafeApprove(address(returnsTooLittle), to, amount); + } + + function testFailApproveWithReturnsTwo( + address to, + uint256 amount, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + verifySafeApprove(address(returnsTwo), to, amount); + } + + function testFailApproveWithGarbage( + address to, + uint256 amount, + bytes memory garbage, + bytes calldata brutalizeWith + ) public brutalizeMemory(brutalizeWith) { + require(garbage.length != 0 && (garbage.length < 32 || garbage[31] != bytes1(0x01))); + + returnsGarbage.setGarbage(garbage); + + verifySafeApprove(address(returnsGarbage), to, amount); + } + + function testFailTransferETHToContractWithoutFallback(uint256 amount, bytes calldata brutalizeWith) + public + brutalizeMemory(brutalizeWith) + { + SafeTransferLib.safeTransferETH(address(this), amount); + } + + function verifySafeTransfer( + address token, + address to, + uint256 amount + ) internal { + uint256 preBal = ERC20(token).balanceOf(to); + SafeTransferLib.safeTransfer(ERC20(address(token)), to, amount); + uint256 postBal = ERC20(token).balanceOf(to); + + if (to == address(this)) { + assertEq(preBal, postBal); + } else { + assertEq(postBal - preBal, amount); + } + } + + function verifySafeTransferFrom( + address token, + address from, + address to, + uint256 amount + ) internal { + forceApprove(token, from, address(this), amount); + + // We cast to MissingReturnToken here because it won't check + // that there was return data, which accommodates all tokens. + MissingReturnToken(token).transfer(from, amount); + + uint256 preBal = ERC20(token).balanceOf(to); + SafeTransferLib.safeTransferFrom(ERC20(token), from, to, amount); + uint256 postBal = ERC20(token).balanceOf(to); + + if (from == to) { + assertEq(preBal, postBal); + } else { + assertEq(postBal - preBal, amount); + } + } + + function verifySafeApprove( + address token, + address to, + uint256 amount + ) internal { + SafeTransferLib.safeApprove(ERC20(address(token)), to, amount); + + assertEq(ERC20(token).allowance(address(this), to), amount); + } + + function forceApprove( + address token, + address from, + address to, + uint256 amount + ) internal { + uint256 slot = token == address(erc20) ? 4 : 2; // Standard ERC20 name and symbol aren't constant. + + hevm.store( + token, + keccak256(abi.encode(to, keccak256(abi.encode(from, uint256(slot))))), + bytes32(uint256(amount)) + ); + + assertEq(ERC20(token).allowance(from, to), amount, "wrong allowance"); + } +} diff --git a/lib/solmate/src/test/WETH.t.sol b/lib/solmate/src/test/WETH.t.sol new file mode 100644 index 0000000..f2d8b9e --- /dev/null +++ b/lib/solmate/src/test/WETH.t.sol @@ -0,0 +1,146 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity 0.8.10; + +import {DSTestPlus} from "./utils/DSTestPlus.sol"; +import {DSInvariantTest} from "./utils/DSInvariantTest.sol"; + +import {SafeTransferLib} from "../utils/SafeTransferLib.sol"; + +import {WETH} from "../tokens/WETH.sol"; + +contract WETHTest is DSTestPlus { + WETH weth; + + function setUp() public { + weth = new WETH(); + } + + function testDeposit() public { + assertEq(weth.balanceOf(address(this)), 0); + assertEq(weth.totalSupply(), 0); + + SafeTransferLib.safeTransferETH(address(weth), 1 ether); + + assertEq(weth.balanceOf(address(this)), 1 ether); + assertEq(weth.totalSupply(), 1 ether); + } + + function testFallbackDeposit() public { + assertEq(weth.balanceOf(address(this)), 0); + assertEq(weth.totalSupply(), 0); + + weth.deposit{value: 1 ether}(); + + assertEq(weth.balanceOf(address(this)), 1 ether); + assertEq(weth.totalSupply(), 1 ether); + } + + function testWithdraw() public { + uint256 startingBalance = address(this).balance; + + weth.deposit{value: 1 ether}(); + + weth.withdraw(1 ether); + + uint256 balanceAfterWithdraw = address(this).balance; + + assertEq(balanceAfterWithdraw, startingBalance); + assertEq(weth.balanceOf(address(this)), 0); + assertEq(weth.totalSupply(), 0); + } + + function testPartialWithdraw() public { + weth.deposit{value: 1 ether}(); + + uint256 balanceBeforeWithdraw = address(this).balance; + + weth.withdraw(0.5 ether); + + uint256 balanceAfterWithdraw = address(this).balance; + + assertEq(balanceAfterWithdraw, balanceBeforeWithdraw + 0.5 ether); + assertEq(weth.balanceOf(address(this)), 0.5 ether); + assertEq(weth.totalSupply(), 0.5 ether); + } + + function testDeposit(uint256 amount) public { + amount = bound(amount, 0, address(this).balance); + + assertEq(weth.balanceOf(address(this)), 0); + assertEq(weth.totalSupply(), 0); + + SafeTransferLib.safeTransferETH(address(weth), amount); + + assertEq(weth.balanceOf(address(this)), amount); + assertEq(weth.totalSupply(), amount); + } + + function testFallbackDeposit(uint256 amount) public { + amount = bound(amount, 0, address(this).balance); + + assertEq(weth.balanceOf(address(this)), 0); + assertEq(weth.totalSupply(), 0); + + weth.deposit{value: amount}(); + + assertEq(weth.balanceOf(address(this)), amount); + assertEq(weth.totalSupply(), amount); + } + + function testWithdraw(uint256 depositAmount, uint256 withdrawAmount) public { + depositAmount = bound(depositAmount, 0, address(this).balance); + withdrawAmount = bound(withdrawAmount, 0, depositAmount); + + weth.deposit{value: depositAmount}(); + + uint256 balanceBeforeWithdraw = address(this).balance; + + weth.withdraw(withdrawAmount); + + uint256 balanceAfterWithdraw = address(this).balance; + + assertEq(balanceAfterWithdraw, balanceBeforeWithdraw + withdrawAmount); + assertEq(weth.balanceOf(address(this)), depositAmount - withdrawAmount); + assertEq(weth.totalSupply(), depositAmount - withdrawAmount); + } + + receive() external payable {} +} + +contract WETHInvariants is DSTestPlus, DSInvariantTest { + WETHTester wethTester; + WETH weth; + + function setUp() public { + weth = new WETH(); + wethTester = new WETHTester{value: address(this).balance}(weth); + + addTargetContract(address(wethTester)); + } + + function invariantTotalSupplyEqualsBalance() public { + assertEq(address(weth).balance, weth.totalSupply()); + } +} + +contract WETHTester { + WETH weth; + + constructor(WETH _weth) payable { + weth = _weth; + } + + function deposit(uint256 amount) public { + weth.deposit{value: amount}(); + } + + function fallbackDeposit(uint256 amount) public { + SafeTransferLib.safeTransferETH(address(weth), amount); + } + + function withdraw(uint256 amount) public { + weth.withdraw(amount); + } + + receive() external payable {} +} diff --git a/lib/solmate/src/test/utils/DSInvariantTest.sol b/lib/solmate/src/test/utils/DSInvariantTest.sol new file mode 100644 index 0000000..820775c --- /dev/null +++ b/lib/solmate/src/test/utils/DSInvariantTest.sol @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +contract DSInvariantTest { + address[] private targets; + + function targetContracts() public view virtual returns (address[] memory) { + require(targets.length > 0, "NO_TARGET_CONTRACTS"); + + return targets; + } + + function addTargetContract(address newTargetContract) internal virtual { + targets.push(newTargetContract); + } +} diff --git a/lib/solmate/src/test/utils/DSTestPlus.sol b/lib/solmate/src/test/utils/DSTestPlus.sol new file mode 100644 index 0000000..bb1772d --- /dev/null +++ b/lib/solmate/src/test/utils/DSTestPlus.sol @@ -0,0 +1,179 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +import {DSTest} from "ds-test/test.sol"; + +import {Hevm} from "./Hevm.sol"; + +/// @notice Extended testing framework for DappTools projects. +/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/test/utils/DSTestPlus.sol) +contract DSTestPlus is DSTest { + Hevm internal constant hevm = Hevm(HEVM_ADDRESS); + + address internal constant DEAD_ADDRESS = 0xDeaDbeefdEAdbeefdEadbEEFdeadbeEFdEaDbeeF; + + string private checkpointLabel; + uint256 private checkpointGasLeft = 1; // Start the slot warm. + + modifier brutalizeMemory(bytes memory brutalizeWith) { + /// @solidity memory-safe-assembly + assembly { + // Fill the 64 bytes of scratch space with the data. + pop( + staticcall( + gas(), // Pass along all the gas in the call. + 0x04, // Call the identity precompile address. + brutalizeWith, // Offset is the bytes' pointer. + 64, // Copy enough to only fill the scratch space. + 0, // Store the return value in the scratch space. + 64 // Scratch space is only 64 bytes in size, we don't want to write further. + ) + ) + + let size := add(mload(brutalizeWith), 32) // Add 32 to include the 32 byte length slot. + + // Fill the free memory pointer's destination with the data. + pop( + staticcall( + gas(), // Pass along all the gas in the call. + 0x04, // Call the identity precompile address. + brutalizeWith, // Offset is the bytes' pointer. + size, // We want to pass the length of the bytes. + mload(0x40), // Store the return value at the free memory pointer. + size // Since the precompile just returns its input, we reuse size. + ) + ) + } + + _; + } + + function startMeasuringGas(string memory label) internal virtual { + checkpointLabel = label; + + checkpointGasLeft = gasleft(); + } + + function stopMeasuringGas() internal virtual { + uint256 checkpointGasLeft2 = gasleft(); + + // Subtract 100 to account for the warm SLOAD in startMeasuringGas. + uint256 gasDelta = checkpointGasLeft - checkpointGasLeft2 - 100; + + emit log_named_uint(string(abi.encodePacked(checkpointLabel, " Gas")), gasDelta); + } + + function fail(string memory err) internal virtual { + emit log_named_string("Error", err); + fail(); + } + + function assertFalse(bool data) internal virtual { + assertTrue(!data); + } + + function assertUint128Eq(uint128 a, uint128 b) internal virtual { + assertEq(uint256(a), uint256(b)); + } + + function assertUint64Eq(uint64 a, uint64 b) internal virtual { + assertEq(uint256(a), uint256(b)); + } + + function assertUint96Eq(uint96 a, uint96 b) internal virtual { + assertEq(uint256(a), uint256(b)); + } + + function assertUint32Eq(uint32 a, uint32 b) internal virtual { + assertEq(uint256(a), uint256(b)); + } + + function assertBoolEq(bool a, bool b) internal virtual { + b ? assertTrue(a) : assertFalse(a); + } + + function assertApproxEq( + uint256 a, + uint256 b, + uint256 maxDelta + ) internal virtual { + uint256 delta = a > b ? a - b : b - a; + + if (delta > maxDelta) { + emit log("Error: a ~= b not satisfied [uint]"); + emit log_named_uint(" Expected", b); + emit log_named_uint(" Actual", a); + emit log_named_uint(" Max Delta", maxDelta); + emit log_named_uint(" Delta", delta); + fail(); + } + } + + function assertRelApproxEq( + uint256 a, + uint256 b, + uint256 maxPercentDelta // An 18 decimal fixed point number, where 1e18 == 100% + ) internal virtual { + if (b == 0) return assertEq(a, b); // If the expected is 0, actual must be too. + + uint256 percentDelta = ((a > b ? a - b : b - a) * 1e18) / b; + + if (percentDelta > maxPercentDelta) { + emit log("Error: a ~= b not satisfied [uint]"); + emit log_named_uint(" Expected", b); + emit log_named_uint(" Actual", a); + emit log_named_decimal_uint(" Max % Delta", maxPercentDelta, 18); + emit log_named_decimal_uint(" % Delta", percentDelta, 18); + fail(); + } + } + + function assertBytesEq(bytes memory a, bytes memory b) internal virtual { + if (keccak256(a) != keccak256(b)) { + emit log("Error: a == b not satisfied [bytes]"); + emit log_named_bytes(" Expected", b); + emit log_named_bytes(" Actual", a); + fail(); + } + } + + function assertUintArrayEq(uint256[] memory a, uint256[] memory b) internal virtual { + require(a.length == b.length, "LENGTH_MISMATCH"); + + for (uint256 i = 0; i < a.length; i++) { + assertEq(a[i], b[i]); + } + } + + function bound( + uint256 x, + uint256 min, + uint256 max + ) internal returns (uint256 result) { + require(max >= min, "MAX_LESS_THAN_MIN"); + + uint256 size = max - min; + + if (size == 0) result = min; + else if (size == type(uint256).max) result = x; + else { + ++size; // Make max inclusive. + uint256 mod = x % size; + result = min + mod; + } + + emit log_named_uint("Bound Result", result); + } + + function min3( + uint256 a, + uint256 b, + uint256 c + ) internal pure returns (uint256) { + return a > b ? (b > c ? c : b) : (a > c ? c : a); + } + + function min2(uint256 a, uint256 b) internal pure returns (uint256) { + return a > b ? b : a; + } +} diff --git a/lib/solmate/src/test/utils/Hevm.sol b/lib/solmate/src/test/utils/Hevm.sol new file mode 100644 index 0000000..8ca0eff --- /dev/null +++ b/lib/solmate/src/test/utils/Hevm.sol @@ -0,0 +1,107 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +interface Hevm { + /// @notice Sets the block timestamp. + function warp(uint256) external; + + /// @notice Sets the block height. + function roll(uint256) external; + + /// @notice Sets the block base fee. + function fee(uint256) external; + + /// @notice Loads a storage slot from an address. + function load(address, bytes32) external returns (bytes32); + + /// @notice Stores a value to an address' storage slot. + function store( + address, + bytes32, + bytes32 + ) external; + + /// @notice Signs a digest with a private key, returns v r s. + function sign(uint256, bytes32) + external + returns ( + uint8, + bytes32, + bytes32 + ); + + /// @notice Gets address for a given private key. + function addr(uint256) external returns (address); + + /// @notice Performs a foreign function call via a terminal call. + function ffi(string[] calldata) external returns (bytes memory); + + /// @notice Sets the next call's msg.sender to be the input address. + function prank(address) external; + + /// @notice Sets all subsequent calls' msg.sender to be the input address until stopPrank is called. + function startPrank(address) external; + + /// @notice Sets the next call's msg.sender to be the input address and the tx.origin to be the second input. + function prank(address, address) external; + + /// @notice Sets all subsequent calls' msg.sender to be the input address and + /// sets tx.origin to be the second address inputted until stopPrank is called. + function startPrank(address, address) external; + + /// @notice Resets msg.sender to its original value before a prank. + function stopPrank() external; + + /// @notice Sets an address' balance. + function deal(address, uint256) external; + + /// @notice Sets an address' code. + function etch(address, bytes calldata) external; + + /// @notice Expects an error from the next call. + function expectRevert(bytes calldata) external; + + /// @notice Expects a revert from the next call. + function expectRevert(bytes4) external; + + /// @notice Record all storage reads and writes. + function record() external; + + /// @notice Gets all accessed reads and write slots from a recording session, for a given address. + function accesses(address) external returns (bytes32[] memory reads, bytes32[] memory writes); + + /// @notice Prepare an expected log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData). + /// @notice Call this function, then emit an event, then call a function. Internally after the call, we check + /// if logs were emitted in the expected order with the expected topics and data as specified by the booleans. + function expectEmit( + bool, + bool, + bool, + bool + ) external; + + /// @notice Mocks the behavior of a contract call, setting the input and output for a function. + /// @notice Calldata can either be strict or a partial match, e.g. if only passed + /// a selector to the expected calldata, then the entire function will be mocked. + function mockCall( + address, + bytes calldata, + bytes calldata + ) external; + + /// @notice Clears all mocked calls. + function clearMockedCalls() external; + + /// @notice Expect a call to an address with the specified calldata. + /// @notice Calldata can either be strict or a partial match. + function expectCall(address, bytes calldata) external; + + /// @notice Fetches the contract bytecode from its artifact file. + function getCode(string calldata) external returns (bytes memory); + + /// @notice Label an address in test traces. + function label(address addr, string calldata label) external; + + /// @notice When fuzzing, generate new inputs if the input conditional is not met. + function assume(bool) external; +} diff --git a/lib/solmate/src/test/utils/mocks/MockAuthChild.sol b/lib/solmate/src/test/utils/mocks/MockAuthChild.sol new file mode 100644 index 0000000..d2c3276 --- /dev/null +++ b/lib/solmate/src/test/utils/mocks/MockAuthChild.sol @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +import {Auth, Authority} from "../../../auth/Auth.sol"; + +contract MockAuthChild is Auth(msg.sender, Authority(address(0))) { + bool public flag; + + function updateFlag() public virtual requiresAuth { + flag = true; + } +} diff --git a/lib/solmate/src/test/utils/mocks/MockAuthority.sol b/lib/solmate/src/test/utils/mocks/MockAuthority.sol new file mode 100644 index 0000000..acb3689 --- /dev/null +++ b/lib/solmate/src/test/utils/mocks/MockAuthority.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +import {Authority} from "../../../auth/Auth.sol"; + +contract MockAuthority is Authority { + bool immutable allowCalls; + + constructor(bool _allowCalls) { + allowCalls = _allowCalls; + } + + function canCall( + address, + address, + bytes4 + ) public view override returns (bool) { + return allowCalls; + } +} diff --git a/lib/solmate/src/test/utils/mocks/MockERC1155.sol b/lib/solmate/src/test/utils/mocks/MockERC1155.sol new file mode 100644 index 0000000..ede086d --- /dev/null +++ b/lib/solmate/src/test/utils/mocks/MockERC1155.sol @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +import {ERC1155} from "../../../tokens/ERC1155.sol"; + +contract MockERC1155 is ERC1155 { + function uri(uint256) public pure virtual override returns (string memory) {} + + function mint( + address to, + uint256 id, + uint256 amount, + bytes memory data + ) public virtual { + _mint(to, id, amount, data); + } + + function batchMint( + address to, + uint256[] memory ids, + uint256[] memory amounts, + bytes memory data + ) public virtual { + _batchMint(to, ids, amounts, data); + } + + function burn( + address from, + uint256 id, + uint256 amount + ) public virtual { + _burn(from, id, amount); + } + + function batchBurn( + address from, + uint256[] memory ids, + uint256[] memory amounts + ) public virtual { + _batchBurn(from, ids, amounts); + } +} diff --git a/lib/solmate/src/test/utils/mocks/MockERC20.sol b/lib/solmate/src/test/utils/mocks/MockERC20.sol new file mode 100644 index 0000000..fbbaef5 --- /dev/null +++ b/lib/solmate/src/test/utils/mocks/MockERC20.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +import {ERC20} from "../../../tokens/ERC20.sol"; + +contract MockERC20 is ERC20 { + constructor( + string memory _name, + string memory _symbol, + uint8 _decimals + ) ERC20(_name, _symbol, _decimals) {} + + function mint(address to, uint256 value) public virtual { + _mint(to, value); + } + + function burn(address from, uint256 value) public virtual { + _burn(from, value); + } +} diff --git a/lib/solmate/src/test/utils/mocks/MockERC4626.sol b/lib/solmate/src/test/utils/mocks/MockERC4626.sol new file mode 100644 index 0000000..edc7d5f --- /dev/null +++ b/lib/solmate/src/test/utils/mocks/MockERC4626.sol @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +import {ERC20} from "../../../tokens/ERC20.sol"; +import {ERC4626} from "../../../mixins/ERC4626.sol"; + +contract MockERC4626 is ERC4626 { + uint256 public beforeWithdrawHookCalledCounter = 0; + uint256 public afterDepositHookCalledCounter = 0; + + constructor( + ERC20 _underlying, + string memory _name, + string memory _symbol + ) ERC4626(_underlying, _name, _symbol) {} + + function totalAssets() public view override returns (uint256) { + return asset.balanceOf(address(this)); + } + + function beforeWithdraw(uint256, uint256) internal override { + beforeWithdrawHookCalledCounter++; + } + + function afterDeposit(uint256, uint256) internal override { + afterDepositHookCalledCounter++; + } +} diff --git a/lib/solmate/src/test/utils/mocks/MockERC721.sol b/lib/solmate/src/test/utils/mocks/MockERC721.sol new file mode 100644 index 0000000..51227c0 --- /dev/null +++ b/lib/solmate/src/test/utils/mocks/MockERC721.sol @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +import {ERC721} from "../../../tokens/ERC721.sol"; + +contract MockERC721 is ERC721 { + constructor(string memory _name, string memory _symbol) ERC721(_name, _symbol) {} + + function tokenURI(uint256) public pure virtual override returns (string memory) {} + + function mint(address to, uint256 tokenId) public virtual { + _mint(to, tokenId); + } + + function burn(uint256 tokenId) public virtual { + _burn(tokenId); + } + + function safeMint(address to, uint256 tokenId) public virtual { + _safeMint(to, tokenId); + } + + function safeMint( + address to, + uint256 tokenId, + bytes memory data + ) public virtual { + _safeMint(to, tokenId, data); + } +} diff --git a/lib/solmate/src/test/utils/mocks/MockOwned.sol b/lib/solmate/src/test/utils/mocks/MockOwned.sol new file mode 100644 index 0000000..52ef918 --- /dev/null +++ b/lib/solmate/src/test/utils/mocks/MockOwned.sol @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +import {Owned} from "../../../auth/Owned.sol"; + +contract MockOwned is Owned(msg.sender) { + bool public flag; + + function updateFlag() public virtual onlyOwner { + flag = true; + } +} diff --git a/lib/solmate/src/test/utils/weird-tokens/MissingReturnToken.sol b/lib/solmate/src/test/utils/weird-tokens/MissingReturnToken.sol new file mode 100644 index 0000000..23f4633 --- /dev/null +++ b/lib/solmate/src/test/utils/weird-tokens/MissingReturnToken.sol @@ -0,0 +1,83 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +contract MissingReturnToken { + /*/////////////////////////////////////////////////////////////// + EVENTS + //////////////////////////////////////////////////////////////*/ + + event Transfer(address indexed from, address indexed to, uint256 amount); + + event Approval(address indexed owner, address indexed spender, uint256 amount); + + /*/////////////////////////////////////////////////////////////// + METADATA STORAGE + //////////////////////////////////////////////////////////////*/ + + string public constant name = "MissingReturnToken"; + + string public constant symbol = "MRT"; + + uint8 public constant decimals = 18; + + /*/////////////////////////////////////////////////////////////// + ERC20 STORAGE + //////////////////////////////////////////////////////////////*/ + + uint256 public totalSupply; + + mapping(address => uint256) public balanceOf; + + mapping(address => mapping(address => uint256)) public allowance; + + /*/////////////////////////////////////////////////////////////// + CONSTRUCTOR + //////////////////////////////////////////////////////////////*/ + + constructor() { + totalSupply = type(uint256).max; + balanceOf[msg.sender] = type(uint256).max; + } + + /*/////////////////////////////////////////////////////////////// + ERC20 LOGIC + //////////////////////////////////////////////////////////////*/ + + function approve(address spender, uint256 amount) public virtual { + allowance[msg.sender][spender] = amount; + + emit Approval(msg.sender, spender, amount); + } + + function transfer(address to, uint256 amount) public virtual { + balanceOf[msg.sender] -= amount; + + // Cannot overflow because the sum of all user + // balances can't exceed the max uint256 value. + unchecked { + balanceOf[to] += amount; + } + + emit Transfer(msg.sender, to, amount); + } + + function transferFrom( + address from, + address to, + uint256 amount + ) public virtual { + uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals. + + if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount; + + balanceOf[from] -= amount; + + // Cannot overflow because the sum of all user + // balances can't exceed the max uint256 value. + unchecked { + balanceOf[to] += amount; + } + + emit Transfer(from, to, amount); + } +} diff --git a/lib/solmate/src/test/utils/weird-tokens/ReturnsFalseToken.sol b/lib/solmate/src/test/utils/weird-tokens/ReturnsFalseToken.sol new file mode 100644 index 0000000..8139efe --- /dev/null +++ b/lib/solmate/src/test/utils/weird-tokens/ReturnsFalseToken.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +contract ReturnsFalseToken { + /*/////////////////////////////////////////////////////////////// + EVENTS + //////////////////////////////////////////////////////////////*/ + + event Transfer(address indexed from, address indexed to, uint256 amount); + + event Approval(address indexed owner, address indexed spender, uint256 amount); + + /*/////////////////////////////////////////////////////////////// + METADATA STORAGE + //////////////////////////////////////////////////////////////*/ + + string public constant name = "ReturnsFalseToken"; + + string public constant symbol = "RFT"; + + uint8 public constant decimals = 18; + + /*/////////////////////////////////////////////////////////////// + ERC20 STORAGE + //////////////////////////////////////////////////////////////*/ + + uint256 public totalSupply; + + mapping(address => uint256) public balanceOf; + + mapping(address => mapping(address => uint256)) public allowance; + + /*/////////////////////////////////////////////////////////////// + CONSTRUCTOR + //////////////////////////////////////////////////////////////*/ + + constructor() { + totalSupply = type(uint256).max; + balanceOf[msg.sender] = type(uint256).max; + } + + /*/////////////////////////////////////////////////////////////// + ERC20 LOGIC + //////////////////////////////////////////////////////////////*/ + + function approve(address, uint256) public virtual returns (bool) { + return false; + } + + function transfer(address, uint256) public virtual returns (bool) { + return false; + } + + function transferFrom( + address, + address, + uint256 + ) public virtual returns (bool) { + return false; + } +} diff --git a/lib/solmate/src/test/utils/weird-tokens/ReturnsGarbageToken.sol b/lib/solmate/src/test/utils/weird-tokens/ReturnsGarbageToken.sol new file mode 100644 index 0000000..77c9575 --- /dev/null +++ b/lib/solmate/src/test/utils/weird-tokens/ReturnsGarbageToken.sol @@ -0,0 +1,115 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +contract ReturnsGarbageToken { + /*/////////////////////////////////////////////////////////////// + EVENTS + //////////////////////////////////////////////////////////////*/ + + event Transfer(address indexed from, address indexed to, uint256 amount); + + event Approval(address indexed owner, address indexed spender, uint256 amount); + + /*/////////////////////////////////////////////////////////////// + METADATA STORAGE + //////////////////////////////////////////////////////////////*/ + + string public constant name = "ReturnsGarbageToken"; + + string public constant symbol = "RGT"; + + uint8 public constant decimals = 18; + + /*/////////////////////////////////////////////////////////////// + ERC20 STORAGE + //////////////////////////////////////////////////////////////*/ + + uint256 public totalSupply; + + mapping(address => uint256) public balanceOf; + + mapping(address => mapping(address => uint256)) public allowance; + + /*/////////////////////////////////////////////////////////////// + MOCK STORAGE + //////////////////////////////////////////////////////////////*/ + + bytes garbage; + + /*/////////////////////////////////////////////////////////////// + CONSTRUCTOR + //////////////////////////////////////////////////////////////*/ + + constructor() { + totalSupply = type(uint256).max; + balanceOf[msg.sender] = type(uint256).max; + } + + /*/////////////////////////////////////////////////////////////// + ERC20 LOGIC + //////////////////////////////////////////////////////////////*/ + + function approve(address spender, uint256 amount) public virtual { + allowance[msg.sender][spender] = amount; + + emit Approval(msg.sender, spender, amount); + + bytes memory _garbage = garbage; + + assembly { + return(add(_garbage, 32), mload(_garbage)) + } + } + + function transfer(address to, uint256 amount) public virtual { + balanceOf[msg.sender] -= amount; + + // Cannot overflow because the sum of all user + // balances can't exceed the max uint256 value. + unchecked { + balanceOf[to] += amount; + } + + emit Transfer(msg.sender, to, amount); + + bytes memory _garbage = garbage; + + assembly { + return(add(_garbage, 32), mload(_garbage)) + } + } + + function transferFrom( + address from, + address to, + uint256 amount + ) public virtual { + uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals. + + if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount; + + balanceOf[from] -= amount; + + // Cannot overflow because the sum of all user + // balances can't exceed the max uint256 value. + unchecked { + balanceOf[to] += amount; + } + + emit Transfer(from, to, amount); + + bytes memory _garbage = garbage; + + assembly { + return(add(_garbage, 32), mload(_garbage)) + } + } + + /*/////////////////////////////////////////////////////////////// + MOCK LOGIC + //////////////////////////////////////////////////////////////*/ + + function setGarbage(bytes memory _garbage) public virtual { + garbage = _garbage; + } +} diff --git a/lib/solmate/src/test/utils/weird-tokens/ReturnsTooLittleToken.sol b/lib/solmate/src/test/utils/weird-tokens/ReturnsTooLittleToken.sol new file mode 100644 index 0000000..69947c3 --- /dev/null +++ b/lib/solmate/src/test/utils/weird-tokens/ReturnsTooLittleToken.sol @@ -0,0 +1,70 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +contract ReturnsTooLittleToken { + /*/////////////////////////////////////////////////////////////// + EVENTS + //////////////////////////////////////////////////////////////*/ + + event Transfer(address indexed from, address indexed to, uint256 amount); + + event Approval(address indexed owner, address indexed spender, uint256 amount); + + /*/////////////////////////////////////////////////////////////// + METADATA STORAGE + //////////////////////////////////////////////////////////////*/ + + string public constant name = "ReturnsTooLittleToken"; + + string public constant symbol = "RTLT"; + + uint8 public constant decimals = 18; + + /*/////////////////////////////////////////////////////////////// + ERC20 STORAGE + //////////////////////////////////////////////////////////////*/ + + uint256 public totalSupply; + + mapping(address => uint256) public balanceOf; + + mapping(address => mapping(address => uint256)) public allowance; + + /*/////////////////////////////////////////////////////////////// + CONSTRUCTOR + //////////////////////////////////////////////////////////////*/ + + constructor() { + totalSupply = type(uint256).max; + balanceOf[msg.sender] = type(uint256).max; + } + + /*/////////////////////////////////////////////////////////////// + ERC20 LOGIC + //////////////////////////////////////////////////////////////*/ + + function approve(address, uint256) public virtual { + assembly { + mstore(0, 0x0100000000000000000000000000000000000000000000000000000000000000) + return(0, 8) + } + } + + function transfer(address, uint256) public virtual { + assembly { + mstore(0, 0x0100000000000000000000000000000000000000000000000000000000000000) + return(0, 8) + } + } + + function transferFrom( + address, + address, + uint256 + ) public virtual { + assembly { + mstore(0, 0x0100000000000000000000000000000000000000000000000000000000000000) + return(0, 8) + } + } +} diff --git a/lib/solmate/src/test/utils/weird-tokens/ReturnsTooMuchToken.sol b/lib/solmate/src/test/utils/weird-tokens/ReturnsTooMuchToken.sol new file mode 100644 index 0000000..8774cbb --- /dev/null +++ b/lib/solmate/src/test/utils/weird-tokens/ReturnsTooMuchToken.sol @@ -0,0 +1,98 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +contract ReturnsTooMuchToken { + /*/////////////////////////////////////////////////////////////// + EVENTS + //////////////////////////////////////////////////////////////*/ + + event Transfer(address indexed from, address indexed to, uint256 amount); + + event Approval(address indexed owner, address indexed spender, uint256 amount); + + /*/////////////////////////////////////////////////////////////// + METADATA STORAGE + //////////////////////////////////////////////////////////////*/ + + string public constant name = "ReturnsTooMuchToken"; + + string public constant symbol = "RTMT"; + + uint8 public constant decimals = 18; + + /*/////////////////////////////////////////////////////////////// + ERC20 STORAGE + //////////////////////////////////////////////////////////////*/ + + uint256 public totalSupply; + + mapping(address => uint256) public balanceOf; + + mapping(address => mapping(address => uint256)) public allowance; + + /*/////////////////////////////////////////////////////////////// + CONSTRUCTOR + //////////////////////////////////////////////////////////////*/ + + constructor() { + totalSupply = type(uint256).max; + balanceOf[msg.sender] = type(uint256).max; + } + + /*/////////////////////////////////////////////////////////////// + ERC20 LOGIC + //////////////////////////////////////////////////////////////*/ + + function approve(address spender, uint256 amount) public virtual { + allowance[msg.sender][spender] = amount; + + emit Approval(msg.sender, spender, amount); + + assembly { + mstore(0, 1) + return(0, 4096) + } + } + + function transfer(address to, uint256 amount) public virtual { + balanceOf[msg.sender] -= amount; + + // Cannot overflow because the sum of all user + // balances can't exceed the max uint256 value. + unchecked { + balanceOf[to] += amount; + } + + emit Transfer(msg.sender, to, amount); + + assembly { + mstore(0, 1) + return(0, 4096) + } + } + + function transferFrom( + address from, + address to, + uint256 amount + ) public virtual { + uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals. + + if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount; + + balanceOf[from] -= amount; + + // Cannot overflow because the sum of all user + // balances can't exceed the max uint256 value. + unchecked { + balanceOf[to] += amount; + } + + emit Transfer(from, to, amount); + + assembly { + mstore(0, 1) + return(0, 4096) + } + } +} diff --git a/lib/solmate/src/test/utils/weird-tokens/ReturnsTwoToken.sol b/lib/solmate/src/test/utils/weird-tokens/ReturnsTwoToken.sol new file mode 100644 index 0000000..ac980f8 --- /dev/null +++ b/lib/solmate/src/test/utils/weird-tokens/ReturnsTwoToken.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +contract ReturnsTwoToken { + /*/////////////////////////////////////////////////////////////// + EVENTS + //////////////////////////////////////////////////////////////*/ + + event Transfer(address indexed from, address indexed to, uint256 amount); + + event Approval(address indexed owner, address indexed spender, uint256 amount); + + /*/////////////////////////////////////////////////////////////// + METADATA STORAGE + //////////////////////////////////////////////////////////////*/ + + string public constant name = "ReturnsFalseToken"; + + string public constant symbol = "RTT"; + + uint8 public constant decimals = 18; + + /*/////////////////////////////////////////////////////////////// + ERC20 STORAGE + //////////////////////////////////////////////////////////////*/ + + uint256 public totalSupply; + + mapping(address => uint256) public balanceOf; + + mapping(address => mapping(address => uint256)) public allowance; + + /*/////////////////////////////////////////////////////////////// + CONSTRUCTOR + //////////////////////////////////////////////////////////////*/ + + constructor() { + totalSupply = type(uint256).max; + balanceOf[msg.sender] = type(uint256).max; + } + + /*/////////////////////////////////////////////////////////////// + ERC20 LOGIC + //////////////////////////////////////////////////////////////*/ + + function approve(address, uint256) public virtual returns (uint256) { + return 2; + } + + function transfer(address, uint256) public virtual returns (uint256) { + return 2; + } + + function transferFrom( + address, + address, + uint256 + ) public virtual returns (uint256) { + return 2; + } +} diff --git a/lib/solmate/src/test/utils/weird-tokens/RevertingToken.sol b/lib/solmate/src/test/utils/weird-tokens/RevertingToken.sol new file mode 100644 index 0000000..48ac1fa --- /dev/null +++ b/lib/solmate/src/test/utils/weird-tokens/RevertingToken.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +contract RevertingToken { + /*/////////////////////////////////////////////////////////////// + EVENTS + //////////////////////////////////////////////////////////////*/ + + event Transfer(address indexed from, address indexed to, uint256 amount); + + event Approval(address indexed owner, address indexed spender, uint256 amount); + + /*/////////////////////////////////////////////////////////////// + METADATA STORAGE + //////////////////////////////////////////////////////////////*/ + + string public constant name = "RevertingToken"; + + string public constant symbol = "RT"; + + uint8 public constant decimals = 18; + + /*/////////////////////////////////////////////////////////////// + ERC20 STORAGE + //////////////////////////////////////////////////////////////*/ + + uint256 public totalSupply; + + mapping(address => uint256) public balanceOf; + + mapping(address => mapping(address => uint256)) public allowance; + + /*/////////////////////////////////////////////////////////////// + CONSTRUCTOR + //////////////////////////////////////////////////////////////*/ + + constructor() { + totalSupply = type(uint256).max; + balanceOf[msg.sender] = type(uint256).max; + } + + /*/////////////////////////////////////////////////////////////// + ERC20 LOGIC + //////////////////////////////////////////////////////////////*/ + + function approve(address, uint256) public virtual { + revert(); + } + + function transfer(address, uint256) public virtual { + revert(); + } + + function transferFrom( + address, + address, + uint256 + ) public virtual { + revert(); + } +} diff --git a/lib/solmate/src/tokens/ERC1155.sol b/lib/solmate/src/tokens/ERC1155.sol new file mode 100644 index 0000000..70c4d2d --- /dev/null +++ b/lib/solmate/src/tokens/ERC1155.sol @@ -0,0 +1,257 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +/// @notice Minimalist and gas efficient standard ERC1155 implementation. +/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC1155.sol) +abstract contract ERC1155 { + /*////////////////////////////////////////////////////////////// + EVENTS + //////////////////////////////////////////////////////////////*/ + + event TransferSingle( + address indexed operator, + address indexed from, + address indexed to, + uint256 id, + uint256 amount + ); + + event TransferBatch( + address indexed operator, + address indexed from, + address indexed to, + uint256[] ids, + uint256[] amounts + ); + + event ApprovalForAll(address indexed owner, address indexed operator, bool approved); + + event URI(string value, uint256 indexed id); + + /*////////////////////////////////////////////////////////////// + ERC1155 STORAGE + //////////////////////////////////////////////////////////////*/ + + mapping(address => mapping(uint256 => uint256)) public balanceOf; + + mapping(address => mapping(address => bool)) public isApprovedForAll; + + /*////////////////////////////////////////////////////////////// + METADATA LOGIC + //////////////////////////////////////////////////////////////*/ + + function uri(uint256 id) public view virtual returns (string memory); + + /*////////////////////////////////////////////////////////////// + ERC1155 LOGIC + //////////////////////////////////////////////////////////////*/ + + function setApprovalForAll(address operator, bool approved) public virtual { + isApprovedForAll[msg.sender][operator] = approved; + + emit ApprovalForAll(msg.sender, operator, approved); + } + + function safeTransferFrom( + address from, + address to, + uint256 id, + uint256 amount, + bytes calldata data + ) public virtual { + require(msg.sender == from || isApprovedForAll[from][msg.sender], "NOT_AUTHORIZED"); + + balanceOf[from][id] -= amount; + balanceOf[to][id] += amount; + + emit TransferSingle(msg.sender, from, to, id, amount); + + require( + to.code.length == 0 + ? to != address(0) + : ERC1155TokenReceiver(to).onERC1155Received(msg.sender, from, id, amount, data) == + ERC1155TokenReceiver.onERC1155Received.selector, + "UNSAFE_RECIPIENT" + ); + } + + function safeBatchTransferFrom( + address from, + address to, + uint256[] calldata ids, + uint256[] calldata amounts, + bytes calldata data + ) public virtual { + require(ids.length == amounts.length, "LENGTH_MISMATCH"); + + require(msg.sender == from || isApprovedForAll[from][msg.sender], "NOT_AUTHORIZED"); + + // Storing these outside the loop saves ~15 gas per iteration. + uint256 id; + uint256 amount; + + for (uint256 i = 0; i < ids.length; ) { + id = ids[i]; + amount = amounts[i]; + + balanceOf[from][id] -= amount; + balanceOf[to][id] += amount; + + // An array can't have a total length + // larger than the max uint256 value. + unchecked { + ++i; + } + } + + emit TransferBatch(msg.sender, from, to, ids, amounts); + + require( + to.code.length == 0 + ? to != address(0) + : ERC1155TokenReceiver(to).onERC1155BatchReceived(msg.sender, from, ids, amounts, data) == + ERC1155TokenReceiver.onERC1155BatchReceived.selector, + "UNSAFE_RECIPIENT" + ); + } + + function balanceOfBatch(address[] calldata owners, uint256[] calldata ids) + public + view + virtual + returns (uint256[] memory balances) + { + require(owners.length == ids.length, "LENGTH_MISMATCH"); + + balances = new uint256[](owners.length); + + // Unchecked because the only math done is incrementing + // the array index counter which cannot possibly overflow. + unchecked { + for (uint256 i = 0; i < owners.length; ++i) { + balances[i] = balanceOf[owners[i]][ids[i]]; + } + } + } + + /*////////////////////////////////////////////////////////////// + ERC165 LOGIC + //////////////////////////////////////////////////////////////*/ + + function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { + return + interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165 + interfaceId == 0xd9b67a26 || // ERC165 Interface ID for ERC1155 + interfaceId == 0x0e89341c; // ERC165 Interface ID for ERC1155MetadataURI + } + + /*////////////////////////////////////////////////////////////// + INTERNAL MINT/BURN LOGIC + //////////////////////////////////////////////////////////////*/ + + function _mint( + address to, + uint256 id, + uint256 amount, + bytes memory data + ) internal virtual { + balanceOf[to][id] += amount; + + emit TransferSingle(msg.sender, address(0), to, id, amount); + + require( + to.code.length == 0 + ? to != address(0) + : ERC1155TokenReceiver(to).onERC1155Received(msg.sender, address(0), id, amount, data) == + ERC1155TokenReceiver.onERC1155Received.selector, + "UNSAFE_RECIPIENT" + ); + } + + function _batchMint( + address to, + uint256[] memory ids, + uint256[] memory amounts, + bytes memory data + ) internal virtual { + uint256 idsLength = ids.length; // Saves MLOADs. + + require(idsLength == amounts.length, "LENGTH_MISMATCH"); + + for (uint256 i = 0; i < idsLength; ) { + balanceOf[to][ids[i]] += amounts[i]; + + // An array can't have a total length + // larger than the max uint256 value. + unchecked { + ++i; + } + } + + emit TransferBatch(msg.sender, address(0), to, ids, amounts); + + require( + to.code.length == 0 + ? to != address(0) + : ERC1155TokenReceiver(to).onERC1155BatchReceived(msg.sender, address(0), ids, amounts, data) == + ERC1155TokenReceiver.onERC1155BatchReceived.selector, + "UNSAFE_RECIPIENT" + ); + } + + function _batchBurn( + address from, + uint256[] memory ids, + uint256[] memory amounts + ) internal virtual { + uint256 idsLength = ids.length; // Saves MLOADs. + + require(idsLength == amounts.length, "LENGTH_MISMATCH"); + + for (uint256 i = 0; i < idsLength; ) { + balanceOf[from][ids[i]] -= amounts[i]; + + // An array can't have a total length + // larger than the max uint256 value. + unchecked { + ++i; + } + } + + emit TransferBatch(msg.sender, from, address(0), ids, amounts); + } + + function _burn( + address from, + uint256 id, + uint256 amount + ) internal virtual { + balanceOf[from][id] -= amount; + + emit TransferSingle(msg.sender, from, address(0), id, amount); + } +} + +/// @notice A generic interface for a contract which properly accepts ERC1155 tokens. +/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC1155.sol) +abstract contract ERC1155TokenReceiver { + function onERC1155Received( + address, + address, + uint256, + uint256, + bytes calldata + ) external virtual returns (bytes4) { + return ERC1155TokenReceiver.onERC1155Received.selector; + } + + function onERC1155BatchReceived( + address, + address, + uint256[] calldata, + uint256[] calldata, + bytes calldata + ) external virtual returns (bytes4) { + return ERC1155TokenReceiver.onERC1155BatchReceived.selector; + } +} diff --git a/lib/solmate/src/tokens/ERC20.sol b/lib/solmate/src/tokens/ERC20.sol new file mode 100644 index 0000000..110314b --- /dev/null +++ b/lib/solmate/src/tokens/ERC20.sol @@ -0,0 +1,206 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation. +/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC20.sol) +/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol) +/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it. +abstract contract ERC20 { + /*////////////////////////////////////////////////////////////// + EVENTS + //////////////////////////////////////////////////////////////*/ + + event Transfer(address indexed from, address indexed to, uint256 amount); + + event Approval(address indexed owner, address indexed spender, uint256 amount); + + /*////////////////////////////////////////////////////////////// + METADATA STORAGE + //////////////////////////////////////////////////////////////*/ + + string public name; + + string public symbol; + + uint8 public immutable decimals; + + /*////////////////////////////////////////////////////////////// + ERC20 STORAGE + //////////////////////////////////////////////////////////////*/ + + uint256 public totalSupply; + + mapping(address => uint256) public balanceOf; + + mapping(address => mapping(address => uint256)) public allowance; + + /*////////////////////////////////////////////////////////////// + EIP-2612 STORAGE + //////////////////////////////////////////////////////////////*/ + + uint256 internal immutable INITIAL_CHAIN_ID; + + bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR; + + mapping(address => uint256) public nonces; + + /*////////////////////////////////////////////////////////////// + CONSTRUCTOR + //////////////////////////////////////////////////////////////*/ + + constructor( + string memory _name, + string memory _symbol, + uint8 _decimals + ) { + name = _name; + symbol = _symbol; + decimals = _decimals; + + INITIAL_CHAIN_ID = block.chainid; + INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator(); + } + + /*////////////////////////////////////////////////////////////// + ERC20 LOGIC + //////////////////////////////////////////////////////////////*/ + + function approve(address spender, uint256 amount) public virtual returns (bool) { + allowance[msg.sender][spender] = amount; + + emit Approval(msg.sender, spender, amount); + + return true; + } + + function transfer(address to, uint256 amount) public virtual returns (bool) { + balanceOf[msg.sender] -= amount; + + // Cannot overflow because the sum of all user + // balances can't exceed the max uint256 value. + unchecked { + balanceOf[to] += amount; + } + + emit Transfer(msg.sender, to, amount); + + return true; + } + + function transferFrom( + address from, + address to, + uint256 amount + ) public virtual returns (bool) { + uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals. + + if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount; + + balanceOf[from] -= amount; + + // Cannot overflow because the sum of all user + // balances can't exceed the max uint256 value. + unchecked { + balanceOf[to] += amount; + } + + emit Transfer(from, to, amount); + + return true; + } + + /*////////////////////////////////////////////////////////////// + EIP-2612 LOGIC + //////////////////////////////////////////////////////////////*/ + + function permit( + address owner, + address spender, + uint256 value, + uint256 deadline, + uint8 v, + bytes32 r, + bytes32 s + ) public virtual { + require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED"); + + // Unchecked because the only math done is incrementing + // the owner's nonce which cannot realistically overflow. + unchecked { + address recoveredAddress = ecrecover( + keccak256( + abi.encodePacked( + "\x19\x01", + DOMAIN_SEPARATOR(), + keccak256( + abi.encode( + keccak256( + "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)" + ), + owner, + spender, + value, + nonces[owner]++, + deadline + ) + ) + ) + ), + v, + r, + s + ); + + require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER"); + + allowance[recoveredAddress][spender] = value; + } + + emit Approval(owner, spender, value); + } + + function DOMAIN_SEPARATOR() public view virtual returns (bytes32) { + return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator(); + } + + function computeDomainSeparator() internal view virtual returns (bytes32) { + return + keccak256( + abi.encode( + keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), + keccak256(bytes(name)), + keccak256("1"), + block.chainid, + address(this) + ) + ); + } + + /*////////////////////////////////////////////////////////////// + INTERNAL MINT/BURN LOGIC + //////////////////////////////////////////////////////////////*/ + + function _mint(address to, uint256 amount) internal virtual { + totalSupply += amount; + + // Cannot overflow because the sum of all user + // balances can't exceed the max uint256 value. + unchecked { + balanceOf[to] += amount; + } + + emit Transfer(address(0), to, amount); + } + + function _burn(address from, uint256 amount) internal virtual { + balanceOf[from] -= amount; + + // Cannot underflow because a user's balance + // will never be larger than the total supply. + unchecked { + totalSupply -= amount; + } + + emit Transfer(from, address(0), amount); + } +} diff --git a/lib/solmate/src/tokens/ERC721.sol b/lib/solmate/src/tokens/ERC721.sol new file mode 100644 index 0000000..13309b7 --- /dev/null +++ b/lib/solmate/src/tokens/ERC721.sol @@ -0,0 +1,231 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +/// @notice Modern, minimalist, and gas efficient ERC-721 implementation. +/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol) +abstract contract ERC721 { + /*////////////////////////////////////////////////////////////// + EVENTS + //////////////////////////////////////////////////////////////*/ + + event Transfer(address indexed from, address indexed to, uint256 indexed id); + + event Approval(address indexed owner, address indexed spender, uint256 indexed id); + + event ApprovalForAll(address indexed owner, address indexed operator, bool approved); + + /*////////////////////////////////////////////////////////////// + METADATA STORAGE/LOGIC + //////////////////////////////////////////////////////////////*/ + + string public name; + + string public symbol; + + function tokenURI(uint256 id) public view virtual returns (string memory); + + /*////////////////////////////////////////////////////////////// + ERC721 BALANCE/OWNER STORAGE + //////////////////////////////////////////////////////////////*/ + + mapping(uint256 => address) internal _ownerOf; + + mapping(address => uint256) internal _balanceOf; + + function ownerOf(uint256 id) public view virtual returns (address owner) { + require((owner = _ownerOf[id]) != address(0), "NOT_MINTED"); + } + + function balanceOf(address owner) public view virtual returns (uint256) { + require(owner != address(0), "ZERO_ADDRESS"); + + return _balanceOf[owner]; + } + + /*////////////////////////////////////////////////////////////// + ERC721 APPROVAL STORAGE + //////////////////////////////////////////////////////////////*/ + + mapping(uint256 => address) public getApproved; + + mapping(address => mapping(address => bool)) public isApprovedForAll; + + /*////////////////////////////////////////////////////////////// + CONSTRUCTOR + //////////////////////////////////////////////////////////////*/ + + constructor(string memory _name, string memory _symbol) { + name = _name; + symbol = _symbol; + } + + /*////////////////////////////////////////////////////////////// + ERC721 LOGIC + //////////////////////////////////////////////////////////////*/ + + function approve(address spender, uint256 id) public virtual { + address owner = _ownerOf[id]; + + require(msg.sender == owner || isApprovedForAll[owner][msg.sender], "NOT_AUTHORIZED"); + + getApproved[id] = spender; + + emit Approval(owner, spender, id); + } + + function setApprovalForAll(address operator, bool approved) public virtual { + isApprovedForAll[msg.sender][operator] = approved; + + emit ApprovalForAll(msg.sender, operator, approved); + } + + function transferFrom( + address from, + address to, + uint256 id + ) public virtual { + require(from == _ownerOf[id], "WRONG_FROM"); + + require(to != address(0), "INVALID_RECIPIENT"); + + require( + msg.sender == from || isApprovedForAll[from][msg.sender] || msg.sender == getApproved[id], + "NOT_AUTHORIZED" + ); + + // Underflow of the sender's balance is impossible because we check for + // ownership above and the recipient's balance can't realistically overflow. + unchecked { + _balanceOf[from]--; + + _balanceOf[to]++; + } + + _ownerOf[id] = to; + + delete getApproved[id]; + + emit Transfer(from, to, id); + } + + function safeTransferFrom( + address from, + address to, + uint256 id + ) public virtual { + transferFrom(from, to, id); + + require( + to.code.length == 0 || + ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, "") == + ERC721TokenReceiver.onERC721Received.selector, + "UNSAFE_RECIPIENT" + ); + } + + function safeTransferFrom( + address from, + address to, + uint256 id, + bytes calldata data + ) public virtual { + transferFrom(from, to, id); + + require( + to.code.length == 0 || + ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, data) == + ERC721TokenReceiver.onERC721Received.selector, + "UNSAFE_RECIPIENT" + ); + } + + /*////////////////////////////////////////////////////////////// + ERC165 LOGIC + //////////////////////////////////////////////////////////////*/ + + function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { + return + interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165 + interfaceId == 0x80ac58cd || // ERC165 Interface ID for ERC721 + interfaceId == 0x5b5e139f; // ERC165 Interface ID for ERC721Metadata + } + + /*////////////////////////////////////////////////////////////// + INTERNAL MINT/BURN LOGIC + //////////////////////////////////////////////////////////////*/ + + function _mint(address to, uint256 id) internal virtual { + require(to != address(0), "INVALID_RECIPIENT"); + + require(_ownerOf[id] == address(0), "ALREADY_MINTED"); + + // Counter overflow is incredibly unrealistic. + unchecked { + _balanceOf[to]++; + } + + _ownerOf[id] = to; + + emit Transfer(address(0), to, id); + } + + function _burn(uint256 id) internal virtual { + address owner = _ownerOf[id]; + + require(owner != address(0), "NOT_MINTED"); + + // Ownership check above ensures no underflow. + unchecked { + _balanceOf[owner]--; + } + + delete _ownerOf[id]; + + delete getApproved[id]; + + emit Transfer(owner, address(0), id); + } + + /*////////////////////////////////////////////////////////////// + INTERNAL SAFE MINT LOGIC + //////////////////////////////////////////////////////////////*/ + + function _safeMint(address to, uint256 id) internal virtual { + _mint(to, id); + + require( + to.code.length == 0 || + ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, "") == + ERC721TokenReceiver.onERC721Received.selector, + "UNSAFE_RECIPIENT" + ); + } + + function _safeMint( + address to, + uint256 id, + bytes memory data + ) internal virtual { + _mint(to, id); + + require( + to.code.length == 0 || + ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, data) == + ERC721TokenReceiver.onERC721Received.selector, + "UNSAFE_RECIPIENT" + ); + } +} + +/// @notice A generic interface for a contract which properly accepts ERC721 tokens. +/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol) +abstract contract ERC721TokenReceiver { + function onERC721Received( + address, + address, + uint256, + bytes calldata + ) external virtual returns (bytes4) { + return ERC721TokenReceiver.onERC721Received.selector; + } +} diff --git a/lib/solmate/src/tokens/WETH.sol b/lib/solmate/src/tokens/WETH.sol new file mode 100644 index 0000000..5c470e3 --- /dev/null +++ b/lib/solmate/src/tokens/WETH.sol @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +import {ERC20} from "./ERC20.sol"; + +import {SafeTransferLib} from "../utils/SafeTransferLib.sol"; + +/// @notice Minimalist and modern Wrapped Ether implementation. +/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/WETH.sol) +/// @author Inspired by WETH9 (https://github.com/dapphub/ds-weth/blob/master/src/weth9.sol) +contract WETH is ERC20("Wrapped Ether", "WETH", 18) { + using SafeTransferLib for address; + + event Deposit(address indexed from, uint256 amount); + + event Withdrawal(address indexed to, uint256 amount); + + function deposit() public payable virtual { + _mint(msg.sender, msg.value); + + emit Deposit(msg.sender, msg.value); + } + + function withdraw(uint256 amount) public virtual { + _burn(msg.sender, amount); + + emit Withdrawal(msg.sender, amount); + + msg.sender.safeTransferETH(amount); + } + + receive() external payable virtual { + deposit(); + } +} diff --git a/lib/solmate/src/utils/Bytes32AddressLib.sol b/lib/solmate/src/utils/Bytes32AddressLib.sol new file mode 100644 index 0000000..bc857be --- /dev/null +++ b/lib/solmate/src/utils/Bytes32AddressLib.sol @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +/// @notice Library for converting between addresses and bytes32 values. +/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/Bytes32AddressLib.sol) +library Bytes32AddressLib { + function fromLast20Bytes(bytes32 bytesValue) internal pure returns (address) { + return address(uint160(uint256(bytesValue))); + } + + function fillLast12Bytes(address addressValue) internal pure returns (bytes32) { + return bytes32(bytes20(addressValue)); + } +} diff --git a/lib/solmate/src/utils/CREATE3.sol b/lib/solmate/src/utils/CREATE3.sol new file mode 100644 index 0000000..04e0915 --- /dev/null +++ b/lib/solmate/src/utils/CREATE3.sol @@ -0,0 +1,82 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +import {Bytes32AddressLib} from "./Bytes32AddressLib.sol"; + +/// @notice Deploy to deterministic addresses without an initcode factor. +/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/CREATE3.sol) +/// @author Modified from 0xSequence (https://github.com/0xSequence/create3/blob/master/contracts/Create3.sol) +library CREATE3 { + using Bytes32AddressLib for bytes32; + + //--------------------------------------------------------------------------------// + // Opcode | Opcode + Arguments | Description | Stack View // + //--------------------------------------------------------------------------------// + // 0x36 | 0x36 | CALLDATASIZE | size // + // 0x3d | 0x3d | RETURNDATASIZE | 0 size // + // 0x3d | 0x3d | RETURNDATASIZE | 0 0 size // + // 0x37 | 0x37 | CALLDATACOPY | // + // 0x36 | 0x36 | CALLDATASIZE | size // + // 0x3d | 0x3d | RETURNDATASIZE | 0 size // + // 0x34 | 0x34 | CALLVALUE | value 0 size // + // 0xf0 | 0xf0 | CREATE | newContract // + //--------------------------------------------------------------------------------// + // Opcode | Opcode + Arguments | Description | Stack View // + //--------------------------------------------------------------------------------// + // 0x67 | 0x67XXXXXXXXXXXXXXXX | PUSH8 bytecode | bytecode // + // 0x3d | 0x3d | RETURNDATASIZE | 0 bytecode // + // 0x52 | 0x52 | MSTORE | // + // 0x60 | 0x6008 | PUSH1 08 | 8 // + // 0x60 | 0x6018 | PUSH1 18 | 24 8 // + // 0xf3 | 0xf3 | RETURN | // + //--------------------------------------------------------------------------------// + bytes internal constant PROXY_BYTECODE = hex"67_36_3d_3d_37_36_3d_34_f0_3d_52_60_08_60_18_f3"; + + bytes32 internal constant PROXY_BYTECODE_HASH = keccak256(PROXY_BYTECODE); + + function deploy( + bytes32 salt, + bytes memory creationCode, + uint256 value + ) internal returns (address deployed) { + bytes memory proxyChildBytecode = PROXY_BYTECODE; + + address proxy; + assembly { + // Deploy a new contract with our pre-made bytecode via CREATE2. + // We start 32 bytes into the code to avoid copying the byte length. + proxy := create2(0, add(proxyChildBytecode, 32), mload(proxyChildBytecode), salt) + } + require(proxy != address(0), "DEPLOYMENT_FAILED"); + + deployed = getDeployed(salt); + (bool success, ) = proxy.call{value: value}(creationCode); + require(success && deployed.code.length != 0, "INITIALIZATION_FAILED"); + } + + function getDeployed(bytes32 salt) internal view returns (address) { + address proxy = keccak256( + abi.encodePacked( + // Prefix: + bytes1(0xFF), + // Creator: + address(this), + // Salt: + salt, + // Bytecode hash: + PROXY_BYTECODE_HASH + ) + ).fromLast20Bytes(); + + return + keccak256( + abi.encodePacked( + // 0xd6 = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x01) + // 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex) + hex"d6_94", + proxy, + hex"01" // Nonce of the proxy contract (1) + ) + ).fromLast20Bytes(); + } +} diff --git a/lib/solmate/src/utils/FixedPointMathLib.sol b/lib/solmate/src/utils/FixedPointMathLib.sol new file mode 100644 index 0000000..b448690 --- /dev/null +++ b/lib/solmate/src/utils/FixedPointMathLib.sol @@ -0,0 +1,222 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +/// @notice Arithmetic library with operations for fixed-point numbers. +/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/FixedPointMathLib.sol) +/// @author Inspired by USM (https://github.com/usmfum/USM/blob/master/contracts/WadMath.sol) +library FixedPointMathLib { + /*////////////////////////////////////////////////////////////// + SIMPLIFIED FIXED POINT OPERATIONS + //////////////////////////////////////////////////////////////*/ + + uint256 internal constant WAD = 1e18; // The scalar of ETH and most ERC20s. + + function mulWadDown(uint256 x, uint256 y) internal pure returns (uint256) { + return mulDivDown(x, y, WAD); // Equivalent to (x * y) / WAD rounded down. + } + + function mulWadUp(uint256 x, uint256 y) internal pure returns (uint256) { + return mulDivUp(x, y, WAD); // Equivalent to (x * y) / WAD rounded up. + } + + function divWadDown(uint256 x, uint256 y) internal pure returns (uint256) { + return mulDivDown(x, WAD, y); // Equivalent to (x * WAD) / y rounded down. + } + + function divWadUp(uint256 x, uint256 y) internal pure returns (uint256) { + return mulDivUp(x, WAD, y); // Equivalent to (x * WAD) / y rounded up. + } + + /*////////////////////////////////////////////////////////////// + LOW LEVEL FIXED POINT OPERATIONS + //////////////////////////////////////////////////////////////*/ + + function mulDivDown( + uint256 x, + uint256 y, + uint256 denominator + ) internal pure returns (uint256 z) { + assembly { + // Store x * y in z for now. + z := mul(x, y) + + // Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y)) + if iszero(and(iszero(iszero(denominator)), or(iszero(x), eq(div(z, x), y)))) { + revert(0, 0) + } + + // Divide z by the denominator. + z := div(z, denominator) + } + } + + function mulDivUp( + uint256 x, + uint256 y, + uint256 denominator + ) internal pure returns (uint256 z) { + assembly { + // Store x * y in z for now. + z := mul(x, y) + + // Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y)) + if iszero(and(iszero(iszero(denominator)), or(iszero(x), eq(div(z, x), y)))) { + revert(0, 0) + } + + // First, divide z - 1 by the denominator and add 1. + // We allow z - 1 to underflow if z is 0, because we multiply the + // end result by 0 if z is zero, ensuring we return 0 if z is zero. + z := mul(iszero(iszero(z)), add(div(sub(z, 1), denominator), 1)) + } + } + + function rpow( + uint256 x, + uint256 n, + uint256 scalar + ) internal pure returns (uint256 z) { + assembly { + switch x + case 0 { + switch n + case 0 { + // 0 ** 0 = 1 + z := scalar + } + default { + // 0 ** n = 0 + z := 0 + } + } + default { + switch mod(n, 2) + case 0 { + // If n is even, store scalar in z for now. + z := scalar + } + default { + // If n is odd, store x in z for now. + z := x + } + + // Shifting right by 1 is like dividing by 2. + let half := shr(1, scalar) + + for { + // Shift n right by 1 before looping to halve it. + n := shr(1, n) + } n { + // Shift n right by 1 each iteration to halve it. + n := shr(1, n) + } { + // Revert immediately if x ** 2 would overflow. + // Equivalent to iszero(eq(div(xx, x), x)) here. + if shr(128, x) { + revert(0, 0) + } + + // Store x squared. + let xx := mul(x, x) + + // Round to the nearest number. + let xxRound := add(xx, half) + + // Revert if xx + half overflowed. + if lt(xxRound, xx) { + revert(0, 0) + } + + // Set x to scaled xxRound. + x := div(xxRound, scalar) + + // If n is even: + if mod(n, 2) { + // Compute z * x. + let zx := mul(z, x) + + // If z * x overflowed: + if iszero(eq(div(zx, x), z)) { + // Revert if x is non-zero. + if iszero(iszero(x)) { + revert(0, 0) + } + } + + // Round to the nearest number. + let zxRound := add(zx, half) + + // Revert if zx + half overflowed. + if lt(zxRound, zx) { + revert(0, 0) + } + + // Return properly scaled zxRound. + z := div(zxRound, scalar) + } + } + } + } + } + + /*////////////////////////////////////////////////////////////// + GENERAL NUMBER UTILITIES + //////////////////////////////////////////////////////////////*/ + + function sqrt(uint256 x) internal pure returns (uint256 z) { + assembly { + // Start off with z at 1. + z := 1 + + // Used below to help find a nearby power of 2. + let y := x + + // Find the lowest power of 2 that is at least sqrt(x). + if iszero(lt(y, 0x100000000000000000000000000000000)) { + y := shr(128, y) // Like dividing by 2 ** 128. + z := shl(64, z) // Like multiplying by 2 ** 64. + } + if iszero(lt(y, 0x10000000000000000)) { + y := shr(64, y) // Like dividing by 2 ** 64. + z := shl(32, z) // Like multiplying by 2 ** 32. + } + if iszero(lt(y, 0x100000000)) { + y := shr(32, y) // Like dividing by 2 ** 32. + z := shl(16, z) // Like multiplying by 2 ** 16. + } + if iszero(lt(y, 0x10000)) { + y := shr(16, y) // Like dividing by 2 ** 16. + z := shl(8, z) // Like multiplying by 2 ** 8. + } + if iszero(lt(y, 0x100)) { + y := shr(8, y) // Like dividing by 2 ** 8. + z := shl(4, z) // Like multiplying by 2 ** 4. + } + if iszero(lt(y, 0x10)) { + y := shr(4, y) // Like dividing by 2 ** 4. + z := shl(2, z) // Like multiplying by 2 ** 2. + } + if iszero(lt(y, 0x8)) { + // Equivalent to 2 ** z. + z := shl(1, z) + } + + // Shifting right by 1 is like dividing by 2. + z := shr(1, add(z, div(x, z))) + z := shr(1, add(z, div(x, z))) + z := shr(1, add(z, div(x, z))) + z := shr(1, add(z, div(x, z))) + z := shr(1, add(z, div(x, z))) + z := shr(1, add(z, div(x, z))) + z := shr(1, add(z, div(x, z))) + + // Compute a rounded down version of z. + let zRoundDown := div(x, z) + + // If zRoundDown is smaller, use it. + if lt(zRoundDown, z) { + z := zRoundDown + } + } + } +} diff --git a/lib/solmate/src/utils/ReentrancyGuard.sol b/lib/solmate/src/utils/ReentrancyGuard.sol new file mode 100644 index 0000000..99aa462 --- /dev/null +++ b/lib/solmate/src/utils/ReentrancyGuard.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +/// @notice Gas optimized reentrancy protection for smart contracts. +/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/ReentrancyGuard.sol) +/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol) +abstract contract ReentrancyGuard { + uint256 private locked = 1; + + modifier nonReentrant() virtual { + require(locked == 1, "REENTRANCY"); + + locked = 2; + + _; + + locked = 1; + } +} diff --git a/lib/solmate/src/utils/SSTORE2.sol b/lib/solmate/src/utils/SSTORE2.sol new file mode 100644 index 0000000..bc10d72 --- /dev/null +++ b/lib/solmate/src/utils/SSTORE2.sol @@ -0,0 +1,99 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +/// @notice Read and write to persistent storage at a fraction of the cost. +/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/SSTORE2.sol) +/// @author Modified from 0xSequence (https://github.com/0xSequence/sstore2/blob/master/contracts/SSTORE2.sol) +library SSTORE2 { + uint256 internal constant DATA_OFFSET = 1; // We skip the first byte as it's a STOP opcode to ensure the contract can't be called. + + /*////////////////////////////////////////////////////////////// + WRITE LOGIC + //////////////////////////////////////////////////////////////*/ + + function write(bytes memory data) internal returns (address pointer) { + // Prefix the bytecode with a STOP opcode to ensure it cannot be called. + bytes memory runtimeCode = abi.encodePacked(hex"00", data); + + bytes memory creationCode = abi.encodePacked( + //---------------------------------------------------------------------------------------------------------------// + // Opcode | Opcode + Arguments | Description | Stack View // + //---------------------------------------------------------------------------------------------------------------// + // 0x60 | 0x600B | PUSH1 11 | codeOffset // + // 0x59 | 0x59 | MSIZE | 0 codeOffset // + // 0x81 | 0x81 | DUP2 | codeOffset 0 codeOffset // + // 0x38 | 0x38 | CODESIZE | codeSize codeOffset 0 codeOffset // + // 0x03 | 0x03 | SUB | (codeSize - codeOffset) 0 codeOffset // + // 0x80 | 0x80 | DUP | (codeSize - codeOffset) (codeSize - codeOffset) 0 codeOffset // + // 0x92 | 0x92 | SWAP3 | codeOffset (codeSize - codeOffset) 0 (codeSize - codeOffset) // + // 0x59 | 0x59 | MSIZE | 0 codeOffset (codeSize - codeOffset) 0 (codeSize - codeOffset) // + // 0x39 | 0x39 | CODECOPY | 0 (codeSize - codeOffset) // + // 0xf3 | 0xf3 | RETURN | // + //---------------------------------------------------------------------------------------------------------------// + hex"60_0B_59_81_38_03_80_92_59_39_F3", // Returns all code in the contract except for the first 11 (0B in hex) bytes. + runtimeCode // The bytecode we want the contract to have after deployment. Capped at 1 byte less than the code size limit. + ); + + assembly { + // Deploy a new contract with the generated creation code. + // We start 32 bytes into the code to avoid copying the byte length. + pointer := create(0, add(creationCode, 32), mload(creationCode)) + } + + require(pointer != address(0), "DEPLOYMENT_FAILED"); + } + + /*////////////////////////////////////////////////////////////// + READ LOGIC + //////////////////////////////////////////////////////////////*/ + + function read(address pointer) internal view returns (bytes memory) { + return readBytecode(pointer, DATA_OFFSET, pointer.code.length - DATA_OFFSET); + } + + function read(address pointer, uint256 start) internal view returns (bytes memory) { + start += DATA_OFFSET; + + return readBytecode(pointer, start, pointer.code.length - start); + } + + function read( + address pointer, + uint256 start, + uint256 end + ) internal view returns (bytes memory) { + start += DATA_OFFSET; + end += DATA_OFFSET; + + require(pointer.code.length >= end, "OUT_OF_BOUNDS"); + + return readBytecode(pointer, start, end - start); + } + + /*////////////////////////////////////////////////////////////// + INTERNAL HELPER LOGIC + //////////////////////////////////////////////////////////////*/ + + function readBytecode( + address pointer, + uint256 start, + uint256 size + ) private view returns (bytes memory data) { + assembly { + // Get a pointer to some free memory. + data := mload(0x40) + + // Update the free memory pointer to prevent overriding our data. + // We use and(x, not(31)) as a cheaper equivalent to sub(x, mod(x, 32)). + // Adding 31 to size and running the result through the logic above ensures + // the memory pointer remains word-aligned, following the Solidity convention. + mstore(0x40, add(data, and(add(add(size, 32), 31), not(31)))) + + // Store the size of the data in the first 32 byte chunk of free memory. + mstore(data, size) + + // Copy the code into memory right after the 32 bytes we used to store the size. + extcodecopy(pointer, add(data, 32), start, size) + } + } +} diff --git a/lib/solmate/src/utils/SafeCastLib.sol b/lib/solmate/src/utils/SafeCastLib.sol new file mode 100644 index 0000000..ab4287f --- /dev/null +++ b/lib/solmate/src/utils/SafeCastLib.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +/// @notice Safe unsigned integer casting library that reverts on overflow. +/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/SafeCastLib.sol) +/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/math/SafeCast.sol) +library SafeCastLib { + function safeCastTo248(uint256 x) internal pure returns (uint248 y) { + require(x < 1 << 248); + + y = uint248(x); + } + + function safeCastTo224(uint256 x) internal pure returns (uint224 y) { + require(x < 1 << 224); + + y = uint224(x); + } + + function safeCastTo192(uint256 x) internal pure returns (uint192 y) { + require(x < 1 << 192); + + y = uint192(x); + } + + function safeCastTo160(uint256 x) internal pure returns (uint160 y) { + require(x < 1 << 160); + + y = uint160(x); + } + + function safeCastTo128(uint256 x) internal pure returns (uint128 y) { + require(x < 1 << 128); + + y = uint128(x); + } + + function safeCastTo96(uint256 x) internal pure returns (uint96 y) { + require(x < 1 << 96); + + y = uint96(x); + } + + function safeCastTo64(uint256 x) internal pure returns (uint64 y) { + require(x < 1 << 64); + + y = uint64(x); + } + + function safeCastTo32(uint256 x) internal pure returns (uint32 y) { + require(x < 1 << 32); + + y = uint32(x); + } + + function safeCastTo8(uint256 x) internal pure returns (uint8 y) { + require(x < 1 << 8); + + y = uint8(x); + } +} diff --git a/lib/solmate/src/utils/SafeTransferLib.sol b/lib/solmate/src/utils/SafeTransferLib.sol new file mode 100644 index 0000000..e4d911f --- /dev/null +++ b/lib/solmate/src/utils/SafeTransferLib.sol @@ -0,0 +1,126 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.0; + +import {ERC20} from "../tokens/ERC20.sol"; + +/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values. +/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/SafeTransferLib.sol) +/// @dev Use with caution! Some functions in this library knowingly create dirty bits at the destination of the free memory pointer. +/// @dev Note that none of the functions in this library check that a token has code at all! That responsibility is delegated to the caller. +library SafeTransferLib { + event Debug(bool one, bool two, uint256 retsize); + + /*////////////////////////////////////////////////////////////// + ETH OPERATIONS + //////////////////////////////////////////////////////////////*/ + + function safeTransferETH(address to, uint256 amount) internal { + bool success; + + assembly { + // Transfer the ETH and store if it succeeded or not. + success := call(gas(), to, amount, 0, 0, 0, 0) + } + + require(success, "ETH_TRANSFER_FAILED"); + } + + /*////////////////////////////////////////////////////////////// + ERC20 OPERATIONS + //////////////////////////////////////////////////////////////*/ + + function safeTransferFrom( + ERC20 token, + address from, + address to, + uint256 amount + ) internal { + bool success; + + assembly { + // Get a pointer to some free memory. + let freeMemoryPointer := mload(0x40) + + // Write the abi-encoded calldata into memory, beginning with the function selector. + mstore(freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000) + mstore(add(freeMemoryPointer, 4), from) // Append the "from" argument. + mstore(add(freeMemoryPointer, 36), to) // Append the "to" argument. + mstore(add(freeMemoryPointer, 68), amount) // Append the "amount" argument. + + success := and( + // Set success to whether the call reverted, if not we check it either + // returned exactly 1 (can't just be non-zero data), or had no return data. + or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())), + // We use 100 because the length of our calldata totals up like so: 4 + 32 * 3. + // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. + // Counterintuitively, this call must be positioned second to the or() call in the + // surrounding and() call or else returndatasize() will be zero during the computation. + call(gas(), token, 0, freeMemoryPointer, 100, 0, 32) + ) + } + + require(success, "TRANSFER_FROM_FAILED"); + } + + function safeTransfer( + ERC20 token, + address to, + uint256 amount + ) internal { + bool success; + + assembly { + // Get a pointer to some free memory. + let freeMemoryPointer := mload(0x40) + + // Write the abi-encoded calldata into memory, beginning with the function selector. + mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000) + mstore(add(freeMemoryPointer, 4), to) // Append the "to" argument. + mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. + + success := and( + // Set success to whether the call reverted, if not we check it either + // returned exactly 1 (can't just be non-zero data), or had no return data. + or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())), + // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2. + // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. + // Counterintuitively, this call must be positioned second to the or() call in the + // surrounding and() call or else returndatasize() will be zero during the computation. + call(gas(), token, 0, freeMemoryPointer, 68, 0, 32) + ) + } + + require(success, "TRANSFER_FAILED"); + } + + function safeApprove( + ERC20 token, + address to, + uint256 amount + ) internal { + bool success; + + assembly { + // Get a pointer to some free memory. + let freeMemoryPointer := mload(0x40) + + // Write the abi-encoded calldata into memory, beginning with the function selector. + mstore(freeMemoryPointer, 0x095ea7b300000000000000000000000000000000000000000000000000000000) + mstore(add(freeMemoryPointer, 4), to) // Append the "to" argument. + mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. + + success := and( + // Set success to whether the call reverted, if not we check it either + // returned exactly 1 (can't just be non-zero data), or had no return data. + or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())), + // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2. + // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. + // Counterintuitively, this call must be positioned second to the or() call in the + // surrounding and() call or else returndatasize() will be zero during the computation. + call(gas(), token, 0, freeMemoryPointer, 68, 0, 32) + ) + } + + require(success, "APPROVE_FAILED"); + } +} diff --git a/remappings.txt b/remappings.txt new file mode 100644 index 0000000..3963bf5 --- /dev/null +++ b/remappings.txt @@ -0,0 +1,2 @@ +forge-std/=lib/forge-std/src/ +solmate/=lib/solmate/src/ \ No newline at end of file From 9e58f1329fb1ddc16bad1b2f6e3ca085e01ce1e4 Mon Sep 17 00:00:00 2001 From: dmarzzz Date: Sun, 7 Jan 2024 21:18:22 -0500 Subject: [PATCH 05/14] add git submodule for solmate --- .gitmodules | 3 +++ examples/712/L1/src/NFTEE.sol | 1 + examples/712/lib | 1 + 3 files changed, 5 insertions(+) create mode 160000 examples/712/lib diff --git a/.gitmodules b/.gitmodules index 99d920f..472cf73 100644 --- a/.gitmodules +++ b/.gitmodules @@ -5,3 +5,6 @@ [submodule "lib/suave-std"] path = lib/suave-std url = https://github.com/flashbots/suave-std +[submodule "examples/712/lib"] + path = examples/712/lib + url = https://github.com/transmissions11/solmate diff --git a/examples/712/L1/src/NFTEE.sol b/examples/712/L1/src/NFTEE.sol index 0ff9bda..3035eb9 100644 --- a/examples/712/L1/src/NFTEE.sol +++ b/examples/712/L1/src/NFTEE.sol @@ -28,6 +28,7 @@ contract SuaveNFT is ERC721 { constructor(address _authorizedSigner) ERC721(NAME, SYMBOL) { authorizedSigner = _authorizedSigner; + // TODO: Make dynamic // // Initialize DOMAIN_SEPARATOR with EIP-712 domain separator, specific to your contract // DOMAIN_SEPARATOR = keccak256( // abi.encode( diff --git a/examples/712/lib b/examples/712/lib new file mode 160000 index 0000000..4b47a19 --- /dev/null +++ b/examples/712/lib @@ -0,0 +1 @@ +Subproject commit 4b47a19038b798b4a33d9749d25e570443520647 From e888a367d458f13ae78db24af0f5867e4a917e7f Mon Sep 17 00:00:00 2001 From: dmarzzz Date: Sun, 7 Jan 2024 21:25:44 -0500 Subject: [PATCH 06/14] remove submodule --- .gitmodules | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index 472cf73..99d920f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -5,6 +5,3 @@ [submodule "lib/suave-std"] path = lib/suave-std url = https://github.com/flashbots/suave-std -[submodule "examples/712/lib"] - path = examples/712/lib - url = https://github.com/transmissions11/solmate From b87151412f24657803e72636dd89cf6a9a245393 Mon Sep 17 00:00:00 2001 From: dmarzzz Date: Sun, 7 Jan 2024 21:27:23 -0500 Subject: [PATCH 07/14] remove solmate --- lib/solmate/.gas-snapshot | 222 --- lib/solmate/.gitattributes | 2 - lib/solmate/.github/pull_request_template.md | 13 - lib/solmate/.github/workflows/tests.yml | 29 - lib/solmate/.gitignore | 3 - lib/solmate/.gitmodules | 3 - lib/solmate/.prettierignore | 1 - lib/solmate/.prettierrc | 14 - lib/solmate/.vscode/settings.json | 9 - lib/solmate/LICENSE | 661 ------ lib/solmate/README.md | 66 - .../audits/v6-Fixed-Point-Solutions.pdf | Bin 170456 -> 0 bytes lib/solmate/foundry.toml | 7 - lib/solmate/lib/ds-test/.gitignore | 3 - lib/solmate/lib/ds-test/LICENSE | 674 ------- lib/solmate/lib/ds-test/Makefile | 14 - lib/solmate/lib/ds-test/default.nix | 4 - lib/solmate/lib/ds-test/demo/demo.sol | 223 --- lib/solmate/lib/ds-test/src/test.sol | 469 ----- lib/solmate/package-lock.json | 125 -- lib/solmate/package.json | 20 - lib/solmate/src/auth/Auth.sol | 64 - lib/solmate/src/auth/Owned.sol | 44 - .../auth/authorities/MultiRolesAuthority.sol | 123 -- .../src/auth/authorities/RolesAuthority.sol | 108 - lib/solmate/src/mixins/ERC4626.sol | 183 -- lib/solmate/src/test/Auth.t.sol | 192 -- lib/solmate/src/test/Bytes32AddressLib.t.sol | 22 - lib/solmate/src/test/CREATE3.t.sol | 74 - lib/solmate/src/test/DSTestPlus.t.sol | 72 - lib/solmate/src/test/ERC1155.t.sol | 1773 ----------------- lib/solmate/src/test/ERC20.t.sol | 529 ----- lib/solmate/src/test/ERC4626.t.sol | 446 ----- lib/solmate/src/test/ERC721.t.sol | 727 ------- lib/solmate/src/test/FixedPointMathLib.t.sol | 277 --- .../src/test/MultiRolesAuthority.t.sol | 321 --- lib/solmate/src/test/Owned.t.sol | 40 - lib/solmate/src/test/ReentrancyGuard.t.sol | 56 - lib/solmate/src/test/RolesAuthority.t.sol | 148 -- lib/solmate/src/test/SSTORE2.t.sol | 152 -- lib/solmate/src/test/SafeCastLib.t.sol | 197 -- lib/solmate/src/test/SafeTransferLib.t.sol | 610 ------ lib/solmate/src/test/WETH.t.sol | 146 -- .../src/test/utils/DSInvariantTest.sol | 16 - lib/solmate/src/test/utils/DSTestPlus.sol | 179 -- lib/solmate/src/test/utils/Hevm.sol | 107 - .../src/test/utils/mocks/MockAuthChild.sol | 12 - .../src/test/utils/mocks/MockAuthority.sol | 20 - .../src/test/utils/mocks/MockERC1155.sol | 42 - .../src/test/utils/mocks/MockERC20.sol | 20 - .../src/test/utils/mocks/MockERC4626.sol | 28 - .../src/test/utils/mocks/MockERC721.sol | 30 - .../src/test/utils/mocks/MockOwned.sol | 12 - .../utils/weird-tokens/MissingReturnToken.sol | 83 - .../utils/weird-tokens/ReturnsFalseToken.sol | 61 - .../weird-tokens/ReturnsGarbageToken.sol | 115 -- .../weird-tokens/ReturnsTooLittleToken.sol | 70 - .../weird-tokens/ReturnsTooMuchToken.sol | 98 - .../utils/weird-tokens/ReturnsTwoToken.sol | 61 - .../utils/weird-tokens/RevertingToken.sol | 61 - lib/solmate/src/tokens/ERC1155.sol | 257 --- lib/solmate/src/tokens/ERC20.sol | 206 -- lib/solmate/src/tokens/ERC721.sol | 231 --- lib/solmate/src/tokens/WETH.sol | 35 - lib/solmate/src/utils/Bytes32AddressLib.sol | 14 - lib/solmate/src/utils/CREATE3.sol | 82 - lib/solmate/src/utils/FixedPointMathLib.sol | 222 --- lib/solmate/src/utils/ReentrancyGuard.sol | 19 - lib/solmate/src/utils/SSTORE2.sol | 99 - lib/solmate/src/utils/SafeCastLib.sol | 61 - lib/solmate/src/utils/SafeTransferLib.sol | 126 -- 71 files changed, 11233 deletions(-) delete mode 100644 lib/solmate/.gas-snapshot delete mode 100644 lib/solmate/.gitattributes delete mode 100644 lib/solmate/.github/pull_request_template.md delete mode 100644 lib/solmate/.github/workflows/tests.yml delete mode 100644 lib/solmate/.gitignore delete mode 100644 lib/solmate/.gitmodules delete mode 100644 lib/solmate/.prettierignore delete mode 100644 lib/solmate/.prettierrc delete mode 100644 lib/solmate/.vscode/settings.json delete mode 100644 lib/solmate/LICENSE delete mode 100644 lib/solmate/README.md delete mode 100644 lib/solmate/audits/v6-Fixed-Point-Solutions.pdf delete mode 100644 lib/solmate/foundry.toml delete mode 100644 lib/solmate/lib/ds-test/.gitignore delete mode 100644 lib/solmate/lib/ds-test/LICENSE delete mode 100644 lib/solmate/lib/ds-test/Makefile delete mode 100644 lib/solmate/lib/ds-test/default.nix delete mode 100644 lib/solmate/lib/ds-test/demo/demo.sol delete mode 100644 lib/solmate/lib/ds-test/src/test.sol delete mode 100644 lib/solmate/package-lock.json delete mode 100644 lib/solmate/package.json delete mode 100644 lib/solmate/src/auth/Auth.sol delete mode 100644 lib/solmate/src/auth/Owned.sol delete mode 100644 lib/solmate/src/auth/authorities/MultiRolesAuthority.sol delete mode 100644 lib/solmate/src/auth/authorities/RolesAuthority.sol delete mode 100644 lib/solmate/src/mixins/ERC4626.sol delete mode 100644 lib/solmate/src/test/Auth.t.sol delete mode 100644 lib/solmate/src/test/Bytes32AddressLib.t.sol delete mode 100644 lib/solmate/src/test/CREATE3.t.sol delete mode 100644 lib/solmate/src/test/DSTestPlus.t.sol delete mode 100644 lib/solmate/src/test/ERC1155.t.sol delete mode 100644 lib/solmate/src/test/ERC20.t.sol delete mode 100644 lib/solmate/src/test/ERC4626.t.sol delete mode 100644 lib/solmate/src/test/ERC721.t.sol delete mode 100644 lib/solmate/src/test/FixedPointMathLib.t.sol delete mode 100644 lib/solmate/src/test/MultiRolesAuthority.t.sol delete mode 100644 lib/solmate/src/test/Owned.t.sol delete mode 100644 lib/solmate/src/test/ReentrancyGuard.t.sol delete mode 100644 lib/solmate/src/test/RolesAuthority.t.sol delete mode 100644 lib/solmate/src/test/SSTORE2.t.sol delete mode 100644 lib/solmate/src/test/SafeCastLib.t.sol delete mode 100644 lib/solmate/src/test/SafeTransferLib.t.sol delete mode 100644 lib/solmate/src/test/WETH.t.sol delete mode 100644 lib/solmate/src/test/utils/DSInvariantTest.sol delete mode 100644 lib/solmate/src/test/utils/DSTestPlus.sol delete mode 100644 lib/solmate/src/test/utils/Hevm.sol delete mode 100644 lib/solmate/src/test/utils/mocks/MockAuthChild.sol delete mode 100644 lib/solmate/src/test/utils/mocks/MockAuthority.sol delete mode 100644 lib/solmate/src/test/utils/mocks/MockERC1155.sol delete mode 100644 lib/solmate/src/test/utils/mocks/MockERC20.sol delete mode 100644 lib/solmate/src/test/utils/mocks/MockERC4626.sol delete mode 100644 lib/solmate/src/test/utils/mocks/MockERC721.sol delete mode 100644 lib/solmate/src/test/utils/mocks/MockOwned.sol delete mode 100644 lib/solmate/src/test/utils/weird-tokens/MissingReturnToken.sol delete mode 100644 lib/solmate/src/test/utils/weird-tokens/ReturnsFalseToken.sol delete mode 100644 lib/solmate/src/test/utils/weird-tokens/ReturnsGarbageToken.sol delete mode 100644 lib/solmate/src/test/utils/weird-tokens/ReturnsTooLittleToken.sol delete mode 100644 lib/solmate/src/test/utils/weird-tokens/ReturnsTooMuchToken.sol delete mode 100644 lib/solmate/src/test/utils/weird-tokens/ReturnsTwoToken.sol delete mode 100644 lib/solmate/src/test/utils/weird-tokens/RevertingToken.sol delete mode 100644 lib/solmate/src/tokens/ERC1155.sol delete mode 100644 lib/solmate/src/tokens/ERC20.sol delete mode 100644 lib/solmate/src/tokens/ERC721.sol delete mode 100644 lib/solmate/src/tokens/WETH.sol delete mode 100644 lib/solmate/src/utils/Bytes32AddressLib.sol delete mode 100644 lib/solmate/src/utils/CREATE3.sol delete mode 100644 lib/solmate/src/utils/FixedPointMathLib.sol delete mode 100644 lib/solmate/src/utils/ReentrancyGuard.sol delete mode 100644 lib/solmate/src/utils/SSTORE2.sol delete mode 100644 lib/solmate/src/utils/SafeCastLib.sol delete mode 100644 lib/solmate/src/utils/SafeTransferLib.sol diff --git a/lib/solmate/.gas-snapshot b/lib/solmate/.gas-snapshot deleted file mode 100644 index 14772d2..0000000 --- a/lib/solmate/.gas-snapshot +++ /dev/null @@ -1,222 +0,0 @@ -AuthTest:testCallFunctionAsOwner() (gas: 29871) -AuthTest:testCallFunctionWithPermissiveAuthority() (gas: 124249) -AuthTest:testFailCallFunctionAsNonOwner() (gas: 15491) -AuthTest:testFailCallFunctionAsOwnerWithOutOfOrderAuthority() (gas: 136021) -AuthTest:testFailCallFunctionWithRestrictiveAuthority() (gas: 129201) -AuthTest:testFailSetAuthorityAsNonOwner() (gas: 18260) -AuthTest:testFailSetAuthorityWithRestrictiveAuthority() (gas: 129078) -AuthTest:testFailSetOwnerAsNonOwner() (gas: 15609) -AuthTest:testFailSetOwnerAsOwnerWithOutOfOrderAuthority() (gas: 136161) -AuthTest:testFailSetOwnerWithRestrictiveAuthority() (gas: 129242) -AuthTest:testSetAuthorityAsOwner() (gas: 32302) -AuthTest:testSetAuthorityAsOwnerWithOutOfOrderAuthority() (gas: 226396) -AuthTest:testSetAuthorityWithPermissiveAuthority() (gas: 125963) -AuthTest:testSetOwnerAsOwner() (gas: 15298) -AuthTest:testSetOwnerWithPermissiveAuthority() (gas: 127884) -Bytes32AddressLibTest:testFillLast12Bytes() (gas: 223) -Bytes32AddressLibTest:testFromLast20Bytes() (gas: 191) -CREATE3Test:testDeployERC20() (gas: 852410) -CREATE3Test:testFailDoubleDeployDifferentBytecode() (gas: 9079256848778914164) -CREATE3Test:testFailDoubleDeploySameBytecode() (gas: 9079256848778906218) -DSTestPlusTest:testBound() (gas: 14208) -DSTestPlusTest:testBrutalizeMemory() (gas: 823) -DSTestPlusTest:testFailBoundMinBiggerThanMax() (gas: 309) -DSTestPlusTest:testRelApproxEqBothZeroesPasses() (gas: 413) -ERC1155Test:testApproveAll() (gas: 31009) -ERC1155Test:testBatchBalanceOf() (gas: 157631) -ERC1155Test:testBatchBurn() (gas: 151074) -ERC1155Test:testBatchMintToEOA() (gas: 137337) -ERC1155Test:testBatchMintToERC1155Recipient() (gas: 942650) -ERC1155Test:testBurn() (gas: 38598) -ERC1155Test:testFailBalanceOfBatchWithArrayMismatch() (gas: 7933) -ERC1155Test:testFailBatchBurnInsufficientBalance() (gas: 136156) -ERC1155Test:testFailBatchBurnWithArrayLengthMismatch() (gas: 135542) -ERC1155Test:testFailBatchMintToNonERC1155Recipient() (gas: 167292) -ERC1155Test:testFailBatchMintToRevertingERC1155Recipient() (gas: 358811) -ERC1155Test:testFailBatchMintToWrongReturnDataERC1155Recipient() (gas: 310743) -ERC1155Test:testFailBatchMintToZero() (gas: 131737) -ERC1155Test:testFailBatchMintWithArrayMismatch() (gas: 9600) -ERC1155Test:testFailBurnInsufficientBalance() (gas: 34852) -ERC1155Test:testFailMintToNonERC155Recipient() (gas: 68191) -ERC1155Test:testFailMintToRevertingERC155Recipient() (gas: 259435) -ERC1155Test:testFailMintToWrongReturnDataERC155Recipient() (gas: 259389) -ERC1155Test:testFailMintToZero() (gas: 33705) -ERC1155Test:testFailSafeBatchTransferFromToNonERC1155Recipient() (gas: 321377) -ERC1155Test:testFailSafeBatchTransferFromToRevertingERC1155Recipient() (gas: 512956) -ERC1155Test:testFailSafeBatchTransferFromToWrongReturnDataERC1155Recipient() (gas: 464847) -ERC1155Test:testFailSafeBatchTransferFromToZero() (gas: 286556) -ERC1155Test:testFailSafeBatchTransferFromWithArrayLengthMismatch() (gas: 162674) -ERC1155Test:testFailSafeBatchTransferInsufficientBalance() (gas: 163555) -ERC1155Test:testFailSafeTransferFromInsufficientBalance() (gas: 63245) -ERC1155Test:testFailSafeTransferFromSelfInsufficientBalance() (gas: 34297) -ERC1155Test:testFailSafeTransferFromToNonERC155Recipient() (gas: 96510) -ERC1155Test:testFailSafeTransferFromToRevertingERC1155Recipient() (gas: 287731) -ERC1155Test:testFailSafeTransferFromToWrongReturnDataERC1155Recipient() (gas: 239587) -ERC1155Test:testFailSafeTransferFromToZero() (gas: 62014) -ERC1155Test:testMintToEOA() (gas: 34765) -ERC1155Test:testMintToERC1155Recipient() (gas: 608328) -ERC1155Test:testSafeBatchTransferFromToEOA() (gas: 297822) -ERC1155Test:testSafeBatchTransferFromToERC1155Recipient() (gas: 1122274) -ERC1155Test:testSafeTransferFromSelf() (gas: 64177) -ERC1155Test:testSafeTransferFromToEOA() (gas: 93167) -ERC1155Test:testSafeTransferFromToERC1155Recipient() (gas: 686500) -ERC20Test:testApprove() (gas: 31058) -ERC20Test:testBurn() (gas: 56970) -ERC20Test:testFailPermitBadDeadline() (gas: 36924) -ERC20Test:testFailPermitBadNonce() (gas: 36874) -ERC20Test:testFailPermitPastDeadline() (gas: 10938) -ERC20Test:testFailPermitReplay() (gas: 66285) -ERC20Test:testFailTransferFromInsufficientAllowance() (gas: 80882) -ERC20Test:testFailTransferFromInsufficientBalance() (gas: 81358) -ERC20Test:testFailTransferInsufficientBalance() (gas: 52806) -ERC20Test:testInfiniteApproveTransferFrom() (gas: 89793) -ERC20Test:testMint() (gas: 53746) -ERC20Test:testPermit() (gas: 63193) -ERC20Test:testTransfer() (gas: 60272) -ERC20Test:testTransferFrom() (gas: 83777) -ERC4626Test:testFailDepositWithNoApproval() (gas: 13351) -ERC4626Test:testFailDepositWithNotEnoughApproval() (gas: 86987) -ERC4626Test:testFailDepositZero() (gas: 7774) -ERC4626Test:testFailMintWithNoApproval() (gas: 13296) -ERC4626Test:testFailRedeemWithNoShareAmount() (gas: 32339) -ERC4626Test:testFailRedeemWithNotEnoughShareAmount() (gas: 203632) -ERC4626Test:testFailRedeemZero() (gas: 7961) -ERC4626Test:testFailWithdrawWithNoUnderlyingAmount() (gas: 32292) -ERC4626Test:testFailWithdrawWithNotEnoughUnderlyingAmount() (gas: 203615) -ERC4626Test:testMintZero() (gas: 54598) -ERC4626Test:testMultipleMintDepositRedeemWithdraw() (gas: 411940) -ERC4626Test:testVaultInteractionsForSomeoneElse() (gas: 286247) -ERC4626Test:testWithdrawZero() (gas: 52465) -ERC721Test:testApprove() (gas: 78427) -ERC721Test:testApproveAll() (gas: 31063) -ERC721Test:testApproveBurn() (gas: 65550) -ERC721Test:testBurn() (gas: 46107) -ERC721Test:testFailApproveUnAuthorized() (gas: 55598) -ERC721Test:testFailApproveUnMinted() (gas: 10236) -ERC721Test:testFailBalanceOfZeroAddress() (gas: 5555) -ERC721Test:testFailBurnUnMinted() (gas: 7857) -ERC721Test:testFailDoubleBurn() (gas: 58943) -ERC721Test:testFailDoubleMint() (gas: 53286) -ERC721Test:testFailMintToZero() (gas: 5753) -ERC721Test:testFailOwnerOfUnminted() (gas: 7609) -ERC721Test:testFailSafeMintToERC721RecipientWithWrongReturnData() (gas: 159076) -ERC721Test:testFailSafeMintToERC721RecipientWithWrongReturnDataWithData() (gas: 159831) -ERC721Test:testFailSafeMintToNonERC721Recipient() (gas: 89210) -ERC721Test:testFailSafeMintToNonERC721RecipientWithData() (gas: 89995) -ERC721Test:testFailSafeMintToRevertingERC721Recipient() (gas: 204743) -ERC721Test:testFailSafeMintToRevertingERC721RecipientWithData() (gas: 205517) -ERC721Test:testFailSafeTransferFromToERC721RecipientWithWrongReturnData() (gas: 187276) -ERC721Test:testFailSafeTransferFromToERC721RecipientWithWrongReturnDataWithData() (gas: 187728) -ERC721Test:testFailSafeTransferFromToNonERC721Recipient() (gas: 117413) -ERC721Test:testFailSafeTransferFromToNonERC721RecipientWithData() (gas: 117872) -ERC721Test:testFailSafeTransferFromToRevertingERC721Recipient() (gas: 233009) -ERC721Test:testFailSafeTransferFromToRevertingERC721RecipientWithData() (gas: 233396) -ERC721Test:testFailTransferFromNotOwner() (gas: 57872) -ERC721Test:testFailTransferFromToZero() (gas: 53381) -ERC721Test:testFailTransferFromUnOwned() (gas: 8000) -ERC721Test:testFailTransferFromWrongFrom() (gas: 53361) -ERC721Test:testMint() (gas: 54336) -ERC721Test:testSafeMintToEOA() (gas: 56993) -ERC721Test:testSafeMintToERC721Recipient() (gas: 381737) -ERC721Test:testSafeMintToERC721RecipientWithData() (gas: 402881) -ERC721Test:testSafeTransferFromToEOA() (gas: 95666) -ERC721Test:testSafeTransferFromToERC721Recipient() (gas: 440251) -ERC721Test:testSafeTransferFromToERC721RecipientWithData() (gas: 461049) -ERC721Test:testTransferFrom() (gas: 86347) -ERC721Test:testTransferFromApproveAll() (gas: 92898) -ERC721Test:testTransferFromSelf() (gas: 64776) -FixedPointMathLibTest:testDivWadDown() (gas: 864) -FixedPointMathLibTest:testDivWadDownEdgeCases() (gas: 423) -FixedPointMathLibTest:testDivWadUp() (gas: 981) -FixedPointMathLibTest:testDivWadUpEdgeCases() (gas: 482) -FixedPointMathLibTest:testFailDivWadDownZeroDenominator() (gas: 362) -FixedPointMathLibTest:testFailDivWadUpZeroDenominator() (gas: 342) -FixedPointMathLibTest:testFailMulDivDownZeroDenominator() (gas: 316) -FixedPointMathLibTest:testFailMulDivUpZeroDenominator() (gas: 317) -FixedPointMathLibTest:testMulDivDown() (gas: 1861) -FixedPointMathLibTest:testMulDivDownEdgeCases() (gas: 751) -FixedPointMathLibTest:testMulDivUp() (gas: 2273) -FixedPointMathLibTest:testMulDivUpEdgeCases() (gas: 846) -FixedPointMathLibTest:testMulWadDown() (gas: 821) -FixedPointMathLibTest:testMulWadDownEdgeCases() (gas: 886) -FixedPointMathLibTest:testMulWadUp() (gas: 959) -FixedPointMathLibTest:testMulWadUpEdgeCases() (gas: 1002) -FixedPointMathLibTest:testRPow() (gas: 2142) -FixedPointMathLibTest:testSqrt() (gas: 2537) -MultiRolesAuthorityTest:testCanCallPublicCapability() (gas: 34292) -MultiRolesAuthorityTest:testCanCallWithAuthorizedRole() (gas: 80556) -MultiRolesAuthorityTest:testCanCallWithCustomAuthority() (gas: 422681) -MultiRolesAuthorityTest:testCanCallWithCustomAuthorityOverridesPublicCapability() (gas: 247674) -MultiRolesAuthorityTest:testCanCallWithCustomAuthorityOverridesUserWithRole() (gas: 256845) -MultiRolesAuthorityTest:testSetPublicCapabilities() (gas: 27762) -MultiRolesAuthorityTest:testSetRoleCapabilities() (gas: 28985) -MultiRolesAuthorityTest:testSetRoles() (gas: 29006) -MultiRolesAuthorityTest:testSetTargetCustomAuthority() (gas: 27976) -OwnedTest:testCallFunctionAsNonOwner() (gas: 11311) -OwnedTest:testCallFunctionAsOwner() (gas: 10479) -OwnedTest:testSetOwner() (gas: 13035) -ReentrancyGuardTest:testFailUnprotectedCall() (gas: 45665) -ReentrancyGuardTest:testNoReentrancy() (gas: 7515) -ReentrancyGuardTest:testProtectedCall() (gas: 32949) -RolesAuthorityTest:testCanCallPublicCapability() (gas: 33336) -RolesAuthorityTest:testCanCallWithAuthorizedRole() (gas: 79601) -RolesAuthorityTest:testSetPublicCapabilities() (gas: 29183) -RolesAuthorityTest:testSetRoleCapabilities() (gas: 30258) -RolesAuthorityTest:testSetRoles() (gas: 28986) -SSTORE2Test:testFailReadInvalidPointer() (gas: 2927) -SSTORE2Test:testFailReadInvalidPointerCustomBounds() (gas: 3099) -SSTORE2Test:testFailReadInvalidPointerCustomStartBound() (gas: 3004) -SSTORE2Test:testFailWriteReadEmptyOutOfBounds() (gas: 34470) -SSTORE2Test:testFailWriteReadOutOfBounds() (gas: 34426) -SSTORE2Test:testFailWriteReadOutOfStartBound() (gas: 34362) -SSTORE2Test:testWriteRead() (gas: 53497) -SSTORE2Test:testWriteReadCustomBounds() (gas: 34869) -SSTORE2Test:testWriteReadCustomStartBound() (gas: 34740) -SSTORE2Test:testWriteReadEmptyBound() (gas: 34677) -SSTORE2Test:testWriteReadFullBoundedRead() (gas: 53672) -SSTORE2Test:testWriteReadFullStartBound() (gas: 34764) -SafeCastLibTest:testFailSafeCastTo128() (gas: 321) -SafeCastLibTest:testFailSafeCastTo160() (gas: 342) -SafeCastLibTest:testFailSafeCastTo192() (gas: 344) -SafeCastLibTest:testFailSafeCastTo224() (gas: 343) -SafeCastLibTest:testFailSafeCastTo248() (gas: 365) -SafeCastLibTest:testFailSafeCastTo32() (gas: 364) -SafeCastLibTest:testFailSafeCastTo64() (gas: 321) -SafeCastLibTest:testFailSafeCastTo8() (gas: 296) -SafeCastLibTest:testFailSafeCastTo96() (gas: 321) -SafeCastLibTest:testSafeCastTo128() (gas: 449) -SafeCastLibTest:testSafeCastTo160() (gas: 470) -SafeCastLibTest:testSafeCastTo192() (gas: 471) -SafeCastLibTest:testSafeCastTo224() (gas: 491) -SafeCastLibTest:testSafeCastTo248() (gas: 427) -SafeCastLibTest:testSafeCastTo32() (gas: 471) -SafeCastLibTest:testSafeCastTo64() (gas: 470) -SafeCastLibTest:testSafeCastTo8() (gas: 469) -SafeCastLibTest:testSafeCastTo96() (gas: 469) -SafeTransferLibTest:testApproveWithMissingReturn() (gas: 30751) -SafeTransferLibTest:testApproveWithNonContract() (gas: 3035) -SafeTransferLibTest:testApproveWithReturnsTooMuch() (gas: 31134) -SafeTransferLibTest:testApproveWithStandardERC20() (gas: 30882) -SafeTransferLibTest:testFailApproveWithReturnsFalse() (gas: 5627) -SafeTransferLibTest:testFailApproveWithReturnsTooLittle() (gas: 5568) -SafeTransferLibTest:testFailApproveWithReverting() (gas: 5502) -SafeTransferLibTest:testFailTransferETHToContractWithoutFallback() (gas: 7244) -SafeTransferLibTest:testFailTransferFromWithReturnsFalse() (gas: 13663) -SafeTransferLibTest:testFailTransferFromWithReturnsTooLittle() (gas: 13544) -SafeTransferLibTest:testFailTransferFromWithReverting() (gas: 9757) -SafeTransferLibTest:testFailTransferWithReturnsFalse() (gas: 8532) -SafeTransferLibTest:testFailTransferWithReturnsTooLittle() (gas: 8538) -SafeTransferLibTest:testFailTransferWithReverting() (gas: 8494) -SafeTransferLibTest:testTransferETH() (gas: 34592) -SafeTransferLibTest:testTransferFromWithMissingReturn() (gas: 49188) -SafeTransferLibTest:testTransferFromWithNonContract() (gas: 3035) -SafeTransferLibTest:testTransferFromWithReturnsTooMuch() (gas: 49812) -SafeTransferLibTest:testTransferFromWithStandardERC20() (gas: 47605) -SafeTransferLibTest:testTransferWithMissingReturn() (gas: 36669) -SafeTransferLibTest:testTransferWithNonContract() (gas: 3012) -SafeTransferLibTest:testTransferWithReturnsTooMuch() (gas: 37115) -SafeTransferLibTest:testTransferWithStandardERC20() (gas: 36699) -WETHTest:testDeposit() (gas: 63260) -WETHTest:testFallbackDeposit() (gas: 63524) -WETHTest:testPartialWithdraw() (gas: 73281) -WETHTest:testWithdraw() (gas: 54360) diff --git a/lib/solmate/.gitattributes b/lib/solmate/.gitattributes deleted file mode 100644 index e664563..0000000 --- a/lib/solmate/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -*.sol linguist-language=Solidity -.gas-snapshot linguist-language=Julia \ No newline at end of file diff --git a/lib/solmate/.github/pull_request_template.md b/lib/solmate/.github/pull_request_template.md deleted file mode 100644 index 5cca391..0000000 --- a/lib/solmate/.github/pull_request_template.md +++ /dev/null @@ -1,13 +0,0 @@ -## Description - -Describe the changes made in your pull request here. - -## Checklist - -Ensure you completed **all of the steps** below before submitting your pull request: - -- [ ] Ran `forge snapshot`? -- [ ] Ran `npm run lint`? -- [ ] Ran `forge test`? - -_Pull requests with an incomplete checklist will be thrown out._ diff --git a/lib/solmate/.github/workflows/tests.yml b/lib/solmate/.github/workflows/tests.yml deleted file mode 100644 index 2a29890..0000000 --- a/lib/solmate/.github/workflows/tests.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Tests - -on: [push, pull_request] - -jobs: - tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Install Foundry - uses: onbjerg/foundry-toolchain@v1 - with: - version: nightly - - - name: Install dependencies - run: forge install - - - name: Check contract sizes - run: forge build --sizes - - - name: Check gas snapshots - run: forge snapshot --check - - - name: Run tests - run: forge test - env: - # Only fuzz intensely if we're running this action on a push to main or for a PR going into main: - FOUNDRY_PROFILE: ${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && 'intense' }} diff --git a/lib/solmate/.gitignore b/lib/solmate/.gitignore deleted file mode 100644 index 5dfe93f..0000000 --- a/lib/solmate/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/cache -/node_modules -/out \ No newline at end of file diff --git a/lib/solmate/.gitmodules b/lib/solmate/.gitmodules deleted file mode 100644 index e124719..0000000 --- a/lib/solmate/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "lib/ds-test"] - path = lib/ds-test - url = https://github.com/dapphub/ds-test diff --git a/lib/solmate/.prettierignore b/lib/solmate/.prettierignore deleted file mode 100644 index 7951405..0000000 --- a/lib/solmate/.prettierignore +++ /dev/null @@ -1 +0,0 @@ -lib \ No newline at end of file diff --git a/lib/solmate/.prettierrc b/lib/solmate/.prettierrc deleted file mode 100644 index 15ae8a7..0000000 --- a/lib/solmate/.prettierrc +++ /dev/null @@ -1,14 +0,0 @@ -{ - "tabWidth": 2, - "printWidth": 100, - - "overrides": [ - { - "files": "*.sol", - "options": { - "tabWidth": 4, - "printWidth": 120 - } - } - ] -} diff --git a/lib/solmate/.vscode/settings.json b/lib/solmate/.vscode/settings.json deleted file mode 100644 index 74939be..0000000 --- a/lib/solmate/.vscode/settings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "solidity.packageDefaultDependenciesContractsDirectory": "src", - "solidity.packageDefaultDependenciesDirectory": "lib", - "solidity.compileUsingRemoteVersion": "v0.8.10", - "search.exclude": { "lib": true }, - "files.associations": { - ".gas-snapshot": "julia" - } -} diff --git a/lib/solmate/LICENSE b/lib/solmate/LICENSE deleted file mode 100644 index 29ebfa5..0000000 --- a/lib/solmate/LICENSE +++ /dev/null @@ -1,661 +0,0 @@ - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -our General Public Licenses are intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. - - A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. - - The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. - - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing under -this license. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU Affero General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Remote Network Interaction; Use with the GNU General Public License. - - Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your version -supports such interaction) an opportunity to receive the Corresponding -Source of your version by providing access to the Corresponding Source -from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source -shall include the Corresponding Source for any work covered by version 3 -of the GNU General Public License that is incorporated pursuant to the -following paragraph. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the work with which it is combined will remain governed by version -3 of the GNU General Public License. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions -will be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU Affero General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU Affero General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU Affero General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published - by the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If your software can interact with users remotely through a computer -network, you should also make sure that it provides a way for users to -get its source. For example, if your program is a web application, its -interface could display a "Source" link that leads users to an archive -of the code. There are many ways you could offer source, and different -solutions will be better for different programs; see section 13 for the -specific requirements. - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU AGPL, see -. \ No newline at end of file diff --git a/lib/solmate/README.md b/lib/solmate/README.md deleted file mode 100644 index 58b207c..0000000 --- a/lib/solmate/README.md +++ /dev/null @@ -1,66 +0,0 @@ -# solmate - -**Modern**, **opinionated**, and **gas optimized** building blocks for **smart contract development**. - -## Contracts - -```ml -auth -├─ Owned — "Simple single owner authorization" -├─ Auth — "Flexible and updatable auth pattern" -├─ authorities -│ ├─ RolesAuthority — "Role based Authority that supports up to 256 roles" -│ ├─ MultiRolesAuthority — "Flexible and target agnostic role based Authority" -mixins -├─ ERC4626 — "Minimal ERC4626 tokenized Vault implementation" -tokens -├─ WETH — "Minimalist and modern Wrapped Ether implementation" -├─ ERC20 — "Modern and gas efficient ERC20 + EIP-2612 implementation" -├─ ERC721 — "Modern, minimalist, and gas efficient ERC721 implementation" -├─ ERC1155 — "Minimalist and gas efficient standard ERC1155 implementation" -utils -├─ SSTORE2 - "Library for cheaper reads and writes to persistent storage" -├─ CREATE3 — "Deploy to deterministic addresses without an initcode factor" -├─ SafeCastLib - "Safe unsigned integer casting lib that reverts on overflow" -├─ ReentrancyGuard — "Gas optimized reentrancy protection for smart contracts" -├─ FixedPointMathLib — "Arithmetic library with operations for fixed-point numbers" -├─ Bytes32AddressLib — "Library for converting between addresses and bytes32 values" -├─ SafeTransferLib — "Safe ERC20/ETH transfer lib that handles missing return values" -``` - -## Safety - -This is **experimental software** and is provided on an "as is" and "as available" basis. - -While each [major release has been audited](audits), these contracts are **not designed with user safety** in mind: - -- There are implicit invariants these contracts expect to hold. -- **You can easily shoot yourself in the foot if you're not careful.** -- You should thoroughly read each contract you plan to use top to bottom. - -We **do not give any warranties** and **will not be liable for any loss** incurred through any use of this codebase. - -## Installation - -To install with [**Foundry**](https://github.com/gakonst/foundry): - -```sh -forge install rari-capital/solmate -``` - -To install with [**Hardhat**](https://github.com/nomiclabs/hardhat) or [**Truffle**](https://github.com/trufflesuite/truffle): - -```sh -npm install @rari-capital/solmate -``` - -## Acknowledgements - -These contracts were inspired by or directly modified from many sources, primarily: - -- [Gnosis](https://github.com/gnosis/gp-v2-contracts) -- [Uniswap](https://github.com/Uniswap/uniswap-lib) -- [Dappsys](https://github.com/dapphub/dappsys) -- [Dappsys V2](https://github.com/dapp-org/dappsys-v2) -- [0xSequence](https://github.com/0xSequence) -- [OpenZeppelin](https://github.com/OpenZeppelin/openzeppelin-contracts) diff --git a/lib/solmate/audits/v6-Fixed-Point-Solutions.pdf b/lib/solmate/audits/v6-Fixed-Point-Solutions.pdf deleted file mode 100644 index 5c4243425bf4fdaef1dcd87eceb2365ba97bd6f0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 170456 zcmZsDc{r4B*tTsfQ~fM?N~vb1vFME`}r>DKAr;Gg!FL|V*nTM;Lx2?Sg`1+cYwIY}U z<)W#HGIDiw1Y-*yfCpYWtA|2MguhyFflavY_ER5UrY@jnrzd`RW*zavP+Gb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lib/solmate/foundry.toml b/lib/solmate/foundry.toml deleted file mode 100644 index 8a4fd22..0000000 --- a/lib/solmate/foundry.toml +++ /dev/null @@ -1,7 +0,0 @@ -[default] -solc = "0.8.10" -bytecode_hash = "none" -optimizer_runs = 1000000 - -[intense] -fuzz_runs = 10000 diff --git a/lib/solmate/lib/ds-test/.gitignore b/lib/solmate/lib/ds-test/.gitignore deleted file mode 100644 index 63f0b2c..0000000 --- a/lib/solmate/lib/ds-test/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/.dapple -/build -/out diff --git a/lib/solmate/lib/ds-test/LICENSE b/lib/solmate/lib/ds-test/LICENSE deleted file mode 100644 index 94a9ed0..0000000 --- a/lib/solmate/lib/ds-test/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/lib/solmate/lib/ds-test/Makefile b/lib/solmate/lib/ds-test/Makefile deleted file mode 100644 index 661dac4..0000000 --- a/lib/solmate/lib/ds-test/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -all:; dapp build - -test: - -dapp --use solc:0.4.23 build - -dapp --use solc:0.4.26 build - -dapp --use solc:0.5.17 build - -dapp --use solc:0.6.12 build - -dapp --use solc:0.7.5 build - -demo: - DAPP_SRC=demo dapp --use solc:0.7.5 build - -hevm dapp-test --verbose 3 - -.PHONY: test demo diff --git a/lib/solmate/lib/ds-test/default.nix b/lib/solmate/lib/ds-test/default.nix deleted file mode 100644 index cf65419..0000000 --- a/lib/solmate/lib/ds-test/default.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ solidityPackage, dappsys }: solidityPackage { - name = "ds-test"; - src = ./src; -} diff --git a/lib/solmate/lib/ds-test/demo/demo.sol b/lib/solmate/lib/ds-test/demo/demo.sol deleted file mode 100644 index d3a7d81..0000000 --- a/lib/solmate/lib/ds-test/demo/demo.sol +++ /dev/null @@ -1,223 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity >=0.4.23; - -import "../src/test.sol"; - -contract DemoTest is DSTest { - function test_this() public pure { - require(true); - } - function test_logs() public { - emit log("-- log(string)"); - emit log("a string"); - - emit log("-- log_named_uint(string, uint)"); - log_named_uint("uint", 512); - - emit log("-- log_named_int(string, int)"); - log_named_int("int", -512); - - emit log("-- log_named_address(string, address)"); - log_named_address("address", address(this)); - - emit log("-- log_named_bytes32(string, bytes32)"); - log_named_bytes32("bytes32", "a string"); - - emit log("-- log_named_bytes(string, bytes)"); - log_named_bytes("bytes", hex"cafefe"); - - emit log("-- log_named_string(string, string)"); - log_named_string("string", "a string"); - - emit log("-- log_named_decimal_uint(string, uint, uint)"); - log_named_decimal_uint("decimal uint", 1.0e18, 18); - - emit log("-- log_named_decimal_int(string, int, uint)"); - log_named_decimal_int("decimal int", -1.0e18, 18); - } - event log_old_named_uint(bytes32,uint); - function test_old_logs() public { - log_old_named_uint("key", 500); - log_named_bytes32("bkey", "val"); - } - function test_trace() public view { - this.echo("string 1", "string 2"); - } - function test_multiline() public { - emit log("a multiline\\n" "string"); - emit log("a multiline " "string"); - log_bytes("a string"); - log_bytes("a multiline\n" "string"); - log_bytes("a multiline\\n" "string"); - emit log(unicode"Ώ"); - logs(hex"0000"); - log_named_bytes("0x0000", hex"0000"); - logs(hex"ff"); - } - function echo(string memory s1, string memory s2) public pure - returns (string memory, string memory) - { - return (s1, s2); - } - - function prove_this(uint x) public { - log_named_uint("sym x", x); - assertGt(x + 1, 0); - } - - function test_logn() public { - assembly { - log0(0x01, 0x02) - log1(0x01, 0x02, 0x03) - log2(0x01, 0x02, 0x03, 0x04) - log3(0x01, 0x02, 0x03, 0x04, 0x05) - } - } - - event MyEvent(uint, uint indexed, uint, uint indexed); - function test_events() public { - emit MyEvent(1, 2, 3, 4); - } - - function test_asserts() public { - string memory err = "this test has failed!"; - emit log("## assertTrue(bool)\n"); - assertTrue(false); - emit log("\n"); - assertTrue(false, err); - - emit log("\n## assertEq(address,address)\n"); - assertEq(address(this), msg.sender); - emit log("\n"); - assertEq(address(this), msg.sender, err); - - emit log("\n## assertEq32(bytes32,bytes32)\n"); - assertEq32("bytes 1", "bytes 2"); - emit log("\n"); - assertEq32("bytes 1", "bytes 2", err); - - emit log("\n## assertEq(bytes32,bytes32)\n"); - assertEq32("bytes 1", "bytes 2"); - emit log("\n"); - assertEq32("bytes 1", "bytes 2", err); - - emit log("\n## assertEq(uint,uint)\n"); - assertEq(uint(0), 1); - emit log("\n"); - assertEq(uint(0), 1, err); - - emit log("\n## assertEq(int,int)\n"); - assertEq(-1, -2); - emit log("\n"); - assertEq(-1, -2, err); - - emit log("\n## assertEqDecimal(int,int,uint)\n"); - assertEqDecimal(-1.0e18, -1.1e18, 18); - emit log("\n"); - assertEqDecimal(-1.0e18, -1.1e18, 18, err); - - emit log("\n## assertEqDecimal(uint,uint,uint)\n"); - assertEqDecimal(uint(1.0e18), 1.1e18, 18); - emit log("\n"); - assertEqDecimal(uint(1.0e18), 1.1e18, 18, err); - - emit log("\n## assertGt(uint,uint)\n"); - assertGt(uint(0), 0); - emit log("\n"); - assertGt(uint(0), 0, err); - - emit log("\n## assertGt(int,int)\n"); - assertGt(-1, -1); - emit log("\n"); - assertGt(-1, -1, err); - - emit log("\n## assertGtDecimal(int,int,uint)\n"); - assertGtDecimal(-2.0e18, -1.1e18, 18); - emit log("\n"); - assertGtDecimal(-2.0e18, -1.1e18, 18, err); - - emit log("\n## assertGtDecimal(uint,uint,uint)\n"); - assertGtDecimal(uint(1.0e18), 1.1e18, 18); - emit log("\n"); - assertGtDecimal(uint(1.0e18), 1.1e18, 18, err); - - emit log("\n## assertGe(uint,uint)\n"); - assertGe(uint(0), 1); - emit log("\n"); - assertGe(uint(0), 1, err); - - emit log("\n## assertGe(int,int)\n"); - assertGe(-1, 0); - emit log("\n"); - assertGe(-1, 0, err); - - emit log("\n## assertGeDecimal(int,int,uint)\n"); - assertGeDecimal(-2.0e18, -1.1e18, 18); - emit log("\n"); - assertGeDecimal(-2.0e18, -1.1e18, 18, err); - - emit log("\n## assertGeDecimal(uint,uint,uint)\n"); - assertGeDecimal(uint(1.0e18), 1.1e18, 18); - emit log("\n"); - assertGeDecimal(uint(1.0e18), 1.1e18, 18, err); - - emit log("\n## assertLt(uint,uint)\n"); - assertLt(uint(0), 0); - emit log("\n"); - assertLt(uint(0), 0, err); - - emit log("\n## assertLt(int,int)\n"); - assertLt(-1, -1); - emit log("\n"); - assertLt(-1, -1, err); - - emit log("\n## assertLtDecimal(int,int,uint)\n"); - assertLtDecimal(-1.0e18, -1.1e18, 18); - emit log("\n"); - assertLtDecimal(-1.0e18, -1.1e18, 18, err); - - emit log("\n## assertLtDecimal(uint,uint,uint)\n"); - assertLtDecimal(uint(2.0e18), 1.1e18, 18); - emit log("\n"); - assertLtDecimal(uint(2.0e18), 1.1e18, 18, err); - - emit log("\n## assertLe(uint,uint)\n"); - assertLe(uint(1), 0); - emit log("\n"); - assertLe(uint(1), 0, err); - - emit log("\n## assertLe(int,int)\n"); - assertLe(0, -1); - emit log("\n"); - assertLe(0, -1, err); - - emit log("\n## assertLeDecimal(int,int,uint)\n"); - assertLeDecimal(-1.0e18, -1.1e18, 18); - emit log("\n"); - assertLeDecimal(-1.0e18, -1.1e18, 18, err); - - emit log("\n## assertLeDecimal(uint,uint,uint)\n"); - assertLeDecimal(uint(2.0e18), 1.1e18, 18); - emit log("\n"); - assertLeDecimal(uint(2.0e18), 1.1e18, 18, err); - - emit log("\n## assertEq(string,string)\n"); - string memory s1 = "string 1"; - string memory s2 = "string 2"; - assertEq(s1, s2); - emit log("\n"); - assertEq(s1, s2, err); - - emit log("\n## assertEq0(bytes,bytes)\n"); - assertEq0(hex"abcdef01", hex"abcdef02"); - log("\n"); - assertEq0(hex"abcdef01", hex"abcdef02", err); - } -} - -contract DemoTestWithSetUp { - function setUp() public { - } - function test_pass() public pure { - } -} diff --git a/lib/solmate/lib/ds-test/src/test.sol b/lib/solmate/lib/ds-test/src/test.sol deleted file mode 100644 index 515a3bd..0000000 --- a/lib/solmate/lib/ds-test/src/test.sol +++ /dev/null @@ -1,469 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-or-later - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -pragma solidity >=0.5.0; - -contract DSTest { - event log (string); - event logs (bytes); - - event log_address (address); - event log_bytes32 (bytes32); - event log_int (int); - event log_uint (uint); - event log_bytes (bytes); - event log_string (string); - - event log_named_address (string key, address val); - event log_named_bytes32 (string key, bytes32 val); - event log_named_decimal_int (string key, int val, uint decimals); - event log_named_decimal_uint (string key, uint val, uint decimals); - event log_named_int (string key, int val); - event log_named_uint (string key, uint val); - event log_named_bytes (string key, bytes val); - event log_named_string (string key, string val); - - bool public IS_TEST = true; - bool private _failed; - - address constant HEVM_ADDRESS = - address(bytes20(uint160(uint256(keccak256('hevm cheat code'))))); - - modifier mayRevert() { _; } - modifier testopts(string memory) { _; } - - function failed() public returns (bool) { - if (_failed) { - return _failed; - } else { - bool globalFailed = false; - if (hasHEVMContext()) { - (, bytes memory retdata) = HEVM_ADDRESS.call( - abi.encodePacked( - bytes4(keccak256("load(address,bytes32)")), - abi.encode(HEVM_ADDRESS, bytes32("failed")) - ) - ); - globalFailed = abi.decode(retdata, (bool)); - } - return globalFailed; - } - } - - function fail() internal { - if (hasHEVMContext()) { - (bool status, ) = HEVM_ADDRESS.call( - abi.encodePacked( - bytes4(keccak256("store(address,bytes32,bytes32)")), - abi.encode(HEVM_ADDRESS, bytes32("failed"), bytes32(uint256(0x01))) - ) - ); - status; // Silence compiler warnings - } - _failed = true; - } - - function hasHEVMContext() internal view returns (bool) { - uint256 hevmCodeSize = 0; - assembly { - hevmCodeSize := extcodesize(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D) - } - return hevmCodeSize > 0; - } - - modifier logs_gas() { - uint startGas = gasleft(); - _; - uint endGas = gasleft(); - emit log_named_uint("gas", startGas - endGas); - } - - function assertTrue(bool condition) internal { - if (!condition) { - emit log("Error: Assertion Failed"); - fail(); - } - } - - function assertTrue(bool condition, string memory err) internal { - if (!condition) { - emit log_named_string("Error", err); - assertTrue(condition); - } - } - - function assertEq(address a, address b) internal { - if (a != b) { - emit log("Error: a == b not satisfied [address]"); - emit log_named_address(" Expected", b); - emit log_named_address(" Actual", a); - fail(); - } - } - function assertEq(address a, address b, string memory err) internal { - if (a != b) { - emit log_named_string ("Error", err); - assertEq(a, b); - } - } - - function assertEq(bytes32 a, bytes32 b) internal { - if (a != b) { - emit log("Error: a == b not satisfied [bytes32]"); - emit log_named_bytes32(" Expected", b); - emit log_named_bytes32(" Actual", a); - fail(); - } - } - function assertEq(bytes32 a, bytes32 b, string memory err) internal { - if (a != b) { - emit log_named_string ("Error", err); - assertEq(a, b); - } - } - function assertEq32(bytes32 a, bytes32 b) internal { - assertEq(a, b); - } - function assertEq32(bytes32 a, bytes32 b, string memory err) internal { - assertEq(a, b, err); - } - - function assertEq(int a, int b) internal { - if (a != b) { - emit log("Error: a == b not satisfied [int]"); - emit log_named_int(" Expected", b); - emit log_named_int(" Actual", a); - fail(); - } - } - function assertEq(int a, int b, string memory err) internal { - if (a != b) { - emit log_named_string("Error", err); - assertEq(a, b); - } - } - function assertEq(uint a, uint b) internal { - if (a != b) { - emit log("Error: a == b not satisfied [uint]"); - emit log_named_uint(" Expected", b); - emit log_named_uint(" Actual", a); - fail(); - } - } - function assertEq(uint a, uint b, string memory err) internal { - if (a != b) { - emit log_named_string("Error", err); - assertEq(a, b); - } - } - function assertEqDecimal(int a, int b, uint decimals) internal { - if (a != b) { - emit log("Error: a == b not satisfied [decimal int]"); - emit log_named_decimal_int(" Expected", b, decimals); - emit log_named_decimal_int(" Actual", a, decimals); - fail(); - } - } - function assertEqDecimal(int a, int b, uint decimals, string memory err) internal { - if (a != b) { - emit log_named_string("Error", err); - assertEqDecimal(a, b, decimals); - } - } - function assertEqDecimal(uint a, uint b, uint decimals) internal { - if (a != b) { - emit log("Error: a == b not satisfied [decimal uint]"); - emit log_named_decimal_uint(" Expected", b, decimals); - emit log_named_decimal_uint(" Actual", a, decimals); - fail(); - } - } - function assertEqDecimal(uint a, uint b, uint decimals, string memory err) internal { - if (a != b) { - emit log_named_string("Error", err); - assertEqDecimal(a, b, decimals); - } - } - - function assertGt(uint a, uint b) internal { - if (a <= b) { - emit log("Error: a > b not satisfied [uint]"); - emit log_named_uint(" Value a", a); - emit log_named_uint(" Value b", b); - fail(); - } - } - function assertGt(uint a, uint b, string memory err) internal { - if (a <= b) { - emit log_named_string("Error", err); - assertGt(a, b); - } - } - function assertGt(int a, int b) internal { - if (a <= b) { - emit log("Error: a > b not satisfied [int]"); - emit log_named_int(" Value a", a); - emit log_named_int(" Value b", b); - fail(); - } - } - function assertGt(int a, int b, string memory err) internal { - if (a <= b) { - emit log_named_string("Error", err); - assertGt(a, b); - } - } - function assertGtDecimal(int a, int b, uint decimals) internal { - if (a <= b) { - emit log("Error: a > b not satisfied [decimal int]"); - emit log_named_decimal_int(" Value a", a, decimals); - emit log_named_decimal_int(" Value b", b, decimals); - fail(); - } - } - function assertGtDecimal(int a, int b, uint decimals, string memory err) internal { - if (a <= b) { - emit log_named_string("Error", err); - assertGtDecimal(a, b, decimals); - } - } - function assertGtDecimal(uint a, uint b, uint decimals) internal { - if (a <= b) { - emit log("Error: a > b not satisfied [decimal uint]"); - emit log_named_decimal_uint(" Value a", a, decimals); - emit log_named_decimal_uint(" Value b", b, decimals); - fail(); - } - } - function assertGtDecimal(uint a, uint b, uint decimals, string memory err) internal { - if (a <= b) { - emit log_named_string("Error", err); - assertGtDecimal(a, b, decimals); - } - } - - function assertGe(uint a, uint b) internal { - if (a < b) { - emit log("Error: a >= b not satisfied [uint]"); - emit log_named_uint(" Value a", a); - emit log_named_uint(" Value b", b); - fail(); - } - } - function assertGe(uint a, uint b, string memory err) internal { - if (a < b) { - emit log_named_string("Error", err); - assertGe(a, b); - } - } - function assertGe(int a, int b) internal { - if (a < b) { - emit log("Error: a >= b not satisfied [int]"); - emit log_named_int(" Value a", a); - emit log_named_int(" Value b", b); - fail(); - } - } - function assertGe(int a, int b, string memory err) internal { - if (a < b) { - emit log_named_string("Error", err); - assertGe(a, b); - } - } - function assertGeDecimal(int a, int b, uint decimals) internal { - if (a < b) { - emit log("Error: a >= b not satisfied [decimal int]"); - emit log_named_decimal_int(" Value a", a, decimals); - emit log_named_decimal_int(" Value b", b, decimals); - fail(); - } - } - function assertGeDecimal(int a, int b, uint decimals, string memory err) internal { - if (a < b) { - emit log_named_string("Error", err); - assertGeDecimal(a, b, decimals); - } - } - function assertGeDecimal(uint a, uint b, uint decimals) internal { - if (a < b) { - emit log("Error: a >= b not satisfied [decimal uint]"); - emit log_named_decimal_uint(" Value a", a, decimals); - emit log_named_decimal_uint(" Value b", b, decimals); - fail(); - } - } - function assertGeDecimal(uint a, uint b, uint decimals, string memory err) internal { - if (a < b) { - emit log_named_string("Error", err); - assertGeDecimal(a, b, decimals); - } - } - - function assertLt(uint a, uint b) internal { - if (a >= b) { - emit log("Error: a < b not satisfied [uint]"); - emit log_named_uint(" Value a", a); - emit log_named_uint(" Value b", b); - fail(); - } - } - function assertLt(uint a, uint b, string memory err) internal { - if (a >= b) { - emit log_named_string("Error", err); - assertLt(a, b); - } - } - function assertLt(int a, int b) internal { - if (a >= b) { - emit log("Error: a < b not satisfied [int]"); - emit log_named_int(" Value a", a); - emit log_named_int(" Value b", b); - fail(); - } - } - function assertLt(int a, int b, string memory err) internal { - if (a >= b) { - emit log_named_string("Error", err); - assertLt(a, b); - } - } - function assertLtDecimal(int a, int b, uint decimals) internal { - if (a >= b) { - emit log("Error: a < b not satisfied [decimal int]"); - emit log_named_decimal_int(" Value a", a, decimals); - emit log_named_decimal_int(" Value b", b, decimals); - fail(); - } - } - function assertLtDecimal(int a, int b, uint decimals, string memory err) internal { - if (a >= b) { - emit log_named_string("Error", err); - assertLtDecimal(a, b, decimals); - } - } - function assertLtDecimal(uint a, uint b, uint decimals) internal { - if (a >= b) { - emit log("Error: a < b not satisfied [decimal uint]"); - emit log_named_decimal_uint(" Value a", a, decimals); - emit log_named_decimal_uint(" Value b", b, decimals); - fail(); - } - } - function assertLtDecimal(uint a, uint b, uint decimals, string memory err) internal { - if (a >= b) { - emit log_named_string("Error", err); - assertLtDecimal(a, b, decimals); - } - } - - function assertLe(uint a, uint b) internal { - if (a > b) { - emit log("Error: a <= b not satisfied [uint]"); - emit log_named_uint(" Value a", a); - emit log_named_uint(" Value b", b); - fail(); - } - } - function assertLe(uint a, uint b, string memory err) internal { - if (a > b) { - emit log_named_string("Error", err); - assertLe(a, b); - } - } - function assertLe(int a, int b) internal { - if (a > b) { - emit log("Error: a <= b not satisfied [int]"); - emit log_named_int(" Value a", a); - emit log_named_int(" Value b", b); - fail(); - } - } - function assertLe(int a, int b, string memory err) internal { - if (a > b) { - emit log_named_string("Error", err); - assertLe(a, b); - } - } - function assertLeDecimal(int a, int b, uint decimals) internal { - if (a > b) { - emit log("Error: a <= b not satisfied [decimal int]"); - emit log_named_decimal_int(" Value a", a, decimals); - emit log_named_decimal_int(" Value b", b, decimals); - fail(); - } - } - function assertLeDecimal(int a, int b, uint decimals, string memory err) internal { - if (a > b) { - emit log_named_string("Error", err); - assertLeDecimal(a, b, decimals); - } - } - function assertLeDecimal(uint a, uint b, uint decimals) internal { - if (a > b) { - emit log("Error: a <= b not satisfied [decimal uint]"); - emit log_named_decimal_uint(" Value a", a, decimals); - emit log_named_decimal_uint(" Value b", b, decimals); - fail(); - } - } - function assertLeDecimal(uint a, uint b, uint decimals, string memory err) internal { - if (a > b) { - emit log_named_string("Error", err); - assertGeDecimal(a, b, decimals); - } - } - - function assertEq(string memory a, string memory b) internal { - if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) { - emit log("Error: a == b not satisfied [string]"); - emit log_named_string(" Expected", b); - emit log_named_string(" Actual", a); - fail(); - } - } - function assertEq(string memory a, string memory b, string memory err) internal { - if (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))) { - emit log_named_string("Error", err); - assertEq(a, b); - } - } - - function checkEq0(bytes memory a, bytes memory b) internal pure returns (bool ok) { - ok = true; - if (a.length == b.length) { - for (uint i = 0; i < a.length; i++) { - if (a[i] != b[i]) { - ok = false; - } - } - } else { - ok = false; - } - } - function assertEq0(bytes memory a, bytes memory b) internal { - if (!checkEq0(a, b)) { - emit log("Error: a == b not satisfied [bytes]"); - emit log_named_bytes(" Expected", b); - emit log_named_bytes(" Actual", a); - fail(); - } - } - function assertEq0(bytes memory a, bytes memory b, string memory err) internal { - if (!checkEq0(a, b)) { - emit log_named_string("Error", err); - assertEq0(a, b); - } - } -} diff --git a/lib/solmate/package-lock.json b/lib/solmate/package-lock.json deleted file mode 100644 index d3bae95..0000000 --- a/lib/solmate/package-lock.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "name": "@rari-capital/solmate", - "version": "6.3.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@solidity-parser/parser": { - "version": "0.13.2", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.13.2.tgz", - "integrity": "sha512-RwHnpRnfrnD2MSPveYoPh8nhofEvX7fgjHk1Oq+NNvCcLx4r1js91CO9o+F/F3fBzOCyvm8kKRTriFICX/odWw==", - "dev": true, - "requires": { - "antlr4ts": "^0.5.0-alpha.4" - } - }, - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true - }, - "antlr4ts": { - "version": "0.5.0-alpha.4", - "resolved": "https://registry.npmjs.org/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz", - "integrity": "sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ==", - "dev": true - }, - "emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "prettier": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.2.tgz", - "integrity": "sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ==", - "dev": true - }, - "prettier-plugin-solidity": { - "version": "1.0.0-beta.16", - "resolved": "https://registry.npmjs.org/prettier-plugin-solidity/-/prettier-plugin-solidity-1.0.0-beta.16.tgz", - "integrity": "sha512-xVBcnoWpe52dNnCCbqPHC9ZrTWXcNfldf852ZD0DBcHDqVMwjHTAPEdfBVy6FczbFpVa8bmxQil+G5XkEz5WHA==", - "dev": true, - "requires": { - "@solidity-parser/parser": "^0.13.2", - "emoji-regex": "^9.2.2", - "escape-string-regexp": "^4.0.0", - "semver": "^7.3.5", - "solidity-comments-extractor": "^0.0.7", - "string-width": "^4.2.2" - } - }, - "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "solidity-comments-extractor": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/solidity-comments-extractor/-/solidity-comments-extractor-0.0.7.tgz", - "integrity": "sha512-wciNMLg/Irp8OKGrh3S2tfvZiZ0NEyILfcRCXCD4mp7SgK/i9gzLfhY2hY7VMCQJ3kH9UB9BzNdibIVMchzyYw==", - "dev": true - }, - "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "dependencies": { - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - } - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } - } -} diff --git a/lib/solmate/package.json b/lib/solmate/package.json deleted file mode 100644 index c2948ec..0000000 --- a/lib/solmate/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "@rari-capital/solmate", - "license": "AGPL-3.0-only", - "version": "6.3.0", - "description": "Modern, opinionated and gas optimized building blocks for smart contract development.", - "files": [ - "src/**/*.sol" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/Rari-Capital/solmate.git" - }, - "devDependencies": { - "prettier": "^2.3.1", - "prettier-plugin-solidity": "^1.0.0-beta.13" - }, - "scripts": { - "lint": "prettier --write **.sol" - } -} diff --git a/lib/solmate/src/auth/Auth.sol b/lib/solmate/src/auth/Auth.sol deleted file mode 100644 index 48edaa4..0000000 --- a/lib/solmate/src/auth/Auth.sol +++ /dev/null @@ -1,64 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -/// @notice Provides a flexible and updatable auth pattern which is completely separate from application logic. -/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/Auth.sol) -/// @author Modified from Dappsys (https://github.com/dapphub/ds-auth/blob/master/src/auth.sol) -abstract contract Auth { - event OwnerUpdated(address indexed user, address indexed newOwner); - - event AuthorityUpdated(address indexed user, Authority indexed newAuthority); - - address public owner; - - Authority public authority; - - constructor(address _owner, Authority _authority) { - owner = _owner; - authority = _authority; - - emit OwnerUpdated(msg.sender, _owner); - emit AuthorityUpdated(msg.sender, _authority); - } - - modifier requiresAuth() virtual { - require(isAuthorized(msg.sender, msg.sig), "UNAUTHORIZED"); - - _; - } - - function isAuthorized(address user, bytes4 functionSig) internal view virtual returns (bool) { - Authority auth = authority; // Memoizing authority saves us a warm SLOAD, around 100 gas. - - // Checking if the caller is the owner only after calling the authority saves gas in most cases, but be - // aware that this makes protected functions uncallable even to the owner if the authority is out of order. - return (address(auth) != address(0) && auth.canCall(user, address(this), functionSig)) || user == owner; - } - - function setAuthority(Authority newAuthority) public virtual { - // We check if the caller is the owner first because we want to ensure they can - // always swap out the authority even if it's reverting or using up a lot of gas. - require(msg.sender == owner || authority.canCall(msg.sender, address(this), msg.sig)); - - authority = newAuthority; - - emit AuthorityUpdated(msg.sender, newAuthority); - } - - function setOwner(address newOwner) public virtual requiresAuth { - owner = newOwner; - - emit OwnerUpdated(msg.sender, newOwner); - } -} - -/// @notice A generic interface for a contract which provides authorization data to an Auth instance. -/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/Auth.sol) -/// @author Modified from Dappsys (https://github.com/dapphub/ds-auth/blob/master/src/auth.sol) -interface Authority { - function canCall( - address user, - address target, - bytes4 functionSig - ) external view returns (bool); -} diff --git a/lib/solmate/src/auth/Owned.sol b/lib/solmate/src/auth/Owned.sol deleted file mode 100644 index 415d845..0000000 --- a/lib/solmate/src/auth/Owned.sol +++ /dev/null @@ -1,44 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -/// @notice Simple single owner authorization mixin. -/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/Owned.sol) -abstract contract Owned { - /*////////////////////////////////////////////////////////////// - EVENTS - //////////////////////////////////////////////////////////////*/ - - event OwnerUpdated(address indexed user, address indexed newOwner); - - /*////////////////////////////////////////////////////////////// - OWNERSHIP STORAGE - //////////////////////////////////////////////////////////////*/ - - address public owner; - - modifier onlyOwner() virtual { - require(msg.sender == owner, "UNAUTHORIZED"); - - _; - } - - /*////////////////////////////////////////////////////////////// - CONSTRUCTOR - //////////////////////////////////////////////////////////////*/ - - constructor(address _owner) { - owner = _owner; - - emit OwnerUpdated(address(0), _owner); - } - - /*////////////////////////////////////////////////////////////// - OWNERSHIP LOGIC - //////////////////////////////////////////////////////////////*/ - - function setOwner(address newOwner) public virtual onlyOwner { - owner = newOwner; - - emit OwnerUpdated(msg.sender, newOwner); - } -} diff --git a/lib/solmate/src/auth/authorities/MultiRolesAuthority.sol b/lib/solmate/src/auth/authorities/MultiRolesAuthority.sol deleted file mode 100644 index 8ecd3cd..0000000 --- a/lib/solmate/src/auth/authorities/MultiRolesAuthority.sol +++ /dev/null @@ -1,123 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -import {Auth, Authority} from "../Auth.sol"; - -/// @notice Flexible and target agnostic role based Authority that supports up to 256 roles. -/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/authorities/MultiRolesAuthority.sol) -contract MultiRolesAuthority is Auth, Authority { - /*////////////////////////////////////////////////////////////// - EVENTS - //////////////////////////////////////////////////////////////*/ - - event UserRoleUpdated(address indexed user, uint8 indexed role, bool enabled); - - event PublicCapabilityUpdated(bytes4 indexed functionSig, bool enabled); - - event RoleCapabilityUpdated(uint8 indexed role, bytes4 indexed functionSig, bool enabled); - - event TargetCustomAuthorityUpdated(address indexed target, Authority indexed authority); - - /*////////////////////////////////////////////////////////////// - CONSTRUCTOR - //////////////////////////////////////////////////////////////*/ - - constructor(address _owner, Authority _authority) Auth(_owner, _authority) {} - - /*////////////////////////////////////////////////////////////// - CUSTOM TARGET AUTHORITY STORAGE - //////////////////////////////////////////////////////////////*/ - - mapping(address => Authority) public getTargetCustomAuthority; - - /*////////////////////////////////////////////////////////////// - ROLE/USER STORAGE - //////////////////////////////////////////////////////////////*/ - - mapping(address => bytes32) public getUserRoles; - - mapping(bytes4 => bool) public isCapabilityPublic; - - mapping(bytes4 => bytes32) public getRolesWithCapability; - - function doesUserHaveRole(address user, uint8 role) public view virtual returns (bool) { - return (uint256(getUserRoles[user]) >> role) & 1 != 0; - } - - function doesRoleHaveCapability(uint8 role, bytes4 functionSig) public view virtual returns (bool) { - return (uint256(getRolesWithCapability[functionSig]) >> role) & 1 != 0; - } - - /*////////////////////////////////////////////////////////////// - AUTHORIZATION LOGIC - //////////////////////////////////////////////////////////////*/ - - function canCall( - address user, - address target, - bytes4 functionSig - ) public view virtual override returns (bool) { - Authority customAuthority = getTargetCustomAuthority[target]; - - if (address(customAuthority) != address(0)) return customAuthority.canCall(user, target, functionSig); - - return - isCapabilityPublic[functionSig] || bytes32(0) != getUserRoles[user] & getRolesWithCapability[functionSig]; - } - - /*/////////////////////////////////////////////////////////////// - CUSTOM TARGET AUTHORITY CONFIGURATION LOGIC - //////////////////////////////////////////////////////////////*/ - - function setTargetCustomAuthority(address target, Authority customAuthority) public virtual requiresAuth { - getTargetCustomAuthority[target] = customAuthority; - - emit TargetCustomAuthorityUpdated(target, customAuthority); - } - - /*////////////////////////////////////////////////////////////// - PUBLIC CAPABILITY CONFIGURATION LOGIC - //////////////////////////////////////////////////////////////*/ - - function setPublicCapability(bytes4 functionSig, bool enabled) public virtual requiresAuth { - isCapabilityPublic[functionSig] = enabled; - - emit PublicCapabilityUpdated(functionSig, enabled); - } - - /*////////////////////////////////////////////////////////////// - USER ROLE ASSIGNMENT LOGIC - //////////////////////////////////////////////////////////////*/ - - function setUserRole( - address user, - uint8 role, - bool enabled - ) public virtual requiresAuth { - if (enabled) { - getUserRoles[user] |= bytes32(1 << role); - } else { - getUserRoles[user] &= ~bytes32(1 << role); - } - - emit UserRoleUpdated(user, role, enabled); - } - - /*////////////////////////////////////////////////////////////// - ROLE CAPABILITY CONFIGURATION LOGIC - //////////////////////////////////////////////////////////////*/ - - function setRoleCapability( - uint8 role, - bytes4 functionSig, - bool enabled - ) public virtual requiresAuth { - if (enabled) { - getRolesWithCapability[functionSig] |= bytes32(1 << role); - } else { - getRolesWithCapability[functionSig] &= ~bytes32(1 << role); - } - - emit RoleCapabilityUpdated(role, functionSig, enabled); - } -} diff --git a/lib/solmate/src/auth/authorities/RolesAuthority.sol b/lib/solmate/src/auth/authorities/RolesAuthority.sol deleted file mode 100644 index afefe1a..0000000 --- a/lib/solmate/src/auth/authorities/RolesAuthority.sol +++ /dev/null @@ -1,108 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -import {Auth, Authority} from "../Auth.sol"; - -/// @notice Role based Authority that supports up to 256 roles. -/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/authorities/RolesAuthority.sol) -/// @author Modified from Dappsys (https://github.com/dapphub/ds-roles/blob/master/src/roles.sol) -contract RolesAuthority is Auth, Authority { - /*////////////////////////////////////////////////////////////// - EVENTS - //////////////////////////////////////////////////////////////*/ - - event UserRoleUpdated(address indexed user, uint8 indexed role, bool enabled); - - event PublicCapabilityUpdated(address indexed target, bytes4 indexed functionSig, bool enabled); - - event RoleCapabilityUpdated(uint8 indexed role, address indexed target, bytes4 indexed functionSig, bool enabled); - - /*////////////////////////////////////////////////////////////// - CONSTRUCTOR - //////////////////////////////////////////////////////////////*/ - - constructor(address _owner, Authority _authority) Auth(_owner, _authority) {} - - /*////////////////////////////////////////////////////////////// - ROLE/USER STORAGE - //////////////////////////////////////////////////////////////*/ - - mapping(address => bytes32) public getUserRoles; - - mapping(address => mapping(bytes4 => bool)) public isCapabilityPublic; - - mapping(address => mapping(bytes4 => bytes32)) public getRolesWithCapability; - - function doesUserHaveRole(address user, uint8 role) public view virtual returns (bool) { - return (uint256(getUserRoles[user]) >> role) & 1 != 0; - } - - function doesRoleHaveCapability( - uint8 role, - address target, - bytes4 functionSig - ) public view virtual returns (bool) { - return (uint256(getRolesWithCapability[target][functionSig]) >> role) & 1 != 0; - } - - /*////////////////////////////////////////////////////////////// - AUTHORIZATION LOGIC - //////////////////////////////////////////////////////////////*/ - - function canCall( - address user, - address target, - bytes4 functionSig - ) public view virtual override returns (bool) { - return - isCapabilityPublic[target][functionSig] || - bytes32(0) != getUserRoles[user] & getRolesWithCapability[target][functionSig]; - } - - /*////////////////////////////////////////////////////////////// - ROLE CAPABILITY CONFIGURATION LOGIC - //////////////////////////////////////////////////////////////*/ - - function setPublicCapability( - address target, - bytes4 functionSig, - bool enabled - ) public virtual requiresAuth { - isCapabilityPublic[target][functionSig] = enabled; - - emit PublicCapabilityUpdated(target, functionSig, enabled); - } - - function setRoleCapability( - uint8 role, - address target, - bytes4 functionSig, - bool enabled - ) public virtual requiresAuth { - if (enabled) { - getRolesWithCapability[target][functionSig] |= bytes32(1 << role); - } else { - getRolesWithCapability[target][functionSig] &= ~bytes32(1 << role); - } - - emit RoleCapabilityUpdated(role, target, functionSig, enabled); - } - - /*////////////////////////////////////////////////////////////// - USER ROLE ASSIGNMENT LOGIC - //////////////////////////////////////////////////////////////*/ - - function setUserRole( - address user, - uint8 role, - bool enabled - ) public virtual requiresAuth { - if (enabled) { - getUserRoles[user] |= bytes32(1 << role); - } else { - getUserRoles[user] &= ~bytes32(1 << role); - } - - emit UserRoleUpdated(user, role, enabled); - } -} diff --git a/lib/solmate/src/mixins/ERC4626.sol b/lib/solmate/src/mixins/ERC4626.sol deleted file mode 100644 index 704e0d4..0000000 --- a/lib/solmate/src/mixins/ERC4626.sol +++ /dev/null @@ -1,183 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -import {ERC20} from "../tokens/ERC20.sol"; -import {SafeTransferLib} from "../utils/SafeTransferLib.sol"; -import {FixedPointMathLib} from "../utils/FixedPointMathLib.sol"; - -/// @notice Minimal ERC4626 tokenized Vault implementation. -/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/mixins/ERC4626.sol) -abstract contract ERC4626 is ERC20 { - using SafeTransferLib for ERC20; - using FixedPointMathLib for uint256; - - /*////////////////////////////////////////////////////////////// - EVENTS - //////////////////////////////////////////////////////////////*/ - - event Deposit(address indexed caller, address indexed owner, uint256 assets, uint256 shares); - - event Withdraw( - address indexed caller, - address indexed receiver, - address indexed owner, - uint256 assets, - uint256 shares - ); - - /*////////////////////////////////////////////////////////////// - IMMUTABLES - //////////////////////////////////////////////////////////////*/ - - ERC20 public immutable asset; - - constructor( - ERC20 _asset, - string memory _name, - string memory _symbol - ) ERC20(_name, _symbol, _asset.decimals()) { - asset = _asset; - } - - /*////////////////////////////////////////////////////////////// - DEPOSIT/WITHDRAWAL LOGIC - //////////////////////////////////////////////////////////////*/ - - function deposit(uint256 assets, address receiver) public virtual returns (uint256 shares) { - // Check for rounding error since we round down in previewDeposit. - require((shares = previewDeposit(assets)) != 0, "ZERO_SHARES"); - - // Need to transfer before minting or ERC777s could reenter. - asset.safeTransferFrom(msg.sender, address(this), assets); - - _mint(receiver, shares); - - emit Deposit(msg.sender, receiver, assets, shares); - - afterDeposit(assets, shares); - } - - function mint(uint256 shares, address receiver) public virtual returns (uint256 assets) { - assets = previewMint(shares); // No need to check for rounding error, previewMint rounds up. - - // Need to transfer before minting or ERC777s could reenter. - asset.safeTransferFrom(msg.sender, address(this), assets); - - _mint(receiver, shares); - - emit Deposit(msg.sender, receiver, assets, shares); - - afterDeposit(assets, shares); - } - - function withdraw( - uint256 assets, - address receiver, - address owner - ) public virtual returns (uint256 shares) { - shares = previewWithdraw(assets); // No need to check for rounding error, previewWithdraw rounds up. - - if (msg.sender != owner) { - uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals. - - if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares; - } - - beforeWithdraw(assets, shares); - - _burn(owner, shares); - - emit Withdraw(msg.sender, receiver, owner, assets, shares); - - asset.safeTransfer(receiver, assets); - } - - function redeem( - uint256 shares, - address receiver, - address owner - ) public virtual returns (uint256 assets) { - if (msg.sender != owner) { - uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals. - - if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares; - } - - // Check for rounding error since we round down in previewRedeem. - require((assets = previewRedeem(shares)) != 0, "ZERO_ASSETS"); - - beforeWithdraw(assets, shares); - - _burn(owner, shares); - - emit Withdraw(msg.sender, receiver, owner, assets, shares); - - asset.safeTransfer(receiver, assets); - } - - /*////////////////////////////////////////////////////////////// - ACCOUNTING LOGIC - //////////////////////////////////////////////////////////////*/ - - function totalAssets() public view virtual returns (uint256); - - function convertToShares(uint256 assets) public view virtual returns (uint256) { - uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero. - - return supply == 0 ? assets : assets.mulDivDown(supply, totalAssets()); - } - - function convertToAssets(uint256 shares) public view virtual returns (uint256) { - uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero. - - return supply == 0 ? shares : shares.mulDivDown(totalAssets(), supply); - } - - function previewDeposit(uint256 assets) public view virtual returns (uint256) { - return convertToShares(assets); - } - - function previewMint(uint256 shares) public view virtual returns (uint256) { - uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero. - - return supply == 0 ? shares : shares.mulDivUp(totalAssets(), supply); - } - - function previewWithdraw(uint256 assets) public view virtual returns (uint256) { - uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero. - - return supply == 0 ? assets : assets.mulDivUp(supply, totalAssets()); - } - - function previewRedeem(uint256 shares) public view virtual returns (uint256) { - return convertToAssets(shares); - } - - /*////////////////////////////////////////////////////////////// - DEPOSIT/WITHDRAWAL LIMIT LOGIC - //////////////////////////////////////////////////////////////*/ - - function maxDeposit(address) public view virtual returns (uint256) { - return type(uint256).max; - } - - function maxMint(address) public view virtual returns (uint256) { - return type(uint256).max; - } - - function maxWithdraw(address owner) public view virtual returns (uint256) { - return convertToAssets(balanceOf[owner]); - } - - function maxRedeem(address owner) public view virtual returns (uint256) { - return balanceOf[owner]; - } - - /*////////////////////////////////////////////////////////////// - INTERNAL HOOKS LOGIC - //////////////////////////////////////////////////////////////*/ - - function beforeWithdraw(uint256 assets, uint256 shares) internal virtual {} - - function afterDeposit(uint256 assets, uint256 shares) internal virtual {} -} diff --git a/lib/solmate/src/test/Auth.t.sol b/lib/solmate/src/test/Auth.t.sol deleted file mode 100644 index 19a6b84..0000000 --- a/lib/solmate/src/test/Auth.t.sol +++ /dev/null @@ -1,192 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity 0.8.10; - -import {DSTestPlus} from "./utils/DSTestPlus.sol"; -import {MockAuthChild} from "./utils/mocks/MockAuthChild.sol"; -import {MockAuthority} from "./utils/mocks/MockAuthority.sol"; - -import {Authority} from "../auth/Auth.sol"; - -contract OutOfOrderAuthority is Authority { - function canCall( - address, - address, - bytes4 - ) public pure override returns (bool) { - revert("OUT_OF_ORDER"); - } -} - -contract AuthTest is DSTestPlus { - MockAuthChild mockAuthChild; - - function setUp() public { - mockAuthChild = new MockAuthChild(); - } - - function testSetOwnerAsOwner() public { - mockAuthChild.setOwner(address(0xBEEF)); - assertEq(mockAuthChild.owner(), address(0xBEEF)); - } - - function testSetAuthorityAsOwner() public { - mockAuthChild.setAuthority(Authority(address(0xBEEF))); - assertEq(address(mockAuthChild.authority()), address(0xBEEF)); - } - - function testCallFunctionAsOwner() public { - mockAuthChild.updateFlag(); - } - - function testSetOwnerWithPermissiveAuthority() public { - mockAuthChild.setAuthority(new MockAuthority(true)); - mockAuthChild.setOwner(address(0)); - mockAuthChild.setOwner(address(this)); - } - - function testSetAuthorityWithPermissiveAuthority() public { - mockAuthChild.setAuthority(new MockAuthority(true)); - mockAuthChild.setOwner(address(0)); - mockAuthChild.setAuthority(Authority(address(0xBEEF))); - } - - function testCallFunctionWithPermissiveAuthority() public { - mockAuthChild.setAuthority(new MockAuthority(true)); - mockAuthChild.setOwner(address(0)); - mockAuthChild.updateFlag(); - } - - function testSetAuthorityAsOwnerWithOutOfOrderAuthority() public { - mockAuthChild.setAuthority(new OutOfOrderAuthority()); - mockAuthChild.setAuthority(new MockAuthority(true)); - } - - function testFailSetOwnerAsNonOwner() public { - mockAuthChild.setOwner(address(0)); - mockAuthChild.setOwner(address(0xBEEF)); - } - - function testFailSetAuthorityAsNonOwner() public { - mockAuthChild.setOwner(address(0)); - mockAuthChild.setAuthority(Authority(address(0xBEEF))); - } - - function testFailCallFunctionAsNonOwner() public { - mockAuthChild.setOwner(address(0)); - mockAuthChild.updateFlag(); - } - - function testFailSetOwnerWithRestrictiveAuthority() public { - mockAuthChild.setAuthority(new MockAuthority(false)); - mockAuthChild.setOwner(address(0)); - mockAuthChild.setOwner(address(this)); - } - - function testFailSetAuthorityWithRestrictiveAuthority() public { - mockAuthChild.setAuthority(new MockAuthority(false)); - mockAuthChild.setOwner(address(0)); - mockAuthChild.setAuthority(Authority(address(0xBEEF))); - } - - function testFailCallFunctionWithRestrictiveAuthority() public { - mockAuthChild.setAuthority(new MockAuthority(false)); - mockAuthChild.setOwner(address(0)); - mockAuthChild.updateFlag(); - } - - function testFailSetOwnerAsOwnerWithOutOfOrderAuthority() public { - mockAuthChild.setAuthority(new OutOfOrderAuthority()); - mockAuthChild.setOwner(address(0)); - } - - function testFailCallFunctionAsOwnerWithOutOfOrderAuthority() public { - mockAuthChild.setAuthority(new OutOfOrderAuthority()); - mockAuthChild.updateFlag(); - } - - function testSetOwnerAsOwner(address newOwner) public { - mockAuthChild.setOwner(newOwner); - assertEq(mockAuthChild.owner(), newOwner); - } - - function testSetAuthorityAsOwner(Authority newAuthority) public { - mockAuthChild.setAuthority(newAuthority); - assertEq(address(mockAuthChild.authority()), address(newAuthority)); - } - - function testSetOwnerWithPermissiveAuthority(address deadOwner, address newOwner) public { - if (deadOwner == address(this)) deadOwner = address(0); - - mockAuthChild.setAuthority(new MockAuthority(true)); - mockAuthChild.setOwner(deadOwner); - mockAuthChild.setOwner(newOwner); - } - - function testSetAuthorityWithPermissiveAuthority(address deadOwner, Authority newAuthority) public { - if (deadOwner == address(this)) deadOwner = address(0); - - mockAuthChild.setAuthority(new MockAuthority(true)); - mockAuthChild.setOwner(deadOwner); - mockAuthChild.setAuthority(newAuthority); - } - - function testCallFunctionWithPermissiveAuthority(address deadOwner) public { - if (deadOwner == address(this)) deadOwner = address(0); - - mockAuthChild.setAuthority(new MockAuthority(true)); - mockAuthChild.setOwner(deadOwner); - mockAuthChild.updateFlag(); - } - - function testFailSetOwnerAsNonOwner(address deadOwner, address newOwner) public { - if (deadOwner == address(this)) deadOwner = address(0); - - mockAuthChild.setOwner(deadOwner); - mockAuthChild.setOwner(newOwner); - } - - function testFailSetAuthorityAsNonOwner(address deadOwner, Authority newAuthority) public { - if (deadOwner == address(this)) deadOwner = address(0); - - mockAuthChild.setOwner(deadOwner); - mockAuthChild.setAuthority(newAuthority); - } - - function testFailCallFunctionAsNonOwner(address deadOwner) public { - if (deadOwner == address(this)) deadOwner = address(0); - - mockAuthChild.setOwner(deadOwner); - mockAuthChild.updateFlag(); - } - - function testFailSetOwnerWithRestrictiveAuthority(address deadOwner, address newOwner) public { - if (deadOwner == address(this)) deadOwner = address(0); - - mockAuthChild.setAuthority(new MockAuthority(false)); - mockAuthChild.setOwner(deadOwner); - mockAuthChild.setOwner(newOwner); - } - - function testFailSetAuthorityWithRestrictiveAuthority(address deadOwner, Authority newAuthority) public { - if (deadOwner == address(this)) deadOwner = address(0); - - mockAuthChild.setAuthority(new MockAuthority(false)); - mockAuthChild.setOwner(deadOwner); - mockAuthChild.setAuthority(newAuthority); - } - - function testFailCallFunctionWithRestrictiveAuthority(address deadOwner) public { - if (deadOwner == address(this)) deadOwner = address(0); - - mockAuthChild.setAuthority(new MockAuthority(false)); - mockAuthChild.setOwner(deadOwner); - mockAuthChild.updateFlag(); - } - - function testFailSetOwnerAsOwnerWithOutOfOrderAuthority(address deadOwner) public { - if (deadOwner == address(this)) deadOwner = address(0); - - mockAuthChild.setAuthority(new OutOfOrderAuthority()); - mockAuthChild.setOwner(deadOwner); - } -} diff --git a/lib/solmate/src/test/Bytes32AddressLib.t.sol b/lib/solmate/src/test/Bytes32AddressLib.t.sol deleted file mode 100644 index 0a85b14..0000000 --- a/lib/solmate/src/test/Bytes32AddressLib.t.sol +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity 0.8.10; - -import {DSTestPlus} from "./utils/DSTestPlus.sol"; - -import {Bytes32AddressLib} from "../utils/Bytes32AddressLib.sol"; - -contract Bytes32AddressLibTest is DSTestPlus { - function testFillLast12Bytes() public { - assertEq( - Bytes32AddressLib.fillLast12Bytes(0xfEEDFaCEcaFeBEEFfEEDFACecaFEBeeFfeEdfAce), - 0xfeedfacecafebeeffeedfacecafebeeffeedface000000000000000000000000 - ); - } - - function testFromLast20Bytes() public { - assertEq( - Bytes32AddressLib.fromLast20Bytes(0xfeedfacecafebeeffeedfacecafebeeffeedfacecafebeeffeedfacecafebeef), - 0xCAfeBeefFeedfAceCAFeBEEffEEDfaCecafEBeeF - ); - } -} diff --git a/lib/solmate/src/test/CREATE3.t.sol b/lib/solmate/src/test/CREATE3.t.sol deleted file mode 100644 index 8120632..0000000 --- a/lib/solmate/src/test/CREATE3.t.sol +++ /dev/null @@ -1,74 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity 0.8.10; - -import {WETH} from "../tokens/WETH.sol"; -import {DSTestPlus} from "./utils/DSTestPlus.sol"; -import {MockERC20} from "./utils/mocks/MockERC20.sol"; -import {MockAuthChild} from "./utils/mocks/MockAuthChild.sol"; - -import {CREATE3} from "../utils/CREATE3.sol"; - -contract CREATE3Test is DSTestPlus { - function testDeployERC20() public { - bytes32 salt = keccak256(bytes("A salt!")); - - MockERC20 deployed = MockERC20( - CREATE3.deploy( - salt, - abi.encodePacked(type(MockERC20).creationCode, abi.encode("Mock Token", "MOCK", 18)), - 0 - ) - ); - - assertEq(address(deployed), CREATE3.getDeployed(salt)); - - assertEq(deployed.name(), "Mock Token"); - assertEq(deployed.symbol(), "MOCK"); - assertEq(deployed.decimals(), 18); - } - - function testFailDoubleDeploySameBytecode() public { - bytes32 salt = keccak256(bytes("Salty...")); - - CREATE3.deploy(salt, type(MockAuthChild).creationCode, 0); - CREATE3.deploy(salt, type(MockAuthChild).creationCode, 0); - } - - function testFailDoubleDeployDifferentBytecode() public { - bytes32 salt = keccak256(bytes("and sweet!")); - - CREATE3.deploy(salt, type(WETH).creationCode, 0); - CREATE3.deploy(salt, type(MockAuthChild).creationCode, 0); - } - - function testDeployERC20( - bytes32 salt, - string calldata name, - string calldata symbol, - uint8 decimals - ) public { - MockERC20 deployed = MockERC20( - CREATE3.deploy(salt, abi.encodePacked(type(MockERC20).creationCode, abi.encode(name, symbol, decimals)), 0) - ); - - assertEq(address(deployed), CREATE3.getDeployed(salt)); - - assertEq(deployed.name(), name); - assertEq(deployed.symbol(), symbol); - assertEq(deployed.decimals(), decimals); - } - - function testFailDoubleDeploySameBytecode(bytes32 salt, bytes calldata bytecode) public { - CREATE3.deploy(salt, bytecode, 0); - CREATE3.deploy(salt, bytecode, 0); - } - - function testFailDoubleDeployDifferentBytecode( - bytes32 salt, - bytes calldata bytecode1, - bytes calldata bytecode2 - ) public { - CREATE3.deploy(salt, bytecode1, 0); - CREATE3.deploy(salt, bytecode2, 0); - } -} diff --git a/lib/solmate/src/test/DSTestPlus.t.sol b/lib/solmate/src/test/DSTestPlus.t.sol deleted file mode 100644 index 8487f84..0000000 --- a/lib/solmate/src/test/DSTestPlus.t.sol +++ /dev/null @@ -1,72 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity 0.8.10; - -import {DSTestPlus} from "./utils/DSTestPlus.sol"; - -contract DSTestPlusTest is DSTestPlus { - function testBound() public { - assertEq(bound(0, 69, 69), 69); - assertEq(bound(0, 68, 69), 68); - assertEq(bound(5, 0, 4), 0); - assertEq(bound(9999, 1337, 6666), 6006); - assertEq(bound(0, type(uint256).max - 6, type(uint256).max), type(uint256).max - 6); - assertEq(bound(6, type(uint256).max - 6, type(uint256).max), type(uint256).max); - } - - function testFailBoundMinBiggerThanMax() public { - bound(5, 100, 10); - } - - function testRelApproxEqBothZeroesPasses() public { - assertRelApproxEq(0, 0, 1e18); - assertRelApproxEq(0, 0, 0); - } - - function testBound( - uint256 num, - uint256 min, - uint256 max - ) public { - if (min > max) (min, max) = (max, min); - - uint256 bounded = bound(num, min, max); - - assertGe(bounded, min); - assertLe(bounded, max); - } - - function testFailBoundMinBiggerThanMax( - uint256 num, - uint256 min, - uint256 max - ) public { - if (max == min) { - unchecked { - min++; // Overflow is handled below. - } - } - - if (max > min) (min, max) = (max, min); - - bound(num, min, max); - } - - function testBrutalizeMemory() public brutalizeMemory("FEEDFACECAFEBEEFFEEDFACECAFEBEEF") { - bytes32 scratchSpace1; - bytes32 scratchSpace2; - bytes32 freeMem1; - bytes32 freeMem2; - - assembly { - scratchSpace1 := mload(0) - scratchSpace2 := mload(32) - freeMem1 := mload(mload(0x40)) - freeMem2 := mload(add(mload(0x40), 32)) - } - - assertGt(uint256(freeMem1), 0); - assertGt(uint256(freeMem2), 0); - assertGt(uint256(scratchSpace1), 0); - assertGt(uint256(scratchSpace2), 0); - } -} diff --git a/lib/solmate/src/test/ERC1155.t.sol b/lib/solmate/src/test/ERC1155.t.sol deleted file mode 100644 index c3d3dec..0000000 --- a/lib/solmate/src/test/ERC1155.t.sol +++ /dev/null @@ -1,1773 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity 0.8.10; - -import {DSTestPlus} from "./utils/DSTestPlus.sol"; -import {DSInvariantTest} from "./utils/DSInvariantTest.sol"; - -import {MockERC1155} from "./utils/mocks/MockERC1155.sol"; - -import {ERC1155TokenReceiver} from "../tokens/ERC1155.sol"; - -contract ERC1155Recipient is ERC1155TokenReceiver { - address public operator; - address public from; - uint256 public id; - uint256 public amount; - bytes public mintData; - - function onERC1155Received( - address _operator, - address _from, - uint256 _id, - uint256 _amount, - bytes calldata _data - ) public override returns (bytes4) { - operator = _operator; - from = _from; - id = _id; - amount = _amount; - mintData = _data; - - return ERC1155TokenReceiver.onERC1155Received.selector; - } - - address public batchOperator; - address public batchFrom; - uint256[] internal _batchIds; - uint256[] internal _batchAmounts; - bytes public batchData; - - function batchIds() external view returns (uint256[] memory) { - return _batchIds; - } - - function batchAmounts() external view returns (uint256[] memory) { - return _batchAmounts; - } - - function onERC1155BatchReceived( - address _operator, - address _from, - uint256[] calldata _ids, - uint256[] calldata _amounts, - bytes calldata _data - ) external override returns (bytes4) { - batchOperator = _operator; - batchFrom = _from; - _batchIds = _ids; - _batchAmounts = _amounts; - batchData = _data; - - return ERC1155TokenReceiver.onERC1155BatchReceived.selector; - } -} - -contract RevertingERC1155Recipient is ERC1155TokenReceiver { - function onERC1155Received( - address, - address, - uint256, - uint256, - bytes calldata - ) public pure override returns (bytes4) { - revert(string(abi.encodePacked(ERC1155TokenReceiver.onERC1155Received.selector))); - } - - function onERC1155BatchReceived( - address, - address, - uint256[] calldata, - uint256[] calldata, - bytes calldata - ) external pure override returns (bytes4) { - revert(string(abi.encodePacked(ERC1155TokenReceiver.onERC1155BatchReceived.selector))); - } -} - -contract WrongReturnDataERC1155Recipient is ERC1155TokenReceiver { - function onERC1155Received( - address, - address, - uint256, - uint256, - bytes calldata - ) public pure override returns (bytes4) { - return 0xCAFEBEEF; - } - - function onERC1155BatchReceived( - address, - address, - uint256[] calldata, - uint256[] calldata, - bytes calldata - ) external pure override returns (bytes4) { - return 0xCAFEBEEF; - } -} - -contract NonERC1155Recipient {} - -contract ERC1155Test is DSTestPlus, ERC1155TokenReceiver { - MockERC1155 token; - - mapping(address => mapping(uint256 => uint256)) public userMintAmounts; - mapping(address => mapping(uint256 => uint256)) public userTransferOrBurnAmounts; - - function setUp() public { - token = new MockERC1155(); - } - - function testMintToEOA() public { - token.mint(address(0xBEEF), 1337, 1, ""); - - assertEq(token.balanceOf(address(0xBEEF), 1337), 1); - } - - function testMintToERC1155Recipient() public { - ERC1155Recipient to = new ERC1155Recipient(); - - token.mint(address(to), 1337, 1, "testing 123"); - - assertEq(token.balanceOf(address(to), 1337), 1); - - assertEq(to.operator(), address(this)); - assertEq(to.from(), address(0)); - assertEq(to.id(), 1337); - assertBytesEq(to.mintData(), "testing 123"); - } - - function testBatchMintToEOA() public { - uint256[] memory ids = new uint256[](5); - ids[0] = 1337; - ids[1] = 1338; - ids[2] = 1339; - ids[3] = 1340; - ids[4] = 1341; - - uint256[] memory amounts = new uint256[](5); - amounts[0] = 100; - amounts[1] = 200; - amounts[2] = 300; - amounts[3] = 400; - amounts[4] = 500; - - token.batchMint(address(0xBEEF), ids, amounts, ""); - - assertEq(token.balanceOf(address(0xBEEF), 1337), 100); - assertEq(token.balanceOf(address(0xBEEF), 1338), 200); - assertEq(token.balanceOf(address(0xBEEF), 1339), 300); - assertEq(token.balanceOf(address(0xBEEF), 1340), 400); - assertEq(token.balanceOf(address(0xBEEF), 1341), 500); - } - - function testBatchMintToERC1155Recipient() public { - ERC1155Recipient to = new ERC1155Recipient(); - - uint256[] memory ids = new uint256[](5); - ids[0] = 1337; - ids[1] = 1338; - ids[2] = 1339; - ids[3] = 1340; - ids[4] = 1341; - - uint256[] memory amounts = new uint256[](5); - amounts[0] = 100; - amounts[1] = 200; - amounts[2] = 300; - amounts[3] = 400; - amounts[4] = 500; - - token.batchMint(address(to), ids, amounts, "testing 123"); - - assertEq(to.batchOperator(), address(this)); - assertEq(to.batchFrom(), address(0)); - assertUintArrayEq(to.batchIds(), ids); - assertUintArrayEq(to.batchAmounts(), amounts); - assertBytesEq(to.batchData(), "testing 123"); - - assertEq(token.balanceOf(address(to), 1337), 100); - assertEq(token.balanceOf(address(to), 1338), 200); - assertEq(token.balanceOf(address(to), 1339), 300); - assertEq(token.balanceOf(address(to), 1340), 400); - assertEq(token.balanceOf(address(to), 1341), 500); - } - - function testBurn() public { - token.mint(address(0xBEEF), 1337, 100, ""); - - token.burn(address(0xBEEF), 1337, 70); - - assertEq(token.balanceOf(address(0xBEEF), 1337), 30); - } - - function testBatchBurn() public { - uint256[] memory ids = new uint256[](5); - ids[0] = 1337; - ids[1] = 1338; - ids[2] = 1339; - ids[3] = 1340; - ids[4] = 1341; - - uint256[] memory mintAmounts = new uint256[](5); - mintAmounts[0] = 100; - mintAmounts[1] = 200; - mintAmounts[2] = 300; - mintAmounts[3] = 400; - mintAmounts[4] = 500; - - uint256[] memory burnAmounts = new uint256[](5); - burnAmounts[0] = 50; - burnAmounts[1] = 100; - burnAmounts[2] = 150; - burnAmounts[3] = 200; - burnAmounts[4] = 250; - - token.batchMint(address(0xBEEF), ids, mintAmounts, ""); - - token.batchBurn(address(0xBEEF), ids, burnAmounts); - - assertEq(token.balanceOf(address(0xBEEF), 1337), 50); - assertEq(token.balanceOf(address(0xBEEF), 1338), 100); - assertEq(token.balanceOf(address(0xBEEF), 1339), 150); - assertEq(token.balanceOf(address(0xBEEF), 1340), 200); - assertEq(token.balanceOf(address(0xBEEF), 1341), 250); - } - - function testApproveAll() public { - token.setApprovalForAll(address(0xBEEF), true); - - assertTrue(token.isApprovedForAll(address(this), address(0xBEEF))); - } - - function testSafeTransferFromToEOA() public { - address from = address(0xABCD); - - token.mint(from, 1337, 100, ""); - - hevm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeTransferFrom(from, address(0xBEEF), 1337, 70, ""); - - assertEq(token.balanceOf(address(0xBEEF), 1337), 70); - assertEq(token.balanceOf(from, 1337), 30); - } - - function testSafeTransferFromToERC1155Recipient() public { - ERC1155Recipient to = new ERC1155Recipient(); - - address from = address(0xABCD); - - token.mint(from, 1337, 100, ""); - - hevm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeTransferFrom(from, address(to), 1337, 70, "testing 123"); - - assertEq(to.operator(), address(this)); - assertEq(to.from(), from); - assertEq(to.id(), 1337); - assertBytesEq(to.mintData(), "testing 123"); - - assertEq(token.balanceOf(address(to), 1337), 70); - assertEq(token.balanceOf(from, 1337), 30); - } - - function testSafeTransferFromSelf() public { - token.mint(address(this), 1337, 100, ""); - - token.safeTransferFrom(address(this), address(0xBEEF), 1337, 70, ""); - - assertEq(token.balanceOf(address(0xBEEF), 1337), 70); - assertEq(token.balanceOf(address(this), 1337), 30); - } - - function testSafeBatchTransferFromToEOA() public { - address from = address(0xABCD); - - uint256[] memory ids = new uint256[](5); - ids[0] = 1337; - ids[1] = 1338; - ids[2] = 1339; - ids[3] = 1340; - ids[4] = 1341; - - uint256[] memory mintAmounts = new uint256[](5); - mintAmounts[0] = 100; - mintAmounts[1] = 200; - mintAmounts[2] = 300; - mintAmounts[3] = 400; - mintAmounts[4] = 500; - - uint256[] memory transferAmounts = new uint256[](5); - transferAmounts[0] = 50; - transferAmounts[1] = 100; - transferAmounts[2] = 150; - transferAmounts[3] = 200; - transferAmounts[4] = 250; - - token.batchMint(from, ids, mintAmounts, ""); - - hevm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeBatchTransferFrom(from, address(0xBEEF), ids, transferAmounts, ""); - - assertEq(token.balanceOf(from, 1337), 50); - assertEq(token.balanceOf(address(0xBEEF), 1337), 50); - - assertEq(token.balanceOf(from, 1338), 100); - assertEq(token.balanceOf(address(0xBEEF), 1338), 100); - - assertEq(token.balanceOf(from, 1339), 150); - assertEq(token.balanceOf(address(0xBEEF), 1339), 150); - - assertEq(token.balanceOf(from, 1340), 200); - assertEq(token.balanceOf(address(0xBEEF), 1340), 200); - - assertEq(token.balanceOf(from, 1341), 250); - assertEq(token.balanceOf(address(0xBEEF), 1341), 250); - } - - function testSafeBatchTransferFromToERC1155Recipient() public { - address from = address(0xABCD); - - ERC1155Recipient to = new ERC1155Recipient(); - - uint256[] memory ids = new uint256[](5); - ids[0] = 1337; - ids[1] = 1338; - ids[2] = 1339; - ids[3] = 1340; - ids[4] = 1341; - - uint256[] memory mintAmounts = new uint256[](5); - mintAmounts[0] = 100; - mintAmounts[1] = 200; - mintAmounts[2] = 300; - mintAmounts[3] = 400; - mintAmounts[4] = 500; - - uint256[] memory transferAmounts = new uint256[](5); - transferAmounts[0] = 50; - transferAmounts[1] = 100; - transferAmounts[2] = 150; - transferAmounts[3] = 200; - transferAmounts[4] = 250; - - token.batchMint(from, ids, mintAmounts, ""); - - hevm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeBatchTransferFrom(from, address(to), ids, transferAmounts, "testing 123"); - - assertEq(to.batchOperator(), address(this)); - assertEq(to.batchFrom(), from); - assertUintArrayEq(to.batchIds(), ids); - assertUintArrayEq(to.batchAmounts(), transferAmounts); - assertBytesEq(to.batchData(), "testing 123"); - - assertEq(token.balanceOf(from, 1337), 50); - assertEq(token.balanceOf(address(to), 1337), 50); - - assertEq(token.balanceOf(from, 1338), 100); - assertEq(token.balanceOf(address(to), 1338), 100); - - assertEq(token.balanceOf(from, 1339), 150); - assertEq(token.balanceOf(address(to), 1339), 150); - - assertEq(token.balanceOf(from, 1340), 200); - assertEq(token.balanceOf(address(to), 1340), 200); - - assertEq(token.balanceOf(from, 1341), 250); - assertEq(token.balanceOf(address(to), 1341), 250); - } - - function testBatchBalanceOf() public { - address[] memory tos = new address[](5); - tos[0] = address(0xBEEF); - tos[1] = address(0xCAFE); - tos[2] = address(0xFACE); - tos[3] = address(0xDEAD); - tos[4] = address(0xFEED); - - uint256[] memory ids = new uint256[](5); - ids[0] = 1337; - ids[1] = 1338; - ids[2] = 1339; - ids[3] = 1340; - ids[4] = 1341; - - token.mint(address(0xBEEF), 1337, 100, ""); - token.mint(address(0xCAFE), 1338, 200, ""); - token.mint(address(0xFACE), 1339, 300, ""); - token.mint(address(0xDEAD), 1340, 400, ""); - token.mint(address(0xFEED), 1341, 500, ""); - - uint256[] memory balances = token.balanceOfBatch(tos, ids); - - assertEq(balances[0], 100); - assertEq(balances[1], 200); - assertEq(balances[2], 300); - assertEq(balances[3], 400); - assertEq(balances[4], 500); - } - - function testFailMintToZero() public { - token.mint(address(0), 1337, 1, ""); - } - - function testFailMintToNonERC155Recipient() public { - token.mint(address(new NonERC1155Recipient()), 1337, 1, ""); - } - - function testFailMintToRevertingERC155Recipient() public { - token.mint(address(new RevertingERC1155Recipient()), 1337, 1, ""); - } - - function testFailMintToWrongReturnDataERC155Recipient() public { - token.mint(address(new RevertingERC1155Recipient()), 1337, 1, ""); - } - - function testFailBurnInsufficientBalance() public { - token.mint(address(0xBEEF), 1337, 70, ""); - token.burn(address(0xBEEF), 1337, 100); - } - - function testFailSafeTransferFromInsufficientBalance() public { - address from = address(0xABCD); - - token.mint(from, 1337, 70, ""); - - hevm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeTransferFrom(from, address(0xBEEF), 1337, 100, ""); - } - - function testFailSafeTransferFromSelfInsufficientBalance() public { - token.mint(address(this), 1337, 70, ""); - token.safeTransferFrom(address(this), address(0xBEEF), 1337, 100, ""); - } - - function testFailSafeTransferFromToZero() public { - token.mint(address(this), 1337, 100, ""); - token.safeTransferFrom(address(this), address(0), 1337, 70, ""); - } - - function testFailSafeTransferFromToNonERC155Recipient() public { - token.mint(address(this), 1337, 100, ""); - token.safeTransferFrom(address(this), address(new NonERC1155Recipient()), 1337, 70, ""); - } - - function testFailSafeTransferFromToRevertingERC1155Recipient() public { - token.mint(address(this), 1337, 100, ""); - token.safeTransferFrom(address(this), address(new RevertingERC1155Recipient()), 1337, 70, ""); - } - - function testFailSafeTransferFromToWrongReturnDataERC1155Recipient() public { - token.mint(address(this), 1337, 100, ""); - token.safeTransferFrom(address(this), address(new WrongReturnDataERC1155Recipient()), 1337, 70, ""); - } - - function testFailSafeBatchTransferInsufficientBalance() public { - address from = address(0xABCD); - - uint256[] memory ids = new uint256[](5); - ids[0] = 1337; - ids[1] = 1338; - ids[2] = 1339; - ids[3] = 1340; - ids[4] = 1341; - - uint256[] memory mintAmounts = new uint256[](5); - - mintAmounts[0] = 50; - mintAmounts[1] = 100; - mintAmounts[2] = 150; - mintAmounts[3] = 200; - mintAmounts[4] = 250; - - uint256[] memory transferAmounts = new uint256[](5); - transferAmounts[0] = 100; - transferAmounts[1] = 200; - transferAmounts[2] = 300; - transferAmounts[3] = 400; - transferAmounts[4] = 500; - - token.batchMint(from, ids, mintAmounts, ""); - - hevm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeBatchTransferFrom(from, address(0xBEEF), ids, transferAmounts, ""); - } - - function testFailSafeBatchTransferFromToZero() public { - address from = address(0xABCD); - - uint256[] memory ids = new uint256[](5); - ids[0] = 1337; - ids[1] = 1338; - ids[2] = 1339; - ids[3] = 1340; - ids[4] = 1341; - - uint256[] memory mintAmounts = new uint256[](5); - mintAmounts[0] = 100; - mintAmounts[1] = 200; - mintAmounts[2] = 300; - mintAmounts[3] = 400; - mintAmounts[4] = 500; - - uint256[] memory transferAmounts = new uint256[](5); - transferAmounts[0] = 50; - transferAmounts[1] = 100; - transferAmounts[2] = 150; - transferAmounts[3] = 200; - transferAmounts[4] = 250; - - token.batchMint(from, ids, mintAmounts, ""); - - hevm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeBatchTransferFrom(from, address(0), ids, transferAmounts, ""); - } - - function testFailSafeBatchTransferFromToNonERC1155Recipient() public { - address from = address(0xABCD); - - uint256[] memory ids = new uint256[](5); - ids[0] = 1337; - ids[1] = 1338; - ids[2] = 1339; - ids[3] = 1340; - ids[4] = 1341; - - uint256[] memory mintAmounts = new uint256[](5); - mintAmounts[0] = 100; - mintAmounts[1] = 200; - mintAmounts[2] = 300; - mintAmounts[3] = 400; - mintAmounts[4] = 500; - - uint256[] memory transferAmounts = new uint256[](5); - transferAmounts[0] = 50; - transferAmounts[1] = 100; - transferAmounts[2] = 150; - transferAmounts[3] = 200; - transferAmounts[4] = 250; - - token.batchMint(from, ids, mintAmounts, ""); - - hevm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeBatchTransferFrom(from, address(new NonERC1155Recipient()), ids, transferAmounts, ""); - } - - function testFailSafeBatchTransferFromToRevertingERC1155Recipient() public { - address from = address(0xABCD); - - uint256[] memory ids = new uint256[](5); - ids[0] = 1337; - ids[1] = 1338; - ids[2] = 1339; - ids[3] = 1340; - ids[4] = 1341; - - uint256[] memory mintAmounts = new uint256[](5); - mintAmounts[0] = 100; - mintAmounts[1] = 200; - mintAmounts[2] = 300; - mintAmounts[3] = 400; - mintAmounts[4] = 500; - - uint256[] memory transferAmounts = new uint256[](5); - transferAmounts[0] = 50; - transferAmounts[1] = 100; - transferAmounts[2] = 150; - transferAmounts[3] = 200; - transferAmounts[4] = 250; - - token.batchMint(from, ids, mintAmounts, ""); - - hevm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeBatchTransferFrom(from, address(new RevertingERC1155Recipient()), ids, transferAmounts, ""); - } - - function testFailSafeBatchTransferFromToWrongReturnDataERC1155Recipient() public { - address from = address(0xABCD); - - uint256[] memory ids = new uint256[](5); - ids[0] = 1337; - ids[1] = 1338; - ids[2] = 1339; - ids[3] = 1340; - ids[4] = 1341; - - uint256[] memory mintAmounts = new uint256[](5); - mintAmounts[0] = 100; - mintAmounts[1] = 200; - mintAmounts[2] = 300; - mintAmounts[3] = 400; - mintAmounts[4] = 500; - - uint256[] memory transferAmounts = new uint256[](5); - transferAmounts[0] = 50; - transferAmounts[1] = 100; - transferAmounts[2] = 150; - transferAmounts[3] = 200; - transferAmounts[4] = 250; - - token.batchMint(from, ids, mintAmounts, ""); - - hevm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeBatchTransferFrom(from, address(new WrongReturnDataERC1155Recipient()), ids, transferAmounts, ""); - } - - function testFailSafeBatchTransferFromWithArrayLengthMismatch() public { - address from = address(0xABCD); - - uint256[] memory ids = new uint256[](5); - ids[0] = 1337; - ids[1] = 1338; - ids[2] = 1339; - ids[3] = 1340; - ids[4] = 1341; - - uint256[] memory mintAmounts = new uint256[](5); - mintAmounts[0] = 100; - mintAmounts[1] = 200; - mintAmounts[2] = 300; - mintAmounts[3] = 400; - mintAmounts[4] = 500; - - uint256[] memory transferAmounts = new uint256[](4); - transferAmounts[0] = 50; - transferAmounts[1] = 100; - transferAmounts[2] = 150; - transferAmounts[3] = 200; - - token.batchMint(from, ids, mintAmounts, ""); - - hevm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeBatchTransferFrom(from, address(0xBEEF), ids, transferAmounts, ""); - } - - function testFailBatchMintToZero() public { - uint256[] memory ids = new uint256[](5); - ids[0] = 1337; - ids[1] = 1338; - ids[2] = 1339; - ids[3] = 1340; - ids[4] = 1341; - - uint256[] memory mintAmounts = new uint256[](5); - mintAmounts[0] = 100; - mintAmounts[1] = 200; - mintAmounts[2] = 300; - mintAmounts[3] = 400; - mintAmounts[4] = 500; - - token.batchMint(address(0), ids, mintAmounts, ""); - } - - function testFailBatchMintToNonERC1155Recipient() public { - NonERC1155Recipient to = new NonERC1155Recipient(); - - uint256[] memory ids = new uint256[](5); - ids[0] = 1337; - ids[1] = 1338; - ids[2] = 1339; - ids[3] = 1340; - ids[4] = 1341; - - uint256[] memory mintAmounts = new uint256[](5); - mintAmounts[0] = 100; - mintAmounts[1] = 200; - mintAmounts[2] = 300; - mintAmounts[3] = 400; - mintAmounts[4] = 500; - - token.batchMint(address(to), ids, mintAmounts, ""); - } - - function testFailBatchMintToRevertingERC1155Recipient() public { - RevertingERC1155Recipient to = new RevertingERC1155Recipient(); - - uint256[] memory ids = new uint256[](5); - ids[0] = 1337; - ids[1] = 1338; - ids[2] = 1339; - ids[3] = 1340; - ids[4] = 1341; - - uint256[] memory mintAmounts = new uint256[](5); - mintAmounts[0] = 100; - mintAmounts[1] = 200; - mintAmounts[2] = 300; - mintAmounts[3] = 400; - mintAmounts[4] = 500; - - token.batchMint(address(to), ids, mintAmounts, ""); - } - - function testFailBatchMintToWrongReturnDataERC1155Recipient() public { - WrongReturnDataERC1155Recipient to = new WrongReturnDataERC1155Recipient(); - - uint256[] memory ids = new uint256[](5); - ids[0] = 1337; - ids[1] = 1338; - ids[2] = 1339; - ids[3] = 1340; - ids[4] = 1341; - - uint256[] memory mintAmounts = new uint256[](5); - mintAmounts[0] = 100; - mintAmounts[1] = 200; - mintAmounts[2] = 300; - mintAmounts[3] = 400; - mintAmounts[4] = 500; - - token.batchMint(address(to), ids, mintAmounts, ""); - } - - function testFailBatchMintWithArrayMismatch() public { - uint256[] memory ids = new uint256[](5); - ids[0] = 1337; - ids[1] = 1338; - ids[2] = 1339; - ids[3] = 1340; - ids[4] = 1341; - - uint256[] memory amounts = new uint256[](4); - amounts[0] = 100; - amounts[1] = 200; - amounts[2] = 300; - amounts[3] = 400; - - token.batchMint(address(0xBEEF), ids, amounts, ""); - } - - function testFailBatchBurnInsufficientBalance() public { - uint256[] memory ids = new uint256[](5); - ids[0] = 1337; - ids[1] = 1338; - ids[2] = 1339; - ids[3] = 1340; - ids[4] = 1341; - - uint256[] memory mintAmounts = new uint256[](5); - mintAmounts[0] = 50; - mintAmounts[1] = 100; - mintAmounts[2] = 150; - mintAmounts[3] = 200; - mintAmounts[4] = 250; - - uint256[] memory burnAmounts = new uint256[](5); - burnAmounts[0] = 100; - burnAmounts[1] = 200; - burnAmounts[2] = 300; - burnAmounts[3] = 400; - burnAmounts[4] = 500; - - token.batchMint(address(0xBEEF), ids, mintAmounts, ""); - - token.batchBurn(address(0xBEEF), ids, burnAmounts); - } - - function testFailBatchBurnWithArrayLengthMismatch() public { - uint256[] memory ids = new uint256[](5); - ids[0] = 1337; - ids[1] = 1338; - ids[2] = 1339; - ids[3] = 1340; - ids[4] = 1341; - - uint256[] memory mintAmounts = new uint256[](5); - mintAmounts[0] = 100; - mintAmounts[1] = 200; - mintAmounts[2] = 300; - mintAmounts[3] = 400; - mintAmounts[4] = 500; - - uint256[] memory burnAmounts = new uint256[](4); - burnAmounts[0] = 50; - burnAmounts[1] = 100; - burnAmounts[2] = 150; - burnAmounts[3] = 200; - - token.batchMint(address(0xBEEF), ids, mintAmounts, ""); - - token.batchBurn(address(0xBEEF), ids, burnAmounts); - } - - function testFailBalanceOfBatchWithArrayMismatch() public view { - address[] memory tos = new address[](5); - tos[0] = address(0xBEEF); - tos[1] = address(0xCAFE); - tos[2] = address(0xFACE); - tos[3] = address(0xDEAD); - tos[4] = address(0xFEED); - - uint256[] memory ids = new uint256[](4); - ids[0] = 1337; - ids[1] = 1338; - ids[2] = 1339; - ids[3] = 1340; - - token.balanceOfBatch(tos, ids); - } - - function testMintToEOA( - address to, - uint256 id, - uint256 amount, - bytes memory mintData - ) public { - if (to == address(0)) to = address(0xBEEF); - - if (uint256(uint160(to)) <= 18 || to.code.length > 0) return; - - token.mint(to, id, amount, mintData); - - assertEq(token.balanceOf(to, id), amount); - } - - function testMintToERC1155Recipient( - uint256 id, - uint256 amount, - bytes memory mintData - ) public { - ERC1155Recipient to = new ERC1155Recipient(); - - token.mint(address(to), id, amount, mintData); - - assertEq(token.balanceOf(address(to), id), amount); - - assertEq(to.operator(), address(this)); - assertEq(to.from(), address(0)); - assertEq(to.id(), id); - assertBytesEq(to.mintData(), mintData); - } - - function testBatchMintToEOA( - address to, - uint256[] memory ids, - uint256[] memory amounts, - bytes memory mintData - ) public { - if (to == address(0)) to = address(0xBEEF); - - if (uint256(uint160(to)) <= 18 || to.code.length > 0) return; - - uint256 minLength = min2(ids.length, amounts.length); - - uint256[] memory normalizedIds = new uint256[](minLength); - uint256[] memory normalizedAmounts = new uint256[](minLength); - - for (uint256 i = 0; i < minLength; i++) { - uint256 id = ids[i]; - - uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[to][id]; - - uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId); - - normalizedIds[i] = id; - normalizedAmounts[i] = mintAmount; - - userMintAmounts[to][id] += mintAmount; - } - - token.batchMint(to, normalizedIds, normalizedAmounts, mintData); - - for (uint256 i = 0; i < normalizedIds.length; i++) { - uint256 id = normalizedIds[i]; - - assertEq(token.balanceOf(to, id), userMintAmounts[to][id]); - } - } - - function testBatchMintToERC1155Recipient( - uint256[] memory ids, - uint256[] memory amounts, - bytes memory mintData - ) public { - ERC1155Recipient to = new ERC1155Recipient(); - - uint256 minLength = min2(ids.length, amounts.length); - - uint256[] memory normalizedIds = new uint256[](minLength); - uint256[] memory normalizedAmounts = new uint256[](minLength); - - for (uint256 i = 0; i < minLength; i++) { - uint256 id = ids[i]; - - uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(to)][id]; - - uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId); - - normalizedIds[i] = id; - normalizedAmounts[i] = mintAmount; - - userMintAmounts[address(to)][id] += mintAmount; - } - - token.batchMint(address(to), normalizedIds, normalizedAmounts, mintData); - - assertEq(to.batchOperator(), address(this)); - assertEq(to.batchFrom(), address(0)); - assertUintArrayEq(to.batchIds(), normalizedIds); - assertUintArrayEq(to.batchAmounts(), normalizedAmounts); - assertBytesEq(to.batchData(), mintData); - - for (uint256 i = 0; i < normalizedIds.length; i++) { - uint256 id = normalizedIds[i]; - - assertEq(token.balanceOf(address(to), id), userMintAmounts[address(to)][id]); - } - } - - function testBurn( - address to, - uint256 id, - uint256 mintAmount, - bytes memory mintData, - uint256 burnAmount - ) public { - if (to == address(0)) to = address(0xBEEF); - - if (uint256(uint160(to)) <= 18 || to.code.length > 0) return; - - burnAmount = bound(burnAmount, 0, mintAmount); - - token.mint(to, id, mintAmount, mintData); - - token.burn(to, id, burnAmount); - - assertEq(token.balanceOf(address(to), id), mintAmount - burnAmount); - } - - function testBatchBurn( - address to, - uint256[] memory ids, - uint256[] memory mintAmounts, - uint256[] memory burnAmounts, - bytes memory mintData - ) public { - if (to == address(0)) to = address(0xBEEF); - - if (uint256(uint160(to)) <= 18 || to.code.length > 0) return; - - uint256 minLength = min3(ids.length, mintAmounts.length, burnAmounts.length); - - uint256[] memory normalizedIds = new uint256[](minLength); - uint256[] memory normalizedMintAmounts = new uint256[](minLength); - uint256[] memory normalizedBurnAmounts = new uint256[](minLength); - - for (uint256 i = 0; i < minLength; i++) { - uint256 id = ids[i]; - - uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(to)][id]; - - normalizedIds[i] = id; - normalizedMintAmounts[i] = bound(mintAmounts[i], 0, remainingMintAmountForId); - normalizedBurnAmounts[i] = bound(burnAmounts[i], 0, normalizedMintAmounts[i]); - - userMintAmounts[address(to)][id] += normalizedMintAmounts[i]; - userTransferOrBurnAmounts[address(to)][id] += normalizedBurnAmounts[i]; - } - - token.batchMint(to, normalizedIds, normalizedMintAmounts, mintData); - - token.batchBurn(to, normalizedIds, normalizedBurnAmounts); - - for (uint256 i = 0; i < normalizedIds.length; i++) { - uint256 id = normalizedIds[i]; - - assertEq(token.balanceOf(to, id), userMintAmounts[to][id] - userTransferOrBurnAmounts[to][id]); - } - } - - function testApproveAll(address to, bool approved) public { - token.setApprovalForAll(to, approved); - - assertBoolEq(token.isApprovedForAll(address(this), to), approved); - } - - function testSafeTransferFromToEOA( - uint256 id, - uint256 mintAmount, - bytes memory mintData, - uint256 transferAmount, - address to, - bytes memory transferData - ) public { - if (to == address(0)) to = address(0xBEEF); - - if (uint256(uint160(to)) <= 18 || to.code.length > 0) return; - - transferAmount = bound(transferAmount, 0, mintAmount); - - address from = address(0xABCD); - - token.mint(from, id, mintAmount, mintData); - - hevm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeTransferFrom(from, to, id, transferAmount, transferData); - - assertEq(token.balanceOf(to, id), transferAmount); - assertEq(token.balanceOf(from, id), mintAmount - transferAmount); - } - - function testSafeTransferFromToERC1155Recipient( - uint256 id, - uint256 mintAmount, - bytes memory mintData, - uint256 transferAmount, - bytes memory transferData - ) public { - ERC1155Recipient to = new ERC1155Recipient(); - - address from = address(0xABCD); - - transferAmount = bound(transferAmount, 0, mintAmount); - - token.mint(from, id, mintAmount, mintData); - - hevm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeTransferFrom(from, address(to), id, transferAmount, transferData); - - assertEq(to.operator(), address(this)); - assertEq(to.from(), from); - assertEq(to.id(), id); - assertBytesEq(to.mintData(), transferData); - - assertEq(token.balanceOf(address(to), id), transferAmount); - assertEq(token.balanceOf(from, id), mintAmount - transferAmount); - } - - function testSafeTransferFromSelf( - uint256 id, - uint256 mintAmount, - bytes memory mintData, - uint256 transferAmount, - address to, - bytes memory transferData - ) public { - if (to == address(0)) to = address(0xBEEF); - - if (uint256(uint160(to)) <= 18 || to.code.length > 0) return; - - transferAmount = bound(transferAmount, 0, mintAmount); - - token.mint(address(this), id, mintAmount, mintData); - - token.safeTransferFrom(address(this), to, id, transferAmount, transferData); - - assertEq(token.balanceOf(to, id), transferAmount); - assertEq(token.balanceOf(address(this), id), mintAmount - transferAmount); - } - - function testSafeBatchTransferFromToEOA( - address to, - uint256[] memory ids, - uint256[] memory mintAmounts, - uint256[] memory transferAmounts, - bytes memory mintData, - bytes memory transferData - ) public { - if (to == address(0)) to = address(0xBEEF); - - if (uint256(uint160(to)) <= 18 || to.code.length > 0) return; - - address from = address(0xABCD); - - uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length); - - uint256[] memory normalizedIds = new uint256[](minLength); - uint256[] memory normalizedMintAmounts = new uint256[](minLength); - uint256[] memory normalizedTransferAmounts = new uint256[](minLength); - - for (uint256 i = 0; i < minLength; i++) { - uint256 id = ids[i]; - - uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[from][id]; - - uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId); - uint256 transferAmount = bound(transferAmounts[i], 0, mintAmount); - - normalizedIds[i] = id; - normalizedMintAmounts[i] = mintAmount; - normalizedTransferAmounts[i] = transferAmount; - - userMintAmounts[from][id] += mintAmount; - userTransferOrBurnAmounts[from][id] += transferAmount; - } - - token.batchMint(from, normalizedIds, normalizedMintAmounts, mintData); - - hevm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeBatchTransferFrom(from, to, normalizedIds, normalizedTransferAmounts, transferData); - - for (uint256 i = 0; i < normalizedIds.length; i++) { - uint256 id = normalizedIds[i]; - - assertEq(token.balanceOf(address(to), id), userTransferOrBurnAmounts[from][id]); - assertEq(token.balanceOf(from, id), userMintAmounts[from][id] - userTransferOrBurnAmounts[from][id]); - } - } - - function testSafeBatchTransferFromToERC1155Recipient( - uint256[] memory ids, - uint256[] memory mintAmounts, - uint256[] memory transferAmounts, - bytes memory mintData, - bytes memory transferData - ) public { - address from = address(0xABCD); - - ERC1155Recipient to = new ERC1155Recipient(); - - uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length); - - uint256[] memory normalizedIds = new uint256[](minLength); - uint256[] memory normalizedMintAmounts = new uint256[](minLength); - uint256[] memory normalizedTransferAmounts = new uint256[](minLength); - - for (uint256 i = 0; i < minLength; i++) { - uint256 id = ids[i]; - - uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[from][id]; - - uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId); - uint256 transferAmount = bound(transferAmounts[i], 0, mintAmount); - - normalizedIds[i] = id; - normalizedMintAmounts[i] = mintAmount; - normalizedTransferAmounts[i] = transferAmount; - - userMintAmounts[from][id] += mintAmount; - userTransferOrBurnAmounts[from][id] += transferAmount; - } - - token.batchMint(from, normalizedIds, normalizedMintAmounts, mintData); - - hevm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeBatchTransferFrom(from, address(to), normalizedIds, normalizedTransferAmounts, transferData); - - assertEq(to.batchOperator(), address(this)); - assertEq(to.batchFrom(), from); - assertUintArrayEq(to.batchIds(), normalizedIds); - assertUintArrayEq(to.batchAmounts(), normalizedTransferAmounts); - assertBytesEq(to.batchData(), transferData); - - for (uint256 i = 0; i < normalizedIds.length; i++) { - uint256 id = normalizedIds[i]; - uint256 transferAmount = userTransferOrBurnAmounts[from][id]; - - assertEq(token.balanceOf(address(to), id), transferAmount); - assertEq(token.balanceOf(from, id), userMintAmounts[from][id] - transferAmount); - } - } - - function testBatchBalanceOf( - address[] memory tos, - uint256[] memory ids, - uint256[] memory amounts, - bytes memory mintData - ) public { - uint256 minLength = min3(tos.length, ids.length, amounts.length); - - address[] memory normalizedTos = new address[](minLength); - uint256[] memory normalizedIds = new uint256[](minLength); - - for (uint256 i = 0; i < minLength; i++) { - uint256 id = ids[i]; - address to = tos[i] == address(0) ? address(0xBEEF) : tos[i]; - - uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[to][id]; - - normalizedTos[i] = to; - normalizedIds[i] = id; - - uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId); - - token.mint(to, id, mintAmount, mintData); - - userMintAmounts[to][id] += mintAmount; - } - - uint256[] memory balances = token.balanceOfBatch(normalizedTos, normalizedIds); - - for (uint256 i = 0; i < normalizedTos.length; i++) { - assertEq(balances[i], token.balanceOf(normalizedTos[i], normalizedIds[i])); - } - } - - function testFailMintToZero( - uint256 id, - uint256 amount, - bytes memory data - ) public { - token.mint(address(0), id, amount, data); - } - - function testFailMintToNonERC155Recipient( - uint256 id, - uint256 mintAmount, - bytes memory mintData - ) public { - token.mint(address(new NonERC1155Recipient()), id, mintAmount, mintData); - } - - function testFailMintToRevertingERC155Recipient( - uint256 id, - uint256 mintAmount, - bytes memory mintData - ) public { - token.mint(address(new RevertingERC1155Recipient()), id, mintAmount, mintData); - } - - function testFailMintToWrongReturnDataERC155Recipient( - uint256 id, - uint256 mintAmount, - bytes memory mintData - ) public { - token.mint(address(new RevertingERC1155Recipient()), id, mintAmount, mintData); - } - - function testFailBurnInsufficientBalance( - address to, - uint256 id, - uint256 mintAmount, - uint256 burnAmount, - bytes memory mintData - ) public { - burnAmount = bound(burnAmount, mintAmount + 1, type(uint256).max); - - token.mint(to, id, mintAmount, mintData); - token.burn(to, id, burnAmount); - } - - function testFailSafeTransferFromInsufficientBalance( - address to, - uint256 id, - uint256 mintAmount, - uint256 transferAmount, - bytes memory mintData, - bytes memory transferData - ) public { - address from = address(0xABCD); - - transferAmount = bound(transferAmount, mintAmount + 1, type(uint256).max); - - token.mint(from, id, mintAmount, mintData); - - hevm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeTransferFrom(from, to, id, transferAmount, transferData); - } - - function testFailSafeTransferFromSelfInsufficientBalance( - address to, - uint256 id, - uint256 mintAmount, - uint256 transferAmount, - bytes memory mintData, - bytes memory transferData - ) public { - transferAmount = bound(transferAmount, mintAmount + 1, type(uint256).max); - - token.mint(address(this), id, mintAmount, mintData); - token.safeTransferFrom(address(this), to, id, transferAmount, transferData); - } - - function testFailSafeTransferFromToZero( - uint256 id, - uint256 mintAmount, - uint256 transferAmount, - bytes memory mintData, - bytes memory transferData - ) public { - transferAmount = bound(transferAmount, 0, mintAmount); - - token.mint(address(this), id, mintAmount, mintData); - token.safeTransferFrom(address(this), address(0), id, transferAmount, transferData); - } - - function testFailSafeTransferFromToNonERC155Recipient( - uint256 id, - uint256 mintAmount, - uint256 transferAmount, - bytes memory mintData, - bytes memory transferData - ) public { - transferAmount = bound(transferAmount, 0, mintAmount); - - token.mint(address(this), id, mintAmount, mintData); - token.safeTransferFrom(address(this), address(new NonERC1155Recipient()), id, transferAmount, transferData); - } - - function testFailSafeTransferFromToRevertingERC1155Recipient( - uint256 id, - uint256 mintAmount, - uint256 transferAmount, - bytes memory mintData, - bytes memory transferData - ) public { - transferAmount = bound(transferAmount, 0, mintAmount); - - token.mint(address(this), id, mintAmount, mintData); - token.safeTransferFrom( - address(this), - address(new RevertingERC1155Recipient()), - id, - transferAmount, - transferData - ); - } - - function testFailSafeTransferFromToWrongReturnDataERC1155Recipient( - uint256 id, - uint256 mintAmount, - uint256 transferAmount, - bytes memory mintData, - bytes memory transferData - ) public { - transferAmount = bound(transferAmount, 0, mintAmount); - - token.mint(address(this), id, mintAmount, mintData); - token.safeTransferFrom( - address(this), - address(new WrongReturnDataERC1155Recipient()), - id, - transferAmount, - transferData - ); - } - - function testFailSafeBatchTransferInsufficientBalance( - address to, - uint256[] memory ids, - uint256[] memory mintAmounts, - uint256[] memory transferAmounts, - bytes memory mintData, - bytes memory transferData - ) public { - address from = address(0xABCD); - - uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length); - - if (minLength == 0) revert(); - - uint256[] memory normalizedIds = new uint256[](minLength); - uint256[] memory normalizedMintAmounts = new uint256[](minLength); - uint256[] memory normalizedTransferAmounts = new uint256[](minLength); - - for (uint256 i = 0; i < minLength; i++) { - uint256 id = ids[i]; - - uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[from][id]; - - uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId); - uint256 transferAmount = bound(transferAmounts[i], mintAmount + 1, type(uint256).max); - - normalizedIds[i] = id; - normalizedMintAmounts[i] = mintAmount; - normalizedTransferAmounts[i] = transferAmount; - - userMintAmounts[from][id] += mintAmount; - } - - token.batchMint(from, normalizedIds, normalizedMintAmounts, mintData); - - hevm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeBatchTransferFrom(from, to, normalizedIds, normalizedTransferAmounts, transferData); - } - - function testFailSafeBatchTransferFromToZero( - uint256[] memory ids, - uint256[] memory mintAmounts, - uint256[] memory transferAmounts, - bytes memory mintData, - bytes memory transferData - ) public { - address from = address(0xABCD); - - uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length); - - uint256[] memory normalizedIds = new uint256[](minLength); - uint256[] memory normalizedMintAmounts = new uint256[](minLength); - uint256[] memory normalizedTransferAmounts = new uint256[](minLength); - - for (uint256 i = 0; i < minLength; i++) { - uint256 id = ids[i]; - - uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[from][id]; - - uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId); - uint256 transferAmount = bound(transferAmounts[i], 0, mintAmount); - - normalizedIds[i] = id; - normalizedMintAmounts[i] = mintAmount; - normalizedTransferAmounts[i] = transferAmount; - - userMintAmounts[from][id] += mintAmount; - } - - token.batchMint(from, normalizedIds, normalizedMintAmounts, mintData); - - hevm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeBatchTransferFrom(from, address(0), normalizedIds, normalizedTransferAmounts, transferData); - } - - function testFailSafeBatchTransferFromToNonERC1155Recipient( - uint256[] memory ids, - uint256[] memory mintAmounts, - uint256[] memory transferAmounts, - bytes memory mintData, - bytes memory transferData - ) public { - address from = address(0xABCD); - - uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length); - - uint256[] memory normalizedIds = new uint256[](minLength); - uint256[] memory normalizedMintAmounts = new uint256[](minLength); - uint256[] memory normalizedTransferAmounts = new uint256[](minLength); - - for (uint256 i = 0; i < minLength; i++) { - uint256 id = ids[i]; - - uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[from][id]; - - uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId); - uint256 transferAmount = bound(transferAmounts[i], 0, mintAmount); - - normalizedIds[i] = id; - normalizedMintAmounts[i] = mintAmount; - normalizedTransferAmounts[i] = transferAmount; - - userMintAmounts[from][id] += mintAmount; - } - - token.batchMint(from, normalizedIds, normalizedMintAmounts, mintData); - - hevm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeBatchTransferFrom( - from, - address(new NonERC1155Recipient()), - normalizedIds, - normalizedTransferAmounts, - transferData - ); - } - - function testFailSafeBatchTransferFromToRevertingERC1155Recipient( - uint256[] memory ids, - uint256[] memory mintAmounts, - uint256[] memory transferAmounts, - bytes memory mintData, - bytes memory transferData - ) public { - address from = address(0xABCD); - - uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length); - - uint256[] memory normalizedIds = new uint256[](minLength); - uint256[] memory normalizedMintAmounts = new uint256[](minLength); - uint256[] memory normalizedTransferAmounts = new uint256[](minLength); - - for (uint256 i = 0; i < minLength; i++) { - uint256 id = ids[i]; - - uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[from][id]; - - uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId); - uint256 transferAmount = bound(transferAmounts[i], 0, mintAmount); - - normalizedIds[i] = id; - normalizedMintAmounts[i] = mintAmount; - normalizedTransferAmounts[i] = transferAmount; - - userMintAmounts[from][id] += mintAmount; - } - - token.batchMint(from, normalizedIds, normalizedMintAmounts, mintData); - - hevm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeBatchTransferFrom( - from, - address(new RevertingERC1155Recipient()), - normalizedIds, - normalizedTransferAmounts, - transferData - ); - } - - function testFailSafeBatchTransferFromToWrongReturnDataERC1155Recipient( - uint256[] memory ids, - uint256[] memory mintAmounts, - uint256[] memory transferAmounts, - bytes memory mintData, - bytes memory transferData - ) public { - address from = address(0xABCD); - - uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length); - - uint256[] memory normalizedIds = new uint256[](minLength); - uint256[] memory normalizedMintAmounts = new uint256[](minLength); - uint256[] memory normalizedTransferAmounts = new uint256[](minLength); - - for (uint256 i = 0; i < minLength; i++) { - uint256 id = ids[i]; - - uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[from][id]; - - uint256 mintAmount = bound(mintAmounts[i], 0, remainingMintAmountForId); - uint256 transferAmount = bound(transferAmounts[i], 0, mintAmount); - - normalizedIds[i] = id; - normalizedMintAmounts[i] = mintAmount; - normalizedTransferAmounts[i] = transferAmount; - - userMintAmounts[from][id] += mintAmount; - } - - token.batchMint(from, normalizedIds, normalizedMintAmounts, mintData); - - hevm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeBatchTransferFrom( - from, - address(new WrongReturnDataERC1155Recipient()), - normalizedIds, - normalizedTransferAmounts, - transferData - ); - } - - function testFailSafeBatchTransferFromWithArrayLengthMismatch( - address to, - uint256[] memory ids, - uint256[] memory mintAmounts, - uint256[] memory transferAmounts, - bytes memory mintData, - bytes memory transferData - ) public { - address from = address(0xABCD); - - if (ids.length == transferAmounts.length) revert(); - - token.batchMint(from, ids, mintAmounts, mintData); - - hevm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeBatchTransferFrom(from, to, ids, transferAmounts, transferData); - } - - function testFailBatchMintToZero( - uint256[] memory ids, - uint256[] memory amounts, - bytes memory mintData - ) public { - uint256 minLength = min2(ids.length, amounts.length); - - uint256[] memory normalizedIds = new uint256[](minLength); - uint256[] memory normalizedAmounts = new uint256[](minLength); - - for (uint256 i = 0; i < minLength; i++) { - uint256 id = ids[i]; - - uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(0)][id]; - - uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId); - - normalizedIds[i] = id; - normalizedAmounts[i] = mintAmount; - - userMintAmounts[address(0)][id] += mintAmount; - } - - token.batchMint(address(0), normalizedIds, normalizedAmounts, mintData); - } - - function testFailBatchMintToNonERC1155Recipient( - uint256[] memory ids, - uint256[] memory amounts, - bytes memory mintData - ) public { - NonERC1155Recipient to = new NonERC1155Recipient(); - - uint256 minLength = min2(ids.length, amounts.length); - - uint256[] memory normalizedIds = new uint256[](minLength); - uint256[] memory normalizedAmounts = new uint256[](minLength); - - for (uint256 i = 0; i < minLength; i++) { - uint256 id = ids[i]; - - uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(to)][id]; - - uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId); - - normalizedIds[i] = id; - normalizedAmounts[i] = mintAmount; - - userMintAmounts[address(to)][id] += mintAmount; - } - - token.batchMint(address(to), normalizedIds, normalizedAmounts, mintData); - } - - function testFailBatchMintToRevertingERC1155Recipient( - uint256[] memory ids, - uint256[] memory amounts, - bytes memory mintData - ) public { - RevertingERC1155Recipient to = new RevertingERC1155Recipient(); - - uint256 minLength = min2(ids.length, amounts.length); - - uint256[] memory normalizedIds = new uint256[](minLength); - uint256[] memory normalizedAmounts = new uint256[](minLength); - - for (uint256 i = 0; i < minLength; i++) { - uint256 id = ids[i]; - - uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(to)][id]; - - uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId); - - normalizedIds[i] = id; - normalizedAmounts[i] = mintAmount; - - userMintAmounts[address(to)][id] += mintAmount; - } - - token.batchMint(address(to), normalizedIds, normalizedAmounts, mintData); - } - - function testFailBatchMintToWrongReturnDataERC1155Recipient( - uint256[] memory ids, - uint256[] memory amounts, - bytes memory mintData - ) public { - WrongReturnDataERC1155Recipient to = new WrongReturnDataERC1155Recipient(); - - uint256 minLength = min2(ids.length, amounts.length); - - uint256[] memory normalizedIds = new uint256[](minLength); - uint256[] memory normalizedAmounts = new uint256[](minLength); - - for (uint256 i = 0; i < minLength; i++) { - uint256 id = ids[i]; - - uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[address(to)][id]; - - uint256 mintAmount = bound(amounts[i], 0, remainingMintAmountForId); - - normalizedIds[i] = id; - normalizedAmounts[i] = mintAmount; - - userMintAmounts[address(to)][id] += mintAmount; - } - - token.batchMint(address(to), normalizedIds, normalizedAmounts, mintData); - } - - function testFailBatchMintWithArrayMismatch( - address to, - uint256[] memory ids, - uint256[] memory amounts, - bytes memory mintData - ) public { - if (ids.length == amounts.length) revert(); - - token.batchMint(address(to), ids, amounts, mintData); - } - - function testFailBatchBurnInsufficientBalance( - address to, - uint256[] memory ids, - uint256[] memory mintAmounts, - uint256[] memory burnAmounts, - bytes memory mintData - ) public { - uint256 minLength = min3(ids.length, mintAmounts.length, burnAmounts.length); - - if (minLength == 0) revert(); - - uint256[] memory normalizedIds = new uint256[](minLength); - uint256[] memory normalizedMintAmounts = new uint256[](minLength); - uint256[] memory normalizedBurnAmounts = new uint256[](minLength); - - for (uint256 i = 0; i < minLength; i++) { - uint256 id = ids[i]; - - uint256 remainingMintAmountForId = type(uint256).max - userMintAmounts[to][id]; - - normalizedIds[i] = id; - normalizedMintAmounts[i] = bound(mintAmounts[i], 0, remainingMintAmountForId); - normalizedBurnAmounts[i] = bound(burnAmounts[i], normalizedMintAmounts[i] + 1, type(uint256).max); - - userMintAmounts[to][id] += normalizedMintAmounts[i]; - } - - token.batchMint(to, normalizedIds, normalizedMintAmounts, mintData); - - token.batchBurn(to, normalizedIds, normalizedBurnAmounts); - } - - function testFailBatchBurnWithArrayLengthMismatch( - address to, - uint256[] memory ids, - uint256[] memory mintAmounts, - uint256[] memory burnAmounts, - bytes memory mintData - ) public { - if (ids.length == burnAmounts.length) revert(); - - token.batchMint(to, ids, mintAmounts, mintData); - - token.batchBurn(to, ids, burnAmounts); - } - - function testFailBalanceOfBatchWithArrayMismatch(address[] memory tos, uint256[] memory ids) public view { - if (tos.length == ids.length) revert(); - - token.balanceOfBatch(tos, ids); - } -} diff --git a/lib/solmate/src/test/ERC20.t.sol b/lib/solmate/src/test/ERC20.t.sol deleted file mode 100644 index 15c6f4a..0000000 --- a/lib/solmate/src/test/ERC20.t.sol +++ /dev/null @@ -1,529 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity 0.8.10; - -import {DSTestPlus} from "./utils/DSTestPlus.sol"; -import {DSInvariantTest} from "./utils/DSInvariantTest.sol"; - -import {MockERC20} from "./utils/mocks/MockERC20.sol"; - -contract ERC20Test is DSTestPlus { - MockERC20 token; - - bytes32 constant PERMIT_TYPEHASH = - keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); - - function setUp() public { - token = new MockERC20("Token", "TKN", 18); - } - - function invariantMetadata() public { - assertEq(token.name(), "Token"); - assertEq(token.symbol(), "TKN"); - assertEq(token.decimals(), 18); - } - - function testMint() public { - token.mint(address(0xBEEF), 1e18); - - assertEq(token.totalSupply(), 1e18); - assertEq(token.balanceOf(address(0xBEEF)), 1e18); - } - - function testBurn() public { - token.mint(address(0xBEEF), 1e18); - token.burn(address(0xBEEF), 0.9e18); - - assertEq(token.totalSupply(), 1e18 - 0.9e18); - assertEq(token.balanceOf(address(0xBEEF)), 0.1e18); - } - - function testApprove() public { - assertTrue(token.approve(address(0xBEEF), 1e18)); - - assertEq(token.allowance(address(this), address(0xBEEF)), 1e18); - } - - function testTransfer() public { - token.mint(address(this), 1e18); - - assertTrue(token.transfer(address(0xBEEF), 1e18)); - assertEq(token.totalSupply(), 1e18); - - assertEq(token.balanceOf(address(this)), 0); - assertEq(token.balanceOf(address(0xBEEF)), 1e18); - } - - function testTransferFrom() public { - address from = address(0xABCD); - - token.mint(from, 1e18); - - hevm.prank(from); - token.approve(address(this), 1e18); - - assertTrue(token.transferFrom(from, address(0xBEEF), 1e18)); - assertEq(token.totalSupply(), 1e18); - - assertEq(token.allowance(from, address(this)), 0); - - assertEq(token.balanceOf(from), 0); - assertEq(token.balanceOf(address(0xBEEF)), 1e18); - } - - function testInfiniteApproveTransferFrom() public { - address from = address(0xABCD); - - token.mint(from, 1e18); - - hevm.prank(from); - token.approve(address(this), type(uint256).max); - - assertTrue(token.transferFrom(from, address(0xBEEF), 1e18)); - assertEq(token.totalSupply(), 1e18); - - assertEq(token.allowance(from, address(this)), type(uint256).max); - - assertEq(token.balanceOf(from), 0); - assertEq(token.balanceOf(address(0xBEEF)), 1e18); - } - - function testPermit() public { - uint256 privateKey = 0xBEEF; - address owner = hevm.addr(privateKey); - - (uint8 v, bytes32 r, bytes32 s) = hevm.sign( - privateKey, - keccak256( - abi.encodePacked( - "\x19\x01", - token.DOMAIN_SEPARATOR(), - keccak256(abi.encode(PERMIT_TYPEHASH, owner, address(0xCAFE), 1e18, 0, block.timestamp)) - ) - ) - ); - - token.permit(owner, address(0xCAFE), 1e18, block.timestamp, v, r, s); - - assertEq(token.allowance(owner, address(0xCAFE)), 1e18); - assertEq(token.nonces(owner), 1); - } - - function testFailTransferInsufficientBalance() public { - token.mint(address(this), 0.9e18); - token.transfer(address(0xBEEF), 1e18); - } - - function testFailTransferFromInsufficientAllowance() public { - address from = address(0xABCD); - - token.mint(from, 1e18); - - hevm.prank(from); - token.approve(address(this), 0.9e18); - - token.transferFrom(from, address(0xBEEF), 1e18); - } - - function testFailTransferFromInsufficientBalance() public { - address from = address(0xABCD); - - token.mint(from, 0.9e18); - - hevm.prank(from); - token.approve(address(this), 1e18); - - token.transferFrom(from, address(0xBEEF), 1e18); - } - - function testFailPermitBadNonce() public { - uint256 privateKey = 0xBEEF; - address owner = hevm.addr(privateKey); - - (uint8 v, bytes32 r, bytes32 s) = hevm.sign( - privateKey, - keccak256( - abi.encodePacked( - "\x19\x01", - token.DOMAIN_SEPARATOR(), - keccak256(abi.encode(PERMIT_TYPEHASH, owner, address(0xCAFE), 1e18, 1, block.timestamp)) - ) - ) - ); - - token.permit(owner, address(0xCAFE), 1e18, block.timestamp, v, r, s); - } - - function testFailPermitBadDeadline() public { - uint256 privateKey = 0xBEEF; - address owner = hevm.addr(privateKey); - - (uint8 v, bytes32 r, bytes32 s) = hevm.sign( - privateKey, - keccak256( - abi.encodePacked( - "\x19\x01", - token.DOMAIN_SEPARATOR(), - keccak256(abi.encode(PERMIT_TYPEHASH, owner, address(0xCAFE), 1e18, 0, block.timestamp)) - ) - ) - ); - - token.permit(owner, address(0xCAFE), 1e18, block.timestamp + 1, v, r, s); - } - - function testFailPermitPastDeadline() public { - uint256 privateKey = 0xBEEF; - address owner = hevm.addr(privateKey); - - (uint8 v, bytes32 r, bytes32 s) = hevm.sign( - privateKey, - keccak256( - abi.encodePacked( - "\x19\x01", - token.DOMAIN_SEPARATOR(), - keccak256(abi.encode(PERMIT_TYPEHASH, owner, address(0xCAFE), 1e18, 0, block.timestamp - 1)) - ) - ) - ); - - token.permit(owner, address(0xCAFE), 1e18, block.timestamp - 1, v, r, s); - } - - function testFailPermitReplay() public { - uint256 privateKey = 0xBEEF; - address owner = hevm.addr(privateKey); - - (uint8 v, bytes32 r, bytes32 s) = hevm.sign( - privateKey, - keccak256( - abi.encodePacked( - "\x19\x01", - token.DOMAIN_SEPARATOR(), - keccak256(abi.encode(PERMIT_TYPEHASH, owner, address(0xCAFE), 1e18, 0, block.timestamp)) - ) - ) - ); - - token.permit(owner, address(0xCAFE), 1e18, block.timestamp, v, r, s); - token.permit(owner, address(0xCAFE), 1e18, block.timestamp, v, r, s); - } - - function testMetadata( - string calldata name, - string calldata symbol, - uint8 decimals - ) public { - MockERC20 tkn = new MockERC20(name, symbol, decimals); - assertEq(tkn.name(), name); - assertEq(tkn.symbol(), symbol); - assertEq(tkn.decimals(), decimals); - } - - function testMint(address from, uint256 amount) public { - token.mint(from, amount); - - assertEq(token.totalSupply(), amount); - assertEq(token.balanceOf(from), amount); - } - - function testBurn( - address from, - uint256 mintAmount, - uint256 burnAmount - ) public { - burnAmount = bound(burnAmount, 0, mintAmount); - - token.mint(from, mintAmount); - token.burn(from, burnAmount); - - assertEq(token.totalSupply(), mintAmount - burnAmount); - assertEq(token.balanceOf(from), mintAmount - burnAmount); - } - - function testApprove(address to, uint256 amount) public { - assertTrue(token.approve(to, amount)); - - assertEq(token.allowance(address(this), to), amount); - } - - function testTransfer(address from, uint256 amount) public { - token.mint(address(this), amount); - - assertTrue(token.transfer(from, amount)); - assertEq(token.totalSupply(), amount); - - if (address(this) == from) { - assertEq(token.balanceOf(address(this)), amount); - } else { - assertEq(token.balanceOf(address(this)), 0); - assertEq(token.balanceOf(from), amount); - } - } - - function testTransferFrom( - address to, - uint256 approval, - uint256 amount - ) public { - amount = bound(amount, 0, approval); - - address from = address(0xABCD); - - token.mint(from, amount); - - hevm.prank(from); - token.approve(address(this), approval); - - assertTrue(token.transferFrom(from, to, amount)); - assertEq(token.totalSupply(), amount); - - uint256 app = from == address(this) || approval == type(uint256).max ? approval : approval - amount; - assertEq(token.allowance(from, address(this)), app); - - if (from == to) { - assertEq(token.balanceOf(from), amount); - } else { - assertEq(token.balanceOf(from), 0); - assertEq(token.balanceOf(to), amount); - } - } - - function testPermit( - uint248 privKey, - address to, - uint256 amount, - uint256 deadline - ) public { - uint256 privateKey = privKey; - if (deadline < block.timestamp) deadline = block.timestamp; - if (privateKey == 0) privateKey = 1; - - address owner = hevm.addr(privateKey); - - (uint8 v, bytes32 r, bytes32 s) = hevm.sign( - privateKey, - keccak256( - abi.encodePacked( - "\x19\x01", - token.DOMAIN_SEPARATOR(), - keccak256(abi.encode(PERMIT_TYPEHASH, owner, to, amount, 0, deadline)) - ) - ) - ); - - token.permit(owner, to, amount, deadline, v, r, s); - - assertEq(token.allowance(owner, to), amount); - assertEq(token.nonces(owner), 1); - } - - function testFailBurnInsufficientBalance( - address to, - uint256 mintAmount, - uint256 burnAmount - ) public { - burnAmount = bound(burnAmount, mintAmount + 1, type(uint256).max); - - token.mint(to, mintAmount); - token.burn(to, burnAmount); - } - - function testFailTransferInsufficientBalance( - address to, - uint256 mintAmount, - uint256 sendAmount - ) public { - sendAmount = bound(sendAmount, mintAmount + 1, type(uint256).max); - - token.mint(address(this), mintAmount); - token.transfer(to, sendAmount); - } - - function testFailTransferFromInsufficientAllowance( - address to, - uint256 approval, - uint256 amount - ) public { - amount = bound(amount, approval + 1, type(uint256).max); - - address from = address(0xABCD); - - token.mint(from, amount); - - hevm.prank(from); - token.approve(address(this), approval); - - token.transferFrom(from, to, amount); - } - - function testFailTransferFromInsufficientBalance( - address to, - uint256 mintAmount, - uint256 sendAmount - ) public { - sendAmount = bound(sendAmount, mintAmount + 1, type(uint256).max); - - address from = address(0xABCD); - - token.mint(from, mintAmount); - - hevm.prank(from); - token.approve(address(this), sendAmount); - - token.transferFrom(from, to, sendAmount); - } - - function testFailPermitBadNonce( - uint256 privateKey, - address to, - uint256 amount, - uint256 deadline, - uint256 nonce - ) public { - if (deadline < block.timestamp) deadline = block.timestamp; - if (privateKey == 0) privateKey = 1; - if (nonce == 0) nonce = 1; - - address owner = hevm.addr(privateKey); - - (uint8 v, bytes32 r, bytes32 s) = hevm.sign( - privateKey, - keccak256( - abi.encodePacked( - "\x19\x01", - token.DOMAIN_SEPARATOR(), - keccak256(abi.encode(PERMIT_TYPEHASH, owner, to, amount, nonce, deadline)) - ) - ) - ); - - token.permit(owner, to, amount, deadline, v, r, s); - } - - function testFailPermitBadDeadline( - uint256 privateKey, - address to, - uint256 amount, - uint256 deadline - ) public { - if (deadline < block.timestamp) deadline = block.timestamp; - if (privateKey == 0) privateKey = 1; - - address owner = hevm.addr(privateKey); - - (uint8 v, bytes32 r, bytes32 s) = hevm.sign( - privateKey, - keccak256( - abi.encodePacked( - "\x19\x01", - token.DOMAIN_SEPARATOR(), - keccak256(abi.encode(PERMIT_TYPEHASH, owner, to, amount, 0, deadline)) - ) - ) - ); - - token.permit(owner, to, amount, deadline + 1, v, r, s); - } - - function testFailPermitPastDeadline( - uint256 privateKey, - address to, - uint256 amount, - uint256 deadline - ) public { - deadline = bound(deadline, 0, block.timestamp - 1); - if (privateKey == 0) privateKey = 1; - - address owner = hevm.addr(privateKey); - - (uint8 v, bytes32 r, bytes32 s) = hevm.sign( - privateKey, - keccak256( - abi.encodePacked( - "\x19\x01", - token.DOMAIN_SEPARATOR(), - keccak256(abi.encode(PERMIT_TYPEHASH, owner, to, amount, 0, deadline)) - ) - ) - ); - - token.permit(owner, to, amount, deadline, v, r, s); - } - - function testFailPermitReplay( - uint256 privateKey, - address to, - uint256 amount, - uint256 deadline - ) public { - if (deadline < block.timestamp) deadline = block.timestamp; - if (privateKey == 0) privateKey = 1; - - address owner = hevm.addr(privateKey); - - (uint8 v, bytes32 r, bytes32 s) = hevm.sign( - privateKey, - keccak256( - abi.encodePacked( - "\x19\x01", - token.DOMAIN_SEPARATOR(), - keccak256(abi.encode(PERMIT_TYPEHASH, owner, to, amount, 0, deadline)) - ) - ) - ); - - token.permit(owner, to, amount, deadline, v, r, s); - token.permit(owner, to, amount, deadline, v, r, s); - } -} - -contract ERC20Invariants is DSTestPlus, DSInvariantTest { - BalanceSum balanceSum; - MockERC20 token; - - function setUp() public { - token = new MockERC20("Token", "TKN", 18); - balanceSum = new BalanceSum(token); - - addTargetContract(address(balanceSum)); - } - - function invariantBalanceSum() public { - assertEq(token.totalSupply(), balanceSum.sum()); - } -} - -contract BalanceSum { - MockERC20 token; - uint256 public sum; - - constructor(MockERC20 _token) { - token = _token; - } - - function mint(address from, uint256 amount) public { - token.mint(from, amount); - sum += amount; - } - - function burn(address from, uint256 amount) public { - token.burn(from, amount); - sum -= amount; - } - - function approve(address to, uint256 amount) public { - token.approve(to, amount); - } - - function transferFrom( - address from, - address to, - uint256 amount - ) public { - token.transferFrom(from, to, amount); - } - - function transfer(address to, uint256 amount) public { - token.transfer(to, amount); - } -} diff --git a/lib/solmate/src/test/ERC4626.t.sol b/lib/solmate/src/test/ERC4626.t.sol deleted file mode 100644 index 56a1752..0000000 --- a/lib/solmate/src/test/ERC4626.t.sol +++ /dev/null @@ -1,446 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity 0.8.10; - -import {DSTestPlus} from "./utils/DSTestPlus.sol"; - -import {MockERC20} from "./utils/mocks/MockERC20.sol"; -import {MockERC4626} from "./utils/mocks/MockERC4626.sol"; - -contract ERC4626Test is DSTestPlus { - MockERC20 underlying; - MockERC4626 vault; - - function setUp() public { - underlying = new MockERC20("Mock Token", "TKN", 18); - vault = new MockERC4626(underlying, "Mock Token Vault", "vwTKN"); - } - - function invariantMetadata() public { - assertEq(vault.name(), "Mock Token Vault"); - assertEq(vault.symbol(), "vwTKN"); - assertEq(vault.decimals(), 18); - } - - function testMetadata(string calldata name, string calldata symbol) public { - MockERC4626 vlt = new MockERC4626(underlying, name, symbol); - assertEq(vlt.name(), name); - assertEq(vlt.symbol(), symbol); - assertEq(address(vlt.asset()), address(underlying)); - } - - function testSingleDepositWithdraw(uint128 amount) public { - if (amount == 0) amount = 1; - - uint256 aliceUnderlyingAmount = amount; - - address alice = address(0xABCD); - - underlying.mint(alice, aliceUnderlyingAmount); - - hevm.prank(alice); - underlying.approve(address(vault), aliceUnderlyingAmount); - assertEq(underlying.allowance(alice, address(vault)), aliceUnderlyingAmount); - - uint256 alicePreDepositBal = underlying.balanceOf(alice); - - hevm.prank(alice); - uint256 aliceShareAmount = vault.deposit(aliceUnderlyingAmount, alice); - - assertEq(vault.afterDepositHookCalledCounter(), 1); - - // Expect exchange rate to be 1:1 on initial deposit. - assertEq(aliceUnderlyingAmount, aliceShareAmount); - assertEq(vault.previewWithdraw(aliceShareAmount), aliceUnderlyingAmount); - assertEq(vault.previewDeposit(aliceUnderlyingAmount), aliceShareAmount); - assertEq(vault.totalSupply(), aliceShareAmount); - assertEq(vault.totalAssets(), aliceUnderlyingAmount); - assertEq(vault.balanceOf(alice), aliceShareAmount); - assertEq(vault.convertToAssets(vault.balanceOf(alice)), aliceUnderlyingAmount); - assertEq(underlying.balanceOf(alice), alicePreDepositBal - aliceUnderlyingAmount); - - hevm.prank(alice); - vault.withdraw(aliceUnderlyingAmount, alice, alice); - - assertEq(vault.beforeWithdrawHookCalledCounter(), 1); - - assertEq(vault.totalAssets(), 0); - assertEq(vault.balanceOf(alice), 0); - assertEq(vault.convertToAssets(vault.balanceOf(alice)), 0); - assertEq(underlying.balanceOf(alice), alicePreDepositBal); - } - - function testSingleMintRedeem(uint128 amount) public { - if (amount == 0) amount = 1; - - uint256 aliceShareAmount = amount; - - address alice = address(0xABCD); - - underlying.mint(alice, aliceShareAmount); - - hevm.prank(alice); - underlying.approve(address(vault), aliceShareAmount); - assertEq(underlying.allowance(alice, address(vault)), aliceShareAmount); - - uint256 alicePreDepositBal = underlying.balanceOf(alice); - - hevm.prank(alice); - uint256 aliceUnderlyingAmount = vault.mint(aliceShareAmount, alice); - - assertEq(vault.afterDepositHookCalledCounter(), 1); - - // Expect exchange rate to be 1:1 on initial mint. - assertEq(aliceShareAmount, aliceUnderlyingAmount); - assertEq(vault.previewWithdraw(aliceShareAmount), aliceUnderlyingAmount); - assertEq(vault.previewDeposit(aliceUnderlyingAmount), aliceShareAmount); - assertEq(vault.totalSupply(), aliceShareAmount); - assertEq(vault.totalAssets(), aliceUnderlyingAmount); - assertEq(vault.balanceOf(alice), aliceUnderlyingAmount); - assertEq(vault.convertToAssets(vault.balanceOf(alice)), aliceUnderlyingAmount); - assertEq(underlying.balanceOf(alice), alicePreDepositBal - aliceUnderlyingAmount); - - hevm.prank(alice); - vault.redeem(aliceShareAmount, alice, alice); - - assertEq(vault.beforeWithdrawHookCalledCounter(), 1); - - assertEq(vault.totalAssets(), 0); - assertEq(vault.balanceOf(alice), 0); - assertEq(vault.convertToAssets(vault.balanceOf(alice)), 0); - assertEq(underlying.balanceOf(alice), alicePreDepositBal); - } - - function testMultipleMintDepositRedeemWithdraw() public { - // Scenario: - // A = Alice, B = Bob - // ________________________________________________________ - // | Vault shares | A share | A assets | B share | B assets | - // |========================================================| - // | 1. Alice mints 2000 shares (costs 2000 tokens) | - // |--------------|---------|----------|---------|----------| - // | 2000 | 2000 | 2000 | 0 | 0 | - // |--------------|---------|----------|---------|----------| - // | 2. Bob deposits 4000 tokens (mints 4000 shares) | - // |--------------|---------|----------|---------|----------| - // | 6000 | 2000 | 2000 | 4000 | 4000 | - // |--------------|---------|----------|---------|----------| - // | 3. Vault mutates by +3000 tokens... | - // | (simulated yield returned from strategy)... | - // |--------------|---------|----------|---------|----------| - // | 6000 | 2000 | 3000 | 4000 | 6000 | - // |--------------|---------|----------|---------|----------| - // | 4. Alice deposits 2000 tokens (mints 1333 shares) | - // |--------------|---------|----------|---------|----------| - // | 7333 | 3333 | 4999 | 4000 | 6000 | - // |--------------|---------|----------|---------|----------| - // | 5. Bob mints 2000 shares (costs 3001 assets) | - // | NOTE: Bob's assets spent got rounded up | - // | NOTE: Alice's vault assets got rounded up | - // |--------------|---------|----------|---------|----------| - // | 9333 | 3333 | 5000 | 6000 | 9000 | - // |--------------|---------|----------|---------|----------| - // | 6. Vault mutates by +3000 tokens... | - // | (simulated yield returned from strategy) | - // | NOTE: Vault holds 17001 tokens, but sum of | - // | assetsOf() is 17000. | - // |--------------|---------|----------|---------|----------| - // | 9333 | 3333 | 6071 | 6000 | 10929 | - // |--------------|---------|----------|---------|----------| - // | 7. Alice redeem 1333 shares (2428 assets) | - // |--------------|---------|----------|---------|----------| - // | 8000 | 2000 | 3643 | 6000 | 10929 | - // |--------------|---------|----------|---------|----------| - // | 8. Bob withdraws 2928 assets (1608 shares) | - // |--------------|---------|----------|---------|----------| - // | 6392 | 2000 | 3643 | 4392 | 8000 | - // |--------------|---------|----------|---------|----------| - // | 9. Alice withdraws 3643 assets (2000 shares) | - // | NOTE: Bob's assets have been rounded back up | - // |--------------|---------|----------|---------|----------| - // | 4392 | 0 | 0 | 4392 | 8001 | - // |--------------|---------|----------|---------|----------| - // | 10. Bob redeem 4392 shares (8001 tokens) | - // |--------------|---------|----------|---------|----------| - // | 0 | 0 | 0 | 0 | 0 | - // |______________|_________|__________|_________|__________| - - address alice = address(0xABCD); - address bob = address(0xDCBA); - - uint256 mutationUnderlyingAmount = 3000; - - underlying.mint(alice, 4000); - - hevm.prank(alice); - underlying.approve(address(vault), 4000); - - assertEq(underlying.allowance(alice, address(vault)), 4000); - - underlying.mint(bob, 7001); - - hevm.prank(bob); - underlying.approve(address(vault), 7001); - - assertEq(underlying.allowance(bob, address(vault)), 7001); - - // 1. Alice mints 2000 shares (costs 2000 tokens) - hevm.prank(alice); - uint256 aliceUnderlyingAmount = vault.mint(2000, alice); - - uint256 aliceShareAmount = vault.previewDeposit(aliceUnderlyingAmount); - assertEq(vault.afterDepositHookCalledCounter(), 1); - - // Expect to have received the requested mint amount. - assertEq(aliceShareAmount, 2000); - assertEq(vault.balanceOf(alice), aliceShareAmount); - assertEq(vault.convertToAssets(vault.balanceOf(alice)), aliceUnderlyingAmount); - assertEq(vault.convertToShares(aliceUnderlyingAmount), vault.balanceOf(alice)); - - // Expect a 1:1 ratio before mutation. - assertEq(aliceUnderlyingAmount, 2000); - - // Sanity check. - assertEq(vault.totalSupply(), aliceShareAmount); - assertEq(vault.totalAssets(), aliceUnderlyingAmount); - - // 2. Bob deposits 4000 tokens (mints 4000 shares) - hevm.prank(bob); - uint256 bobShareAmount = vault.deposit(4000, bob); - uint256 bobUnderlyingAmount = vault.previewWithdraw(bobShareAmount); - assertEq(vault.afterDepositHookCalledCounter(), 2); - - // Expect to have received the requested underlying amount. - assertEq(bobUnderlyingAmount, 4000); - assertEq(vault.balanceOf(bob), bobShareAmount); - assertEq(vault.convertToAssets(vault.balanceOf(bob)), bobUnderlyingAmount); - assertEq(vault.convertToShares(bobUnderlyingAmount), vault.balanceOf(bob)); - - // Expect a 1:1 ratio before mutation. - assertEq(bobShareAmount, bobUnderlyingAmount); - - // Sanity check. - uint256 preMutationShareBal = aliceShareAmount + bobShareAmount; - uint256 preMutationBal = aliceUnderlyingAmount + bobUnderlyingAmount; - assertEq(vault.totalSupply(), preMutationShareBal); - assertEq(vault.totalAssets(), preMutationBal); - assertEq(vault.totalSupply(), 6000); - assertEq(vault.totalAssets(), 6000); - - // 3. Vault mutates by +3000 tokens... | - // (simulated yield returned from strategy)... - // The Vault now contains more tokens than deposited which causes the exchange rate to change. - // Alice share is 33.33% of the Vault, Bob 66.66% of the Vault. - // Alice's share count stays the same but the underlying amount changes from 2000 to 3000. - // Bob's share count stays the same but the underlying amount changes from 4000 to 6000. - underlying.mint(address(vault), mutationUnderlyingAmount); - assertEq(vault.totalSupply(), preMutationShareBal); - assertEq(vault.totalAssets(), preMutationBal + mutationUnderlyingAmount); - assertEq(vault.balanceOf(alice), aliceShareAmount); - assertEq( - vault.convertToAssets(vault.balanceOf(alice)), - aliceUnderlyingAmount + (mutationUnderlyingAmount / 3) * 1 - ); - assertEq(vault.balanceOf(bob), bobShareAmount); - assertEq(vault.convertToAssets(vault.balanceOf(bob)), bobUnderlyingAmount + (mutationUnderlyingAmount / 3) * 2); - - // 4. Alice deposits 2000 tokens (mints 1333 shares) - hevm.prank(alice); - vault.deposit(2000, alice); - - assertEq(vault.totalSupply(), 7333); - assertEq(vault.balanceOf(alice), 3333); - assertEq(vault.convertToAssets(vault.balanceOf(alice)), 4999); - assertEq(vault.balanceOf(bob), 4000); - assertEq(vault.convertToAssets(vault.balanceOf(bob)), 6000); - - // 5. Bob mints 2000 shares (costs 3001 assets) - // NOTE: Bob's assets spent got rounded up - // NOTE: Alices's vault assets got rounded up - hevm.prank(bob); - vault.mint(2000, bob); - - assertEq(vault.totalSupply(), 9333); - assertEq(vault.balanceOf(alice), 3333); - assertEq(vault.convertToAssets(vault.balanceOf(alice)), 5000); - assertEq(vault.balanceOf(bob), 6000); - assertEq(vault.convertToAssets(vault.balanceOf(bob)), 9000); - - // Sanity checks: - // Alice and bob should have spent all their tokens now - assertEq(underlying.balanceOf(alice), 0); - assertEq(underlying.balanceOf(bob), 0); - // Assets in vault: 4k (alice) + 7k (bob) + 3k (yield) + 1 (round up) - assertEq(vault.totalAssets(), 14001); - - // 6. Vault mutates by +3000 tokens - // NOTE: Vault holds 17001 tokens, but sum of assetsOf() is 17000. - underlying.mint(address(vault), mutationUnderlyingAmount); - assertEq(vault.totalAssets(), 17001); - assertEq(vault.convertToAssets(vault.balanceOf(alice)), 6071); - assertEq(vault.convertToAssets(vault.balanceOf(bob)), 10929); - - // 7. Alice redeem 1333 shares (2428 assets) - hevm.prank(alice); - vault.redeem(1333, alice, alice); - - assertEq(underlying.balanceOf(alice), 2428); - assertEq(vault.totalSupply(), 8000); - assertEq(vault.totalAssets(), 14573); - assertEq(vault.balanceOf(alice), 2000); - assertEq(vault.convertToAssets(vault.balanceOf(alice)), 3643); - assertEq(vault.balanceOf(bob), 6000); - assertEq(vault.convertToAssets(vault.balanceOf(bob)), 10929); - - // 8. Bob withdraws 2929 assets (1608 shares) - hevm.prank(bob); - vault.withdraw(2929, bob, bob); - - assertEq(underlying.balanceOf(bob), 2929); - assertEq(vault.totalSupply(), 6392); - assertEq(vault.totalAssets(), 11644); - assertEq(vault.balanceOf(alice), 2000); - assertEq(vault.convertToAssets(vault.balanceOf(alice)), 3643); - assertEq(vault.balanceOf(bob), 4392); - assertEq(vault.convertToAssets(vault.balanceOf(bob)), 8000); - - // 9. Alice withdraws 3643 assets (2000 shares) - // NOTE: Bob's assets have been rounded back up - hevm.prank(alice); - vault.withdraw(3643, alice, alice); - - assertEq(underlying.balanceOf(alice), 6071); - assertEq(vault.totalSupply(), 4392); - assertEq(vault.totalAssets(), 8001); - assertEq(vault.balanceOf(alice), 0); - assertEq(vault.convertToAssets(vault.balanceOf(alice)), 0); - assertEq(vault.balanceOf(bob), 4392); - assertEq(vault.convertToAssets(vault.balanceOf(bob)), 8001); - - // 10. Bob redeem 4392 shares (8001 tokens) - hevm.prank(bob); - vault.redeem(4392, bob, bob); - assertEq(underlying.balanceOf(bob), 10930); - assertEq(vault.totalSupply(), 0); - assertEq(vault.totalAssets(), 0); - assertEq(vault.balanceOf(alice), 0); - assertEq(vault.convertToAssets(vault.balanceOf(alice)), 0); - assertEq(vault.balanceOf(bob), 0); - assertEq(vault.convertToAssets(vault.balanceOf(bob)), 0); - - // Sanity check - assertEq(underlying.balanceOf(address(vault)), 0); - } - - function testFailDepositWithNotEnoughApproval() public { - underlying.mint(address(this), 0.5e18); - underlying.approve(address(vault), 0.5e18); - assertEq(underlying.allowance(address(this), address(vault)), 0.5e18); - - vault.deposit(1e18, address(this)); - } - - function testFailWithdrawWithNotEnoughUnderlyingAmount() public { - underlying.mint(address(this), 0.5e18); - underlying.approve(address(vault), 0.5e18); - - vault.deposit(0.5e18, address(this)); - - vault.withdraw(1e18, address(this), address(this)); - } - - function testFailRedeemWithNotEnoughShareAmount() public { - underlying.mint(address(this), 0.5e18); - underlying.approve(address(vault), 0.5e18); - - vault.deposit(0.5e18, address(this)); - - vault.redeem(1e18, address(this), address(this)); - } - - function testFailWithdrawWithNoUnderlyingAmount() public { - vault.withdraw(1e18, address(this), address(this)); - } - - function testFailRedeemWithNoShareAmount() public { - vault.redeem(1e18, address(this), address(this)); - } - - function testFailDepositWithNoApproval() public { - vault.deposit(1e18, address(this)); - } - - function testFailMintWithNoApproval() public { - vault.mint(1e18, address(this)); - } - - function testFailDepositZero() public { - vault.deposit(0, address(this)); - } - - function testMintZero() public { - vault.mint(0, address(this)); - - assertEq(vault.balanceOf(address(this)), 0); - assertEq(vault.convertToAssets(vault.balanceOf(address(this))), 0); - assertEq(vault.totalSupply(), 0); - assertEq(vault.totalAssets(), 0); - } - - function testFailRedeemZero() public { - vault.redeem(0, address(this), address(this)); - } - - function testWithdrawZero() public { - vault.withdraw(0, address(this), address(this)); - - assertEq(vault.balanceOf(address(this)), 0); - assertEq(vault.convertToAssets(vault.balanceOf(address(this))), 0); - assertEq(vault.totalSupply(), 0); - assertEq(vault.totalAssets(), 0); - } - - function testVaultInteractionsForSomeoneElse() public { - // init 2 users with a 1e18 balance - address alice = address(0xABCD); - address bob = address(0xDCBA); - underlying.mint(alice, 1e18); - underlying.mint(bob, 1e18); - - hevm.prank(alice); - underlying.approve(address(vault), 1e18); - - hevm.prank(bob); - underlying.approve(address(vault), 1e18); - - // alice deposits 1e18 for bob - hevm.prank(alice); - vault.deposit(1e18, bob); - - assertEq(vault.balanceOf(alice), 0); - assertEq(vault.balanceOf(bob), 1e18); - assertEq(underlying.balanceOf(alice), 0); - - // bob mint 1e18 for alice - hevm.prank(bob); - vault.mint(1e18, alice); - assertEq(vault.balanceOf(alice), 1e18); - assertEq(vault.balanceOf(bob), 1e18); - assertEq(underlying.balanceOf(bob), 0); - - // alice redeem 1e18 for bob - hevm.prank(alice); - vault.redeem(1e18, bob, alice); - - assertEq(vault.balanceOf(alice), 0); - assertEq(vault.balanceOf(bob), 1e18); - assertEq(underlying.balanceOf(bob), 1e18); - - // bob withdraw 1e18 for alice - hevm.prank(bob); - vault.withdraw(1e18, alice, bob); - - assertEq(vault.balanceOf(alice), 0); - assertEq(vault.balanceOf(bob), 0); - assertEq(underlying.balanceOf(alice), 1e18); - } -} diff --git a/lib/solmate/src/test/ERC721.t.sol b/lib/solmate/src/test/ERC721.t.sol deleted file mode 100644 index 1f2b509..0000000 --- a/lib/solmate/src/test/ERC721.t.sol +++ /dev/null @@ -1,727 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity 0.8.10; - -import {DSTestPlus} from "./utils/DSTestPlus.sol"; -import {DSInvariantTest} from "./utils/DSInvariantTest.sol"; - -import {MockERC721} from "./utils/mocks/MockERC721.sol"; - -import {ERC721TokenReceiver} from "../tokens/ERC721.sol"; - -contract ERC721Recipient is ERC721TokenReceiver { - address public operator; - address public from; - uint256 public id; - bytes public data; - - function onERC721Received( - address _operator, - address _from, - uint256 _id, - bytes calldata _data - ) public virtual override returns (bytes4) { - operator = _operator; - from = _from; - id = _id; - data = _data; - - return ERC721TokenReceiver.onERC721Received.selector; - } -} - -contract RevertingERC721Recipient is ERC721TokenReceiver { - function onERC721Received( - address, - address, - uint256, - bytes calldata - ) public virtual override returns (bytes4) { - revert(string(abi.encodePacked(ERC721TokenReceiver.onERC721Received.selector))); - } -} - -contract WrongReturnDataERC721Recipient is ERC721TokenReceiver { - function onERC721Received( - address, - address, - uint256, - bytes calldata - ) public virtual override returns (bytes4) { - return 0xCAFEBEEF; - } -} - -contract NonERC721Recipient {} - -contract ERC721Test is DSTestPlus { - MockERC721 token; - - function setUp() public { - token = new MockERC721("Token", "TKN"); - } - - function invariantMetadata() public { - assertEq(token.name(), "Token"); - assertEq(token.symbol(), "TKN"); - } - - function testMint() public { - token.mint(address(0xBEEF), 1337); - - assertEq(token.balanceOf(address(0xBEEF)), 1); - assertEq(token.ownerOf(1337), address(0xBEEF)); - } - - function testBurn() public { - token.mint(address(0xBEEF), 1337); - token.burn(1337); - - assertEq(token.balanceOf(address(0xBEEF)), 0); - - hevm.expectRevert("NOT_MINTED"); - token.ownerOf(1337); - } - - function testApprove() public { - token.mint(address(this), 1337); - - token.approve(address(0xBEEF), 1337); - - assertEq(token.getApproved(1337), address(0xBEEF)); - } - - function testApproveBurn() public { - token.mint(address(this), 1337); - - token.approve(address(0xBEEF), 1337); - - token.burn(1337); - - assertEq(token.balanceOf(address(this)), 0); - assertEq(token.getApproved(1337), address(0)); - - hevm.expectRevert("NOT_MINTED"); - token.ownerOf(1337); - } - - function testApproveAll() public { - token.setApprovalForAll(address(0xBEEF), true); - - assertTrue(token.isApprovedForAll(address(this), address(0xBEEF))); - } - - function testTransferFrom() public { - address from = address(0xABCD); - - token.mint(from, 1337); - - hevm.prank(from); - token.approve(address(this), 1337); - - token.transferFrom(from, address(0xBEEF), 1337); - - assertEq(token.getApproved(1337), address(0)); - assertEq(token.ownerOf(1337), address(0xBEEF)); - assertEq(token.balanceOf(address(0xBEEF)), 1); - assertEq(token.balanceOf(from), 0); - } - - function testTransferFromSelf() public { - token.mint(address(this), 1337); - - token.transferFrom(address(this), address(0xBEEF), 1337); - - assertEq(token.getApproved(1337), address(0)); - assertEq(token.ownerOf(1337), address(0xBEEF)); - assertEq(token.balanceOf(address(0xBEEF)), 1); - assertEq(token.balanceOf(address(this)), 0); - } - - function testTransferFromApproveAll() public { - address from = address(0xABCD); - - token.mint(from, 1337); - - hevm.prank(from); - token.setApprovalForAll(address(this), true); - - token.transferFrom(from, address(0xBEEF), 1337); - - assertEq(token.getApproved(1337), address(0)); - assertEq(token.ownerOf(1337), address(0xBEEF)); - assertEq(token.balanceOf(address(0xBEEF)), 1); - assertEq(token.balanceOf(from), 0); - } - - function testSafeTransferFromToEOA() public { - address from = address(0xABCD); - - token.mint(from, 1337); - - hevm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeTransferFrom(from, address(0xBEEF), 1337); - - assertEq(token.getApproved(1337), address(0)); - assertEq(token.ownerOf(1337), address(0xBEEF)); - assertEq(token.balanceOf(address(0xBEEF)), 1); - assertEq(token.balanceOf(from), 0); - } - - function testSafeTransferFromToERC721Recipient() public { - address from = address(0xABCD); - ERC721Recipient recipient = new ERC721Recipient(); - - token.mint(from, 1337); - - hevm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeTransferFrom(from, address(recipient), 1337); - - assertEq(token.getApproved(1337), address(0)); - assertEq(token.ownerOf(1337), address(recipient)); - assertEq(token.balanceOf(address(recipient)), 1); - assertEq(token.balanceOf(from), 0); - - assertEq(recipient.operator(), address(this)); - assertEq(recipient.from(), from); - assertEq(recipient.id(), 1337); - assertBytesEq(recipient.data(), ""); - } - - function testSafeTransferFromToERC721RecipientWithData() public { - address from = address(0xABCD); - ERC721Recipient recipient = new ERC721Recipient(); - - token.mint(from, 1337); - - hevm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeTransferFrom(from, address(recipient), 1337, "testing 123"); - - assertEq(token.getApproved(1337), address(0)); - assertEq(token.ownerOf(1337), address(recipient)); - assertEq(token.balanceOf(address(recipient)), 1); - assertEq(token.balanceOf(from), 0); - - assertEq(recipient.operator(), address(this)); - assertEq(recipient.from(), from); - assertEq(recipient.id(), 1337); - assertBytesEq(recipient.data(), "testing 123"); - } - - function testSafeMintToEOA() public { - token.safeMint(address(0xBEEF), 1337); - - assertEq(token.ownerOf(1337), address(address(0xBEEF))); - assertEq(token.balanceOf(address(address(0xBEEF))), 1); - } - - function testSafeMintToERC721Recipient() public { - ERC721Recipient to = new ERC721Recipient(); - - token.safeMint(address(to), 1337); - - assertEq(token.ownerOf(1337), address(to)); - assertEq(token.balanceOf(address(to)), 1); - - assertEq(to.operator(), address(this)); - assertEq(to.from(), address(0)); - assertEq(to.id(), 1337); - assertBytesEq(to.data(), ""); - } - - function testSafeMintToERC721RecipientWithData() public { - ERC721Recipient to = new ERC721Recipient(); - - token.safeMint(address(to), 1337, "testing 123"); - - assertEq(token.ownerOf(1337), address(to)); - assertEq(token.balanceOf(address(to)), 1); - - assertEq(to.operator(), address(this)); - assertEq(to.from(), address(0)); - assertEq(to.id(), 1337); - assertBytesEq(to.data(), "testing 123"); - } - - function testFailMintToZero() public { - token.mint(address(0), 1337); - } - - function testFailDoubleMint() public { - token.mint(address(0xBEEF), 1337); - token.mint(address(0xBEEF), 1337); - } - - function testFailBurnUnMinted() public { - token.burn(1337); - } - - function testFailDoubleBurn() public { - token.mint(address(0xBEEF), 1337); - - token.burn(1337); - token.burn(1337); - } - - function testFailApproveUnMinted() public { - token.approve(address(0xBEEF), 1337); - } - - function testFailApproveUnAuthorized() public { - token.mint(address(0xCAFE), 1337); - - token.approve(address(0xBEEF), 1337); - } - - function testFailTransferFromUnOwned() public { - token.transferFrom(address(0xFEED), address(0xBEEF), 1337); - } - - function testFailTransferFromWrongFrom() public { - token.mint(address(0xCAFE), 1337); - - token.transferFrom(address(0xFEED), address(0xBEEF), 1337); - } - - function testFailTransferFromToZero() public { - token.mint(address(this), 1337); - - token.transferFrom(address(this), address(0), 1337); - } - - function testFailTransferFromNotOwner() public { - token.mint(address(0xFEED), 1337); - - token.transferFrom(address(0xFEED), address(0xBEEF), 1337); - } - - function testFailSafeTransferFromToNonERC721Recipient() public { - token.mint(address(this), 1337); - - token.safeTransferFrom(address(this), address(new NonERC721Recipient()), 1337); - } - - function testFailSafeTransferFromToNonERC721RecipientWithData() public { - token.mint(address(this), 1337); - - token.safeTransferFrom(address(this), address(new NonERC721Recipient()), 1337, "testing 123"); - } - - function testFailSafeTransferFromToRevertingERC721Recipient() public { - token.mint(address(this), 1337); - - token.safeTransferFrom(address(this), address(new RevertingERC721Recipient()), 1337); - } - - function testFailSafeTransferFromToRevertingERC721RecipientWithData() public { - token.mint(address(this), 1337); - - token.safeTransferFrom(address(this), address(new RevertingERC721Recipient()), 1337, "testing 123"); - } - - function testFailSafeTransferFromToERC721RecipientWithWrongReturnData() public { - token.mint(address(this), 1337); - - token.safeTransferFrom(address(this), address(new WrongReturnDataERC721Recipient()), 1337); - } - - function testFailSafeTransferFromToERC721RecipientWithWrongReturnDataWithData() public { - token.mint(address(this), 1337); - - token.safeTransferFrom(address(this), address(new WrongReturnDataERC721Recipient()), 1337, "testing 123"); - } - - function testFailSafeMintToNonERC721Recipient() public { - token.safeMint(address(new NonERC721Recipient()), 1337); - } - - function testFailSafeMintToNonERC721RecipientWithData() public { - token.safeMint(address(new NonERC721Recipient()), 1337, "testing 123"); - } - - function testFailSafeMintToRevertingERC721Recipient() public { - token.safeMint(address(new RevertingERC721Recipient()), 1337); - } - - function testFailSafeMintToRevertingERC721RecipientWithData() public { - token.safeMint(address(new RevertingERC721Recipient()), 1337, "testing 123"); - } - - function testFailSafeMintToERC721RecipientWithWrongReturnData() public { - token.safeMint(address(new WrongReturnDataERC721Recipient()), 1337); - } - - function testFailSafeMintToERC721RecipientWithWrongReturnDataWithData() public { - token.safeMint(address(new WrongReturnDataERC721Recipient()), 1337, "testing 123"); - } - - function testFailBalanceOfZeroAddress() public view { - token.balanceOf(address(0)); - } - - function testFailOwnerOfUnminted() public view { - token.ownerOf(1337); - } - - function testMetadata(string memory name, string memory symbol) public { - MockERC721 tkn = new MockERC721(name, symbol); - - assertEq(tkn.name(), name); - assertEq(tkn.symbol(), symbol); - } - - function testMint(address to, uint256 id) public { - if (to == address(0)) to = address(0xBEEF); - - token.mint(to, id); - - assertEq(token.balanceOf(to), 1); - assertEq(token.ownerOf(id), to); - } - - function testBurn(address to, uint256 id) public { - if (to == address(0)) to = address(0xBEEF); - - token.mint(to, id); - token.burn(id); - - assertEq(token.balanceOf(to), 0); - - hevm.expectRevert("NOT_MINTED"); - token.ownerOf(id); - } - - function testApprove(address to, uint256 id) public { - if (to == address(0)) to = address(0xBEEF); - - token.mint(address(this), id); - - token.approve(to, id); - - assertEq(token.getApproved(id), to); - } - - function testApproveBurn(address to, uint256 id) public { - token.mint(address(this), id); - - token.approve(address(to), id); - - token.burn(id); - - assertEq(token.balanceOf(address(this)), 0); - assertEq(token.getApproved(id), address(0)); - - hevm.expectRevert("NOT_MINTED"); - token.ownerOf(id); - } - - function testApproveAll(address to, bool approved) public { - token.setApprovalForAll(to, approved); - - assertBoolEq(token.isApprovedForAll(address(this), to), approved); - } - - function testTransferFrom(uint256 id, address to) public { - address from = address(0xABCD); - - if (to == address(0) || to == from) to = address(0xBEEF); - - token.mint(from, id); - - hevm.prank(from); - token.approve(address(this), id); - - token.transferFrom(from, to, id); - - assertEq(token.getApproved(id), address(0)); - assertEq(token.ownerOf(id), to); - assertEq(token.balanceOf(to), 1); - assertEq(token.balanceOf(from), 0); - } - - function testTransferFromSelf(uint256 id, address to) public { - if (to == address(0) || to == address(this)) to = address(0xBEEF); - - token.mint(address(this), id); - - token.transferFrom(address(this), to, id); - - assertEq(token.getApproved(id), address(0)); - assertEq(token.ownerOf(id), to); - assertEq(token.balanceOf(to), 1); - assertEq(token.balanceOf(address(this)), 0); - } - - function testTransferFromApproveAll(uint256 id, address to) public { - address from = address(0xABCD); - - if (to == address(0) || to == from) to = address(0xBEEF); - - token.mint(from, id); - - hevm.prank(from); - token.setApprovalForAll(address(this), true); - - token.transferFrom(from, to, id); - - assertEq(token.getApproved(id), address(0)); - assertEq(token.ownerOf(id), to); - assertEq(token.balanceOf(to), 1); - assertEq(token.balanceOf(from), 0); - } - - function testSafeTransferFromToEOA(uint256 id, address to) public { - address from = address(0xABCD); - - if (to == address(0) || to == from) to = address(0xBEEF); - - if (uint256(uint160(to)) <= 18 || to.code.length > 0) return; - - token.mint(from, id); - - hevm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeTransferFrom(from, to, id); - - assertEq(token.getApproved(id), address(0)); - assertEq(token.ownerOf(id), to); - assertEq(token.balanceOf(to), 1); - assertEq(token.balanceOf(from), 0); - } - - function testSafeTransferFromToERC721Recipient(uint256 id) public { - address from = address(0xABCD); - - ERC721Recipient recipient = new ERC721Recipient(); - - token.mint(from, id); - - hevm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeTransferFrom(from, address(recipient), id); - - assertEq(token.getApproved(id), address(0)); - assertEq(token.ownerOf(id), address(recipient)); - assertEq(token.balanceOf(address(recipient)), 1); - assertEq(token.balanceOf(from), 0); - - assertEq(recipient.operator(), address(this)); - assertEq(recipient.from(), from); - assertEq(recipient.id(), id); - assertBytesEq(recipient.data(), ""); - } - - function testSafeTransferFromToERC721RecipientWithData(uint256 id, bytes calldata data) public { - address from = address(0xABCD); - ERC721Recipient recipient = new ERC721Recipient(); - - token.mint(from, id); - - hevm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeTransferFrom(from, address(recipient), id, data); - - assertEq(token.getApproved(id), address(0)); - assertEq(token.ownerOf(id), address(recipient)); - assertEq(token.balanceOf(address(recipient)), 1); - assertEq(token.balanceOf(from), 0); - - assertEq(recipient.operator(), address(this)); - assertEq(recipient.from(), from); - assertEq(recipient.id(), id); - assertBytesEq(recipient.data(), data); - } - - function testSafeMintToEOA(uint256 id, address to) public { - if (to == address(0)) to = address(0xBEEF); - - if (uint256(uint160(to)) <= 18 || to.code.length > 0) return; - - token.safeMint(to, id); - - assertEq(token.ownerOf(id), address(to)); - assertEq(token.balanceOf(address(to)), 1); - } - - function testSafeMintToERC721Recipient(uint256 id) public { - ERC721Recipient to = new ERC721Recipient(); - - token.safeMint(address(to), id); - - assertEq(token.ownerOf(id), address(to)); - assertEq(token.balanceOf(address(to)), 1); - - assertEq(to.operator(), address(this)); - assertEq(to.from(), address(0)); - assertEq(to.id(), id); - assertBytesEq(to.data(), ""); - } - - function testSafeMintToERC721RecipientWithData(uint256 id, bytes calldata data) public { - ERC721Recipient to = new ERC721Recipient(); - - token.safeMint(address(to), id, data); - - assertEq(token.ownerOf(id), address(to)); - assertEq(token.balanceOf(address(to)), 1); - - assertEq(to.operator(), address(this)); - assertEq(to.from(), address(0)); - assertEq(to.id(), id); - assertBytesEq(to.data(), data); - } - - function testFailMintToZero(uint256 id) public { - token.mint(address(0), id); - } - - function testFailDoubleMint(uint256 id, address to) public { - if (to == address(0)) to = address(0xBEEF); - - token.mint(to, id); - token.mint(to, id); - } - - function testFailBurnUnMinted(uint256 id) public { - token.burn(id); - } - - function testFailDoubleBurn(uint256 id, address to) public { - if (to == address(0)) to = address(0xBEEF); - - token.mint(to, id); - - token.burn(id); - token.burn(id); - } - - function testFailApproveUnMinted(uint256 id, address to) public { - token.approve(to, id); - } - - function testFailApproveUnAuthorized( - address owner, - uint256 id, - address to - ) public { - if (owner == address(0) || owner == address(this)) owner = address(0xBEEF); - - token.mint(owner, id); - - token.approve(to, id); - } - - function testFailTransferFromUnOwned( - address from, - address to, - uint256 id - ) public { - token.transferFrom(from, to, id); - } - - function testFailTransferFromWrongFrom( - address owner, - address from, - address to, - uint256 id - ) public { - if (owner == address(0)) to = address(0xBEEF); - if (from == owner) revert(); - - token.mint(owner, id); - - token.transferFrom(from, to, id); - } - - function testFailTransferFromToZero(uint256 id) public { - token.mint(address(this), id); - - token.transferFrom(address(this), address(0), id); - } - - function testFailTransferFromNotOwner( - address from, - address to, - uint256 id - ) public { - if (from == address(this)) from = address(0xBEEF); - - token.mint(from, id); - - token.transferFrom(from, to, id); - } - - function testFailSafeTransferFromToNonERC721Recipient(uint256 id) public { - token.mint(address(this), id); - - token.safeTransferFrom(address(this), address(new NonERC721Recipient()), id); - } - - function testFailSafeTransferFromToNonERC721RecipientWithData(uint256 id, bytes calldata data) public { - token.mint(address(this), id); - - token.safeTransferFrom(address(this), address(new NonERC721Recipient()), id, data); - } - - function testFailSafeTransferFromToRevertingERC721Recipient(uint256 id) public { - token.mint(address(this), id); - - token.safeTransferFrom(address(this), address(new RevertingERC721Recipient()), id); - } - - function testFailSafeTransferFromToRevertingERC721RecipientWithData(uint256 id, bytes calldata data) public { - token.mint(address(this), id); - - token.safeTransferFrom(address(this), address(new RevertingERC721Recipient()), id, data); - } - - function testFailSafeTransferFromToERC721RecipientWithWrongReturnData(uint256 id) public { - token.mint(address(this), id); - - token.safeTransferFrom(address(this), address(new WrongReturnDataERC721Recipient()), id); - } - - function testFailSafeTransferFromToERC721RecipientWithWrongReturnDataWithData(uint256 id, bytes calldata data) - public - { - token.mint(address(this), id); - - token.safeTransferFrom(address(this), address(new WrongReturnDataERC721Recipient()), id, data); - } - - function testFailSafeMintToNonERC721Recipient(uint256 id) public { - token.safeMint(address(new NonERC721Recipient()), id); - } - - function testFailSafeMintToNonERC721RecipientWithData(uint256 id, bytes calldata data) public { - token.safeMint(address(new NonERC721Recipient()), id, data); - } - - function testFailSafeMintToRevertingERC721Recipient(uint256 id) public { - token.safeMint(address(new RevertingERC721Recipient()), id); - } - - function testFailSafeMintToRevertingERC721RecipientWithData(uint256 id, bytes calldata data) public { - token.safeMint(address(new RevertingERC721Recipient()), id, data); - } - - function testFailSafeMintToERC721RecipientWithWrongReturnData(uint256 id) public { - token.safeMint(address(new WrongReturnDataERC721Recipient()), id); - } - - function testFailSafeMintToERC721RecipientWithWrongReturnDataWithData(uint256 id, bytes calldata data) public { - token.safeMint(address(new WrongReturnDataERC721Recipient()), id, data); - } - - function testFailOwnerOfUnminted(uint256 id) public view { - token.ownerOf(id); - } -} diff --git a/lib/solmate/src/test/FixedPointMathLib.t.sol b/lib/solmate/src/test/FixedPointMathLib.t.sol deleted file mode 100644 index 6e259f7..0000000 --- a/lib/solmate/src/test/FixedPointMathLib.t.sol +++ /dev/null @@ -1,277 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity 0.8.10; - -import {DSTestPlus} from "./utils/DSTestPlus.sol"; - -import {FixedPointMathLib} from "../utils/FixedPointMathLib.sol"; - -contract FixedPointMathLibTest is DSTestPlus { - function testMulWadDown() public { - assertEq(FixedPointMathLib.mulWadDown(2.5e18, 0.5e18), 1.25e18); - assertEq(FixedPointMathLib.mulWadDown(3e18, 1e18), 3e18); - assertEq(FixedPointMathLib.mulWadDown(369, 271), 0); - } - - function testMulWadDownEdgeCases() public { - assertEq(FixedPointMathLib.mulWadDown(0, 1e18), 0); - assertEq(FixedPointMathLib.mulWadDown(1e18, 0), 0); - assertEq(FixedPointMathLib.mulWadDown(0, 0), 0); - } - - function testMulWadUp() public { - assertEq(FixedPointMathLib.mulWadUp(2.5e18, 0.5e18), 1.25e18); - assertEq(FixedPointMathLib.mulWadUp(3e18, 1e18), 3e18); - assertEq(FixedPointMathLib.mulWadUp(369, 271), 1); - } - - function testMulWadUpEdgeCases() public { - assertEq(FixedPointMathLib.mulWadUp(0, 1e18), 0); - assertEq(FixedPointMathLib.mulWadUp(1e18, 0), 0); - assertEq(FixedPointMathLib.mulWadUp(0, 0), 0); - } - - function testDivWadDown() public { - assertEq(FixedPointMathLib.divWadDown(1.25e18, 0.5e18), 2.5e18); - assertEq(FixedPointMathLib.divWadDown(3e18, 1e18), 3e18); - assertEq(FixedPointMathLib.divWadDown(2, 100000000000000e18), 0); - } - - function testDivWadDownEdgeCases() public { - assertEq(FixedPointMathLib.divWadDown(0, 1e18), 0); - } - - function testFailDivWadDownZeroDenominator() public pure { - FixedPointMathLib.divWadDown(1e18, 0); - } - - function testDivWadUp() public { - assertEq(FixedPointMathLib.divWadUp(1.25e18, 0.5e18), 2.5e18); - assertEq(FixedPointMathLib.divWadUp(3e18, 1e18), 3e18); - assertEq(FixedPointMathLib.divWadUp(2, 100000000000000e18), 1); - } - - function testDivWadUpEdgeCases() public { - assertEq(FixedPointMathLib.divWadUp(0, 1e18), 0); - } - - function testFailDivWadUpZeroDenominator() public pure { - FixedPointMathLib.divWadUp(1e18, 0); - } - - function testMulDivDown() public { - assertEq(FixedPointMathLib.mulDivDown(2.5e27, 0.5e27, 1e27), 1.25e27); - assertEq(FixedPointMathLib.mulDivDown(2.5e18, 0.5e18, 1e18), 1.25e18); - assertEq(FixedPointMathLib.mulDivDown(2.5e8, 0.5e8, 1e8), 1.25e8); - assertEq(FixedPointMathLib.mulDivDown(369, 271, 1e2), 999); - - assertEq(FixedPointMathLib.mulDivDown(1e27, 1e27, 2e27), 0.5e27); - assertEq(FixedPointMathLib.mulDivDown(1e18, 1e18, 2e18), 0.5e18); - assertEq(FixedPointMathLib.mulDivDown(1e8, 1e8, 2e8), 0.5e8); - - assertEq(FixedPointMathLib.mulDivDown(2e27, 3e27, 2e27), 3e27); - assertEq(FixedPointMathLib.mulDivDown(3e18, 2e18, 3e18), 2e18); - assertEq(FixedPointMathLib.mulDivDown(2e8, 3e8, 2e8), 3e8); - } - - function testMulDivDownEdgeCases() public { - assertEq(FixedPointMathLib.mulDivDown(0, 1e18, 1e18), 0); - assertEq(FixedPointMathLib.mulDivDown(1e18, 0, 1e18), 0); - assertEq(FixedPointMathLib.mulDivDown(0, 0, 1e18), 0); - } - - function testFailMulDivDownZeroDenominator() public pure { - FixedPointMathLib.mulDivDown(1e18, 1e18, 0); - } - - function testMulDivUp() public { - assertEq(FixedPointMathLib.mulDivUp(2.5e27, 0.5e27, 1e27), 1.25e27); - assertEq(FixedPointMathLib.mulDivUp(2.5e18, 0.5e18, 1e18), 1.25e18); - assertEq(FixedPointMathLib.mulDivUp(2.5e8, 0.5e8, 1e8), 1.25e8); - assertEq(FixedPointMathLib.mulDivUp(369, 271, 1e2), 1000); - - assertEq(FixedPointMathLib.mulDivUp(1e27, 1e27, 2e27), 0.5e27); - assertEq(FixedPointMathLib.mulDivUp(1e18, 1e18, 2e18), 0.5e18); - assertEq(FixedPointMathLib.mulDivUp(1e8, 1e8, 2e8), 0.5e8); - - assertEq(FixedPointMathLib.mulDivUp(2e27, 3e27, 2e27), 3e27); - assertEq(FixedPointMathLib.mulDivUp(3e18, 2e18, 3e18), 2e18); - assertEq(FixedPointMathLib.mulDivUp(2e8, 3e8, 2e8), 3e8); - } - - function testMulDivUpEdgeCases() public { - assertEq(FixedPointMathLib.mulDivUp(0, 1e18, 1e18), 0); - assertEq(FixedPointMathLib.mulDivUp(1e18, 0, 1e18), 0); - assertEq(FixedPointMathLib.mulDivUp(0, 0, 1e18), 0); - } - - function testFailMulDivUpZeroDenominator() public pure { - FixedPointMathLib.mulDivUp(1e18, 1e18, 0); - } - - function testRPow() public { - assertEq(FixedPointMathLib.rpow(2e27, 2, 1e27), 4e27); - assertEq(FixedPointMathLib.rpow(2e18, 2, 1e18), 4e18); - assertEq(FixedPointMathLib.rpow(2e8, 2, 1e8), 4e8); - assertEq(FixedPointMathLib.rpow(8, 3, 1), 512); - } - - function testSqrt() public { - assertEq(FixedPointMathLib.sqrt(0), 0); - assertEq(FixedPointMathLib.sqrt(1), 1); - assertEq(FixedPointMathLib.sqrt(2704), 52); - assertEq(FixedPointMathLib.sqrt(110889), 333); - assertEq(FixedPointMathLib.sqrt(32239684), 5678); - } - - function testMulWadDown(uint256 x, uint256 y) public { - // Ignore cases where x * y overflows. - unchecked { - if (x != 0 && (x * y) / x != y) return; - } - - assertEq(FixedPointMathLib.mulWadDown(x, y), (x * y) / 1e18); - } - - function testFailMulWadDownOverflow(uint256 x, uint256 y) public pure { - // Ignore cases where x * y does not overflow. - unchecked { - if ((x * y) / x == y) revert(); - } - - FixedPointMathLib.mulWadDown(x, y); - } - - function testMulWadUp(uint256 x, uint256 y) public { - // Ignore cases where x * y overflows. - unchecked { - if (x != 0 && (x * y) / x != y) return; - } - - assertEq(FixedPointMathLib.mulWadUp(x, y), x * y == 0 ? 0 : (x * y - 1) / 1e18 + 1); - } - - function testFailMulWadUpOverflow(uint256 x, uint256 y) public pure { - // Ignore cases where x * y does not overflow. - unchecked { - if ((x * y) / x == y) revert(); - } - - FixedPointMathLib.mulWadUp(x, y); - } - - function testDivWadDown(uint256 x, uint256 y) public { - // Ignore cases where x * WAD overflows or y is 0. - unchecked { - if (y == 0 || (x != 0 && (x * 1e18) / 1e18 != x)) return; - } - - assertEq(FixedPointMathLib.divWadDown(x, y), (x * 1e18) / y); - } - - function testFailDivWadDownOverflow(uint256 x, uint256 y) public pure { - // Ignore cases where x * WAD does not overflow or y is 0. - unchecked { - if (y == 0 || (x * 1e18) / 1e18 == x) revert(); - } - - FixedPointMathLib.divWadDown(x, y); - } - - function testFailDivWadDownZeroDenominator(uint256 x) public pure { - FixedPointMathLib.divWadDown(x, 0); - } - - function testDivWadUp(uint256 x, uint256 y) public { - // Ignore cases where x * WAD overflows or y is 0. - unchecked { - if (y == 0 || (x != 0 && (x * 1e18) / 1e18 != x)) return; - } - - assertEq(FixedPointMathLib.divWadUp(x, y), x == 0 ? 0 : (x * 1e18 - 1) / y + 1); - } - - function testFailDivWadUpOverflow(uint256 x, uint256 y) public pure { - // Ignore cases where x * WAD does not overflow or y is 0. - unchecked { - if (y == 0 || (x * 1e18) / 1e18 == x) revert(); - } - - FixedPointMathLib.divWadUp(x, y); - } - - function testFailDivWadUpZeroDenominator(uint256 x) public pure { - FixedPointMathLib.divWadUp(x, 0); - } - - function testMulDivDown( - uint256 x, - uint256 y, - uint256 denominator - ) public { - // Ignore cases where x * y overflows or denominator is 0. - unchecked { - if (denominator == 0 || (x != 0 && (x * y) / x != y)) return; - } - - assertEq(FixedPointMathLib.mulDivDown(x, y, denominator), (x * y) / denominator); - } - - function testFailMulDivDownOverflow( - uint256 x, - uint256 y, - uint256 denominator - ) public pure { - // Ignore cases where x * y does not overflow or denominator is 0. - unchecked { - if (denominator == 0 || (x * y) / x == y) revert(); - } - - FixedPointMathLib.mulDivDown(x, y, denominator); - } - - function testFailMulDivDownZeroDenominator(uint256 x, uint256 y) public pure { - FixedPointMathLib.mulDivDown(x, y, 0); - } - - function testMulDivUp( - uint256 x, - uint256 y, - uint256 denominator - ) public { - // Ignore cases where x * y overflows or denominator is 0. - unchecked { - if (denominator == 0 || (x != 0 && (x * y) / x != y)) return; - } - - assertEq(FixedPointMathLib.mulDivUp(x, y, denominator), x * y == 0 ? 0 : (x * y - 1) / denominator + 1); - } - - function testFailMulDivUpOverflow( - uint256 x, - uint256 y, - uint256 denominator - ) public pure { - // Ignore cases where x * y does not overflow or denominator is 0. - unchecked { - if (denominator == 0 || (x * y) / x == y) revert(); - } - - FixedPointMathLib.mulDivUp(x, y, denominator); - } - - function testFailMulDivUpZeroDenominator(uint256 x, uint256 y) public pure { - FixedPointMathLib.mulDivUp(x, y, 0); - } - - function testSqrt(uint256 x) public { - uint256 root = FixedPointMathLib.sqrt(x); - uint256 next = root + 1; - - // Ignore cases where next * next overflows. - unchecked { - if (next * next < next) return; - } - - assertTrue(root * root <= x && next * next > x); - } -} diff --git a/lib/solmate/src/test/MultiRolesAuthority.t.sol b/lib/solmate/src/test/MultiRolesAuthority.t.sol deleted file mode 100644 index 8530887..0000000 --- a/lib/solmate/src/test/MultiRolesAuthority.t.sol +++ /dev/null @@ -1,321 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity 0.8.10; - -import {DSTestPlus} from "./utils/DSTestPlus.sol"; -import {MockAuthority} from "./utils/mocks/MockAuthority.sol"; - -import {Authority} from "../auth/Auth.sol"; - -import {MultiRolesAuthority} from "../auth/authorities/MultiRolesAuthority.sol"; - -contract MultiRolesAuthorityTest is DSTestPlus { - MultiRolesAuthority multiRolesAuthority; - - function setUp() public { - multiRolesAuthority = new MultiRolesAuthority(address(this), Authority(address(0))); - } - - function testSetRoles() public { - assertFalse(multiRolesAuthority.doesUserHaveRole(address(0xBEEF), 0)); - - multiRolesAuthority.setUserRole(address(0xBEEF), 0, true); - assertTrue(multiRolesAuthority.doesUserHaveRole(address(0xBEEF), 0)); - - multiRolesAuthority.setUserRole(address(0xBEEF), 0, false); - assertFalse(multiRolesAuthority.doesUserHaveRole(address(0xBEEF), 0)); - } - - function testSetRoleCapabilities() public { - assertFalse(multiRolesAuthority.doesRoleHaveCapability(0, 0xBEEFCAFE)); - - multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, true); - assertTrue(multiRolesAuthority.doesRoleHaveCapability(0, 0xBEEFCAFE)); - - multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, false); - assertFalse(multiRolesAuthority.doesRoleHaveCapability(0, 0xBEEFCAFE)); - } - - function testSetPublicCapabilities() public { - assertFalse(multiRolesAuthority.isCapabilityPublic(0xBEEFCAFE)); - - multiRolesAuthority.setPublicCapability(0xBEEFCAFE, true); - assertTrue(multiRolesAuthority.isCapabilityPublic(0xBEEFCAFE)); - - multiRolesAuthority.setPublicCapability(0xBEEFCAFE, false); - assertFalse(multiRolesAuthority.isCapabilityPublic(0xBEEFCAFE)); - } - - function testSetTargetCustomAuthority() public { - assertEq(address(multiRolesAuthority.getTargetCustomAuthority(address(0xBEEF))), address(0)); - - multiRolesAuthority.setTargetCustomAuthority(address(0xBEEF), Authority(address(0xCAFE))); - assertEq(address(multiRolesAuthority.getTargetCustomAuthority(address(0xBEEF))), address(0xCAFE)); - - multiRolesAuthority.setTargetCustomAuthority(address(0xBEEF), Authority(address(0))); - assertEq(address(multiRolesAuthority.getTargetCustomAuthority(address(0xBEEF))), address(0)); - } - - function testCanCallWithAuthorizedRole() public { - assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - multiRolesAuthority.setUserRole(address(0xBEEF), 0, true); - assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, true); - assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, false); - assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, true); - assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - multiRolesAuthority.setUserRole(address(0xBEEF), 0, false); - assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - } - - function testCanCallPublicCapability() public { - assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - multiRolesAuthority.setPublicCapability(0xBEEFCAFE, true); - assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - multiRolesAuthority.setPublicCapability(0xBEEFCAFE, false); - assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - } - - function testCanCallWithCustomAuthority() public { - assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(false)); - assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(true)); - assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(false)); - assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), Authority(address(0))); - assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(true)); - assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - } - - function testCanCallWithCustomAuthorityOverridesPublicCapability() public { - assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - multiRolesAuthority.setPublicCapability(0xBEEFCAFE, true); - assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(false)); - assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(true)); - assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - multiRolesAuthority.setPublicCapability(0xBEEFCAFE, false); - assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), Authority(address(0))); - assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - multiRolesAuthority.setPublicCapability(0xBEEFCAFE, true); - assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - } - - function testCanCallWithCustomAuthorityOverridesUserWithRole() public { - assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - multiRolesAuthority.setUserRole(address(0xBEEF), 0, true); - assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, true); - assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(false)); - assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), new MockAuthority(true)); - assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - multiRolesAuthority.setUserRole(address(0xBEEF), 0, false); - assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - multiRolesAuthority.setTargetCustomAuthority(address(0xCAFE), Authority(address(0))); - assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - multiRolesAuthority.setUserRole(address(0xBEEF), 0, true); - assertTrue(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - multiRolesAuthority.setRoleCapability(0, 0xBEEFCAFE, false); - assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - multiRolesAuthority.setUserRole(address(0xBEEF), 0, false); - assertFalse(multiRolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - } - - function testSetRoles(address user, uint8 role) public { - assertFalse(multiRolesAuthority.doesUserHaveRole(user, role)); - - multiRolesAuthority.setUserRole(user, role, true); - assertTrue(multiRolesAuthority.doesUserHaveRole(user, role)); - - multiRolesAuthority.setUserRole(user, role, false); - assertFalse(multiRolesAuthority.doesUserHaveRole(user, role)); - } - - function testSetRoleCapabilities(uint8 role, bytes4 functionSig) public { - assertFalse(multiRolesAuthority.doesRoleHaveCapability(role, functionSig)); - - multiRolesAuthority.setRoleCapability(role, functionSig, true); - assertTrue(multiRolesAuthority.doesRoleHaveCapability(role, functionSig)); - - multiRolesAuthority.setRoleCapability(role, functionSig, false); - assertFalse(multiRolesAuthority.doesRoleHaveCapability(role, functionSig)); - } - - function testSetPublicCapabilities(bytes4 functionSig) public { - assertFalse(multiRolesAuthority.isCapabilityPublic(functionSig)); - - multiRolesAuthority.setPublicCapability(functionSig, true); - assertTrue(multiRolesAuthority.isCapabilityPublic(functionSig)); - - multiRolesAuthority.setPublicCapability(functionSig, false); - assertFalse(multiRolesAuthority.isCapabilityPublic(functionSig)); - } - - function testSetTargetCustomAuthority(address user, Authority customAuthority) public { - assertEq(address(multiRolesAuthority.getTargetCustomAuthority(user)), address(0)); - - multiRolesAuthority.setTargetCustomAuthority(user, customAuthority); - assertEq(address(multiRolesAuthority.getTargetCustomAuthority(user)), address(customAuthority)); - - multiRolesAuthority.setTargetCustomAuthority(user, Authority(address(0))); - assertEq(address(multiRolesAuthority.getTargetCustomAuthority(user)), address(0)); - } - - function testCanCallWithAuthorizedRole( - address user, - uint8 role, - address target, - bytes4 functionSig - ) public { - assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); - - multiRolesAuthority.setUserRole(user, role, true); - assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); - - multiRolesAuthority.setRoleCapability(role, functionSig, true); - assertTrue(multiRolesAuthority.canCall(user, target, functionSig)); - - multiRolesAuthority.setRoleCapability(role, functionSig, false); - assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); - - multiRolesAuthority.setRoleCapability(role, functionSig, true); - assertTrue(multiRolesAuthority.canCall(user, target, functionSig)); - - multiRolesAuthority.setUserRole(user, role, false); - assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); - } - - function testCanCallPublicCapability( - address user, - address target, - bytes4 functionSig - ) public { - assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); - - multiRolesAuthority.setPublicCapability(functionSig, true); - assertTrue(multiRolesAuthority.canCall(user, target, functionSig)); - - multiRolesAuthority.setPublicCapability(functionSig, false); - assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); - } - - function testCanCallWithCustomAuthority( - address user, - address target, - bytes4 functionSig - ) public { - assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); - - multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(false)); - assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); - - multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(true)); - assertTrue(multiRolesAuthority.canCall(user, target, functionSig)); - - multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(false)); - assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); - - multiRolesAuthority.setTargetCustomAuthority(target, Authority(address(0))); - assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); - - multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(true)); - assertTrue(multiRolesAuthority.canCall(user, target, functionSig)); - } - - function testCanCallWithCustomAuthorityOverridesPublicCapability( - address user, - address target, - bytes4 functionSig - ) public { - assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); - - multiRolesAuthority.setPublicCapability(functionSig, true); - assertTrue(multiRolesAuthority.canCall(user, target, functionSig)); - - multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(false)); - assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); - - multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(true)); - assertTrue(multiRolesAuthority.canCall(user, target, functionSig)); - - multiRolesAuthority.setPublicCapability(functionSig, false); - assertTrue(multiRolesAuthority.canCall(user, target, functionSig)); - - multiRolesAuthority.setTargetCustomAuthority(target, Authority(address(0))); - assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); - - multiRolesAuthority.setPublicCapability(functionSig, true); - assertTrue(multiRolesAuthority.canCall(user, target, functionSig)); - } - - function testCanCallWithCustomAuthorityOverridesUserWithRole( - address user, - uint8 role, - address target, - bytes4 functionSig - ) public { - assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); - - multiRolesAuthority.setUserRole(user, role, true); - assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); - - multiRolesAuthority.setRoleCapability(role, functionSig, true); - assertTrue(multiRolesAuthority.canCall(user, target, functionSig)); - - multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(false)); - assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); - - multiRolesAuthority.setTargetCustomAuthority(target, new MockAuthority(true)); - assertTrue(multiRolesAuthority.canCall(user, target, functionSig)); - - multiRolesAuthority.setUserRole(user, role, false); - assertTrue(multiRolesAuthority.canCall(user, target, functionSig)); - - multiRolesAuthority.setTargetCustomAuthority(target, Authority(address(0))); - assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); - - multiRolesAuthority.setUserRole(user, role, true); - assertTrue(multiRolesAuthority.canCall(user, target, functionSig)); - - multiRolesAuthority.setRoleCapability(role, functionSig, false); - assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); - - multiRolesAuthority.setUserRole(user, role, false); - assertFalse(multiRolesAuthority.canCall(user, target, functionSig)); - } -} diff --git a/lib/solmate/src/test/Owned.t.sol b/lib/solmate/src/test/Owned.t.sol deleted file mode 100644 index 6c30c10..0000000 --- a/lib/solmate/src/test/Owned.t.sol +++ /dev/null @@ -1,40 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity 0.8.10; - -import {DSTestPlus} from "./utils/DSTestPlus.sol"; -import {MockOwned} from "./utils/mocks/MockOwned.sol"; - -contract OwnedTest is DSTestPlus { - MockOwned mockOwned; - - function setUp() public { - mockOwned = new MockOwned(); - } - - function testSetOwner() public { - testSetOwner(address(0xBEEF)); - } - - function testCallFunctionAsNonOwner() public { - testCallFunctionAsNonOwner(address(0)); - } - - function testCallFunctionAsOwner() public { - mockOwned.updateFlag(); - } - - function testSetOwner(address newOwner) public { - mockOwned.setOwner(newOwner); - - assertEq(mockOwned.owner(), newOwner); - } - - function testCallFunctionAsNonOwner(address owner) public { - hevm.assume(owner != address(this)); - - mockOwned.setOwner(owner); - - hevm.expectRevert("UNAUTHORIZED"); - mockOwned.updateFlag(); - } -} diff --git a/lib/solmate/src/test/ReentrancyGuard.t.sol b/lib/solmate/src/test/ReentrancyGuard.t.sol deleted file mode 100644 index eb8a36c..0000000 --- a/lib/solmate/src/test/ReentrancyGuard.t.sol +++ /dev/null @@ -1,56 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity 0.8.10; - -import {DSTestPlus} from "./utils/DSTestPlus.sol"; - -import {ReentrancyGuard} from "../utils/ReentrancyGuard.sol"; - -contract RiskyContract is ReentrancyGuard { - uint256 public enterTimes; - - function unprotectedCall() public { - enterTimes++; - - if (enterTimes > 1) return; - - protectedCall(); - } - - function protectedCall() public nonReentrant { - enterTimes++; - - if (enterTimes > 1) return; - - protectedCall(); - } - - function overprotectedCall() public nonReentrant {} -} - -contract ReentrancyGuardTest is DSTestPlus { - RiskyContract riskyContract; - - function setUp() public { - riskyContract = new RiskyContract(); - } - - function invariantReentrancyStatusAlways1() public { - assertEq(uint256(hevm.load(address(riskyContract), 0)), 1); - } - - function testFailUnprotectedCall() public { - riskyContract.unprotectedCall(); - - assertEq(riskyContract.enterTimes(), 1); - } - - function testProtectedCall() public { - try riskyContract.protectedCall() { - fail("Reentrancy Guard Failed To Stop Attacker"); - } catch {} - } - - function testNoReentrancy() public { - riskyContract.overprotectedCall(); - } -} diff --git a/lib/solmate/src/test/RolesAuthority.t.sol b/lib/solmate/src/test/RolesAuthority.t.sol deleted file mode 100644 index 88c43fc..0000000 --- a/lib/solmate/src/test/RolesAuthority.t.sol +++ /dev/null @@ -1,148 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity 0.8.10; - -import {DSTestPlus} from "./utils/DSTestPlus.sol"; -import {MockAuthority} from "./utils/mocks/MockAuthority.sol"; - -import {Authority} from "../auth/Auth.sol"; - -import {RolesAuthority} from "../auth/authorities/RolesAuthority.sol"; - -contract RolesAuthorityTest is DSTestPlus { - RolesAuthority rolesAuthority; - - function setUp() public { - rolesAuthority = new RolesAuthority(address(this), Authority(address(0))); - } - - function testSetRoles() public { - assertFalse(rolesAuthority.doesUserHaveRole(address(0xBEEF), 0)); - - rolesAuthority.setUserRole(address(0xBEEF), 0, true); - assertTrue(rolesAuthority.doesUserHaveRole(address(0xBEEF), 0)); - - rolesAuthority.setUserRole(address(0xBEEF), 0, false); - assertFalse(rolesAuthority.doesUserHaveRole(address(0xBEEF), 0)); - } - - function testSetRoleCapabilities() public { - assertFalse(rolesAuthority.doesRoleHaveCapability(0, address(0xCAFE), 0xBEEFCAFE)); - - rolesAuthority.setRoleCapability(0, address(0xCAFE), 0xBEEFCAFE, true); - assertTrue(rolesAuthority.doesRoleHaveCapability(0, address(0xCAFE), 0xBEEFCAFE)); - - rolesAuthority.setRoleCapability(0, address(0xCAFE), 0xBEEFCAFE, false); - assertFalse(rolesAuthority.doesRoleHaveCapability(0, address(0xCAFE), 0xBEEFCAFE)); - } - - function testSetPublicCapabilities() public { - assertFalse(rolesAuthority.isCapabilityPublic(address(0xCAFE), 0xBEEFCAFE)); - - rolesAuthority.setPublicCapability(address(0xCAFE), 0xBEEFCAFE, true); - assertTrue(rolesAuthority.isCapabilityPublic(address(0xCAFE), 0xBEEFCAFE)); - - rolesAuthority.setPublicCapability(address(0xCAFE), 0xBEEFCAFE, false); - assertFalse(rolesAuthority.isCapabilityPublic(address(0xCAFE), 0xBEEFCAFE)); - } - - function testCanCallWithAuthorizedRole() public { - assertFalse(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - rolesAuthority.setUserRole(address(0xBEEF), 0, true); - assertFalse(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - rolesAuthority.setRoleCapability(0, address(0xCAFE), 0xBEEFCAFE, true); - assertTrue(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - rolesAuthority.setRoleCapability(0, address(0xCAFE), 0xBEEFCAFE, false); - assertFalse(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - rolesAuthority.setRoleCapability(0, address(0xCAFE), 0xBEEFCAFE, true); - assertTrue(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - rolesAuthority.setUserRole(address(0xBEEF), 0, false); - assertFalse(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - } - - function testCanCallPublicCapability() public { - assertFalse(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - rolesAuthority.setPublicCapability(address(0xCAFE), 0xBEEFCAFE, true); - assertTrue(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - - rolesAuthority.setPublicCapability(address(0xCAFE), 0xBEEFCAFE, false); - assertFalse(rolesAuthority.canCall(address(0xBEEF), address(0xCAFE), 0xBEEFCAFE)); - } - - function testSetRoles(address user, uint8 role) public { - assertFalse(rolesAuthority.doesUserHaveRole(user, role)); - - rolesAuthority.setUserRole(user, role, true); - assertTrue(rolesAuthority.doesUserHaveRole(user, role)); - - rolesAuthority.setUserRole(user, role, false); - assertFalse(rolesAuthority.doesUserHaveRole(user, role)); - } - - function testSetRoleCapabilities( - uint8 role, - address target, - bytes4 functionSig - ) public { - assertFalse(rolesAuthority.doesRoleHaveCapability(role, target, functionSig)); - - rolesAuthority.setRoleCapability(role, target, functionSig, true); - assertTrue(rolesAuthority.doesRoleHaveCapability(role, target, functionSig)); - - rolesAuthority.setRoleCapability(role, target, functionSig, false); - assertFalse(rolesAuthority.doesRoleHaveCapability(role, target, functionSig)); - } - - function testSetPublicCapabilities(address target, bytes4 functionSig) public { - assertFalse(rolesAuthority.isCapabilityPublic(target, functionSig)); - - rolesAuthority.setPublicCapability(target, functionSig, true); - assertTrue(rolesAuthority.isCapabilityPublic(target, functionSig)); - - rolesAuthority.setPublicCapability(target, functionSig, false); - assertFalse(rolesAuthority.isCapabilityPublic(target, functionSig)); - } - - function testCanCallWithAuthorizedRole( - address user, - uint8 role, - address target, - bytes4 functionSig - ) public { - assertFalse(rolesAuthority.canCall(user, target, functionSig)); - - rolesAuthority.setUserRole(user, role, true); - assertFalse(rolesAuthority.canCall(user, target, functionSig)); - - rolesAuthority.setRoleCapability(role, target, functionSig, true); - assertTrue(rolesAuthority.canCall(user, target, functionSig)); - - rolesAuthority.setRoleCapability(role, target, functionSig, false); - assertFalse(rolesAuthority.canCall(user, target, functionSig)); - - rolesAuthority.setRoleCapability(role, target, functionSig, true); - assertTrue(rolesAuthority.canCall(user, target, functionSig)); - - rolesAuthority.setUserRole(user, role, false); - assertFalse(rolesAuthority.canCall(user, target, functionSig)); - } - - function testCanCallPublicCapability( - address user, - address target, - bytes4 functionSig - ) public { - assertFalse(rolesAuthority.canCall(user, target, functionSig)); - - rolesAuthority.setPublicCapability(target, functionSig, true); - assertTrue(rolesAuthority.canCall(user, target, functionSig)); - - rolesAuthority.setPublicCapability(target, functionSig, false); - assertFalse(rolesAuthority.canCall(user, target, functionSig)); - } -} diff --git a/lib/solmate/src/test/SSTORE2.t.sol b/lib/solmate/src/test/SSTORE2.t.sol deleted file mode 100644 index 5dbe196..0000000 --- a/lib/solmate/src/test/SSTORE2.t.sol +++ /dev/null @@ -1,152 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity 0.8.10; - -import {DSTestPlus} from "./utils/DSTestPlus.sol"; - -import {SSTORE2} from "../utils/SSTORE2.sol"; - -contract SSTORE2Test is DSTestPlus { - function testWriteRead() public { - bytes memory testBytes = abi.encode("this is a test"); - - address pointer = SSTORE2.write(testBytes); - - assertBytesEq(SSTORE2.read(pointer), testBytes); - } - - function testWriteReadFullStartBound() public { - assertBytesEq(SSTORE2.read(SSTORE2.write(hex"11223344"), 0), hex"11223344"); - } - - function testWriteReadCustomStartBound() public { - assertBytesEq(SSTORE2.read(SSTORE2.write(hex"11223344"), 1), hex"223344"); - } - - function testWriteReadFullBoundedRead() public { - bytes memory testBytes = abi.encode("this is a test"); - - assertBytesEq(SSTORE2.read(SSTORE2.write(testBytes), 0, testBytes.length), testBytes); - } - - function testWriteReadCustomBounds() public { - assertBytesEq(SSTORE2.read(SSTORE2.write(hex"11223344"), 1, 3), hex"2233"); - } - - function testWriteReadEmptyBound() public { - SSTORE2.read(SSTORE2.write(hex"11223344"), 3, 3); - } - - function testFailReadInvalidPointer() public view { - SSTORE2.read(DEAD_ADDRESS); - } - - function testFailReadInvalidPointerCustomStartBound() public view { - SSTORE2.read(DEAD_ADDRESS, 1); - } - - function testFailReadInvalidPointerCustomBounds() public view { - SSTORE2.read(DEAD_ADDRESS, 2, 4); - } - - function testFailWriteReadOutOfStartBound() public { - SSTORE2.read(SSTORE2.write(hex"11223344"), 41000); - } - - function testFailWriteReadEmptyOutOfBounds() public { - SSTORE2.read(SSTORE2.write(hex"11223344"), 42000, 42000); - } - - function testFailWriteReadOutOfBounds() public { - SSTORE2.read(SSTORE2.write(hex"11223344"), 41000, 42000); - } - - function testWriteRead(bytes calldata testBytes, bytes calldata brutalizeWith) - public - brutalizeMemory(brutalizeWith) - { - assertBytesEq(SSTORE2.read(SSTORE2.write(testBytes)), testBytes); - } - - function testWriteReadCustomStartBound( - bytes calldata testBytes, - uint256 startIndex, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - if (testBytes.length == 0) return; - - startIndex = bound(startIndex, 0, testBytes.length); - - assertBytesEq(SSTORE2.read(SSTORE2.write(testBytes), startIndex), bytes(testBytes[startIndex:])); - } - - function testWriteReadCustomBounds( - bytes calldata testBytes, - uint256 startIndex, - uint256 endIndex, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - if (testBytes.length == 0) return; - - endIndex = bound(endIndex, 0, testBytes.length); - startIndex = bound(startIndex, 0, testBytes.length); - - if (startIndex > endIndex) return; - - assertBytesEq( - SSTORE2.read(SSTORE2.write(testBytes), startIndex, endIndex), - bytes(testBytes[startIndex:endIndex]) - ); - } - - function testFailReadInvalidPointer(address pointer, bytes calldata brutalizeWith) - public - view - brutalizeMemory(brutalizeWith) - { - if (pointer.code.length > 0) revert(); - - SSTORE2.read(pointer); - } - - function testFailReadInvalidPointerCustomStartBound( - address pointer, - uint256 startIndex, - bytes calldata brutalizeWith - ) public view brutalizeMemory(brutalizeWith) { - if (pointer.code.length > 0) revert(); - - SSTORE2.read(pointer, startIndex); - } - - function testFailReadInvalidPointerCustomBounds( - address pointer, - uint256 startIndex, - uint256 endIndex, - bytes calldata brutalizeWith - ) public view brutalizeMemory(brutalizeWith) { - if (pointer.code.length > 0) revert(); - - SSTORE2.read(pointer, startIndex, endIndex); - } - - function testFailWriteReadCustomStartBoundOutOfRange( - bytes calldata testBytes, - uint256 startIndex, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - startIndex = bound(startIndex, testBytes.length + 1, type(uint256).max); - - SSTORE2.read(SSTORE2.write(testBytes), startIndex); - } - - function testFailWriteReadCustomBoundsOutOfRange( - bytes calldata testBytes, - uint256 startIndex, - uint256 endIndex, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - endIndex = bound(endIndex, testBytes.length + 1, type(uint256).max); - - SSTORE2.read(SSTORE2.write(testBytes), startIndex, endIndex); - } -} diff --git a/lib/solmate/src/test/SafeCastLib.t.sol b/lib/solmate/src/test/SafeCastLib.t.sol deleted file mode 100644 index 48a2a76..0000000 --- a/lib/solmate/src/test/SafeCastLib.t.sol +++ /dev/null @@ -1,197 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity 0.8.10; - -import {DSTestPlus} from "./utils/DSTestPlus.sol"; - -import {SafeCastLib} from "../utils/SafeCastLib.sol"; - -contract SafeCastLibTest is DSTestPlus { - function testSafeCastTo248() public { - assertEq(SafeCastLib.safeCastTo248(2.5e45), 2.5e45); - assertEq(SafeCastLib.safeCastTo248(2.5e27), 2.5e27); - } - - function testSafeCastTo224() public { - assertEq(SafeCastLib.safeCastTo224(2.5e36), 2.5e36); - assertEq(SafeCastLib.safeCastTo224(2.5e27), 2.5e27); - } - - function testSafeCastTo192() public { - assertEq(SafeCastLib.safeCastTo192(2.5e36), 2.5e36); - assertEq(SafeCastLib.safeCastTo192(2.5e27), 2.5e27); - } - - function testSafeCastTo160() public { - assertEq(SafeCastLib.safeCastTo160(2.5e36), 2.5e36); - assertEq(SafeCastLib.safeCastTo160(2.5e27), 2.5e27); - } - - function testSafeCastTo128() public { - assertEq(SafeCastLib.safeCastTo128(2.5e27), 2.5e27); - assertEq(SafeCastLib.safeCastTo128(2.5e18), 2.5e18); - } - - function testSafeCastTo96() public { - assertEq(SafeCastLib.safeCastTo96(2.5e18), 2.5e18); - assertEq(SafeCastLib.safeCastTo96(2.5e17), 2.5e17); - } - - function testSafeCastTo64() public { - assertEq(SafeCastLib.safeCastTo64(2.5e18), 2.5e18); - assertEq(SafeCastLib.safeCastTo64(2.5e17), 2.5e17); - } - - function testSafeCastTo32() public { - assertEq(SafeCastLib.safeCastTo32(2.5e8), 2.5e8); - assertEq(SafeCastLib.safeCastTo32(2.5e7), 2.5e7); - } - - function testSafeCastTo8() public { - assertEq(SafeCastLib.safeCastTo8(100), 100); - assertEq(SafeCastLib.safeCastTo8(250), 250); - } - - function testFailSafeCastTo248() public pure { - SafeCastLib.safeCastTo248(type(uint248).max + 1); - } - - function testFailSafeCastTo224() public pure { - SafeCastLib.safeCastTo224(type(uint224).max + 1); - } - - function testFailSafeCastTo192() public pure { - SafeCastLib.safeCastTo192(type(uint192).max + 1); - } - - function testFailSafeCastTo160() public pure { - SafeCastLib.safeCastTo160(type(uint160).max + 1); - } - - function testFailSafeCastTo128() public pure { - SafeCastLib.safeCastTo128(type(uint128).max + 1); - } - - function testFailSafeCastTo96() public pure { - SafeCastLib.safeCastTo96(type(uint96).max + 1); - } - - function testFailSafeCastTo64() public pure { - SafeCastLib.safeCastTo64(type(uint64).max + 1); - } - - function testFailSafeCastTo32() public pure { - SafeCastLib.safeCastTo32(type(uint32).max + 1); - } - - function testFailSafeCastTo8() public pure { - SafeCastLib.safeCastTo8(type(uint8).max + 1); - } - - function testSafeCastTo248(uint256 x) public { - x = bound(x, 0, type(uint248).max); - - assertEq(SafeCastLib.safeCastTo248(x), x); - } - - function testSafeCastTo224(uint256 x) public { - x = bound(x, 0, type(uint224).max); - - assertEq(SafeCastLib.safeCastTo224(x), x); - } - - function testSafeCastTo192(uint256 x) public { - x = bound(x, 0, type(uint192).max); - - assertEq(SafeCastLib.safeCastTo192(x), x); - } - - function testSafeCastTo160(uint256 x) public { - x = bound(x, 0, type(uint160).max); - - assertEq(SafeCastLib.safeCastTo160(x), x); - } - - function testSafeCastTo128(uint256 x) public { - x = bound(x, 0, type(uint128).max); - - assertEq(SafeCastLib.safeCastTo128(x), x); - } - - function testSafeCastTo96(uint256 x) public { - x = bound(x, 0, type(uint96).max); - - assertEq(SafeCastLib.safeCastTo96(x), x); - } - - function testSafeCastTo64(uint256 x) public { - x = bound(x, 0, type(uint64).max); - - assertEq(SafeCastLib.safeCastTo64(x), x); - } - - function testSafeCastTo32(uint256 x) public { - x = bound(x, 0, type(uint32).max); - - assertEq(SafeCastLib.safeCastTo32(x), x); - } - - function testSafeCastTo8(uint256 x) public { - x = bound(x, 0, type(uint8).max); - - assertEq(SafeCastLib.safeCastTo8(x), x); - } - - function testFailSafeCastTo248(uint256 x) public { - x = bound(x, type(uint248).max + 1, type(uint256).max); - - SafeCastLib.safeCastTo248(x); - } - - function testFailSafeCastTo224(uint256 x) public { - x = bound(x, type(uint224).max + 1, type(uint256).max); - - SafeCastLib.safeCastTo224(x); - } - - function testFailSafeCastTo192(uint256 x) public { - x = bound(x, type(uint192).max + 1, type(uint256).max); - - SafeCastLib.safeCastTo192(x); - } - - function testFailSafeCastTo160(uint256 x) public { - x = bound(x, type(uint160).max + 1, type(uint256).max); - - SafeCastLib.safeCastTo160(x); - } - - function testFailSafeCastTo128(uint256 x) public { - x = bound(x, type(uint128).max + 1, type(uint256).max); - - SafeCastLib.safeCastTo128(x); - } - - function testFailSafeCastTo96(uint256 x) public { - x = bound(x, type(uint96).max + 1, type(uint256).max); - - SafeCastLib.safeCastTo96(x); - } - - function testFailSafeCastTo64(uint256 x) public { - x = bound(x, type(uint64).max + 1, type(uint256).max); - - SafeCastLib.safeCastTo64(x); - } - - function testFailSafeCastTo32(uint256 x) public { - x = bound(x, type(uint32).max + 1, type(uint256).max); - - SafeCastLib.safeCastTo32(x); - } - - function testFailSafeCastTo8(uint256 x) public { - x = bound(x, type(uint8).max + 1, type(uint256).max); - - SafeCastLib.safeCastTo8(x); - } -} diff --git a/lib/solmate/src/test/SafeTransferLib.t.sol b/lib/solmate/src/test/SafeTransferLib.t.sol deleted file mode 100644 index ebae33a..0000000 --- a/lib/solmate/src/test/SafeTransferLib.t.sol +++ /dev/null @@ -1,610 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity 0.8.10; - -import {MockERC20} from "./utils/mocks/MockERC20.sol"; -import {RevertingToken} from "./utils/weird-tokens/RevertingToken.sol"; -import {ReturnsTwoToken} from "./utils/weird-tokens/ReturnsTwoToken.sol"; -import {ReturnsFalseToken} from "./utils/weird-tokens/ReturnsFalseToken.sol"; -import {MissingReturnToken} from "./utils/weird-tokens/MissingReturnToken.sol"; -import {ReturnsTooMuchToken} from "./utils/weird-tokens/ReturnsTooMuchToken.sol"; -import {ReturnsGarbageToken} from "./utils/weird-tokens/ReturnsGarbageToken.sol"; -import {ReturnsTooLittleToken} from "./utils/weird-tokens/ReturnsTooLittleToken.sol"; - -import {DSTestPlus} from "./utils/DSTestPlus.sol"; - -import {ERC20} from "../tokens/ERC20.sol"; -import {SafeTransferLib} from "../utils/SafeTransferLib.sol"; - -contract SafeTransferLibTest is DSTestPlus { - RevertingToken reverting; - ReturnsTwoToken returnsTwo; - ReturnsFalseToken returnsFalse; - MissingReturnToken missingReturn; - ReturnsTooMuchToken returnsTooMuch; - ReturnsGarbageToken returnsGarbage; - ReturnsTooLittleToken returnsTooLittle; - - MockERC20 erc20; - - function setUp() public { - reverting = new RevertingToken(); - returnsTwo = new ReturnsTwoToken(); - returnsFalse = new ReturnsFalseToken(); - missingReturn = new MissingReturnToken(); - returnsTooMuch = new ReturnsTooMuchToken(); - returnsGarbage = new ReturnsGarbageToken(); - returnsTooLittle = new ReturnsTooLittleToken(); - - erc20 = new MockERC20("StandardToken", "ST", 18); - erc20.mint(address(this), type(uint256).max); - } - - function testTransferWithMissingReturn() public { - verifySafeTransfer(address(missingReturn), address(0xBEEF), 1e18); - } - - function testTransferWithStandardERC20() public { - verifySafeTransfer(address(erc20), address(0xBEEF), 1e18); - } - - function testTransferWithReturnsTooMuch() public { - verifySafeTransfer(address(returnsTooMuch), address(0xBEEF), 1e18); - } - - function testTransferWithNonContract() public { - SafeTransferLib.safeTransfer(ERC20(address(0xBADBEEF)), address(0xBEEF), 1e18); - } - - function testTransferFromWithMissingReturn() public { - verifySafeTransferFrom(address(missingReturn), address(0xFEED), address(0xBEEF), 1e18); - } - - function testTransferFromWithStandardERC20() public { - verifySafeTransferFrom(address(erc20), address(0xFEED), address(0xBEEF), 1e18); - } - - function testTransferFromWithReturnsTooMuch() public { - verifySafeTransferFrom(address(returnsTooMuch), address(0xFEED), address(0xBEEF), 1e18); - } - - function testTransferFromWithNonContract() public { - SafeTransferLib.safeTransferFrom(ERC20(address(0xBADBEEF)), address(0xFEED), address(0xBEEF), 1e18); - } - - function testApproveWithMissingReturn() public { - verifySafeApprove(address(missingReturn), address(0xBEEF), 1e18); - } - - function testApproveWithStandardERC20() public { - verifySafeApprove(address(erc20), address(0xBEEF), 1e18); - } - - function testApproveWithReturnsTooMuch() public { - verifySafeApprove(address(returnsTooMuch), address(0xBEEF), 1e18); - } - - function testApproveWithNonContract() public { - SafeTransferLib.safeApprove(ERC20(address(0xBADBEEF)), address(0xBEEF), 1e18); - } - - function testTransferETH() public { - SafeTransferLib.safeTransferETH(address(0xBEEF), 1e18); - } - - function testFailTransferWithReturnsFalse() public { - verifySafeTransfer(address(returnsFalse), address(0xBEEF), 1e18); - } - - function testFailTransferWithReverting() public { - verifySafeTransfer(address(reverting), address(0xBEEF), 1e18); - } - - function testFailTransferWithReturnsTooLittle() public { - verifySafeTransfer(address(returnsTooLittle), address(0xBEEF), 1e18); - } - - function testFailTransferFromWithReturnsFalse() public { - verifySafeTransferFrom(address(returnsFalse), address(0xFEED), address(0xBEEF), 1e18); - } - - function testFailTransferFromWithReverting() public { - verifySafeTransferFrom(address(reverting), address(0xFEED), address(0xBEEF), 1e18); - } - - function testFailTransferFromWithReturnsTooLittle() public { - verifySafeTransferFrom(address(returnsTooLittle), address(0xFEED), address(0xBEEF), 1e18); - } - - function testFailApproveWithReturnsFalse() public { - verifySafeApprove(address(returnsFalse), address(0xBEEF), 1e18); - } - - function testFailApproveWithReverting() public { - verifySafeApprove(address(reverting), address(0xBEEF), 1e18); - } - - function testFailApproveWithReturnsTooLittle() public { - verifySafeApprove(address(returnsTooLittle), address(0xBEEF), 1e18); - } - - function testTransferWithMissingReturn( - address to, - uint256 amount, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - verifySafeTransfer(address(missingReturn), to, amount); - } - - function testTransferWithStandardERC20( - address to, - uint256 amount, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - verifySafeTransfer(address(erc20), to, amount); - } - - function testTransferWithReturnsTooMuch( - address to, - uint256 amount, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - verifySafeTransfer(address(returnsTooMuch), to, amount); - } - - function testTransferWithGarbage( - address to, - uint256 amount, - bytes memory garbage, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - if ( - (garbage.length < 32 || - (garbage[0] != 0 || - garbage[1] != 0 || - garbage[2] != 0 || - garbage[3] != 0 || - garbage[4] != 0 || - garbage[5] != 0 || - garbage[6] != 0 || - garbage[7] != 0 || - garbage[8] != 0 || - garbage[9] != 0 || - garbage[10] != 0 || - garbage[11] != 0 || - garbage[12] != 0 || - garbage[13] != 0 || - garbage[14] != 0 || - garbage[15] != 0 || - garbage[16] != 0 || - garbage[17] != 0 || - garbage[18] != 0 || - garbage[19] != 0 || - garbage[20] != 0 || - garbage[21] != 0 || - garbage[22] != 0 || - garbage[23] != 0 || - garbage[24] != 0 || - garbage[25] != 0 || - garbage[26] != 0 || - garbage[27] != 0 || - garbage[28] != 0 || - garbage[29] != 0 || - garbage[30] != 0 || - garbage[31] != bytes1(0x01))) && garbage.length != 0 - ) return; - - returnsGarbage.setGarbage(garbage); - - verifySafeTransfer(address(returnsGarbage), to, amount); - } - - function testTransferWithNonContract( - address nonContract, - address to, - uint256 amount, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - if (uint256(uint160(nonContract)) <= 18 || nonContract.code.length > 0) return; - - SafeTransferLib.safeTransfer(ERC20(nonContract), to, amount); - } - - function testFailTransferETHToContractWithoutFallback() public { - SafeTransferLib.safeTransferETH(address(this), 1e18); - } - - function testTransferFromWithMissingReturn( - address from, - address to, - uint256 amount, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - verifySafeTransferFrom(address(missingReturn), from, to, amount); - } - - function testTransferFromWithStandardERC20( - address from, - address to, - uint256 amount, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - verifySafeTransferFrom(address(erc20), from, to, amount); - } - - function testTransferFromWithReturnsTooMuch( - address from, - address to, - uint256 amount, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - verifySafeTransferFrom(address(returnsTooMuch), from, to, amount); - } - - function testTransferFromWithGarbage( - address from, - address to, - uint256 amount, - bytes memory garbage, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - if ( - (garbage.length < 32 || - (garbage[0] != 0 || - garbage[1] != 0 || - garbage[2] != 0 || - garbage[3] != 0 || - garbage[4] != 0 || - garbage[5] != 0 || - garbage[6] != 0 || - garbage[7] != 0 || - garbage[8] != 0 || - garbage[9] != 0 || - garbage[10] != 0 || - garbage[11] != 0 || - garbage[12] != 0 || - garbage[13] != 0 || - garbage[14] != 0 || - garbage[15] != 0 || - garbage[16] != 0 || - garbage[17] != 0 || - garbage[18] != 0 || - garbage[19] != 0 || - garbage[20] != 0 || - garbage[21] != 0 || - garbage[22] != 0 || - garbage[23] != 0 || - garbage[24] != 0 || - garbage[25] != 0 || - garbage[26] != 0 || - garbage[27] != 0 || - garbage[28] != 0 || - garbage[29] != 0 || - garbage[30] != 0 || - garbage[31] != bytes1(0x01))) && garbage.length != 0 - ) return; - - returnsGarbage.setGarbage(garbage); - - verifySafeTransferFrom(address(returnsGarbage), from, to, amount); - } - - function testTransferFromWithNonContract( - address nonContract, - address from, - address to, - uint256 amount, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - if (uint256(uint160(nonContract)) <= 18 || nonContract.code.length > 0) return; - - SafeTransferLib.safeTransferFrom(ERC20(nonContract), from, to, amount); - } - - function testApproveWithMissingReturn( - address to, - uint256 amount, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - verifySafeApprove(address(missingReturn), to, amount); - } - - function testApproveWithStandardERC20( - address to, - uint256 amount, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - verifySafeApprove(address(erc20), to, amount); - } - - function testApproveWithReturnsTooMuch( - address to, - uint256 amount, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - verifySafeApprove(address(returnsTooMuch), to, amount); - } - - function testApproveWithGarbage( - address to, - uint256 amount, - bytes memory garbage, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - if ( - (garbage.length < 32 || - (garbage[0] != 0 || - garbage[1] != 0 || - garbage[2] != 0 || - garbage[3] != 0 || - garbage[4] != 0 || - garbage[5] != 0 || - garbage[6] != 0 || - garbage[7] != 0 || - garbage[8] != 0 || - garbage[9] != 0 || - garbage[10] != 0 || - garbage[11] != 0 || - garbage[12] != 0 || - garbage[13] != 0 || - garbage[14] != 0 || - garbage[15] != 0 || - garbage[16] != 0 || - garbage[17] != 0 || - garbage[18] != 0 || - garbage[19] != 0 || - garbage[20] != 0 || - garbage[21] != 0 || - garbage[22] != 0 || - garbage[23] != 0 || - garbage[24] != 0 || - garbage[25] != 0 || - garbage[26] != 0 || - garbage[27] != 0 || - garbage[28] != 0 || - garbage[29] != 0 || - garbage[30] != 0 || - garbage[31] != bytes1(0x01))) && garbage.length != 0 - ) return; - - returnsGarbage.setGarbage(garbage); - - verifySafeApprove(address(returnsGarbage), to, amount); - } - - function testApproveWithNonContract( - address nonContract, - address to, - uint256 amount, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - if (uint256(uint160(nonContract)) <= 18 || nonContract.code.length > 0) return; - - SafeTransferLib.safeApprove(ERC20(nonContract), to, amount); - } - - function testTransferETH( - address recipient, - uint256 amount, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - // Transferring to msg.sender can fail because it's possible to overflow their ETH balance as it begins non-zero. - if (recipient.code.length > 0 || uint256(uint160(recipient)) <= 18 || recipient == msg.sender) return; - - amount = bound(amount, 0, address(this).balance); - - SafeTransferLib.safeTransferETH(recipient, amount); - } - - function testFailTransferWithReturnsFalse( - address to, - uint256 amount, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - verifySafeTransfer(address(returnsFalse), to, amount); - } - - function testFailTransferWithReverting( - address to, - uint256 amount, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - verifySafeTransfer(address(reverting), to, amount); - } - - function testFailTransferWithReturnsTooLittle( - address to, - uint256 amount, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - verifySafeTransfer(address(returnsTooLittle), to, amount); - } - - function testFailTransferWithReturnsTwo( - address to, - uint256 amount, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - verifySafeTransfer(address(returnsTwo), to, amount); - } - - function testFailTransferWithGarbage( - address to, - uint256 amount, - bytes memory garbage, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - require(garbage.length != 0 && (garbage.length < 32 || garbage[31] != bytes1(0x01))); - - returnsGarbage.setGarbage(garbage); - - verifySafeTransfer(address(returnsGarbage), to, amount); - } - - function testFailTransferFromWithReturnsFalse( - address from, - address to, - uint256 amount, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - verifySafeTransferFrom(address(returnsFalse), from, to, amount); - } - - function testFailTransferFromWithReverting( - address from, - address to, - uint256 amount, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - verifySafeTransferFrom(address(reverting), from, to, amount); - } - - function testFailTransferFromWithReturnsTooLittle( - address from, - address to, - uint256 amount, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - verifySafeTransferFrom(address(returnsTooLittle), from, to, amount); - } - - function testFailTransferFromWithReturnsTwo( - address from, - address to, - uint256 amount, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - verifySafeTransferFrom(address(returnsTwo), from, to, amount); - } - - function testFailTransferFromWithGarbage( - address from, - address to, - uint256 amount, - bytes memory garbage, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - require(garbage.length != 0 && (garbage.length < 32 || garbage[31] != bytes1(0x01))); - - returnsGarbage.setGarbage(garbage); - - verifySafeTransferFrom(address(returnsGarbage), from, to, amount); - } - - function testFailApproveWithReturnsFalse( - address to, - uint256 amount, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - verifySafeApprove(address(returnsFalse), to, amount); - } - - function testFailApproveWithReverting( - address to, - uint256 amount, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - verifySafeApprove(address(reverting), to, amount); - } - - function testFailApproveWithReturnsTooLittle( - address to, - uint256 amount, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - verifySafeApprove(address(returnsTooLittle), to, amount); - } - - function testFailApproveWithReturnsTwo( - address to, - uint256 amount, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - verifySafeApprove(address(returnsTwo), to, amount); - } - - function testFailApproveWithGarbage( - address to, - uint256 amount, - bytes memory garbage, - bytes calldata brutalizeWith - ) public brutalizeMemory(brutalizeWith) { - require(garbage.length != 0 && (garbage.length < 32 || garbage[31] != bytes1(0x01))); - - returnsGarbage.setGarbage(garbage); - - verifySafeApprove(address(returnsGarbage), to, amount); - } - - function testFailTransferETHToContractWithoutFallback(uint256 amount, bytes calldata brutalizeWith) - public - brutalizeMemory(brutalizeWith) - { - SafeTransferLib.safeTransferETH(address(this), amount); - } - - function verifySafeTransfer( - address token, - address to, - uint256 amount - ) internal { - uint256 preBal = ERC20(token).balanceOf(to); - SafeTransferLib.safeTransfer(ERC20(address(token)), to, amount); - uint256 postBal = ERC20(token).balanceOf(to); - - if (to == address(this)) { - assertEq(preBal, postBal); - } else { - assertEq(postBal - preBal, amount); - } - } - - function verifySafeTransferFrom( - address token, - address from, - address to, - uint256 amount - ) internal { - forceApprove(token, from, address(this), amount); - - // We cast to MissingReturnToken here because it won't check - // that there was return data, which accommodates all tokens. - MissingReturnToken(token).transfer(from, amount); - - uint256 preBal = ERC20(token).balanceOf(to); - SafeTransferLib.safeTransferFrom(ERC20(token), from, to, amount); - uint256 postBal = ERC20(token).balanceOf(to); - - if (from == to) { - assertEq(preBal, postBal); - } else { - assertEq(postBal - preBal, amount); - } - } - - function verifySafeApprove( - address token, - address to, - uint256 amount - ) internal { - SafeTransferLib.safeApprove(ERC20(address(token)), to, amount); - - assertEq(ERC20(token).allowance(address(this), to), amount); - } - - function forceApprove( - address token, - address from, - address to, - uint256 amount - ) internal { - uint256 slot = token == address(erc20) ? 4 : 2; // Standard ERC20 name and symbol aren't constant. - - hevm.store( - token, - keccak256(abi.encode(to, keccak256(abi.encode(from, uint256(slot))))), - bytes32(uint256(amount)) - ); - - assertEq(ERC20(token).allowance(from, to), amount, "wrong allowance"); - } -} diff --git a/lib/solmate/src/test/WETH.t.sol b/lib/solmate/src/test/WETH.t.sol deleted file mode 100644 index f2d8b9e..0000000 --- a/lib/solmate/src/test/WETH.t.sol +++ /dev/null @@ -1,146 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity 0.8.10; - -import {DSTestPlus} from "./utils/DSTestPlus.sol"; -import {DSInvariantTest} from "./utils/DSInvariantTest.sol"; - -import {SafeTransferLib} from "../utils/SafeTransferLib.sol"; - -import {WETH} from "../tokens/WETH.sol"; - -contract WETHTest is DSTestPlus { - WETH weth; - - function setUp() public { - weth = new WETH(); - } - - function testDeposit() public { - assertEq(weth.balanceOf(address(this)), 0); - assertEq(weth.totalSupply(), 0); - - SafeTransferLib.safeTransferETH(address(weth), 1 ether); - - assertEq(weth.balanceOf(address(this)), 1 ether); - assertEq(weth.totalSupply(), 1 ether); - } - - function testFallbackDeposit() public { - assertEq(weth.balanceOf(address(this)), 0); - assertEq(weth.totalSupply(), 0); - - weth.deposit{value: 1 ether}(); - - assertEq(weth.balanceOf(address(this)), 1 ether); - assertEq(weth.totalSupply(), 1 ether); - } - - function testWithdraw() public { - uint256 startingBalance = address(this).balance; - - weth.deposit{value: 1 ether}(); - - weth.withdraw(1 ether); - - uint256 balanceAfterWithdraw = address(this).balance; - - assertEq(balanceAfterWithdraw, startingBalance); - assertEq(weth.balanceOf(address(this)), 0); - assertEq(weth.totalSupply(), 0); - } - - function testPartialWithdraw() public { - weth.deposit{value: 1 ether}(); - - uint256 balanceBeforeWithdraw = address(this).balance; - - weth.withdraw(0.5 ether); - - uint256 balanceAfterWithdraw = address(this).balance; - - assertEq(balanceAfterWithdraw, balanceBeforeWithdraw + 0.5 ether); - assertEq(weth.balanceOf(address(this)), 0.5 ether); - assertEq(weth.totalSupply(), 0.5 ether); - } - - function testDeposit(uint256 amount) public { - amount = bound(amount, 0, address(this).balance); - - assertEq(weth.balanceOf(address(this)), 0); - assertEq(weth.totalSupply(), 0); - - SafeTransferLib.safeTransferETH(address(weth), amount); - - assertEq(weth.balanceOf(address(this)), amount); - assertEq(weth.totalSupply(), amount); - } - - function testFallbackDeposit(uint256 amount) public { - amount = bound(amount, 0, address(this).balance); - - assertEq(weth.balanceOf(address(this)), 0); - assertEq(weth.totalSupply(), 0); - - weth.deposit{value: amount}(); - - assertEq(weth.balanceOf(address(this)), amount); - assertEq(weth.totalSupply(), amount); - } - - function testWithdraw(uint256 depositAmount, uint256 withdrawAmount) public { - depositAmount = bound(depositAmount, 0, address(this).balance); - withdrawAmount = bound(withdrawAmount, 0, depositAmount); - - weth.deposit{value: depositAmount}(); - - uint256 balanceBeforeWithdraw = address(this).balance; - - weth.withdraw(withdrawAmount); - - uint256 balanceAfterWithdraw = address(this).balance; - - assertEq(balanceAfterWithdraw, balanceBeforeWithdraw + withdrawAmount); - assertEq(weth.balanceOf(address(this)), depositAmount - withdrawAmount); - assertEq(weth.totalSupply(), depositAmount - withdrawAmount); - } - - receive() external payable {} -} - -contract WETHInvariants is DSTestPlus, DSInvariantTest { - WETHTester wethTester; - WETH weth; - - function setUp() public { - weth = new WETH(); - wethTester = new WETHTester{value: address(this).balance}(weth); - - addTargetContract(address(wethTester)); - } - - function invariantTotalSupplyEqualsBalance() public { - assertEq(address(weth).balance, weth.totalSupply()); - } -} - -contract WETHTester { - WETH weth; - - constructor(WETH _weth) payable { - weth = _weth; - } - - function deposit(uint256 amount) public { - weth.deposit{value: amount}(); - } - - function fallbackDeposit(uint256 amount) public { - SafeTransferLib.safeTransferETH(address(weth), amount); - } - - function withdraw(uint256 amount) public { - weth.withdraw(amount); - } - - receive() external payable {} -} diff --git a/lib/solmate/src/test/utils/DSInvariantTest.sol b/lib/solmate/src/test/utils/DSInvariantTest.sol deleted file mode 100644 index 820775c..0000000 --- a/lib/solmate/src/test/utils/DSInvariantTest.sol +++ /dev/null @@ -1,16 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -contract DSInvariantTest { - address[] private targets; - - function targetContracts() public view virtual returns (address[] memory) { - require(targets.length > 0, "NO_TARGET_CONTRACTS"); - - return targets; - } - - function addTargetContract(address newTargetContract) internal virtual { - targets.push(newTargetContract); - } -} diff --git a/lib/solmate/src/test/utils/DSTestPlus.sol b/lib/solmate/src/test/utils/DSTestPlus.sol deleted file mode 100644 index bb1772d..0000000 --- a/lib/solmate/src/test/utils/DSTestPlus.sol +++ /dev/null @@ -1,179 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -import {DSTest} from "ds-test/test.sol"; - -import {Hevm} from "./Hevm.sol"; - -/// @notice Extended testing framework for DappTools projects. -/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/test/utils/DSTestPlus.sol) -contract DSTestPlus is DSTest { - Hevm internal constant hevm = Hevm(HEVM_ADDRESS); - - address internal constant DEAD_ADDRESS = 0xDeaDbeefdEAdbeefdEadbEEFdeadbeEFdEaDbeeF; - - string private checkpointLabel; - uint256 private checkpointGasLeft = 1; // Start the slot warm. - - modifier brutalizeMemory(bytes memory brutalizeWith) { - /// @solidity memory-safe-assembly - assembly { - // Fill the 64 bytes of scratch space with the data. - pop( - staticcall( - gas(), // Pass along all the gas in the call. - 0x04, // Call the identity precompile address. - brutalizeWith, // Offset is the bytes' pointer. - 64, // Copy enough to only fill the scratch space. - 0, // Store the return value in the scratch space. - 64 // Scratch space is only 64 bytes in size, we don't want to write further. - ) - ) - - let size := add(mload(brutalizeWith), 32) // Add 32 to include the 32 byte length slot. - - // Fill the free memory pointer's destination with the data. - pop( - staticcall( - gas(), // Pass along all the gas in the call. - 0x04, // Call the identity precompile address. - brutalizeWith, // Offset is the bytes' pointer. - size, // We want to pass the length of the bytes. - mload(0x40), // Store the return value at the free memory pointer. - size // Since the precompile just returns its input, we reuse size. - ) - ) - } - - _; - } - - function startMeasuringGas(string memory label) internal virtual { - checkpointLabel = label; - - checkpointGasLeft = gasleft(); - } - - function stopMeasuringGas() internal virtual { - uint256 checkpointGasLeft2 = gasleft(); - - // Subtract 100 to account for the warm SLOAD in startMeasuringGas. - uint256 gasDelta = checkpointGasLeft - checkpointGasLeft2 - 100; - - emit log_named_uint(string(abi.encodePacked(checkpointLabel, " Gas")), gasDelta); - } - - function fail(string memory err) internal virtual { - emit log_named_string("Error", err); - fail(); - } - - function assertFalse(bool data) internal virtual { - assertTrue(!data); - } - - function assertUint128Eq(uint128 a, uint128 b) internal virtual { - assertEq(uint256(a), uint256(b)); - } - - function assertUint64Eq(uint64 a, uint64 b) internal virtual { - assertEq(uint256(a), uint256(b)); - } - - function assertUint96Eq(uint96 a, uint96 b) internal virtual { - assertEq(uint256(a), uint256(b)); - } - - function assertUint32Eq(uint32 a, uint32 b) internal virtual { - assertEq(uint256(a), uint256(b)); - } - - function assertBoolEq(bool a, bool b) internal virtual { - b ? assertTrue(a) : assertFalse(a); - } - - function assertApproxEq( - uint256 a, - uint256 b, - uint256 maxDelta - ) internal virtual { - uint256 delta = a > b ? a - b : b - a; - - if (delta > maxDelta) { - emit log("Error: a ~= b not satisfied [uint]"); - emit log_named_uint(" Expected", b); - emit log_named_uint(" Actual", a); - emit log_named_uint(" Max Delta", maxDelta); - emit log_named_uint(" Delta", delta); - fail(); - } - } - - function assertRelApproxEq( - uint256 a, - uint256 b, - uint256 maxPercentDelta // An 18 decimal fixed point number, where 1e18 == 100% - ) internal virtual { - if (b == 0) return assertEq(a, b); // If the expected is 0, actual must be too. - - uint256 percentDelta = ((a > b ? a - b : b - a) * 1e18) / b; - - if (percentDelta > maxPercentDelta) { - emit log("Error: a ~= b not satisfied [uint]"); - emit log_named_uint(" Expected", b); - emit log_named_uint(" Actual", a); - emit log_named_decimal_uint(" Max % Delta", maxPercentDelta, 18); - emit log_named_decimal_uint(" % Delta", percentDelta, 18); - fail(); - } - } - - function assertBytesEq(bytes memory a, bytes memory b) internal virtual { - if (keccak256(a) != keccak256(b)) { - emit log("Error: a == b not satisfied [bytes]"); - emit log_named_bytes(" Expected", b); - emit log_named_bytes(" Actual", a); - fail(); - } - } - - function assertUintArrayEq(uint256[] memory a, uint256[] memory b) internal virtual { - require(a.length == b.length, "LENGTH_MISMATCH"); - - for (uint256 i = 0; i < a.length; i++) { - assertEq(a[i], b[i]); - } - } - - function bound( - uint256 x, - uint256 min, - uint256 max - ) internal returns (uint256 result) { - require(max >= min, "MAX_LESS_THAN_MIN"); - - uint256 size = max - min; - - if (size == 0) result = min; - else if (size == type(uint256).max) result = x; - else { - ++size; // Make max inclusive. - uint256 mod = x % size; - result = min + mod; - } - - emit log_named_uint("Bound Result", result); - } - - function min3( - uint256 a, - uint256 b, - uint256 c - ) internal pure returns (uint256) { - return a > b ? (b > c ? c : b) : (a > c ? c : a); - } - - function min2(uint256 a, uint256 b) internal pure returns (uint256) { - return a > b ? b : a; - } -} diff --git a/lib/solmate/src/test/utils/Hevm.sol b/lib/solmate/src/test/utils/Hevm.sol deleted file mode 100644 index 8ca0eff..0000000 --- a/lib/solmate/src/test/utils/Hevm.sol +++ /dev/null @@ -1,107 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -interface Hevm { - /// @notice Sets the block timestamp. - function warp(uint256) external; - - /// @notice Sets the block height. - function roll(uint256) external; - - /// @notice Sets the block base fee. - function fee(uint256) external; - - /// @notice Loads a storage slot from an address. - function load(address, bytes32) external returns (bytes32); - - /// @notice Stores a value to an address' storage slot. - function store( - address, - bytes32, - bytes32 - ) external; - - /// @notice Signs a digest with a private key, returns v r s. - function sign(uint256, bytes32) - external - returns ( - uint8, - bytes32, - bytes32 - ); - - /// @notice Gets address for a given private key. - function addr(uint256) external returns (address); - - /// @notice Performs a foreign function call via a terminal call. - function ffi(string[] calldata) external returns (bytes memory); - - /// @notice Sets the next call's msg.sender to be the input address. - function prank(address) external; - - /// @notice Sets all subsequent calls' msg.sender to be the input address until stopPrank is called. - function startPrank(address) external; - - /// @notice Sets the next call's msg.sender to be the input address and the tx.origin to be the second input. - function prank(address, address) external; - - /// @notice Sets all subsequent calls' msg.sender to be the input address and - /// sets tx.origin to be the second address inputted until stopPrank is called. - function startPrank(address, address) external; - - /// @notice Resets msg.sender to its original value before a prank. - function stopPrank() external; - - /// @notice Sets an address' balance. - function deal(address, uint256) external; - - /// @notice Sets an address' code. - function etch(address, bytes calldata) external; - - /// @notice Expects an error from the next call. - function expectRevert(bytes calldata) external; - - /// @notice Expects a revert from the next call. - function expectRevert(bytes4) external; - - /// @notice Record all storage reads and writes. - function record() external; - - /// @notice Gets all accessed reads and write slots from a recording session, for a given address. - function accesses(address) external returns (bytes32[] memory reads, bytes32[] memory writes); - - /// @notice Prepare an expected log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData). - /// @notice Call this function, then emit an event, then call a function. Internally after the call, we check - /// if logs were emitted in the expected order with the expected topics and data as specified by the booleans. - function expectEmit( - bool, - bool, - bool, - bool - ) external; - - /// @notice Mocks the behavior of a contract call, setting the input and output for a function. - /// @notice Calldata can either be strict or a partial match, e.g. if only passed - /// a selector to the expected calldata, then the entire function will be mocked. - function mockCall( - address, - bytes calldata, - bytes calldata - ) external; - - /// @notice Clears all mocked calls. - function clearMockedCalls() external; - - /// @notice Expect a call to an address with the specified calldata. - /// @notice Calldata can either be strict or a partial match. - function expectCall(address, bytes calldata) external; - - /// @notice Fetches the contract bytecode from its artifact file. - function getCode(string calldata) external returns (bytes memory); - - /// @notice Label an address in test traces. - function label(address addr, string calldata label) external; - - /// @notice When fuzzing, generate new inputs if the input conditional is not met. - function assume(bool) external; -} diff --git a/lib/solmate/src/test/utils/mocks/MockAuthChild.sol b/lib/solmate/src/test/utils/mocks/MockAuthChild.sol deleted file mode 100644 index d2c3276..0000000 --- a/lib/solmate/src/test/utils/mocks/MockAuthChild.sol +++ /dev/null @@ -1,12 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -import {Auth, Authority} from "../../../auth/Auth.sol"; - -contract MockAuthChild is Auth(msg.sender, Authority(address(0))) { - bool public flag; - - function updateFlag() public virtual requiresAuth { - flag = true; - } -} diff --git a/lib/solmate/src/test/utils/mocks/MockAuthority.sol b/lib/solmate/src/test/utils/mocks/MockAuthority.sol deleted file mode 100644 index acb3689..0000000 --- a/lib/solmate/src/test/utils/mocks/MockAuthority.sol +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -import {Authority} from "../../../auth/Auth.sol"; - -contract MockAuthority is Authority { - bool immutable allowCalls; - - constructor(bool _allowCalls) { - allowCalls = _allowCalls; - } - - function canCall( - address, - address, - bytes4 - ) public view override returns (bool) { - return allowCalls; - } -} diff --git a/lib/solmate/src/test/utils/mocks/MockERC1155.sol b/lib/solmate/src/test/utils/mocks/MockERC1155.sol deleted file mode 100644 index ede086d..0000000 --- a/lib/solmate/src/test/utils/mocks/MockERC1155.sol +++ /dev/null @@ -1,42 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -import {ERC1155} from "../../../tokens/ERC1155.sol"; - -contract MockERC1155 is ERC1155 { - function uri(uint256) public pure virtual override returns (string memory) {} - - function mint( - address to, - uint256 id, - uint256 amount, - bytes memory data - ) public virtual { - _mint(to, id, amount, data); - } - - function batchMint( - address to, - uint256[] memory ids, - uint256[] memory amounts, - bytes memory data - ) public virtual { - _batchMint(to, ids, amounts, data); - } - - function burn( - address from, - uint256 id, - uint256 amount - ) public virtual { - _burn(from, id, amount); - } - - function batchBurn( - address from, - uint256[] memory ids, - uint256[] memory amounts - ) public virtual { - _batchBurn(from, ids, amounts); - } -} diff --git a/lib/solmate/src/test/utils/mocks/MockERC20.sol b/lib/solmate/src/test/utils/mocks/MockERC20.sol deleted file mode 100644 index fbbaef5..0000000 --- a/lib/solmate/src/test/utils/mocks/MockERC20.sol +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -import {ERC20} from "../../../tokens/ERC20.sol"; - -contract MockERC20 is ERC20 { - constructor( - string memory _name, - string memory _symbol, - uint8 _decimals - ) ERC20(_name, _symbol, _decimals) {} - - function mint(address to, uint256 value) public virtual { - _mint(to, value); - } - - function burn(address from, uint256 value) public virtual { - _burn(from, value); - } -} diff --git a/lib/solmate/src/test/utils/mocks/MockERC4626.sol b/lib/solmate/src/test/utils/mocks/MockERC4626.sol deleted file mode 100644 index edc7d5f..0000000 --- a/lib/solmate/src/test/utils/mocks/MockERC4626.sol +++ /dev/null @@ -1,28 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -import {ERC20} from "../../../tokens/ERC20.sol"; -import {ERC4626} from "../../../mixins/ERC4626.sol"; - -contract MockERC4626 is ERC4626 { - uint256 public beforeWithdrawHookCalledCounter = 0; - uint256 public afterDepositHookCalledCounter = 0; - - constructor( - ERC20 _underlying, - string memory _name, - string memory _symbol - ) ERC4626(_underlying, _name, _symbol) {} - - function totalAssets() public view override returns (uint256) { - return asset.balanceOf(address(this)); - } - - function beforeWithdraw(uint256, uint256) internal override { - beforeWithdrawHookCalledCounter++; - } - - function afterDeposit(uint256, uint256) internal override { - afterDepositHookCalledCounter++; - } -} diff --git a/lib/solmate/src/test/utils/mocks/MockERC721.sol b/lib/solmate/src/test/utils/mocks/MockERC721.sol deleted file mode 100644 index 51227c0..0000000 --- a/lib/solmate/src/test/utils/mocks/MockERC721.sol +++ /dev/null @@ -1,30 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -import {ERC721} from "../../../tokens/ERC721.sol"; - -contract MockERC721 is ERC721 { - constructor(string memory _name, string memory _symbol) ERC721(_name, _symbol) {} - - function tokenURI(uint256) public pure virtual override returns (string memory) {} - - function mint(address to, uint256 tokenId) public virtual { - _mint(to, tokenId); - } - - function burn(uint256 tokenId) public virtual { - _burn(tokenId); - } - - function safeMint(address to, uint256 tokenId) public virtual { - _safeMint(to, tokenId); - } - - function safeMint( - address to, - uint256 tokenId, - bytes memory data - ) public virtual { - _safeMint(to, tokenId, data); - } -} diff --git a/lib/solmate/src/test/utils/mocks/MockOwned.sol b/lib/solmate/src/test/utils/mocks/MockOwned.sol deleted file mode 100644 index 52ef918..0000000 --- a/lib/solmate/src/test/utils/mocks/MockOwned.sol +++ /dev/null @@ -1,12 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -import {Owned} from "../../../auth/Owned.sol"; - -contract MockOwned is Owned(msg.sender) { - bool public flag; - - function updateFlag() public virtual onlyOwner { - flag = true; - } -} diff --git a/lib/solmate/src/test/utils/weird-tokens/MissingReturnToken.sol b/lib/solmate/src/test/utils/weird-tokens/MissingReturnToken.sol deleted file mode 100644 index 23f4633..0000000 --- a/lib/solmate/src/test/utils/weird-tokens/MissingReturnToken.sol +++ /dev/null @@ -1,83 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -contract MissingReturnToken { - /*/////////////////////////////////////////////////////////////// - EVENTS - //////////////////////////////////////////////////////////////*/ - - event Transfer(address indexed from, address indexed to, uint256 amount); - - event Approval(address indexed owner, address indexed spender, uint256 amount); - - /*/////////////////////////////////////////////////////////////// - METADATA STORAGE - //////////////////////////////////////////////////////////////*/ - - string public constant name = "MissingReturnToken"; - - string public constant symbol = "MRT"; - - uint8 public constant decimals = 18; - - /*/////////////////////////////////////////////////////////////// - ERC20 STORAGE - //////////////////////////////////////////////////////////////*/ - - uint256 public totalSupply; - - mapping(address => uint256) public balanceOf; - - mapping(address => mapping(address => uint256)) public allowance; - - /*/////////////////////////////////////////////////////////////// - CONSTRUCTOR - //////////////////////////////////////////////////////////////*/ - - constructor() { - totalSupply = type(uint256).max; - balanceOf[msg.sender] = type(uint256).max; - } - - /*/////////////////////////////////////////////////////////////// - ERC20 LOGIC - //////////////////////////////////////////////////////////////*/ - - function approve(address spender, uint256 amount) public virtual { - allowance[msg.sender][spender] = amount; - - emit Approval(msg.sender, spender, amount); - } - - function transfer(address to, uint256 amount) public virtual { - balanceOf[msg.sender] -= amount; - - // Cannot overflow because the sum of all user - // balances can't exceed the max uint256 value. - unchecked { - balanceOf[to] += amount; - } - - emit Transfer(msg.sender, to, amount); - } - - function transferFrom( - address from, - address to, - uint256 amount - ) public virtual { - uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals. - - if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount; - - balanceOf[from] -= amount; - - // Cannot overflow because the sum of all user - // balances can't exceed the max uint256 value. - unchecked { - balanceOf[to] += amount; - } - - emit Transfer(from, to, amount); - } -} diff --git a/lib/solmate/src/test/utils/weird-tokens/ReturnsFalseToken.sol b/lib/solmate/src/test/utils/weird-tokens/ReturnsFalseToken.sol deleted file mode 100644 index 8139efe..0000000 --- a/lib/solmate/src/test/utils/weird-tokens/ReturnsFalseToken.sol +++ /dev/null @@ -1,61 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -contract ReturnsFalseToken { - /*/////////////////////////////////////////////////////////////// - EVENTS - //////////////////////////////////////////////////////////////*/ - - event Transfer(address indexed from, address indexed to, uint256 amount); - - event Approval(address indexed owner, address indexed spender, uint256 amount); - - /*/////////////////////////////////////////////////////////////// - METADATA STORAGE - //////////////////////////////////////////////////////////////*/ - - string public constant name = "ReturnsFalseToken"; - - string public constant symbol = "RFT"; - - uint8 public constant decimals = 18; - - /*/////////////////////////////////////////////////////////////// - ERC20 STORAGE - //////////////////////////////////////////////////////////////*/ - - uint256 public totalSupply; - - mapping(address => uint256) public balanceOf; - - mapping(address => mapping(address => uint256)) public allowance; - - /*/////////////////////////////////////////////////////////////// - CONSTRUCTOR - //////////////////////////////////////////////////////////////*/ - - constructor() { - totalSupply = type(uint256).max; - balanceOf[msg.sender] = type(uint256).max; - } - - /*/////////////////////////////////////////////////////////////// - ERC20 LOGIC - //////////////////////////////////////////////////////////////*/ - - function approve(address, uint256) public virtual returns (bool) { - return false; - } - - function transfer(address, uint256) public virtual returns (bool) { - return false; - } - - function transferFrom( - address, - address, - uint256 - ) public virtual returns (bool) { - return false; - } -} diff --git a/lib/solmate/src/test/utils/weird-tokens/ReturnsGarbageToken.sol b/lib/solmate/src/test/utils/weird-tokens/ReturnsGarbageToken.sol deleted file mode 100644 index 77c9575..0000000 --- a/lib/solmate/src/test/utils/weird-tokens/ReturnsGarbageToken.sol +++ /dev/null @@ -1,115 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -contract ReturnsGarbageToken { - /*/////////////////////////////////////////////////////////////// - EVENTS - //////////////////////////////////////////////////////////////*/ - - event Transfer(address indexed from, address indexed to, uint256 amount); - - event Approval(address indexed owner, address indexed spender, uint256 amount); - - /*/////////////////////////////////////////////////////////////// - METADATA STORAGE - //////////////////////////////////////////////////////////////*/ - - string public constant name = "ReturnsGarbageToken"; - - string public constant symbol = "RGT"; - - uint8 public constant decimals = 18; - - /*/////////////////////////////////////////////////////////////// - ERC20 STORAGE - //////////////////////////////////////////////////////////////*/ - - uint256 public totalSupply; - - mapping(address => uint256) public balanceOf; - - mapping(address => mapping(address => uint256)) public allowance; - - /*/////////////////////////////////////////////////////////////// - MOCK STORAGE - //////////////////////////////////////////////////////////////*/ - - bytes garbage; - - /*/////////////////////////////////////////////////////////////// - CONSTRUCTOR - //////////////////////////////////////////////////////////////*/ - - constructor() { - totalSupply = type(uint256).max; - balanceOf[msg.sender] = type(uint256).max; - } - - /*/////////////////////////////////////////////////////////////// - ERC20 LOGIC - //////////////////////////////////////////////////////////////*/ - - function approve(address spender, uint256 amount) public virtual { - allowance[msg.sender][spender] = amount; - - emit Approval(msg.sender, spender, amount); - - bytes memory _garbage = garbage; - - assembly { - return(add(_garbage, 32), mload(_garbage)) - } - } - - function transfer(address to, uint256 amount) public virtual { - balanceOf[msg.sender] -= amount; - - // Cannot overflow because the sum of all user - // balances can't exceed the max uint256 value. - unchecked { - balanceOf[to] += amount; - } - - emit Transfer(msg.sender, to, amount); - - bytes memory _garbage = garbage; - - assembly { - return(add(_garbage, 32), mload(_garbage)) - } - } - - function transferFrom( - address from, - address to, - uint256 amount - ) public virtual { - uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals. - - if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount; - - balanceOf[from] -= amount; - - // Cannot overflow because the sum of all user - // balances can't exceed the max uint256 value. - unchecked { - balanceOf[to] += amount; - } - - emit Transfer(from, to, amount); - - bytes memory _garbage = garbage; - - assembly { - return(add(_garbage, 32), mload(_garbage)) - } - } - - /*/////////////////////////////////////////////////////////////// - MOCK LOGIC - //////////////////////////////////////////////////////////////*/ - - function setGarbage(bytes memory _garbage) public virtual { - garbage = _garbage; - } -} diff --git a/lib/solmate/src/test/utils/weird-tokens/ReturnsTooLittleToken.sol b/lib/solmate/src/test/utils/weird-tokens/ReturnsTooLittleToken.sol deleted file mode 100644 index 69947c3..0000000 --- a/lib/solmate/src/test/utils/weird-tokens/ReturnsTooLittleToken.sol +++ /dev/null @@ -1,70 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -contract ReturnsTooLittleToken { - /*/////////////////////////////////////////////////////////////// - EVENTS - //////////////////////////////////////////////////////////////*/ - - event Transfer(address indexed from, address indexed to, uint256 amount); - - event Approval(address indexed owner, address indexed spender, uint256 amount); - - /*/////////////////////////////////////////////////////////////// - METADATA STORAGE - //////////////////////////////////////////////////////////////*/ - - string public constant name = "ReturnsTooLittleToken"; - - string public constant symbol = "RTLT"; - - uint8 public constant decimals = 18; - - /*/////////////////////////////////////////////////////////////// - ERC20 STORAGE - //////////////////////////////////////////////////////////////*/ - - uint256 public totalSupply; - - mapping(address => uint256) public balanceOf; - - mapping(address => mapping(address => uint256)) public allowance; - - /*/////////////////////////////////////////////////////////////// - CONSTRUCTOR - //////////////////////////////////////////////////////////////*/ - - constructor() { - totalSupply = type(uint256).max; - balanceOf[msg.sender] = type(uint256).max; - } - - /*/////////////////////////////////////////////////////////////// - ERC20 LOGIC - //////////////////////////////////////////////////////////////*/ - - function approve(address, uint256) public virtual { - assembly { - mstore(0, 0x0100000000000000000000000000000000000000000000000000000000000000) - return(0, 8) - } - } - - function transfer(address, uint256) public virtual { - assembly { - mstore(0, 0x0100000000000000000000000000000000000000000000000000000000000000) - return(0, 8) - } - } - - function transferFrom( - address, - address, - uint256 - ) public virtual { - assembly { - mstore(0, 0x0100000000000000000000000000000000000000000000000000000000000000) - return(0, 8) - } - } -} diff --git a/lib/solmate/src/test/utils/weird-tokens/ReturnsTooMuchToken.sol b/lib/solmate/src/test/utils/weird-tokens/ReturnsTooMuchToken.sol deleted file mode 100644 index 8774cbb..0000000 --- a/lib/solmate/src/test/utils/weird-tokens/ReturnsTooMuchToken.sol +++ /dev/null @@ -1,98 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -contract ReturnsTooMuchToken { - /*/////////////////////////////////////////////////////////////// - EVENTS - //////////////////////////////////////////////////////////////*/ - - event Transfer(address indexed from, address indexed to, uint256 amount); - - event Approval(address indexed owner, address indexed spender, uint256 amount); - - /*/////////////////////////////////////////////////////////////// - METADATA STORAGE - //////////////////////////////////////////////////////////////*/ - - string public constant name = "ReturnsTooMuchToken"; - - string public constant symbol = "RTMT"; - - uint8 public constant decimals = 18; - - /*/////////////////////////////////////////////////////////////// - ERC20 STORAGE - //////////////////////////////////////////////////////////////*/ - - uint256 public totalSupply; - - mapping(address => uint256) public balanceOf; - - mapping(address => mapping(address => uint256)) public allowance; - - /*/////////////////////////////////////////////////////////////// - CONSTRUCTOR - //////////////////////////////////////////////////////////////*/ - - constructor() { - totalSupply = type(uint256).max; - balanceOf[msg.sender] = type(uint256).max; - } - - /*/////////////////////////////////////////////////////////////// - ERC20 LOGIC - //////////////////////////////////////////////////////////////*/ - - function approve(address spender, uint256 amount) public virtual { - allowance[msg.sender][spender] = amount; - - emit Approval(msg.sender, spender, amount); - - assembly { - mstore(0, 1) - return(0, 4096) - } - } - - function transfer(address to, uint256 amount) public virtual { - balanceOf[msg.sender] -= amount; - - // Cannot overflow because the sum of all user - // balances can't exceed the max uint256 value. - unchecked { - balanceOf[to] += amount; - } - - emit Transfer(msg.sender, to, amount); - - assembly { - mstore(0, 1) - return(0, 4096) - } - } - - function transferFrom( - address from, - address to, - uint256 amount - ) public virtual { - uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals. - - if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount; - - balanceOf[from] -= amount; - - // Cannot overflow because the sum of all user - // balances can't exceed the max uint256 value. - unchecked { - balanceOf[to] += amount; - } - - emit Transfer(from, to, amount); - - assembly { - mstore(0, 1) - return(0, 4096) - } - } -} diff --git a/lib/solmate/src/test/utils/weird-tokens/ReturnsTwoToken.sol b/lib/solmate/src/test/utils/weird-tokens/ReturnsTwoToken.sol deleted file mode 100644 index ac980f8..0000000 --- a/lib/solmate/src/test/utils/weird-tokens/ReturnsTwoToken.sol +++ /dev/null @@ -1,61 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -contract ReturnsTwoToken { - /*/////////////////////////////////////////////////////////////// - EVENTS - //////////////////////////////////////////////////////////////*/ - - event Transfer(address indexed from, address indexed to, uint256 amount); - - event Approval(address indexed owner, address indexed spender, uint256 amount); - - /*/////////////////////////////////////////////////////////////// - METADATA STORAGE - //////////////////////////////////////////////////////////////*/ - - string public constant name = "ReturnsFalseToken"; - - string public constant symbol = "RTT"; - - uint8 public constant decimals = 18; - - /*/////////////////////////////////////////////////////////////// - ERC20 STORAGE - //////////////////////////////////////////////////////////////*/ - - uint256 public totalSupply; - - mapping(address => uint256) public balanceOf; - - mapping(address => mapping(address => uint256)) public allowance; - - /*/////////////////////////////////////////////////////////////// - CONSTRUCTOR - //////////////////////////////////////////////////////////////*/ - - constructor() { - totalSupply = type(uint256).max; - balanceOf[msg.sender] = type(uint256).max; - } - - /*/////////////////////////////////////////////////////////////// - ERC20 LOGIC - //////////////////////////////////////////////////////////////*/ - - function approve(address, uint256) public virtual returns (uint256) { - return 2; - } - - function transfer(address, uint256) public virtual returns (uint256) { - return 2; - } - - function transferFrom( - address, - address, - uint256 - ) public virtual returns (uint256) { - return 2; - } -} diff --git a/lib/solmate/src/test/utils/weird-tokens/RevertingToken.sol b/lib/solmate/src/test/utils/weird-tokens/RevertingToken.sol deleted file mode 100644 index 48ac1fa..0000000 --- a/lib/solmate/src/test/utils/weird-tokens/RevertingToken.sol +++ /dev/null @@ -1,61 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -contract RevertingToken { - /*/////////////////////////////////////////////////////////////// - EVENTS - //////////////////////////////////////////////////////////////*/ - - event Transfer(address indexed from, address indexed to, uint256 amount); - - event Approval(address indexed owner, address indexed spender, uint256 amount); - - /*/////////////////////////////////////////////////////////////// - METADATA STORAGE - //////////////////////////////////////////////////////////////*/ - - string public constant name = "RevertingToken"; - - string public constant symbol = "RT"; - - uint8 public constant decimals = 18; - - /*/////////////////////////////////////////////////////////////// - ERC20 STORAGE - //////////////////////////////////////////////////////////////*/ - - uint256 public totalSupply; - - mapping(address => uint256) public balanceOf; - - mapping(address => mapping(address => uint256)) public allowance; - - /*/////////////////////////////////////////////////////////////// - CONSTRUCTOR - //////////////////////////////////////////////////////////////*/ - - constructor() { - totalSupply = type(uint256).max; - balanceOf[msg.sender] = type(uint256).max; - } - - /*/////////////////////////////////////////////////////////////// - ERC20 LOGIC - //////////////////////////////////////////////////////////////*/ - - function approve(address, uint256) public virtual { - revert(); - } - - function transfer(address, uint256) public virtual { - revert(); - } - - function transferFrom( - address, - address, - uint256 - ) public virtual { - revert(); - } -} diff --git a/lib/solmate/src/tokens/ERC1155.sol b/lib/solmate/src/tokens/ERC1155.sol deleted file mode 100644 index 70c4d2d..0000000 --- a/lib/solmate/src/tokens/ERC1155.sol +++ /dev/null @@ -1,257 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -/// @notice Minimalist and gas efficient standard ERC1155 implementation. -/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC1155.sol) -abstract contract ERC1155 { - /*////////////////////////////////////////////////////////////// - EVENTS - //////////////////////////////////////////////////////////////*/ - - event TransferSingle( - address indexed operator, - address indexed from, - address indexed to, - uint256 id, - uint256 amount - ); - - event TransferBatch( - address indexed operator, - address indexed from, - address indexed to, - uint256[] ids, - uint256[] amounts - ); - - event ApprovalForAll(address indexed owner, address indexed operator, bool approved); - - event URI(string value, uint256 indexed id); - - /*////////////////////////////////////////////////////////////// - ERC1155 STORAGE - //////////////////////////////////////////////////////////////*/ - - mapping(address => mapping(uint256 => uint256)) public balanceOf; - - mapping(address => mapping(address => bool)) public isApprovedForAll; - - /*////////////////////////////////////////////////////////////// - METADATA LOGIC - //////////////////////////////////////////////////////////////*/ - - function uri(uint256 id) public view virtual returns (string memory); - - /*////////////////////////////////////////////////////////////// - ERC1155 LOGIC - //////////////////////////////////////////////////////////////*/ - - function setApprovalForAll(address operator, bool approved) public virtual { - isApprovedForAll[msg.sender][operator] = approved; - - emit ApprovalForAll(msg.sender, operator, approved); - } - - function safeTransferFrom( - address from, - address to, - uint256 id, - uint256 amount, - bytes calldata data - ) public virtual { - require(msg.sender == from || isApprovedForAll[from][msg.sender], "NOT_AUTHORIZED"); - - balanceOf[from][id] -= amount; - balanceOf[to][id] += amount; - - emit TransferSingle(msg.sender, from, to, id, amount); - - require( - to.code.length == 0 - ? to != address(0) - : ERC1155TokenReceiver(to).onERC1155Received(msg.sender, from, id, amount, data) == - ERC1155TokenReceiver.onERC1155Received.selector, - "UNSAFE_RECIPIENT" - ); - } - - function safeBatchTransferFrom( - address from, - address to, - uint256[] calldata ids, - uint256[] calldata amounts, - bytes calldata data - ) public virtual { - require(ids.length == amounts.length, "LENGTH_MISMATCH"); - - require(msg.sender == from || isApprovedForAll[from][msg.sender], "NOT_AUTHORIZED"); - - // Storing these outside the loop saves ~15 gas per iteration. - uint256 id; - uint256 amount; - - for (uint256 i = 0; i < ids.length; ) { - id = ids[i]; - amount = amounts[i]; - - balanceOf[from][id] -= amount; - balanceOf[to][id] += amount; - - // An array can't have a total length - // larger than the max uint256 value. - unchecked { - ++i; - } - } - - emit TransferBatch(msg.sender, from, to, ids, amounts); - - require( - to.code.length == 0 - ? to != address(0) - : ERC1155TokenReceiver(to).onERC1155BatchReceived(msg.sender, from, ids, amounts, data) == - ERC1155TokenReceiver.onERC1155BatchReceived.selector, - "UNSAFE_RECIPIENT" - ); - } - - function balanceOfBatch(address[] calldata owners, uint256[] calldata ids) - public - view - virtual - returns (uint256[] memory balances) - { - require(owners.length == ids.length, "LENGTH_MISMATCH"); - - balances = new uint256[](owners.length); - - // Unchecked because the only math done is incrementing - // the array index counter which cannot possibly overflow. - unchecked { - for (uint256 i = 0; i < owners.length; ++i) { - balances[i] = balanceOf[owners[i]][ids[i]]; - } - } - } - - /*////////////////////////////////////////////////////////////// - ERC165 LOGIC - //////////////////////////////////////////////////////////////*/ - - function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { - return - interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165 - interfaceId == 0xd9b67a26 || // ERC165 Interface ID for ERC1155 - interfaceId == 0x0e89341c; // ERC165 Interface ID for ERC1155MetadataURI - } - - /*////////////////////////////////////////////////////////////// - INTERNAL MINT/BURN LOGIC - //////////////////////////////////////////////////////////////*/ - - function _mint( - address to, - uint256 id, - uint256 amount, - bytes memory data - ) internal virtual { - balanceOf[to][id] += amount; - - emit TransferSingle(msg.sender, address(0), to, id, amount); - - require( - to.code.length == 0 - ? to != address(0) - : ERC1155TokenReceiver(to).onERC1155Received(msg.sender, address(0), id, amount, data) == - ERC1155TokenReceiver.onERC1155Received.selector, - "UNSAFE_RECIPIENT" - ); - } - - function _batchMint( - address to, - uint256[] memory ids, - uint256[] memory amounts, - bytes memory data - ) internal virtual { - uint256 idsLength = ids.length; // Saves MLOADs. - - require(idsLength == amounts.length, "LENGTH_MISMATCH"); - - for (uint256 i = 0; i < idsLength; ) { - balanceOf[to][ids[i]] += amounts[i]; - - // An array can't have a total length - // larger than the max uint256 value. - unchecked { - ++i; - } - } - - emit TransferBatch(msg.sender, address(0), to, ids, amounts); - - require( - to.code.length == 0 - ? to != address(0) - : ERC1155TokenReceiver(to).onERC1155BatchReceived(msg.sender, address(0), ids, amounts, data) == - ERC1155TokenReceiver.onERC1155BatchReceived.selector, - "UNSAFE_RECIPIENT" - ); - } - - function _batchBurn( - address from, - uint256[] memory ids, - uint256[] memory amounts - ) internal virtual { - uint256 idsLength = ids.length; // Saves MLOADs. - - require(idsLength == amounts.length, "LENGTH_MISMATCH"); - - for (uint256 i = 0; i < idsLength; ) { - balanceOf[from][ids[i]] -= amounts[i]; - - // An array can't have a total length - // larger than the max uint256 value. - unchecked { - ++i; - } - } - - emit TransferBatch(msg.sender, from, address(0), ids, amounts); - } - - function _burn( - address from, - uint256 id, - uint256 amount - ) internal virtual { - balanceOf[from][id] -= amount; - - emit TransferSingle(msg.sender, from, address(0), id, amount); - } -} - -/// @notice A generic interface for a contract which properly accepts ERC1155 tokens. -/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC1155.sol) -abstract contract ERC1155TokenReceiver { - function onERC1155Received( - address, - address, - uint256, - uint256, - bytes calldata - ) external virtual returns (bytes4) { - return ERC1155TokenReceiver.onERC1155Received.selector; - } - - function onERC1155BatchReceived( - address, - address, - uint256[] calldata, - uint256[] calldata, - bytes calldata - ) external virtual returns (bytes4) { - return ERC1155TokenReceiver.onERC1155BatchReceived.selector; - } -} diff --git a/lib/solmate/src/tokens/ERC20.sol b/lib/solmate/src/tokens/ERC20.sol deleted file mode 100644 index 110314b..0000000 --- a/lib/solmate/src/tokens/ERC20.sol +++ /dev/null @@ -1,206 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation. -/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC20.sol) -/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol) -/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it. -abstract contract ERC20 { - /*////////////////////////////////////////////////////////////// - EVENTS - //////////////////////////////////////////////////////////////*/ - - event Transfer(address indexed from, address indexed to, uint256 amount); - - event Approval(address indexed owner, address indexed spender, uint256 amount); - - /*////////////////////////////////////////////////////////////// - METADATA STORAGE - //////////////////////////////////////////////////////////////*/ - - string public name; - - string public symbol; - - uint8 public immutable decimals; - - /*////////////////////////////////////////////////////////////// - ERC20 STORAGE - //////////////////////////////////////////////////////////////*/ - - uint256 public totalSupply; - - mapping(address => uint256) public balanceOf; - - mapping(address => mapping(address => uint256)) public allowance; - - /*////////////////////////////////////////////////////////////// - EIP-2612 STORAGE - //////////////////////////////////////////////////////////////*/ - - uint256 internal immutable INITIAL_CHAIN_ID; - - bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR; - - mapping(address => uint256) public nonces; - - /*////////////////////////////////////////////////////////////// - CONSTRUCTOR - //////////////////////////////////////////////////////////////*/ - - constructor( - string memory _name, - string memory _symbol, - uint8 _decimals - ) { - name = _name; - symbol = _symbol; - decimals = _decimals; - - INITIAL_CHAIN_ID = block.chainid; - INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator(); - } - - /*////////////////////////////////////////////////////////////// - ERC20 LOGIC - //////////////////////////////////////////////////////////////*/ - - function approve(address spender, uint256 amount) public virtual returns (bool) { - allowance[msg.sender][spender] = amount; - - emit Approval(msg.sender, spender, amount); - - return true; - } - - function transfer(address to, uint256 amount) public virtual returns (bool) { - balanceOf[msg.sender] -= amount; - - // Cannot overflow because the sum of all user - // balances can't exceed the max uint256 value. - unchecked { - balanceOf[to] += amount; - } - - emit Transfer(msg.sender, to, amount); - - return true; - } - - function transferFrom( - address from, - address to, - uint256 amount - ) public virtual returns (bool) { - uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals. - - if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount; - - balanceOf[from] -= amount; - - // Cannot overflow because the sum of all user - // balances can't exceed the max uint256 value. - unchecked { - balanceOf[to] += amount; - } - - emit Transfer(from, to, amount); - - return true; - } - - /*////////////////////////////////////////////////////////////// - EIP-2612 LOGIC - //////////////////////////////////////////////////////////////*/ - - function permit( - address owner, - address spender, - uint256 value, - uint256 deadline, - uint8 v, - bytes32 r, - bytes32 s - ) public virtual { - require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED"); - - // Unchecked because the only math done is incrementing - // the owner's nonce which cannot realistically overflow. - unchecked { - address recoveredAddress = ecrecover( - keccak256( - abi.encodePacked( - "\x19\x01", - DOMAIN_SEPARATOR(), - keccak256( - abi.encode( - keccak256( - "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)" - ), - owner, - spender, - value, - nonces[owner]++, - deadline - ) - ) - ) - ), - v, - r, - s - ); - - require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER"); - - allowance[recoveredAddress][spender] = value; - } - - emit Approval(owner, spender, value); - } - - function DOMAIN_SEPARATOR() public view virtual returns (bytes32) { - return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator(); - } - - function computeDomainSeparator() internal view virtual returns (bytes32) { - return - keccak256( - abi.encode( - keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), - keccak256(bytes(name)), - keccak256("1"), - block.chainid, - address(this) - ) - ); - } - - /*////////////////////////////////////////////////////////////// - INTERNAL MINT/BURN LOGIC - //////////////////////////////////////////////////////////////*/ - - function _mint(address to, uint256 amount) internal virtual { - totalSupply += amount; - - // Cannot overflow because the sum of all user - // balances can't exceed the max uint256 value. - unchecked { - balanceOf[to] += amount; - } - - emit Transfer(address(0), to, amount); - } - - function _burn(address from, uint256 amount) internal virtual { - balanceOf[from] -= amount; - - // Cannot underflow because a user's balance - // will never be larger than the total supply. - unchecked { - totalSupply -= amount; - } - - emit Transfer(from, address(0), amount); - } -} diff --git a/lib/solmate/src/tokens/ERC721.sol b/lib/solmate/src/tokens/ERC721.sol deleted file mode 100644 index 13309b7..0000000 --- a/lib/solmate/src/tokens/ERC721.sol +++ /dev/null @@ -1,231 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -/// @notice Modern, minimalist, and gas efficient ERC-721 implementation. -/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol) -abstract contract ERC721 { - /*////////////////////////////////////////////////////////////// - EVENTS - //////////////////////////////////////////////////////////////*/ - - event Transfer(address indexed from, address indexed to, uint256 indexed id); - - event Approval(address indexed owner, address indexed spender, uint256 indexed id); - - event ApprovalForAll(address indexed owner, address indexed operator, bool approved); - - /*////////////////////////////////////////////////////////////// - METADATA STORAGE/LOGIC - //////////////////////////////////////////////////////////////*/ - - string public name; - - string public symbol; - - function tokenURI(uint256 id) public view virtual returns (string memory); - - /*////////////////////////////////////////////////////////////// - ERC721 BALANCE/OWNER STORAGE - //////////////////////////////////////////////////////////////*/ - - mapping(uint256 => address) internal _ownerOf; - - mapping(address => uint256) internal _balanceOf; - - function ownerOf(uint256 id) public view virtual returns (address owner) { - require((owner = _ownerOf[id]) != address(0), "NOT_MINTED"); - } - - function balanceOf(address owner) public view virtual returns (uint256) { - require(owner != address(0), "ZERO_ADDRESS"); - - return _balanceOf[owner]; - } - - /*////////////////////////////////////////////////////////////// - ERC721 APPROVAL STORAGE - //////////////////////////////////////////////////////////////*/ - - mapping(uint256 => address) public getApproved; - - mapping(address => mapping(address => bool)) public isApprovedForAll; - - /*////////////////////////////////////////////////////////////// - CONSTRUCTOR - //////////////////////////////////////////////////////////////*/ - - constructor(string memory _name, string memory _symbol) { - name = _name; - symbol = _symbol; - } - - /*////////////////////////////////////////////////////////////// - ERC721 LOGIC - //////////////////////////////////////////////////////////////*/ - - function approve(address spender, uint256 id) public virtual { - address owner = _ownerOf[id]; - - require(msg.sender == owner || isApprovedForAll[owner][msg.sender], "NOT_AUTHORIZED"); - - getApproved[id] = spender; - - emit Approval(owner, spender, id); - } - - function setApprovalForAll(address operator, bool approved) public virtual { - isApprovedForAll[msg.sender][operator] = approved; - - emit ApprovalForAll(msg.sender, operator, approved); - } - - function transferFrom( - address from, - address to, - uint256 id - ) public virtual { - require(from == _ownerOf[id], "WRONG_FROM"); - - require(to != address(0), "INVALID_RECIPIENT"); - - require( - msg.sender == from || isApprovedForAll[from][msg.sender] || msg.sender == getApproved[id], - "NOT_AUTHORIZED" - ); - - // Underflow of the sender's balance is impossible because we check for - // ownership above and the recipient's balance can't realistically overflow. - unchecked { - _balanceOf[from]--; - - _balanceOf[to]++; - } - - _ownerOf[id] = to; - - delete getApproved[id]; - - emit Transfer(from, to, id); - } - - function safeTransferFrom( - address from, - address to, - uint256 id - ) public virtual { - transferFrom(from, to, id); - - require( - to.code.length == 0 || - ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, "") == - ERC721TokenReceiver.onERC721Received.selector, - "UNSAFE_RECIPIENT" - ); - } - - function safeTransferFrom( - address from, - address to, - uint256 id, - bytes calldata data - ) public virtual { - transferFrom(from, to, id); - - require( - to.code.length == 0 || - ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, data) == - ERC721TokenReceiver.onERC721Received.selector, - "UNSAFE_RECIPIENT" - ); - } - - /*////////////////////////////////////////////////////////////// - ERC165 LOGIC - //////////////////////////////////////////////////////////////*/ - - function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { - return - interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165 - interfaceId == 0x80ac58cd || // ERC165 Interface ID for ERC721 - interfaceId == 0x5b5e139f; // ERC165 Interface ID for ERC721Metadata - } - - /*////////////////////////////////////////////////////////////// - INTERNAL MINT/BURN LOGIC - //////////////////////////////////////////////////////////////*/ - - function _mint(address to, uint256 id) internal virtual { - require(to != address(0), "INVALID_RECIPIENT"); - - require(_ownerOf[id] == address(0), "ALREADY_MINTED"); - - // Counter overflow is incredibly unrealistic. - unchecked { - _balanceOf[to]++; - } - - _ownerOf[id] = to; - - emit Transfer(address(0), to, id); - } - - function _burn(uint256 id) internal virtual { - address owner = _ownerOf[id]; - - require(owner != address(0), "NOT_MINTED"); - - // Ownership check above ensures no underflow. - unchecked { - _balanceOf[owner]--; - } - - delete _ownerOf[id]; - - delete getApproved[id]; - - emit Transfer(owner, address(0), id); - } - - /*////////////////////////////////////////////////////////////// - INTERNAL SAFE MINT LOGIC - //////////////////////////////////////////////////////////////*/ - - function _safeMint(address to, uint256 id) internal virtual { - _mint(to, id); - - require( - to.code.length == 0 || - ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, "") == - ERC721TokenReceiver.onERC721Received.selector, - "UNSAFE_RECIPIENT" - ); - } - - function _safeMint( - address to, - uint256 id, - bytes memory data - ) internal virtual { - _mint(to, id); - - require( - to.code.length == 0 || - ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, data) == - ERC721TokenReceiver.onERC721Received.selector, - "UNSAFE_RECIPIENT" - ); - } -} - -/// @notice A generic interface for a contract which properly accepts ERC721 tokens. -/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol) -abstract contract ERC721TokenReceiver { - function onERC721Received( - address, - address, - uint256, - bytes calldata - ) external virtual returns (bytes4) { - return ERC721TokenReceiver.onERC721Received.selector; - } -} diff --git a/lib/solmate/src/tokens/WETH.sol b/lib/solmate/src/tokens/WETH.sol deleted file mode 100644 index 5c470e3..0000000 --- a/lib/solmate/src/tokens/WETH.sol +++ /dev/null @@ -1,35 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -import {ERC20} from "./ERC20.sol"; - -import {SafeTransferLib} from "../utils/SafeTransferLib.sol"; - -/// @notice Minimalist and modern Wrapped Ether implementation. -/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/WETH.sol) -/// @author Inspired by WETH9 (https://github.com/dapphub/ds-weth/blob/master/src/weth9.sol) -contract WETH is ERC20("Wrapped Ether", "WETH", 18) { - using SafeTransferLib for address; - - event Deposit(address indexed from, uint256 amount); - - event Withdrawal(address indexed to, uint256 amount); - - function deposit() public payable virtual { - _mint(msg.sender, msg.value); - - emit Deposit(msg.sender, msg.value); - } - - function withdraw(uint256 amount) public virtual { - _burn(msg.sender, amount); - - emit Withdrawal(msg.sender, amount); - - msg.sender.safeTransferETH(amount); - } - - receive() external payable virtual { - deposit(); - } -} diff --git a/lib/solmate/src/utils/Bytes32AddressLib.sol b/lib/solmate/src/utils/Bytes32AddressLib.sol deleted file mode 100644 index bc857be..0000000 --- a/lib/solmate/src/utils/Bytes32AddressLib.sol +++ /dev/null @@ -1,14 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -/// @notice Library for converting between addresses and bytes32 values. -/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/Bytes32AddressLib.sol) -library Bytes32AddressLib { - function fromLast20Bytes(bytes32 bytesValue) internal pure returns (address) { - return address(uint160(uint256(bytesValue))); - } - - function fillLast12Bytes(address addressValue) internal pure returns (bytes32) { - return bytes32(bytes20(addressValue)); - } -} diff --git a/lib/solmate/src/utils/CREATE3.sol b/lib/solmate/src/utils/CREATE3.sol deleted file mode 100644 index 04e0915..0000000 --- a/lib/solmate/src/utils/CREATE3.sol +++ /dev/null @@ -1,82 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -import {Bytes32AddressLib} from "./Bytes32AddressLib.sol"; - -/// @notice Deploy to deterministic addresses without an initcode factor. -/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/CREATE3.sol) -/// @author Modified from 0xSequence (https://github.com/0xSequence/create3/blob/master/contracts/Create3.sol) -library CREATE3 { - using Bytes32AddressLib for bytes32; - - //--------------------------------------------------------------------------------// - // Opcode | Opcode + Arguments | Description | Stack View // - //--------------------------------------------------------------------------------// - // 0x36 | 0x36 | CALLDATASIZE | size // - // 0x3d | 0x3d | RETURNDATASIZE | 0 size // - // 0x3d | 0x3d | RETURNDATASIZE | 0 0 size // - // 0x37 | 0x37 | CALLDATACOPY | // - // 0x36 | 0x36 | CALLDATASIZE | size // - // 0x3d | 0x3d | RETURNDATASIZE | 0 size // - // 0x34 | 0x34 | CALLVALUE | value 0 size // - // 0xf0 | 0xf0 | CREATE | newContract // - //--------------------------------------------------------------------------------// - // Opcode | Opcode + Arguments | Description | Stack View // - //--------------------------------------------------------------------------------// - // 0x67 | 0x67XXXXXXXXXXXXXXXX | PUSH8 bytecode | bytecode // - // 0x3d | 0x3d | RETURNDATASIZE | 0 bytecode // - // 0x52 | 0x52 | MSTORE | // - // 0x60 | 0x6008 | PUSH1 08 | 8 // - // 0x60 | 0x6018 | PUSH1 18 | 24 8 // - // 0xf3 | 0xf3 | RETURN | // - //--------------------------------------------------------------------------------// - bytes internal constant PROXY_BYTECODE = hex"67_36_3d_3d_37_36_3d_34_f0_3d_52_60_08_60_18_f3"; - - bytes32 internal constant PROXY_BYTECODE_HASH = keccak256(PROXY_BYTECODE); - - function deploy( - bytes32 salt, - bytes memory creationCode, - uint256 value - ) internal returns (address deployed) { - bytes memory proxyChildBytecode = PROXY_BYTECODE; - - address proxy; - assembly { - // Deploy a new contract with our pre-made bytecode via CREATE2. - // We start 32 bytes into the code to avoid copying the byte length. - proxy := create2(0, add(proxyChildBytecode, 32), mload(proxyChildBytecode), salt) - } - require(proxy != address(0), "DEPLOYMENT_FAILED"); - - deployed = getDeployed(salt); - (bool success, ) = proxy.call{value: value}(creationCode); - require(success && deployed.code.length != 0, "INITIALIZATION_FAILED"); - } - - function getDeployed(bytes32 salt) internal view returns (address) { - address proxy = keccak256( - abi.encodePacked( - // Prefix: - bytes1(0xFF), - // Creator: - address(this), - // Salt: - salt, - // Bytecode hash: - PROXY_BYTECODE_HASH - ) - ).fromLast20Bytes(); - - return - keccak256( - abi.encodePacked( - // 0xd6 = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x01) - // 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex) - hex"d6_94", - proxy, - hex"01" // Nonce of the proxy contract (1) - ) - ).fromLast20Bytes(); - } -} diff --git a/lib/solmate/src/utils/FixedPointMathLib.sol b/lib/solmate/src/utils/FixedPointMathLib.sol deleted file mode 100644 index b448690..0000000 --- a/lib/solmate/src/utils/FixedPointMathLib.sol +++ /dev/null @@ -1,222 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -/// @notice Arithmetic library with operations for fixed-point numbers. -/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/FixedPointMathLib.sol) -/// @author Inspired by USM (https://github.com/usmfum/USM/blob/master/contracts/WadMath.sol) -library FixedPointMathLib { - /*////////////////////////////////////////////////////////////// - SIMPLIFIED FIXED POINT OPERATIONS - //////////////////////////////////////////////////////////////*/ - - uint256 internal constant WAD = 1e18; // The scalar of ETH and most ERC20s. - - function mulWadDown(uint256 x, uint256 y) internal pure returns (uint256) { - return mulDivDown(x, y, WAD); // Equivalent to (x * y) / WAD rounded down. - } - - function mulWadUp(uint256 x, uint256 y) internal pure returns (uint256) { - return mulDivUp(x, y, WAD); // Equivalent to (x * y) / WAD rounded up. - } - - function divWadDown(uint256 x, uint256 y) internal pure returns (uint256) { - return mulDivDown(x, WAD, y); // Equivalent to (x * WAD) / y rounded down. - } - - function divWadUp(uint256 x, uint256 y) internal pure returns (uint256) { - return mulDivUp(x, WAD, y); // Equivalent to (x * WAD) / y rounded up. - } - - /*////////////////////////////////////////////////////////////// - LOW LEVEL FIXED POINT OPERATIONS - //////////////////////////////////////////////////////////////*/ - - function mulDivDown( - uint256 x, - uint256 y, - uint256 denominator - ) internal pure returns (uint256 z) { - assembly { - // Store x * y in z for now. - z := mul(x, y) - - // Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y)) - if iszero(and(iszero(iszero(denominator)), or(iszero(x), eq(div(z, x), y)))) { - revert(0, 0) - } - - // Divide z by the denominator. - z := div(z, denominator) - } - } - - function mulDivUp( - uint256 x, - uint256 y, - uint256 denominator - ) internal pure returns (uint256 z) { - assembly { - // Store x * y in z for now. - z := mul(x, y) - - // Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y)) - if iszero(and(iszero(iszero(denominator)), or(iszero(x), eq(div(z, x), y)))) { - revert(0, 0) - } - - // First, divide z - 1 by the denominator and add 1. - // We allow z - 1 to underflow if z is 0, because we multiply the - // end result by 0 if z is zero, ensuring we return 0 if z is zero. - z := mul(iszero(iszero(z)), add(div(sub(z, 1), denominator), 1)) - } - } - - function rpow( - uint256 x, - uint256 n, - uint256 scalar - ) internal pure returns (uint256 z) { - assembly { - switch x - case 0 { - switch n - case 0 { - // 0 ** 0 = 1 - z := scalar - } - default { - // 0 ** n = 0 - z := 0 - } - } - default { - switch mod(n, 2) - case 0 { - // If n is even, store scalar in z for now. - z := scalar - } - default { - // If n is odd, store x in z for now. - z := x - } - - // Shifting right by 1 is like dividing by 2. - let half := shr(1, scalar) - - for { - // Shift n right by 1 before looping to halve it. - n := shr(1, n) - } n { - // Shift n right by 1 each iteration to halve it. - n := shr(1, n) - } { - // Revert immediately if x ** 2 would overflow. - // Equivalent to iszero(eq(div(xx, x), x)) here. - if shr(128, x) { - revert(0, 0) - } - - // Store x squared. - let xx := mul(x, x) - - // Round to the nearest number. - let xxRound := add(xx, half) - - // Revert if xx + half overflowed. - if lt(xxRound, xx) { - revert(0, 0) - } - - // Set x to scaled xxRound. - x := div(xxRound, scalar) - - // If n is even: - if mod(n, 2) { - // Compute z * x. - let zx := mul(z, x) - - // If z * x overflowed: - if iszero(eq(div(zx, x), z)) { - // Revert if x is non-zero. - if iszero(iszero(x)) { - revert(0, 0) - } - } - - // Round to the nearest number. - let zxRound := add(zx, half) - - // Revert if zx + half overflowed. - if lt(zxRound, zx) { - revert(0, 0) - } - - // Return properly scaled zxRound. - z := div(zxRound, scalar) - } - } - } - } - } - - /*////////////////////////////////////////////////////////////// - GENERAL NUMBER UTILITIES - //////////////////////////////////////////////////////////////*/ - - function sqrt(uint256 x) internal pure returns (uint256 z) { - assembly { - // Start off with z at 1. - z := 1 - - // Used below to help find a nearby power of 2. - let y := x - - // Find the lowest power of 2 that is at least sqrt(x). - if iszero(lt(y, 0x100000000000000000000000000000000)) { - y := shr(128, y) // Like dividing by 2 ** 128. - z := shl(64, z) // Like multiplying by 2 ** 64. - } - if iszero(lt(y, 0x10000000000000000)) { - y := shr(64, y) // Like dividing by 2 ** 64. - z := shl(32, z) // Like multiplying by 2 ** 32. - } - if iszero(lt(y, 0x100000000)) { - y := shr(32, y) // Like dividing by 2 ** 32. - z := shl(16, z) // Like multiplying by 2 ** 16. - } - if iszero(lt(y, 0x10000)) { - y := shr(16, y) // Like dividing by 2 ** 16. - z := shl(8, z) // Like multiplying by 2 ** 8. - } - if iszero(lt(y, 0x100)) { - y := shr(8, y) // Like dividing by 2 ** 8. - z := shl(4, z) // Like multiplying by 2 ** 4. - } - if iszero(lt(y, 0x10)) { - y := shr(4, y) // Like dividing by 2 ** 4. - z := shl(2, z) // Like multiplying by 2 ** 2. - } - if iszero(lt(y, 0x8)) { - // Equivalent to 2 ** z. - z := shl(1, z) - } - - // Shifting right by 1 is like dividing by 2. - z := shr(1, add(z, div(x, z))) - z := shr(1, add(z, div(x, z))) - z := shr(1, add(z, div(x, z))) - z := shr(1, add(z, div(x, z))) - z := shr(1, add(z, div(x, z))) - z := shr(1, add(z, div(x, z))) - z := shr(1, add(z, div(x, z))) - - // Compute a rounded down version of z. - let zRoundDown := div(x, z) - - // If zRoundDown is smaller, use it. - if lt(zRoundDown, z) { - z := zRoundDown - } - } - } -} diff --git a/lib/solmate/src/utils/ReentrancyGuard.sol b/lib/solmate/src/utils/ReentrancyGuard.sol deleted file mode 100644 index 99aa462..0000000 --- a/lib/solmate/src/utils/ReentrancyGuard.sol +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -/// @notice Gas optimized reentrancy protection for smart contracts. -/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/ReentrancyGuard.sol) -/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol) -abstract contract ReentrancyGuard { - uint256 private locked = 1; - - modifier nonReentrant() virtual { - require(locked == 1, "REENTRANCY"); - - locked = 2; - - _; - - locked = 1; - } -} diff --git a/lib/solmate/src/utils/SSTORE2.sol b/lib/solmate/src/utils/SSTORE2.sol deleted file mode 100644 index bc10d72..0000000 --- a/lib/solmate/src/utils/SSTORE2.sol +++ /dev/null @@ -1,99 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -/// @notice Read and write to persistent storage at a fraction of the cost. -/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/SSTORE2.sol) -/// @author Modified from 0xSequence (https://github.com/0xSequence/sstore2/blob/master/contracts/SSTORE2.sol) -library SSTORE2 { - uint256 internal constant DATA_OFFSET = 1; // We skip the first byte as it's a STOP opcode to ensure the contract can't be called. - - /*////////////////////////////////////////////////////////////// - WRITE LOGIC - //////////////////////////////////////////////////////////////*/ - - function write(bytes memory data) internal returns (address pointer) { - // Prefix the bytecode with a STOP opcode to ensure it cannot be called. - bytes memory runtimeCode = abi.encodePacked(hex"00", data); - - bytes memory creationCode = abi.encodePacked( - //---------------------------------------------------------------------------------------------------------------// - // Opcode | Opcode + Arguments | Description | Stack View // - //---------------------------------------------------------------------------------------------------------------// - // 0x60 | 0x600B | PUSH1 11 | codeOffset // - // 0x59 | 0x59 | MSIZE | 0 codeOffset // - // 0x81 | 0x81 | DUP2 | codeOffset 0 codeOffset // - // 0x38 | 0x38 | CODESIZE | codeSize codeOffset 0 codeOffset // - // 0x03 | 0x03 | SUB | (codeSize - codeOffset) 0 codeOffset // - // 0x80 | 0x80 | DUP | (codeSize - codeOffset) (codeSize - codeOffset) 0 codeOffset // - // 0x92 | 0x92 | SWAP3 | codeOffset (codeSize - codeOffset) 0 (codeSize - codeOffset) // - // 0x59 | 0x59 | MSIZE | 0 codeOffset (codeSize - codeOffset) 0 (codeSize - codeOffset) // - // 0x39 | 0x39 | CODECOPY | 0 (codeSize - codeOffset) // - // 0xf3 | 0xf3 | RETURN | // - //---------------------------------------------------------------------------------------------------------------// - hex"60_0B_59_81_38_03_80_92_59_39_F3", // Returns all code in the contract except for the first 11 (0B in hex) bytes. - runtimeCode // The bytecode we want the contract to have after deployment. Capped at 1 byte less than the code size limit. - ); - - assembly { - // Deploy a new contract with the generated creation code. - // We start 32 bytes into the code to avoid copying the byte length. - pointer := create(0, add(creationCode, 32), mload(creationCode)) - } - - require(pointer != address(0), "DEPLOYMENT_FAILED"); - } - - /*////////////////////////////////////////////////////////////// - READ LOGIC - //////////////////////////////////////////////////////////////*/ - - function read(address pointer) internal view returns (bytes memory) { - return readBytecode(pointer, DATA_OFFSET, pointer.code.length - DATA_OFFSET); - } - - function read(address pointer, uint256 start) internal view returns (bytes memory) { - start += DATA_OFFSET; - - return readBytecode(pointer, start, pointer.code.length - start); - } - - function read( - address pointer, - uint256 start, - uint256 end - ) internal view returns (bytes memory) { - start += DATA_OFFSET; - end += DATA_OFFSET; - - require(pointer.code.length >= end, "OUT_OF_BOUNDS"); - - return readBytecode(pointer, start, end - start); - } - - /*////////////////////////////////////////////////////////////// - INTERNAL HELPER LOGIC - //////////////////////////////////////////////////////////////*/ - - function readBytecode( - address pointer, - uint256 start, - uint256 size - ) private view returns (bytes memory data) { - assembly { - // Get a pointer to some free memory. - data := mload(0x40) - - // Update the free memory pointer to prevent overriding our data. - // We use and(x, not(31)) as a cheaper equivalent to sub(x, mod(x, 32)). - // Adding 31 to size and running the result through the logic above ensures - // the memory pointer remains word-aligned, following the Solidity convention. - mstore(0x40, add(data, and(add(add(size, 32), 31), not(31)))) - - // Store the size of the data in the first 32 byte chunk of free memory. - mstore(data, size) - - // Copy the code into memory right after the 32 bytes we used to store the size. - extcodecopy(pointer, add(data, 32), start, size) - } - } -} diff --git a/lib/solmate/src/utils/SafeCastLib.sol b/lib/solmate/src/utils/SafeCastLib.sol deleted file mode 100644 index ab4287f..0000000 --- a/lib/solmate/src/utils/SafeCastLib.sol +++ /dev/null @@ -1,61 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -/// @notice Safe unsigned integer casting library that reverts on overflow. -/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/SafeCastLib.sol) -/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/math/SafeCast.sol) -library SafeCastLib { - function safeCastTo248(uint256 x) internal pure returns (uint248 y) { - require(x < 1 << 248); - - y = uint248(x); - } - - function safeCastTo224(uint256 x) internal pure returns (uint224 y) { - require(x < 1 << 224); - - y = uint224(x); - } - - function safeCastTo192(uint256 x) internal pure returns (uint192 y) { - require(x < 1 << 192); - - y = uint192(x); - } - - function safeCastTo160(uint256 x) internal pure returns (uint160 y) { - require(x < 1 << 160); - - y = uint160(x); - } - - function safeCastTo128(uint256 x) internal pure returns (uint128 y) { - require(x < 1 << 128); - - y = uint128(x); - } - - function safeCastTo96(uint256 x) internal pure returns (uint96 y) { - require(x < 1 << 96); - - y = uint96(x); - } - - function safeCastTo64(uint256 x) internal pure returns (uint64 y) { - require(x < 1 << 64); - - y = uint64(x); - } - - function safeCastTo32(uint256 x) internal pure returns (uint32 y) { - require(x < 1 << 32); - - y = uint32(x); - } - - function safeCastTo8(uint256 x) internal pure returns (uint8 y) { - require(x < 1 << 8); - - y = uint8(x); - } -} diff --git a/lib/solmate/src/utils/SafeTransferLib.sol b/lib/solmate/src/utils/SafeTransferLib.sol deleted file mode 100644 index e4d911f..0000000 --- a/lib/solmate/src/utils/SafeTransferLib.sol +++ /dev/null @@ -1,126 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -pragma solidity >=0.8.0; - -import {ERC20} from "../tokens/ERC20.sol"; - -/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values. -/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/SafeTransferLib.sol) -/// @dev Use with caution! Some functions in this library knowingly create dirty bits at the destination of the free memory pointer. -/// @dev Note that none of the functions in this library check that a token has code at all! That responsibility is delegated to the caller. -library SafeTransferLib { - event Debug(bool one, bool two, uint256 retsize); - - /*////////////////////////////////////////////////////////////// - ETH OPERATIONS - //////////////////////////////////////////////////////////////*/ - - function safeTransferETH(address to, uint256 amount) internal { - bool success; - - assembly { - // Transfer the ETH and store if it succeeded or not. - success := call(gas(), to, amount, 0, 0, 0, 0) - } - - require(success, "ETH_TRANSFER_FAILED"); - } - - /*////////////////////////////////////////////////////////////// - ERC20 OPERATIONS - //////////////////////////////////////////////////////////////*/ - - function safeTransferFrom( - ERC20 token, - address from, - address to, - uint256 amount - ) internal { - bool success; - - assembly { - // Get a pointer to some free memory. - let freeMemoryPointer := mload(0x40) - - // Write the abi-encoded calldata into memory, beginning with the function selector. - mstore(freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000) - mstore(add(freeMemoryPointer, 4), from) // Append the "from" argument. - mstore(add(freeMemoryPointer, 36), to) // Append the "to" argument. - mstore(add(freeMemoryPointer, 68), amount) // Append the "amount" argument. - - success := and( - // Set success to whether the call reverted, if not we check it either - // returned exactly 1 (can't just be non-zero data), or had no return data. - or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())), - // We use 100 because the length of our calldata totals up like so: 4 + 32 * 3. - // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. - // Counterintuitively, this call must be positioned second to the or() call in the - // surrounding and() call or else returndatasize() will be zero during the computation. - call(gas(), token, 0, freeMemoryPointer, 100, 0, 32) - ) - } - - require(success, "TRANSFER_FROM_FAILED"); - } - - function safeTransfer( - ERC20 token, - address to, - uint256 amount - ) internal { - bool success; - - assembly { - // Get a pointer to some free memory. - let freeMemoryPointer := mload(0x40) - - // Write the abi-encoded calldata into memory, beginning with the function selector. - mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000) - mstore(add(freeMemoryPointer, 4), to) // Append the "to" argument. - mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. - - success := and( - // Set success to whether the call reverted, if not we check it either - // returned exactly 1 (can't just be non-zero data), or had no return data. - or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())), - // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2. - // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. - // Counterintuitively, this call must be positioned second to the or() call in the - // surrounding and() call or else returndatasize() will be zero during the computation. - call(gas(), token, 0, freeMemoryPointer, 68, 0, 32) - ) - } - - require(success, "TRANSFER_FAILED"); - } - - function safeApprove( - ERC20 token, - address to, - uint256 amount - ) internal { - bool success; - - assembly { - // Get a pointer to some free memory. - let freeMemoryPointer := mload(0x40) - - // Write the abi-encoded calldata into memory, beginning with the function selector. - mstore(freeMemoryPointer, 0x095ea7b300000000000000000000000000000000000000000000000000000000) - mstore(add(freeMemoryPointer, 4), to) // Append the "to" argument. - mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. - - success := and( - // Set success to whether the call reverted, if not we check it either - // returned exactly 1 (can't just be non-zero data), or had no return data. - or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())), - // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2. - // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. - // Counterintuitively, this call must be positioned second to the or() call in the - // surrounding and() call or else returndatasize() will be zero during the computation. - call(gas(), token, 0, freeMemoryPointer, 68, 0, 32) - ) - } - - require(success, "APPROVE_FAILED"); - } -} From 97ec219dd44459b4514ef543eb28371fcef07cb8 Mon Sep 17 00:00:00 2001 From: dmarzzz Date: Sun, 7 Jan 2024 21:27:57 -0500 Subject: [PATCH 08/14] add submodule --- .gitmodules | 3 +++ lib/solmate | 1 + 2 files changed, 4 insertions(+) create mode 160000 lib/solmate diff --git a/.gitmodules b/.gitmodules index 99d920f..7d447a9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -5,3 +5,6 @@ [submodule "lib/suave-std"] path = lib/suave-std url = https://github.com/flashbots/suave-std +[submodule "lib/solmate"] + path = lib/solmate + url = https://github.com/transmissions11/solmate diff --git a/lib/solmate b/lib/solmate new file mode 160000 index 0000000..4b47a19 --- /dev/null +++ b/lib/solmate @@ -0,0 +1 @@ +Subproject commit 4b47a19038b798b4a33d9749d25e570443520647 From 053f56e6dbc4e868ebe0454a5cff8d8065f2740a Mon Sep 17 00:00:00 2001 From: dmarzzz Date: Sun, 7 Jan 2024 21:29:35 -0500 Subject: [PATCH 09/14] remove accidental lib --- examples/712/lib | 1 - 1 file changed, 1 deletion(-) delete mode 160000 examples/712/lib diff --git a/examples/712/lib b/examples/712/lib deleted file mode 160000 index 4b47a19..0000000 --- a/examples/712/lib +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4b47a19038b798b4a33d9749d25e570443520647 From ef86129ec38ccb6cb63fef28f5ab301b8444b689 Mon Sep 17 00:00:00 2001 From: dmarzzz Date: Sun, 7 Jan 2024 21:30:51 -0500 Subject: [PATCH 10/14] add suave std to remappings --- remappings.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/remappings.txt b/remappings.txt index 3963bf5..0525c64 100644 --- a/remappings.txt +++ b/remappings.txt @@ -1,2 +1,3 @@ forge-std/=lib/forge-std/src/ +suave-std/=lib/suave-std/src/ solmate/=lib/solmate/src/ \ No newline at end of file From 52bd533c1f382f0b82d5540d3ddbc7cb62455204 Mon Sep 17 00:00:00 2001 From: dmarzzz Date: Sun, 7 Jan 2024 21:37:56 -0500 Subject: [PATCH 11/14] go mod tidy --- go.mod | 4 ++- go.sum | 80 ++-------------------------------------------------------- 2 files changed, 5 insertions(+), 79 deletions(-) diff --git a/go.mod b/go.mod index 57a960b..8d25059 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/flashbots/suapp-examples -go 1.21.3 +go 1.20 replace github.com/ethereum/go-ethereum => github.com/flashbots/suave-geth v0.0.0-20240103141237-95ae32eaaccb @@ -11,8 +11,10 @@ require ( github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/deckarep/golang-set/v2 v2.1.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect + github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-ole/go-ole v1.2.1 // indirect github.com/go-stack/stack v1.8.1 // indirect + github.com/google/uuid v1.3.1 // indirect github.com/gorilla/websocket v1.4.2 // indirect github.com/holiman/uint256 v1.2.3 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect diff --git a/go.sum b/go.sum index 9bacece..80ca949 100644 --- a/go.sum +++ b/go.sum @@ -1,193 +1,117 @@ github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= -github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= -github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a h1:HbKu58rmZpUGpz5+4FfNmIU+FmZg2P3Xaj2v2bfNWmk= -github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= github.com/alicebob/miniredis/v2 v2.30.5 h1:3r6kTHdKnuP4fkS8k2IrvSfxpxUTcW1SOL0wN7b7Dt0= -github.com/alicebob/miniredis/v2 v2.30.5/go.mod h1:b25qWj4fCEsBeAAR2mlb0ufImGC6uH3VlUfb/HS5zKg= github.com/attestantio/go-builder-client v0.3.0 h1:NY7pUNT070T3tx/N8hCaO5KpExvaVQhH//9zsgRh43M= -github.com/attestantio/go-builder-client v0.3.0/go.mod h1:DwesMTOqnCp4u+n3uZ+fWL8wwnSBZVD9VMIVPDR+AZE= github.com/attestantio/go-eth2-client v0.16.4 h1:utfGx49JZN4W7IT6/txdwE9qobP3b/eTa3Ge1PJFRJg= -github.com/attestantio/go-eth2-client v0.16.4/go.mod h1:lgxKsjRSxQnHSWxSbtZLGYlFkE3vFM4L+DK4bXqAxAU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bits-and-blooms/bitset v1.7.0 h1:YjAGVd3XmtK9ktAbX8Zg2g2PwLIMjGREZJHlV4j7NEo= -github.com/bits-and-blooms/bitset v1.7.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= -github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 h1:ytcWPaNPhNoGMWEhDvS3zToKcDpRsLuRolQJBVGdozk= -github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811/go.mod h1:Nb5lgvnQ2+oGlE/EyZy4+2/CxRh9KfvCXnag1vtpxVM= github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= -github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= github.com/consensys/gnark-crypto v0.11.0 h1:QqzHQlwEqlQr5jfWblGDkwlKHpT+4QodYqqExkAtyks= -github.com/consensys/gnark-crypto v0.11.0/go.mod h1:Iq/P3HHl0ElSjsg2E1gsMwhAyxnxoKK5nVyZKd+/KhU= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= -github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= -github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/ferranbt/fastssz v0.1.3 h1:ZI+z3JH05h4kgmFXdHuR1aWYsgrg7o+Fw7/NCzM16Mo= -github.com/ferranbt/fastssz v0.1.3/go.mod h1:0Y9TEd/9XuFlh7mskMPfXiI2Dkw4Ddg9EyXt1W7MRvE= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= -github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/flashbots/go-boost-utils v1.7.0 h1:BaLeGl71nD/ro0aUzCYqHc8PiqIIaErLwcgMOQWoBZY= -github.com/flashbots/go-boost-utils v1.7.0/go.mod h1:1Y0rD/e57KZZIRgkCcXRvvztW+v+eZHnWu25wxtGstU= github.com/flashbots/go-utils v0.4.13-0.20230919094729-c049be707f79 h1:y2obQCUIvqKISLxWxC0Tz8Oc618vA3q1xmn9GwElvfI= -github.com/flashbots/go-utils v0.4.13-0.20230919094729-c049be707f79/go.mod h1:LauDwifaRdSK0mS5X34GR59pJtUu1T/lOFNdff1BqtI= github.com/flashbots/suave-geth v0.0.0-20240103141237-95ae32eaaccb h1:nm42W76MwJVn1rgI3sHE1RaVJrR1U34Kx61quBd1QbU= github.com/flashbots/suave-geth v0.0.0-20240103141237-95ae32eaaccb/go.mod h1:FSIekwR5M+o2lAXumvYR+E+RYgQ0yK3X8HdRMSTdagU= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= -github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkNC1sN0= -github.com/getsentry/sentry-go v0.18.0/go.mod h1:Kgon4Mby+FJ7ZWHFUAZgVaIa8sxHtnRJRLTXZr51aKQ= github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= -github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= github.com/goccy/go-yaml v1.11.0 h1:n7Z+zx8S9f9KgzG6KtQKf+kwqXZlLNR2F6018Dgau54= -github.com/goccy/go-yaml v1.11.0/go.mod h1:H+mJrWtjPTJAHvRbV09MCK9xYwODM+wRTVFFTWckfng= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= -github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.3.0 h1:kHL1vqdqWNfATmA0FNMdmZNMyZI1U6O31X4rlIPoBog= -github.com/golang-jwt/jwt/v4 v4.3.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= -github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= -github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= -github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.3 h1:K8UWO1HUJpRMXBxbmaY1Y8IAMZC/RsKB+ArEnnK4l5o= github.com/holiman/uint256 v1.2.3/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= github.com/huin/goupnp v1.0.3 h1:N8No57ls+MnjlB+JPiCVSOyy/ot7MJTqlo7rn+NYSqQ= -github.com/huin/goupnp v1.0.3/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= -github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/klauspost/compress v1.15.15 h1:EF27CXIuDsYJ6mmvtBRlEuB2UVOqHG1tAXgZ7yIO+lw= -github.com/klauspost/compress v1.15.15/go.mod h1:ZcK2JAFqKOpnBlxcLsJzYfrS9X1akm9fHZNnD9+Vo/4= github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= -github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98= -github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= -github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g= -github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= -github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= -github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= -github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/common v0.39.0 h1:oOyhkDq05hPZKItWVBkJ6g6AtGxi+fy7F4JvUV8uhsI= -github.com/prometheus/common v0.39.0/go.mod h1:6XBZ7lYdLCbkAVhwRsWTZn+IN5AB9F/NXd5w0BbEX0Y= github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= -github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= github.com/prysmaticlabs/go-bitfield v0.0.0-20210809151128-385d8c5e3fb7 h1:0tVE4tdWQK9ZpYygoV7+vS6QkDvQVySboMVEIxBJmXw= -github.com/prysmaticlabs/go-bitfield v0.0.0-20210809151128-385d8c5e3fb7/go.mod h1:wmuf/mdK4VMD+jA9ThwcUKjg3a2XWM9cVfFYjDyY4j4= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= -github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= -github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= -github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/tklauser/go-sysconf v0.3.5 h1:uu3Xl4nkLzQfXNsWn15rPc/HQCJKObbt1dKJeWp3vU4= github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= github.com/tklauser/numcpus v0.2.2 h1:oyhllyrScuYI6g+h/zUvNXNp1wy7x8qQy3t/piefldA= github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM= github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= -github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= github.com/urfave/cli/v2 v2.17.2-0.20221006022127-8f469abc00aa h1:5SqCsI/2Qya2bCzK15ozrqo2sZxkh0FHynJZOTVoV6Q= -github.com/urfave/cli/v2 v2.17.2-0.20221006022127-8f469abc00aa/go.mod h1:1CNUng3PtjQMtRzJO4FMXBQvkGtuYRxxiR9xMa7jMwI= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= -github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= github.com/yuin/gopher-lua v1.1.0 h1:BojcDhfyDWgU2f2TOzYK/g5p2gxMrku8oupLDqlnSqE= -github.com/yuin/gopher-lua v1.1.0/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/exp v0.0.0-20230810033253-352e893a4cad h1:g0bG7Z4uG+OgH2QDODnjp6ggkk1bJDsINcuWmJN1iJU= -golang.org/x/exp v0.0.0-20230810033253-352e893a4cad/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20220922220347-f3bd1da661af h1:Yx9k8YCG3dvF87UAn2tu2HQLf2dt/eR1bXxpLMWeH+Y= -golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= -gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= -rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= From ec5c11fc5be616bc375d15ec354c97877fc1f189 Mon Sep 17 00:00:00 2001 From: dmarzzz Date: Sun, 7 Jan 2024 21:43:49 -0500 Subject: [PATCH 12/14] add args to framework doCall --- examples/onchain-state/main.go | 2 +- framework/framework.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/onchain-state/main.go b/examples/onchain-state/main.go index 3d77189..a77acc2 100644 --- a/examples/onchain-state/main.go +++ b/examples/onchain-state/main.go @@ -22,7 +22,7 @@ func main() { fmt.Println("2. Send a confidential request that modifies the state") contract.SendTransaction("example", nil, nil) - val, ok := contract.Call("getState")[0].(uint64) + val, ok := contract.Call("getState", nil)[0].(uint64) if !ok { fmt.Printf("expected uint64") os.Exit(1) diff --git a/framework/framework.go b/framework/framework.go index cb52205..9d311af 100644 --- a/framework/framework.go +++ b/framework/framework.go @@ -100,8 +100,8 @@ type Contract struct { fr *Framework } -func (c *Contract) Call(methodName string) []interface{} { - input, err := c.abi.Pack(methodName) +func (c *Contract) Call(methodName string, args []interface{}) []interface{} { + input, err := c.abi.Pack(methodName, args...) if err != nil { panic(err) } From 1dc705ea7cc15092f362c727b2fc5b12d126827c Mon Sep 17 00:00:00 2001 From: dmarzzz Date: Sun, 7 Jan 2024 21:46:15 -0500 Subject: [PATCH 13/14] remove unused code --- examples/712/main.go | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/examples/712/main.go b/examples/712/main.go index 6f44ef3..1090fa9 100644 --- a/examples/712/main.go +++ b/examples/712/main.go @@ -73,7 +73,7 @@ func deploySuaveContract(privKey *framework.PrivKey) (common.Address, common.Has contractAddr := contract.Ref(privKey) skHex := hex.EncodeToString(crypto.FromECDSA(privKey.Priv)) - receipt := contractAddr.SendTransaction("updatePrivateKey", []interface{}{}, []byte(skHex)) + _ = contractAddr.SendTransaction("updatePrivateKey", []interface{}{}, []byte(skHex)) tokenId := big.NewInt(NFTEE_TOKEN_ID) @@ -81,7 +81,7 @@ func deploySuaveContract(privKey *framework.PrivKey) (common.Address, common.Has digestHash := contract.Call("createEIP712Digest", []interface{}{tokenId, addr}) // Call signL1MintApproval and compare signatures - receipt = contractAddr.SendTransaction("signL1MintApproval", []interface{}{tokenId, addr}, nil) + receipt := contractAddr.SendTransaction("signL1MintApproval", []interface{}{tokenId, addr}, nil) nfteeApprovalEvent := &NFTEEApproval{} if err := nfteeApprovalEvent.Unpack(receipt.Logs[0]); err != nil { panic(err) @@ -218,14 +218,6 @@ func (na *NFTEEApproval) Unpack(log *types.Log) error { return eventABI.UnpackIntoInterface(na, "NFTEEApproval", log.Data) } -func encodePacked(data ...[]byte) []byte { - var packed []byte - for _, b := range data { - packed = append(packed, b...) - } - return packed -} - type relayHandlerExample struct { } From cd37b8706ea218182ef16283e5da53c7151bb0ae Mon Sep 17 00:00:00 2001 From: dmarzzz Date: Sun, 7 Jan 2024 21:56:00 -0500 Subject: [PATCH 14/14] remove remapping --- remappings.txt | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 remappings.txt diff --git a/remappings.txt b/remappings.txt deleted file mode 100644 index 0525c64..0000000 --- a/remappings.txt +++ /dev/null @@ -1,3 +0,0 @@ -forge-std/=lib/forge-std/src/ -suave-std/=lib/suave-std/src/ -solmate/=lib/solmate/src/ \ No newline at end of file