Skip to content

Commit

Permalink
feat: ERC-2771 Forwarder tests added
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Stefanov <[email protected]>
  • Loading branch information
stefan-stefanooov committed Dec 7, 2023
1 parent 59b49a5 commit 4a86a85
Show file tree
Hide file tree
Showing 7 changed files with 868 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,50 @@
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "message",
"type": "string"
},
{
"indexed": false,
"internalType": "address",
"name": "forwarder",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "MessageChanged",
"type": "event"
},
{
"inputs": [
{
"internalType": "string",
"name": "_message",
"type": "string"
}
],
"name": "changeMessageTestRequest",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
Expand Down Expand Up @@ -112,8 +156,8 @@
"type": "function"
}
],
"bytecode": "0x60a060405234801561001057600080fd5b5060405161066138038061066183398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b6080516105c261009f6000396000818160b00152818161011d01528181610298015261030401526105c26000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80637da0a8771161005b5780637da0a8771461011b5780638afa462e14610141578063c4c2bfdc14610149578063e21f37ce1461015157600080fd5b80632c8cf4fc14610082578063572b6c05146100a057806367e404ce146100f0575b600080fd5b61008a610159565b6040516100979190610398565b60405180910390f35b6100e06100ae3660046103b2565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b6040519015158152602001610097565b600154610103906001600160a01b031681565b6040516001600160a01b039091168152602001610097565b7f0000000000000000000000000000000000000000000000000000000000000000610103565b6101036101b4565b61008a6101f8565b61008a610286565b6060610163610293565b60029161017191908361047a565b5061017a610293565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092949350505050565b60006101be610300565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03929092169190911790556101f3610300565b905090565b60028054610205906103f1565b80601f0160208091040260200160405190810160405280929190818152602001828054610231906103f1565b801561027e5780601f106102535761010080835404028352916020019161027e565b820191906000526020600020905b81548152906001019060200180831161026157829003601f168201915b505050505081565b60008054610205906103f1565b3660007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316331480156102cf575060143610155b156102f857600080366102e360148261053b565b926102f093929190610562565b915091509091565b6000366102f0565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163314801561033b575060143610155b1561034d575060131936013560601c90565b503390565b6000815180845260005b818110156103785760208185018101518683018201520161035c565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006103ab6020830184610352565b9392505050565b6000602082840312156103c457600080fd5b81356001600160a01b03811681146103ab57600080fd5b634e487b7160e01b600052604160045260246000fd5b600181811c9082168061040557607f821691505b60208210810361042557634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561047557600081815260208120601f850160051c810160208610156104525750805b601f850160051c820191505b818110156104715782815560010161045e565b5050505b505050565b67ffffffffffffffff831115610492576104926103db565b6104a6836104a083546103f1565b8361042b565b6000601f8411600181146104da57600085156104c25750838201355b600019600387901b1c1916600186901b178355610534565b600083815260209020601f19861690835b8281101561050b57868501358255602094850194600190920191016104eb565b50868210156105285760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b8181038181111561055c57634e487b7160e01b600052601160045260246000fd5b92915050565b6000808585111561057257600080fd5b8386111561057f57600080fd5b505082019391909203915056fea2646970667358221220c863d64187f5b1eb7fbd87e0af899a23f7a2e7214493d64b4cdb33c7d6df096a64736f6c63430008140033",
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c80637da0a8771161005b5780637da0a8771461011b5780638afa462e14610141578063c4c2bfdc14610149578063e21f37ce1461015157600080fd5b80632c8cf4fc14610082578063572b6c05146100a057806367e404ce146100f0575b600080fd5b61008a610159565b6040516100979190610398565b60405180910390f35b6100e06100ae3660046103b2565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b6040519015158152602001610097565b600154610103906001600160a01b031681565b6040516001600160a01b039091168152602001610097565b7f0000000000000000000000000000000000000000000000000000000000000000610103565b6101036101b4565b61008a6101f8565b61008a610286565b6060610163610293565b60029161017191908361047a565b5061017a610293565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092949350505050565b60006101be610300565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03929092169190911790556101f3610300565b905090565b60028054610205906103f1565b80601f0160208091040260200160405190810160405280929190818152602001828054610231906103f1565b801561027e5780601f106102535761010080835404028352916020019161027e565b820191906000526020600020905b81548152906001019060200180831161026157829003601f168201915b505050505081565b60008054610205906103f1565b3660007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316331480156102cf575060143610155b156102f857600080366102e360148261053b565b926102f093929190610562565b915091509091565b6000366102f0565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163314801561033b575060143610155b1561034d575060131936013560601c90565b503390565b6000815180845260005b818110156103785760208185018101518683018201520161035c565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006103ab6020830184610352565b9392505050565b6000602082840312156103c457600080fd5b81356001600160a01b03811681146103ab57600080fd5b634e487b7160e01b600052604160045260246000fd5b600181811c9082168061040557607f821691505b60208210810361042557634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561047557600081815260208120601f850160051c810160208610156104525750805b601f850160051c820191505b818110156104715782815560010161045e565b5050505b505050565b67ffffffffffffffff831115610492576104926103db565b6104a6836104a083546103f1565b8361042b565b6000601f8411600181146104da57600085156104c25750838201355b600019600387901b1c1916600186901b178355610534565b600083815260209020601f19861690835b8281101561050b57868501358255602094850194600190920191016104eb565b50868210156105285760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b8181038181111561055c57634e487b7160e01b600052601160045260246000fd5b92915050565b6000808585111561057257600080fd5b8386111561057f57600080fd5b505082019391909203915056fea2646970667358221220c863d64187f5b1eb7fbd87e0af899a23f7a2e7214493d64b4cdb33c7d6df096a64736f6c63430008140033",
"bytecode": "0x60a060405234801561001057600080fd5b506040516108c93803806108c983398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b60805161082a61009f6000396000818160c80152818161014f0152818161035c01526103c8015261082a6000f3fe60806040526004361061007b5760003560e01c80638afa462e1161004e5780638afa462e14610173578063bbbf20d614610188578063c4c2bfdc1461019b578063e21f37ce146101b057600080fd5b80632c8cf4fc14610080578063572b6c05146100ab57806367e404ce146101085780637da0a87714610140575b600080fd5b34801561008c57600080fd5b506100956101c5565b6040516100a2919061045c565b60405180910390f35b3480156100b757600080fd5b506100f86100c6366004610476565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b60405190151581526020016100a2565b34801561011457600080fd5b50600154610128906001600160a01b031681565b6040516001600160a01b0390911681526020016100a2565b34801561014c57600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610128565b34801561017f57600080fd5b50610128610220565b6100f86101963660046104b5565b610264565b3480156101a757600080fd5b506100956102bc565b3480156101bc57600080fd5b5061009561034a565b60606101cf610357565b6002916101dd9190836105ef565b506101e6610357565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092949350505050565b600061022a6103c4565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039290921691909117905561025f6103c4565b905090565b60008061027183826106b0565b507f5b4dd3292eb885405859ffb5d2e0a3fd78187c674fc12ca0c224956a51d52a99823361029d6103c4565b6040516102ac93929190610770565b60405180910390a1506001919050565b600280546102c990610566565b80601f01602080910402602001604051908101604052809291908181526020018280546102f590610566565b80156103425780601f1061031757610100808354040283529160200191610342565b820191906000526020600020905b81548152906001019060200180831161032557829003601f168201915b505050505081565b600080546102c990610566565b3660007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633148015610393575060143610155b156103bc57600080366103a76014826107a3565b926103b4939291906107ca565b915091509091565b6000366103b4565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316331480156103ff575060143610155b15610411575060131936013560601c90565b503390565b6000815180845260005b8181101561043c57602081850181015186830182015201610420565b506000602082860101526020601f19601f83011685010191505092915050565b60208152600061046f6020830184610416565b9392505050565b60006020828403121561048857600080fd5b81356001600160a01b038116811461046f57600080fd5b634e487b7160e01b600052604160045260246000fd5b6000602082840312156104c757600080fd5b813567ffffffffffffffff808211156104df57600080fd5b818401915084601f8301126104f357600080fd5b8135818111156105055761050561049f565b604051601f8201601f19908116603f0116810190838211818310171561052d5761052d61049f565b8160405282815287602084870101111561054657600080fd5b826020860160208301376000928101602001929092525095945050505050565b600181811c9082168061057a57607f821691505b60208210810361059a57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156105ea57600081815260208120601f850160051c810160208610156105c75750805b601f850160051c820191505b818110156105e6578281556001016105d3565b5050505b505050565b67ffffffffffffffff8311156106075761060761049f565b61061b836106158354610566565b836105a0565b6000601f84116001811461064f57600085156106375750838201355b600019600387901b1c1916600186901b1783556106a9565b600083815260209020601f19861690835b828110156106805786850135825560209485019460019092019101610660565b508682101561069d5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b815167ffffffffffffffff8111156106ca576106ca61049f565b6106de816106d88454610566565b846105a0565b602080601f83116001811461071357600084156106fb5750858301515b600019600386901b1c1916600185901b1785556105e6565b600085815260208120601f198616915b8281101561074257888601518255948401946001909101908401610723565b50858210156107605787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6060815260006107836060830186610416565b6001600160a01b0394851660208401529290931660409091015292915050565b818103818111156107c457634e487b7160e01b600052601160045260246000fd5b92915050565b600080858511156107da57600080fd5b838611156107e757600080fd5b505082019391909203915056fea2646970667358221220c0cbd6f15fd1a59fe9ddea06f21dd121e30eef632d9a4806d473685be655c6d664736f6c63430008140033",
"deployedBytecode": "0x60806040526004361061007b5760003560e01c80638afa462e1161004e5780638afa462e14610173578063bbbf20d614610188578063c4c2bfdc1461019b578063e21f37ce146101b057600080fd5b80632c8cf4fc14610080578063572b6c05146100ab57806367e404ce146101085780637da0a87714610140575b600080fd5b34801561008c57600080fd5b506100956101c5565b6040516100a2919061045c565b60405180910390f35b3480156100b757600080fd5b506100f86100c6366004610476565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b60405190151581526020016100a2565b34801561011457600080fd5b50600154610128906001600160a01b031681565b6040516001600160a01b0390911681526020016100a2565b34801561014c57600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610128565b34801561017f57600080fd5b50610128610220565b6100f86101963660046104b5565b610264565b3480156101a757600080fd5b506100956102bc565b3480156101bc57600080fd5b5061009561034a565b60606101cf610357565b6002916101dd9190836105ef565b506101e6610357565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092949350505050565b600061022a6103c4565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039290921691909117905561025f6103c4565b905090565b60008061027183826106b0565b507f5b4dd3292eb885405859ffb5d2e0a3fd78187c674fc12ca0c224956a51d52a99823361029d6103c4565b6040516102ac93929190610770565b60405180910390a1506001919050565b600280546102c990610566565b80601f01602080910402602001604051908101604052809291908181526020018280546102f590610566565b80156103425780601f1061031757610100808354040283529160200191610342565b820191906000526020600020905b81548152906001019060200180831161032557829003601f168201915b505050505081565b600080546102c990610566565b3660007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633148015610393575060143610155b156103bc57600080366103a76014826107a3565b926103b4939291906107ca565b915091509091565b6000366103b4565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316331480156103ff575060143610155b15610411575060131936013560601c90565b503390565b6000815180845260005b8181101561043c57602081850181015186830182015201610420565b506000602082860101526020601f19601f83011685010191505092915050565b60208152600061046f6020830184610416565b9392505050565b60006020828403121561048857600080fd5b81356001600160a01b038116811461046f57600080fd5b634e487b7160e01b600052604160045260246000fd5b6000602082840312156104c757600080fd5b813567ffffffffffffffff808211156104df57600080fd5b818401915084601f8301126104f357600080fd5b8135818111156105055761050561049f565b604051601f8201601f19908116603f0116810190838211818310171561052d5761052d61049f565b8160405282815287602084870101111561054657600080fd5b826020860160208301376000928101602001929092525095945050505050565b600181811c9082168061057a57607f821691505b60208210810361059a57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156105ea57600081815260208120601f850160051c810160208610156105c75750805b601f850160051c820191505b818110156105e6578281556001016105d3565b5050505b505050565b67ffffffffffffffff8311156106075761060761049f565b61061b836106158354610566565b836105a0565b6000601f84116001811461064f57600085156106375750838201355b600019600387901b1c1916600186901b1783556106a9565b600083815260209020601f19861690835b828110156106805786850135825560209485019460019092019101610660565b508682101561069d5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b815167ffffffffffffffff8111156106ca576106ca61049f565b6106de816106d88454610566565b846105a0565b602080601f83116001811461071357600084156106fb5750858301515b600019600386901b1c1916600185901b1785556105e6565b600085815260208120601f198616915b8281101561074257888601518255948401946001909101908401610723565b50858210156107605787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6060815260006107836060830186610416565b6001600160a01b0394851660208401529290931660409091015292915050565b818103818111156107c457634e487b7160e01b600052601160045260246000fd5b92915050565b600080858511156107da57600080fd5b838611156107e757600080fd5b505082019391909203915056fea2646970667358221220c0cbd6f15fd1a59fe9ddea06f21dd121e30eef632d9a4806d473685be655c6d664736f6c63430008140033",
"linkReferences": {},
"deployedLinkReferences": {}
}
Loading

0 comments on commit 4a86a85

Please sign in to comment.