Skip to content

Commit

Permalink
feat: add integration test: Interactions.t.sol
Browse files Browse the repository at this point in the history
  • Loading branch information
RamboGj committed Nov 20, 2024
1 parent cca7ae3 commit e1d08c1
Show file tree
Hide file tree
Showing 10 changed files with 245 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "lib/chainlink-brownie-contracts"]
path = lib/chainlink-brownie-contracts
url = https://github.com/smartcontractkit/chainlink-brownie-contracts
[submodule "lib/foundry-devops"]
path = lib/foundry-devops
url = https://github.com/Cyfrin/foundry-devops
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-include .env

build:; forge build

deploy-sepolia:; forge script script/DeployFundMe.s.sol --rpc-url $(RPC_URL) --account testnetKey --broadcast --verify --etherscan-api-key $(ETHERSCAN_API_KEY) -vvvv
53 changes: 53 additions & 0 deletions broadcast/DeployFundMe.s.sol/11155111/run-1732107842.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"transactions": [
{
"hash": "0x50506f094b1c3b84b76d91dcaca7e9027f5ba1418e749b1b47f3e8252e29448d",
"transactionType": "CREATE",
"contractName": "FundMe",
"contractAddress": "0xe608b99ab796dd2f1e85cfaaf8c1a32626909589",
"function": null,
"arguments": [
"0x694AA1769357215DE4FAC081bf1f309aDC325306"
],
"transaction": {
"from": "0x3028c176b0fb834e410ae66595e5d05b6a078478",
"gas": "0x9f4b8",
"value": "0x0",
"input": "0x60c060405234801561001057600080fd5b506040516108c93803806108c983398101604081905261002f91610044565b336080526001600160a01b031660a052610074565b60006020828403121561005657600080fd5b81516001600160a01b038116811461006d57600080fd5b9392505050565b60805160a05161081b6100ae600039600081816101b0015261029201526000818161013401528181610322015261045f015261081b6000f3fe60806040526004361061007f5760003560e01c8063893d20e81161004e578063893d20e814610125578063b60d42881461008e578063be2693f01461016c578063d7b4750c146101815761008e565b80630343fb25146100965780630d8e6e2c146100df5780633ccfd60b146100f45780636b69a592146101095761008e565b3661008e5761008c6101a1565b005b61008c6101a1565b3480156100a257600080fd5b506100cc6100b1366004610671565b6001600160a01b031660009081526020819052604090205490565b6040519081526020015b60405180910390f35b3480156100eb57600080fd5b506100cc61028e565b34801561010057600080fd5b5061008c610317565b34801561011557600080fd5b506100cc674563918244f4000081565b34801561013157600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020016100d6565b34801561017857600080fd5b5061008c610454565b34801561018d57600080fd5b5061015461019c36600461069a565b61050c565b674563918244f400006101d4347f000000000000000000000000000000000000000000000000000000000000000061053c565b10156102275760405162461bcd60e51b815260206004820152601b60248201527f596f75206e65656420746f207370656e64206d6f72652045544821000000000060448201526064015b60405180910390fd5b33600090815260208190526040812080543492906102469084906106c9565b90915550506001805480820182556000919091527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60180546001600160a01b03191633179055565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166354fd4d506040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102ee573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031291906106dc565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610360576040516310e0797960e01b815260040160405180910390fd5b60005b6001548110156103ac57600060018281548110610382576103826106f5565b60009182526020808320909101546001600160a01b03168252819052604081205550600101610363565b5060408051600081526020810191829052516103ca916001916105f7565b50604051600090339047908381818185875af1925050503d806000811461040d576040519150601f19603f3d011682016040523d82523d6000602084013e610412565b606091505b50509050806104515760405162461bcd60e51b815260206004820152600b60248201526a10d85b1b0819985a5b195960aa1b604482015260640161021e565b50565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461049d576040516310e0797960e01b815260040160405180910390fd5b60015460005b818110156104ea576000600182815481106104c0576104c06106f5565b60009182526020808320909101546001600160a01b031682528190526040812055506001016104a3565b506040805160008152602081019182905251610508916001916105f7565b5050565b600060018281548110610521576105216106f5565b6000918252602090912001546001600160a01b031692915050565b60008061054883610574565b90506000670de0b6b3a764000061055f868461070b565b6105699190610722565b925050505b92915050565b600080826001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156105b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d99190610763565b505050915050806402540be4006105f091906107b5565b9392505050565b82805482825590600052602060002090810192821561064c579160200282015b8281111561064c57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190610617565b5061065892915061065c565b5090565b5b80821115610658576000815560010161065d565b60006020828403121561068357600080fd5b81356001600160a01b03811681146105f057600080fd5b6000602082840312156106ac57600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561056e5761056e6106b3565b6000602082840312156106ee57600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b808202811582820484141761056e5761056e6106b3565b60008261073f57634e487b7160e01b600052601260045260246000fd5b500490565b805169ffffffffffffffffffff8116811461075e57600080fd5b919050565b600080600080600060a0868803121561077b57600080fd5b61078486610744565b602087015160408801516060890151929750909550935091506107a960808701610744565b90509295509295909350565b80820260008212600160ff1b841416156107d1576107d16106b3565b818105831482151761056e5761056e6106b356fea2646970667358221220d521075bd99e7703c99ea3c442d0e6ca59804181d14b80fdbd80dac7c1c86fd764736f6c634300081c0033000000000000000000000000694aa1769357215de4fac081bf1f309adc325306",
"nonce": "0x13",
"chainId": "0xaa36a7"
},
"additionalContracts": [],
"isFixedGasLimit": false
}
],
"receipts": [
{
"status": "0x1",
"cumulativeGasUsed": "0xa77ee4",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"type": "0x2",
"transactionHash": "0x50506f094b1c3b84b76d91dcaca7e9027f5ba1418e749b1b47f3e8252e29448d",
"transactionIndex": "0x70",
"blockHash": "0xe2c383809c6c7900e693dcf6f9962d683f1c4f27e1e999a402aca66efcee3e2c",
"blockNumber": "0x6c94ad",
"gasUsed": "0x7a91e",
"effectiveGasPrice": "0xde8e2051f",
"from": "0x3028c176b0fb834e410ae66595e5d05b6a078478",
"to": null,
"contractAddress": "0xe608b99ab796dd2f1e85cfaaf8c1a32626909589"
}
],
"libraries": [],
"pending": [],
"returns": {
"0": {
"internal_type": "contract FundMe",
"value": "0xe608B99AB796dD2F1E85CfaaF8c1A32626909589"
}
},
"timestamp": 1732107842,
"chain": 11155111,
"commit": "cca7ae3"
}
53 changes: 53 additions & 0 deletions broadcast/DeployFundMe.s.sol/11155111/run-1732108271.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"transactions": [
{
"hash": "0x4364ade478b6711bd9f0abf11a759f8eb7a89de83e9ed87c3495f8e3fa8ad0fd",
"transactionType": "CREATE",
"contractName": "FundMe",
"contractAddress": "0x3abee58e5965337dd1dd642479ed0eeb51990822",
"function": null,
"arguments": [
"0x694AA1769357215DE4FAC081bf1f309aDC325306"
],
"transaction": {
"from": "0x3028c176b0fb834e410ae66595e5d05b6a078478",
"gas": "0x9f4b8",
"value": "0x0",
"input": "0x60c060405234801561001057600080fd5b506040516108c93803806108c983398101604081905261002f91610044565b336080526001600160a01b031660a052610074565b60006020828403121561005657600080fd5b81516001600160a01b038116811461006d57600080fd5b9392505050565b60805160a05161081b6100ae600039600081816101b0015261029201526000818161013401528181610322015261045f015261081b6000f3fe60806040526004361061007f5760003560e01c8063893d20e81161004e578063893d20e814610125578063b60d42881461008e578063be2693f01461016c578063d7b4750c146101815761008e565b80630343fb25146100965780630d8e6e2c146100df5780633ccfd60b146100f45780636b69a592146101095761008e565b3661008e5761008c6101a1565b005b61008c6101a1565b3480156100a257600080fd5b506100cc6100b1366004610671565b6001600160a01b031660009081526020819052604090205490565b6040519081526020015b60405180910390f35b3480156100eb57600080fd5b506100cc61028e565b34801561010057600080fd5b5061008c610317565b34801561011557600080fd5b506100cc674563918244f4000081565b34801561013157600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020016100d6565b34801561017857600080fd5b5061008c610454565b34801561018d57600080fd5b5061015461019c36600461069a565b61050c565b674563918244f400006101d4347f000000000000000000000000000000000000000000000000000000000000000061053c565b10156102275760405162461bcd60e51b815260206004820152601b60248201527f596f75206e65656420746f207370656e64206d6f72652045544821000000000060448201526064015b60405180910390fd5b33600090815260208190526040812080543492906102469084906106c9565b90915550506001805480820182556000919091527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60180546001600160a01b03191633179055565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166354fd4d506040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102ee573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031291906106dc565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610360576040516310e0797960e01b815260040160405180910390fd5b60005b6001548110156103ac57600060018281548110610382576103826106f5565b60009182526020808320909101546001600160a01b03168252819052604081205550600101610363565b5060408051600081526020810191829052516103ca916001916105f7565b50604051600090339047908381818185875af1925050503d806000811461040d576040519150601f19603f3d011682016040523d82523d6000602084013e610412565b606091505b50509050806104515760405162461bcd60e51b815260206004820152600b60248201526a10d85b1b0819985a5b195960aa1b604482015260640161021e565b50565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461049d576040516310e0797960e01b815260040160405180910390fd5b60015460005b818110156104ea576000600182815481106104c0576104c06106f5565b60009182526020808320909101546001600160a01b031682528190526040812055506001016104a3565b506040805160008152602081019182905251610508916001916105f7565b5050565b600060018281548110610521576105216106f5565b6000918252602090912001546001600160a01b031692915050565b60008061054883610574565b90506000670de0b6b3a764000061055f868461070b565b6105699190610722565b925050505b92915050565b600080826001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156105b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d99190610763565b505050915050806402540be4006105f091906107b5565b9392505050565b82805482825590600052602060002090810192821561064c579160200282015b8281111561064c57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190610617565b5061065892915061065c565b5090565b5b80821115610658576000815560010161065d565b60006020828403121561068357600080fd5b81356001600160a01b03811681146105f057600080fd5b6000602082840312156106ac57600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561056e5761056e6106b3565b6000602082840312156106ee57600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b808202811582820484141761056e5761056e6106b3565b60008261073f57634e487b7160e01b600052601260045260246000fd5b500490565b805169ffffffffffffffffffff8116811461075e57600080fd5b919050565b600080600080600060a0868803121561077b57600080fd5b61078486610744565b602087015160408801516060890151929750909550935091506107a960808701610744565b90509295509295909350565b80820260008212600160ff1b841416156107d1576107d16106b3565b818105831482151761056e5761056e6106b356fea2646970667358221220d521075bd99e7703c99ea3c442d0e6ca59804181d14b80fdbd80dac7c1c86fd764736f6c634300081c0033000000000000000000000000694aa1769357215de4fac081bf1f309adc325306",
"nonce": "0x14",
"chainId": "0xaa36a7"
},
"additionalContracts": [],
"isFixedGasLimit": false
}
],
"receipts": [
{
"status": "0x1",
"cumulativeGasUsed": "0x98ce4d",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"type": "0x2",
"transactionHash": "0x4364ade478b6711bd9f0abf11a759f8eb7a89de83e9ed87c3495f8e3fa8ad0fd",
"transactionIndex": "0xaa",
"blockHash": "0x7b5baed0495e6fcc54307c65d40598ec62e87b60108a64a36e868b0be40f9cd0",
"blockNumber": "0x6c94cf",
"gasUsed": "0x7a91e",
"effectiveGasPrice": "0xda3402856",
"from": "0x3028c176b0fb834e410ae66595e5d05b6a078478",
"to": null,
"contractAddress": "0x3abee58e5965337dd1dd642479ed0eeb51990822"
}
],
"libraries": [],
"pending": [],
"returns": {
"0": {
"internal_type": "contract FundMe",
"value": "0x3aBEE58E5965337Dd1dd642479ed0eeb51990822"
}
},
"timestamp": 1732108271,
"chain": 11155111,
"commit": "cca7ae3"
}
Loading

0 comments on commit e1d08c1

Please sign in to comment.