Skip to content

Commit 5bbec69

Browse files
Initial commit
1 parent eacfeb2 commit 5bbec69

File tree

21 files changed

+1458
-57
lines changed

21 files changed

+1458
-57
lines changed

.gitmodules

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
[submodule "lib/forge-std"]
22
path = lib/forge-std
33
url = https://github.com/foundry-rs/forge-std
4+
[submodule "lib/chainlink-brownie-contracts"]
5+
path = lib/chainlink-brownie-contracts
6+
url = https://github.com/smartcontractkit/chainlink-brownie-contracts
7+
[submodule "lib/solmate"]
8+
path = lib/solmate
9+
url = https://github.com/transmissions11/solmate
10+
[submodule "lib/foundry-devops"]
11+
path = lib/foundry-devops
12+
url = https://github.com/Cyfrin/foundry-devops

Makefile

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
-include .env
2+
3+
.PHONY: all test clean deploy fund help install snapshot format anvil
4+
5+
DEFAULT_ANVIL_KEY := 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
6+
7+
help:
8+
@echo "Usage:"
9+
@echo " make deploy [ARGS=...]\n example: make deploy ARGS=\"--network sepolia\""
10+
@echo ""
11+
@echo " make fund [ARGS=...]\n example: make deploy ARGS=\"--network sepolia\""
12+
13+
all: clean remove install update build
14+
15+
# Clean the repo
16+
clean :; forge clean
17+
18+
# Remove modules
19+
remove :; rm -rf .gitmodules && rm -rf .git/modules/* && rm -rf lib && touch .gitmodules && git add . && git commit -m "modules"
20+
21+
install :; forge install cyfrin/[email protected] --no-commit && forge install smartcontractkit/[email protected] --no-commit && forge install foundry-rs/[email protected] --no-commit && forge install transmissions11/solmate@v6 --no-commit
22+
23+
# Update Dependencies
24+
update:; forge update
25+
26+
build:; forge build
27+
28+
test :; forge test
29+
30+
snapshot :; forge snapshot
31+
32+
format :; forge fmt
33+
34+
anvil :; anvil -m 'test test test test test test test test test test test junk' --steps-tracing --block-time 1
35+
36+
NETWORK_ARGS := --rpc-url http://localhost:8545 --private-key $(DEFAULT_ANVIL_KEY) --broadcast
37+
38+
# ifeq ($(findstring --network sepolia,$(ARGS)),--network sepolia)
39+
# NETWORK_ARGS := --rpc-url $(SEPOLIA_RPC_URL) --private-key $(PRIVATE_KEY) --broadcast --verify --etherscan-api-key $(ETHERSCAN_API_KEY) -vvvv
40+
# endif
41+
42+
deploy:
43+
@forge script script/DeployRaffle.s.sol:DeployRaffle --rpc-url $(SEPOLIA_RPC_URL) --account defaultKey --broadcast --verify --etherscan-api-key $(ETHERSCAN_API_KEY) -vvvv
44+
45+
createSubscription:
46+
@forge script script/Interactions.s.sol:CreateSubscription $(NETWORK_ARGS)
47+
48+
addConsumer:
49+
@forge script script/Interactions.s.sol:AddConsumer $(NETWORK_ARGS)
50+
51+
fundSubscription:
52+
@forge script script/Interactions.s.sol:FundSubscription $(NETWORK_ARGS)
53+

broadcast/DeployRaffle.s.sol/11155111/run-1732473732.json

Lines changed: 106 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployRaffle.s.sol/11155111/run-latest.json

Lines changed: 106 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
{
2+
"transactions": [
3+
{
4+
"hash": "0xd0a3ecc75081e74110f6ff66190f42d242fe354dda13af3b3ec264fd379b02f0",
5+
"transactionType": "CALL",
6+
"contractName": null,
7+
"contractAddress": "0x779877a7b0d9e8603169ddbd7836e478b4624789",
8+
"function": "transferAndCall(address,uint256,bytes)",
9+
"arguments": [
10+
"0x9DdfaCa8183c41ad55329BdeeD9F6A8d53168B1B",
11+
"3000000000000000000",
12+
"0xa3428e9668db2f8ddbf4696b75991fae8087bc18e20d4f4bc64bab239464d225"
13+
],
14+
"transaction": {
15+
"from": "0x188a278f1e94b3fb39df76e07421f17cb9092a8d",
16+
"to": "0x779877a7b0d9e8603169ddbd7836e478b4624789",
17+
"gas": "0x1c1ff",
18+
"value": "0x0",
19+
"input": "0x4000aea00000000000000000000000009ddfaca8183c41ad55329bdeed9f6a8d53168b1b00000000000000000000000000000000000000000000000029a2241af62c000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000020a3428e9668db2f8ddbf4696b75991fae8087bc18e20d4f4bc64bab239464d225",
20+
"nonce": "0x23",
21+
"chainId": "0xaa36a7"
22+
},
23+
"additionalContracts": [],
24+
"isFixedGasLimit": false
25+
}
26+
],
27+
"receipts": [
28+
{
29+
"status": "0x1",
30+
"cumulativeGasUsed": "0xb177f9",
31+
"logs": [
32+
{
33+
"address": "0x779877a7b0d9e8603169ddbd7836e478b4624789",
34+
"topics": [
35+
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
36+
"0x000000000000000000000000188a278f1e94b3fb39df76e07421f17cb9092a8d",
37+
"0x0000000000000000000000009ddfaca8183c41ad55329bdeed9f6a8d53168b1b"
38+
],
39+
"data": "0x00000000000000000000000000000000000000000000000029a2241af62c0000",
40+
"blockHash": "0xc38a1a7dd1fdd3f150a5649504b1604a835389f26ee3afdef4570b7b63a9033c",
41+
"blockNumber": "0x6cb62c",
42+
"transactionHash": "0xd0a3ecc75081e74110f6ff66190f42d242fe354dda13af3b3ec264fd379b02f0",
43+
"transactionIndex": "0x161",
44+
"logIndex": "0x36",
45+
"removed": false
46+
},
47+
{
48+
"address": "0x779877a7b0d9e8603169ddbd7836e478b4624789",
49+
"topics": [
50+
"0xe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c16",
51+
"0x000000000000000000000000188a278f1e94b3fb39df76e07421f17cb9092a8d",
52+
"0x0000000000000000000000009ddfaca8183c41ad55329bdeed9f6a8d53168b1b"
53+
],
54+
"data": "0x00000000000000000000000000000000000000000000000029a2241af62c000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000020a3428e9668db2f8ddbf4696b75991fae8087bc18e20d4f4bc64bab239464d225",
55+
"blockHash": "0xc38a1a7dd1fdd3f150a5649504b1604a835389f26ee3afdef4570b7b63a9033c",
56+
"blockNumber": "0x6cb62c",
57+
"transactionHash": "0xd0a3ecc75081e74110f6ff66190f42d242fe354dda13af3b3ec264fd379b02f0",
58+
"transactionIndex": "0x161",
59+
"logIndex": "0x37",
60+
"removed": false
61+
},
62+
{
63+
"address": "0x9ddfaca8183c41ad55329bdeed9f6a8d53168b1b",
64+
"topics": [
65+
"0x1ced9348ff549fceab2ac57cd3a9de38edaaab274b725ee82c23e8fc8c4eec7a",
66+
"0xa3428e9668db2f8ddbf4696b75991fae8087bc18e20d4f4bc64bab239464d225"
67+
],
68+
"data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000029a2241af62c0000",
69+
"blockHash": "0xc38a1a7dd1fdd3f150a5649504b1604a835389f26ee3afdef4570b7b63a9033c",
70+
"blockNumber": "0x6cb62c",
71+
"transactionHash": "0xd0a3ecc75081e74110f6ff66190f42d242fe354dda13af3b3ec264fd379b02f0",
72+
"transactionIndex": "0x161",
73+
"logIndex": "0x38",
74+
"removed": false
75+
}
76+
],
77+
"logsBloom": "0x00000004000000000000000000000000000001000020000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000008000000000000002000000000000020000020000808000000000000000000000000000000000000200000000000000010000040000000000000000000000000010000800000000020000000020000000000000000000000000000000000000000010000000000000000000000000004000000000000000002000000000000000000000000000000000000000100000000000000000010000000000000800000000000000000000000000000000000000000000000",
78+
"type": "0x2",
79+
"transactionHash": "0xd0a3ecc75081e74110f6ff66190f42d242fe354dda13af3b3ec264fd379b02f0",
80+
"transactionIndex": "0x161",
81+
"blockHash": "0xc38a1a7dd1fdd3f150a5649504b1604a835389f26ee3afdef4570b7b63a9033c",
82+
"blockNumber": "0x6cb62c",
83+
"gasUsed": "0x133b1",
84+
"effectiveGasPrice": "0x50f5331b1",
85+
"from": "0x188a278f1e94b3fb39df76e07421f17cb9092a8d",
86+
"to": "0x779877a7b0d9e8603169ddbd7836e478b4624789",
87+
"contractAddress": null
88+
}
89+
],
90+
"libraries": [],
91+
"pending": [],
92+
"returns": {},
93+
"timestamp": 1732216805,
94+
"chain": 11155111,
95+
"commit": "ee64b2a"
96+
}
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
{
2+
"transactions": [
3+
{
4+
"hash": "0xd0a3ecc75081e74110f6ff66190f42d242fe354dda13af3b3ec264fd379b02f0",
5+
"transactionType": "CALL",
6+
"contractName": null,
7+
"contractAddress": "0x779877a7b0d9e8603169ddbd7836e478b4624789",
8+
"function": "transferAndCall(address,uint256,bytes)",
9+
"arguments": [
10+
"0x9DdfaCa8183c41ad55329BdeeD9F6A8d53168B1B",
11+
"3000000000000000000",
12+
"0xa3428e9668db2f8ddbf4696b75991fae8087bc18e20d4f4bc64bab239464d225"
13+
],
14+
"transaction": {
15+
"from": "0x188a278f1e94b3fb39df76e07421f17cb9092a8d",
16+
"to": "0x779877a7b0d9e8603169ddbd7836e478b4624789",
17+
"gas": "0x1c1ff",
18+
"value": "0x0",
19+
"input": "0x4000aea00000000000000000000000009ddfaca8183c41ad55329bdeed9f6a8d53168b1b00000000000000000000000000000000000000000000000029a2241af62c000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000020a3428e9668db2f8ddbf4696b75991fae8087bc18e20d4f4bc64bab239464d225",
20+
"nonce": "0x23",
21+
"chainId": "0xaa36a7"
22+
},
23+
"additionalContracts": [],
24+
"isFixedGasLimit": false
25+
}
26+
],
27+
"receipts": [
28+
{
29+
"status": "0x1",
30+
"cumulativeGasUsed": "0xb177f9",
31+
"logs": [
32+
{
33+
"address": "0x779877a7b0d9e8603169ddbd7836e478b4624789",
34+
"topics": [
35+
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
36+
"0x000000000000000000000000188a278f1e94b3fb39df76e07421f17cb9092a8d",
37+
"0x0000000000000000000000009ddfaca8183c41ad55329bdeed9f6a8d53168b1b"
38+
],
39+
"data": "0x00000000000000000000000000000000000000000000000029a2241af62c0000",
40+
"blockHash": "0xc38a1a7dd1fdd3f150a5649504b1604a835389f26ee3afdef4570b7b63a9033c",
41+
"blockNumber": "0x6cb62c",
42+
"transactionHash": "0xd0a3ecc75081e74110f6ff66190f42d242fe354dda13af3b3ec264fd379b02f0",
43+
"transactionIndex": "0x161",
44+
"logIndex": "0x36",
45+
"removed": false
46+
},
47+
{
48+
"address": "0x779877a7b0d9e8603169ddbd7836e478b4624789",
49+
"topics": [
50+
"0xe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c16",
51+
"0x000000000000000000000000188a278f1e94b3fb39df76e07421f17cb9092a8d",
52+
"0x0000000000000000000000009ddfaca8183c41ad55329bdeed9f6a8d53168b1b"
53+
],
54+
"data": "0x00000000000000000000000000000000000000000000000029a2241af62c000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000020a3428e9668db2f8ddbf4696b75991fae8087bc18e20d4f4bc64bab239464d225",
55+
"blockHash": "0xc38a1a7dd1fdd3f150a5649504b1604a835389f26ee3afdef4570b7b63a9033c",
56+
"blockNumber": "0x6cb62c",
57+
"transactionHash": "0xd0a3ecc75081e74110f6ff66190f42d242fe354dda13af3b3ec264fd379b02f0",
58+
"transactionIndex": "0x161",
59+
"logIndex": "0x37",
60+
"removed": false
61+
},
62+
{
63+
"address": "0x9ddfaca8183c41ad55329bdeed9f6a8d53168b1b",
64+
"topics": [
65+
"0x1ced9348ff549fceab2ac57cd3a9de38edaaab274b725ee82c23e8fc8c4eec7a",
66+
"0xa3428e9668db2f8ddbf4696b75991fae8087bc18e20d4f4bc64bab239464d225"
67+
],
68+
"data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000029a2241af62c0000",
69+
"blockHash": "0xc38a1a7dd1fdd3f150a5649504b1604a835389f26ee3afdef4570b7b63a9033c",
70+
"blockNumber": "0x6cb62c",
71+
"transactionHash": "0xd0a3ecc75081e74110f6ff66190f42d242fe354dda13af3b3ec264fd379b02f0",
72+
"transactionIndex": "0x161",
73+
"logIndex": "0x38",
74+
"removed": false
75+
}
76+
],
77+
"logsBloom": "0x00000004000000000000000000000000000001000020000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000008000000000000002000000000000020000020000808000000000000000000000000000000000000200000000000000010000040000000000000000000000000010000800000000020000000020000000000000000000000000000000000000000010000000000000000000000000004000000000000000002000000000000000000000000000000000000000100000000000000000010000000000000800000000000000000000000000000000000000000000000",
78+
"type": "0x2",
79+
"transactionHash": "0xd0a3ecc75081e74110f6ff66190f42d242fe354dda13af3b3ec264fd379b02f0",
80+
"transactionIndex": "0x161",
81+
"blockHash": "0xc38a1a7dd1fdd3f150a5649504b1604a835389f26ee3afdef4570b7b63a9033c",
82+
"blockNumber": "0x6cb62c",
83+
"gasUsed": "0x133b1",
84+
"effectiveGasPrice": "0x50f5331b1",
85+
"from": "0x188a278f1e94b3fb39df76e07421f17cb9092a8d",
86+
"to": "0x779877a7b0d9e8603169ddbd7836e478b4624789",
87+
"contractAddress": null
88+
}
89+
],
90+
"libraries": [],
91+
"pending": [],
92+
"returns": {},
93+
"timestamp": 1732216805,
94+
"chain": 11155111,
95+
"commit": "ee64b2a"
96+
}

foundry.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,13 @@ src = "src"
33
out = "out"
44
libs = ["lib"]
55

6+
remappings = [
7+
"@chainlink/contracts/=lib/chainlink-brownie-contracts/contracts/",
8+
'@solmate=lib/solmate/src/',
9+
]
10+
fs_permissions = [
11+
{ access = "read", path = "./broadcast" },
12+
{ access = "read", path = "./reports" },
13+
]
14+
615
# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options

json.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

lib/chainlink-brownie-contracts

lib/foundry-devops

Submodule foundry-devops added at 47393d0

0 commit comments

Comments
 (0)