-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3b726db
commit 87efbd4
Showing
13 changed files
with
569 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,4 @@ out/ | |
docs/ | ||
|
||
# Dotenv file | ||
.env | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "lib/openzeppelin-contracts"] | ||
path = lib/openzeppelin-contracts | ||
url = https://github.com/OpenZeppelin/openzeppelin-contracts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
-include .env | ||
|
||
.PHONY: all test clean deploy fund help install snapshot format anvil | ||
|
||
DEFAULT_ANVIL_KEY := 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 | ||
|
||
help: | ||
@echo "Usage:" | ||
@echo " make deploy [ARGS=...]\n example: make deploy ARGS=\"--network sepolia\"" | ||
@echo "" | ||
|
||
all: clean remove install update build | ||
|
||
# Clean the repo | ||
clean :; forge clean | ||
|
||
# Remove modules | ||
remove :; rm -rf .gitmodules && rm -rf .git/modules/* && rm -rf lib && touch .gitmodules && git add . && git commit -m "modules" | ||
|
||
install :; forge install Cyfrin/foundry-devops@0.0.11 --no-commit --no-commit && forge install foundry-rs/forge-std@v1.5.3 --no-commit && forge install openzeppelin/openzeppelin-contracts@v4.8.3 --no-commit | ||
|
||
# Update Dependencies | ||
update:; forge update | ||
|
||
build:; forge build | ||
|
||
test :; forge test | ||
|
||
snapshot :; forge snapshot | ||
|
||
format :; forge fmt | ||
|
||
anvil :; anvil -m 'test test test test test test test test test test test junk' --steps-tracing --block-time 1 | ||
|
||
NETWORK_ARGS := --rpc-url http://127.0.0.1:8545 --private-key $(DEFAULT_ANVIL_KEY) --broadcast | ||
|
||
ifeq ($(findstring --network sepolia,$(ARGS)),--network sepolia) | ||
NETWORK_ARGS := --rpc-url $(SEPOLIA_RPC_URL) --private-key $(PRIVATE_KEY) --broadcast --verify --etherscan-api-key $(ETHERSCAN_API_KEY) -vvvv | ||
endif | ||
|
||
deployeth: | ||
@forge script script/DeployPIFToken.s.sol:DeployPIFToken --fork-url $(ETH_RPC_URL) --private-key $(ETH_WALLET_PK) --broadcast --verify --etherscan-api-key $(ETHERSCAN_API_KEY) -vvv | ||
|
||
deploymatic: | ||
@forge script script/DeployPIFToken.s.sol:DeployPIFToken --fork-url $(MATIC_RPC_URL) --private-key $(MATIC_WALLET_PK) --broadcast --verify --etherscan-api-key $(MATIC_API_KEY) -vvv | ||
|
||
deploybnb: | ||
@forge script script/DeployPIFToken.s.sol:DeployPIFToken --fork-url $(BNB_RPC_URL) --private-key $(BNB_WALLET_PK) --broadcast --verify --etherscan-api-key $(BNB_API_KEY) -vvv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{ | ||
"transactions": [ | ||
{ | ||
"hash": "0x5c79c5a213b3611c583912252b2f8bd35cf177151dda567b51604b7a9867d7d2", | ||
"transactionType": "CREATE", | ||
"contractName": "PIFToken", | ||
"contractAddress": "0x26dc7dd2a1c9a1f6da9cb992321f80fc91d73d3e", | ||
"function": null, | ||
"arguments": null, | ||
"transaction": { | ||
"from": "0x4310a13c5ef01a8c75cabac34c741a3227b4288e", | ||
"gas": "0x1883ac", | ||
"value": "0x0", | ||
"input": "0x60806040526008805461ffff60a01b1916604b60a21b17905534801561002457600080fd5b506040518060400160405280600e81526020016d14185e48125d08119bdc9dd85c9960921b815250604051806040016040528060038152602001622824a360e91b815250816003908161007791906102cd565b50600461008482826102cd565b50506005805460ff19169055506100a7336b019d971e4fe8401e740000006100c3565b60058054610100600160a81b03191633610100021790556103b3565b6001600160a01b0382166100f25760405163ec442f0560e01b8152600060048201526024015b60405180910390fd5b6100fe60008383610102565b5050565b6001600160a01b03831661012d578060026000828254610122919061038c565b9091555061019f9050565b6001600160a01b038316600090815260208190526040902054818110156101805760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016100e9565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b0382166101bb576002805482900390556101da565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161021f91815260200190565b60405180910390a3505050565b634e487b7160e01b600052604160045260246000fd5b600181811c9082168061025657607f821691505b60208210810361027657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156102c8576000816000526020600020601f850160051c810160208610156102a55750805b601f850160051c820191505b818110156102c4578281556001016102b1565b5050505b505050565b81516001600160401b038111156102e6576102e661022c565b6102fa816102f48454610242565b8461027c565b602080601f83116001811461032f57600084156103175750858301515b600019600386901b1c1916600185901b1785556102c4565b600085815260208120601f198616915b8281101561035e5788860151825594840194600190910190840161033f565b508582101561037c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b808201808211156103ad57634e487b7160e01b600052601160045260246000fd5b92915050565b6112a9806103c26000396000f3fe608060405234801561001057600080fd5b50600436106101585760003560e01c806370a08231116100c3578063a9059cbb1161007c578063a9059cbb146102da578063d54f9f35146102ed578063dd62ed3e14610315578063e30c39781461034e578063f2fde38b14610361578063fe042a3e1461037457600080fd5b806370a082311461026e5780637200b829146102975780638456cb591461029f5780638705fcd4146102a75780638da5cb5b146102ba57806395d89b41146102d257600080fd5b8063313ce56711610115578063313ce567146101fb5780633f4ba83a1461020a578063412753581461021257806342966c681461023d57806347ddb15a146102505780635c975abb1461026357600080fd5b806306fdde031461015d578063095ea7b31461017b5780630f4fbcc61461019e57806318160ddd146101b357806323b872dd146101c55780632fa62740146101d8575b600080fd5b610165610387565b6040516101729190610fd6565b60405180910390f35b61018e610189366004611041565b610419565b6040519015158152602001610172565b6101b16101ac36600461106b565b610433565b005b6002545b604051908152602001610172565b61018e6101d3366004611086565b6104dc565b61018e6101e636600461106b565b60076020526000908152604090205460ff1681565b60405160128152602001610172565b6101b161057b565b600654610225906001600160a01b031681565b6040516001600160a01b039091168152602001610172565b6101b161024b3660046110c2565b6105b4565b6101b161025e36600461106b565b61061a565b60055460ff1661018e565b6101b761027c36600461106b565b6001600160a01b031660009081526020819052604090205490565b6101b16106bd565b6101b16107bf565b6101b16102b536600461106b565b6107f6565b6005546102259061010090046001600160a01b031681565b610165610897565b61018e6102e8366004611041565b6108a6565b60085461030290600160a01b900461ffff1681565b60405161ffff9091168152602001610172565b6101b76103233660046110db565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b600854610225906001600160a01b031681565b6101b161036f36600461106b565b61091b565b6101b161038236600461110e565b610994565b60606003805461039690611132565b80601f01602080910402602001604051908101604052809291908181526020018280546103c290611132565b801561040f5780601f106103e45761010080835404028352916020019161040f565b820191906000526020600020905b8154815290600101906020018083116103f257829003601f168201915b5050505050905090565b600033610427818585610abb565b60019150505b92915050565b60055461010090046001600160a01b0316331461046b5760405162461bcd60e51b81526004016104629061116c565b60405180910390fd5b806001600160a01b0381166104925760405162461bcd60e51b8152600401610462906111ad565b6001600160a01b038216600081815260076020526040808220805460ff19169055517fcb89fd6144c6fee2cc62917942933f35a60450a10b3c834540f43b699bb0f8589190a25050565b60006104e6610acd565b81600081116105075760405162461bcd60e51b8152600401610462906111d6565b846001600160a01b03811661052e5760405162461bcd60e51b8152600401610462906111ad565b846001600160a01b0381166105555760405162461bcd60e51b8152600401610462906111ad565b6000610562888888610af1565b905061056f888883610be5565b98975050505050505050565b60055461010090046001600160a01b031633146105aa5760405162461bcd60e51b81526004016104629061116c565b6105b2610c09565b565b60055461010090046001600160a01b031633146105e35760405162461bcd60e51b81526004016104629061116c565b80600081116106045760405162461bcd60e51b8152600401610462906111d6565b61060c610acd565b6106163383610c5b565b5050565b60055461010090046001600160a01b031633146106495760405162461bcd60e51b81526004016104629061116c565b806001600160a01b0381166106705760405162461bcd60e51b8152600401610462906111ad565b6001600160a01b038216600081815260076020526040808220805460ff19166001179055517fd91657a9c595e137181339fe473201ed2914e73e84facf80a2bc7c36fd08bd3f9190a25050565b33806106db5760405162461bcd60e51b8152600401610462906111ad565b6008546001600160a01b0316331461074d5760405162461bcd60e51b815260206004820152602f60248201527f4f6e6c79207468652070656e64696e67206f776e65722063616e20636f6e666960448201526e3936903a3432903a3930b739b332b960891b6064820152608401610462565b60058054600880546001600160a01b03818116610100908102610100600160a81b0319861617958690556001600160a01b03199092169092556040519281900482169304169082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60055461010090046001600160a01b031633146107ee5760405162461bcd60e51b81526004016104629061116c565b6105b2610c91565b60055461010090046001600160a01b031633146108255760405162461bcd60e51b81526004016104629061116c565b806001600160a01b03811661084c5760405162461bcd60e51b8152600401610462906111ad565b600680546001600160a01b0319166001600160a01b0384169081179091556040517f446e39bcf1b47cfadfaa23442cb4b34682cfe6bd9220da084894e3b1f834e4f390600090a25050565b60606004805461039690611132565b60006108b0610acd565b81600081116108d15760405162461bcd60e51b8152600401610462906111d6565b836001600160a01b0381166108f85760405162461bcd60e51b8152600401610462906111ad565b6000610905338787610af1565b90506109118682610cce565b9695505050505050565b60055461010090046001600160a01b0316331461094a5760405162461bcd60e51b81526004016104629061116c565b806001600160a01b0381166109715760405162461bcd60e51b8152600401610462906111ad565b50600880546001600160a01b0319166001600160a01b0392909216919091179055565b60055461010090046001600160a01b031633146109c35760405162461bcd60e51b81526004016104629061116c565b8061ffff16600081116109e85760405162461bcd60e51b8152600401610462906111d6565b60008261ffff16118015610a02575061012c8261ffff1611155b610a615760405162461bcd60e51b815260206004820152602a60248201527f466565206d757374206265206265747765656e203120616e642033303020626160448201526973697320706f696e747360b01b6064820152608401610462565b6008805461ffff60a01b1916600160a01b61ffff8581168202929092179283905560405192041681527fd9c5e2f60dbb90a63fa92d719310d8994ae26e50f17df1c2ab9433e484b4c3f89060200160405180910390a15050565b610ac88383836001610cdc565b505050565b60055460ff16156105b25760405163d93c066560e01b815260040160405180910390fd5b6001600160a01b03831660009081526007602052604081205460ff16158015610b3357506001600160a01b03831660009081526007602052604090205460ff16155b15610b3f575080610bde565b60085460009061271090610b5e90600160a01b900461ffff1685611214565b610b68919061122b565b600654909150610b839086906001600160a01b031683610db2565b836001600160a01b0316856001600160a01b03167ff228de527fc1b9843baac03b9a04565473a263375950e63435d4138464386f4683604051610bc891815260200190565b60405180910390a3610bda818461124d565b9150505b9392505050565b600033610bf3858285610e11565b610bfe858585610db2565b506001949350505050565b610c11610e89565b6005805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038216610c8557604051634b637e8f60e11b815260006004820152602401610462565b61061682600083610eac565b610c99610acd565b6005805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610c3e3390565b600033610427818585610db2565b6001600160a01b038416610d065760405163e602df0560e01b815260006004820152602401610462565b6001600160a01b038316610d3057604051634a1406b160e11b815260006004820152602401610462565b6001600160a01b0380851660009081526001602090815260408083209387168352929052208290558015610dac57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610da391815260200190565b60405180910390a35b50505050565b6001600160a01b038316610ddc57604051634b637e8f60e11b815260006004820152602401610462565b6001600160a01b038216610e065760405163ec442f0560e01b815260006004820152602401610462565b610ac8838383610eac565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198114610dac5781811015610e7a57604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610462565b610dac84848484036000610cdc565b60055460ff166105b257604051638dfc202b60e01b815260040160405180910390fd5b6001600160a01b038316610ed7578060026000828254610ecc9190611260565b90915550610f499050565b6001600160a01b03831660009081526020819052604090205481811015610f2a5760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401610462565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b038216610f6557600280548290039055610f84565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610fc991815260200190565b60405180910390a3505050565b60006020808352835180602085015260005b8181101561100457858101830151858201604001528201610fe8565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461103c57600080fd5b919050565b6000806040838503121561105457600080fd5b61105d83611025565b946020939093013593505050565b60006020828403121561107d57600080fd5b610bde82611025565b60008060006060848603121561109b57600080fd5b6110a484611025565b92506110b260208501611025565b9150604084013590509250925092565b6000602082840312156110d457600080fd5b5035919050565b600080604083850312156110ee57600080fd5b6110f783611025565b915061110560208401611025565b90509250929050565b60006020828403121561112057600080fd5b813561ffff81168114610bde57600080fd5b600181811c9082168061114657607f821691505b60208210810361116657634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526021908201527f4f6e6c79206f776e65722063616e2063616c6c20746869732066756e6374696f6040820152603760f91b606082015260800190565b6020808252600f908201526e496e76616c6964206164647265737360881b604082015260600190565b6020808252600e908201526d125b9d985b1a5908185b5bdd5b9d60921b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761042d5761042d6111fe565b60008261124857634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561042d5761042d6111fe565b8082018082111561042d5761042d6111fe56fea2646970667358221220abba3cd03196f4162f78db99894c5d0b685e6b12a55c052a4493ffa87faf0db964736f6c63430008190033", | ||
"nonce": "0x1a", | ||
"chainId": "0x38" | ||
}, | ||
"additionalContracts": [], | ||
"isFixedGasLimit": false | ||
} | ||
], | ||
"receipts": [ | ||
{ | ||
"status": "0x1", | ||
"cumulativeGasUsed": "0x7eef05", | ||
"logs": [ | ||
{ | ||
"address": "0x26dc7dd2a1c9a1f6da9cb992321f80fc91d73d3e", | ||
"topics": [ | ||
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", | ||
"0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"0x0000000000000000000000004310a13c5ef01a8c75cabac34c741a3227b4288e" | ||
], | ||
"data": "0x0000000000000000000000000000000000000000019d971e4fe8401e74000000", | ||
"blockHash": "0x748aec42d53373bd85a76269ae9f4124f7a787051664fb9382e2ab54be671553", | ||
"blockNumber": "0x298b4c3", | ||
"transactionHash": "0x5c79c5a213b3611c583912252b2f8bd35cf177151dda567b51604b7a9867d7d2", | ||
"transactionIndex": "0x45", | ||
"logIndex": "0xa4", | ||
"removed": false | ||
} | ||
], | ||
"logsBloom": "0x00004000000000000000000000000000000000000000040000000000000000800000000000000000000000000100000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000020000000000000000000800000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002100000000000000000000000000000000000000000000000000020000000000004000000000000000000000000000000000000000000000000000000", | ||
"type": "0x0", | ||
"transactionHash": "0x5c79c5a213b3611c583912252b2f8bd35cf177151dda567b51604b7a9867d7d2", | ||
"transactionIndex": "0x45", | ||
"blockHash": "0x748aec42d53373bd85a76269ae9f4124f7a787051664fb9382e2ab54be671553", | ||
"blockNumber": "0x298b4c3", | ||
"gasUsed": "0x12dcd9", | ||
"effectiveGasPrice": "0x3b9aca00", | ||
"from": "0x4310a13c5ef01a8c75cabac34c741a3227b4288e", | ||
"to": null, | ||
"contractAddress": "0x26dc7dd2a1c9a1f6da9cb992321f80fc91d73d3e" | ||
} | ||
], | ||
"libraries": [], | ||
"pending": [], | ||
"returns": { | ||
"0": { | ||
"internal_type": "contract PIFToken", | ||
"value": "0x26DC7Dd2A1C9a1F6da9cb992321F80Fc91d73d3E" | ||
} | ||
}, | ||
"timestamp": 1730266547, | ||
"chain": 56, | ||
"commit": "598f861" | ||
} |
Oops, something went wrong.