-
I am using Ubuntu 22.04 ARM64, when run following command I meet problem: $ forge script script/Interactions.s.sol:MintBasicNft --rpc-url http://localhost:8545 --private-key $FIRST_ANVIL_PRIVATE_KEY --broadcast
[⠊] Compiling...
No files changed, compilation skipped
Traces:
[1139609] → new DevOpsTools@0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512
└─ ← [Return] 5692 bytes of code
[228375] → new MintBasicNft@0x5b73C5498c1E3b4dbA84de0F1833c4a029d90519
└─ ← [Return] 1030 bytes of code
[1145083] MintBasicNft::run()
├─ [1142147] DevOpsTools::get_most_recent_deployment("BasicNft", 31337 [3.133e4]) [delegatecall]
│ ├─ [0] VM::readDir("./broadcast", 3) [staticcall]
│ │ └─ ← [Return] [("", "/home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/DeployBasicNft.s.sol", 1, true, false), ("", "/home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/DeployBasicNft.s.sol/11155111", 2, true, false), ("", "/home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/DeployBasicNft.s.sol/11155111/run-1711536472.json", 3, false, false), ("", "/home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/DeployBasicNft.s.sol/11155111/run-1711536498.json", 3, false, false), ("", "/home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/DeployBasicNft.s.sol/11155111/run-1711536528.json", 3, false, false), ("", "/home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/DeployBasicNft.s.sol/11155111/run-latest.json", 3, false, false), ("", "/home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/DeployBasicNft.s.sol/31337", 2, true, false), ("", "/home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/DeployBasicNft.s.sol/31337/run-1714904279.json", 3, false, false), ("", "/home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/DeployBasicNft.s.sol/31337/run-1714908725.json", 3, false, false), ("", "/home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/DeployBasicNft.s.sol/31337/run-1714910074.json", 3, false, false), ("", "/home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/DeployBasicNft.s.sol/31337/run-1714915836.json", 3, false, false), ("", "/home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/DeployBasicNft.s.sol/31337/run-1714918324.json", 3, false, false), ("", "/home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/DeployBasicNft.s.sol/31337/run-latest.json", 3, false, false), ("", "/home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/DeployMoodNft.s.sol", 1, true, false), ("", "/home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/DeployMoodNft.s.sol/11155111", 2, true, false), ("", "/home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/DeployMoodNft.s.sol/11155111/run-1711766857.json", 3, false, false), ("", "/home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/DeployMoodNft.s.sol/11155111/run-1711766871.json", 3, false, false), ("", "/home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/DeployMoodNft.s.sol/11155111/run-1711766906.json", 3, false, false), ("", "/home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/DeployMoodNft.s.sol/11155111/run-latest.json", 3, false, false), ("", "/home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/DeployMoodNft.s.sol/31337", 2, true, false), ("", "/home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/DeployMoodNft.s.sol/31337/run-1711765066.json", 3, false, false), ("", "/home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/DeployMoodNft.s.sol/31337/run-1711765629.json", 3, false, false), ("", "/home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/DeployMoodNft.s.sol/31337/run-1711765630.json", 3, false, false), ("", "/home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/DeployMoodNft.s.sol/31337/run-latest.json", 3, false, false), ("", "/home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/Interactions.s.sol", 1, true, false), ("", "/home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/Interactions.s.sol/11155111", 2, true, false), ("", "/home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/Interactions.s.sol/11155111/run-1711537434.json", 3, false, false), ("", "/home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/Interactions.s.sol/11155111/run-1711537441.json", 3, false, false), ("", "/home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/Interactions.s.sol/11155111/run-1711537484.json", 3, false, false), ("", "/home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/Interactions.s.sol/11155111/run-latest.json", 3, false, false)]
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::readFile("/home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/DeployBasicNft.s.sol/31337/run-latest.json") [staticcall]
│ │ └─ ← [Return] <file>
│ ├─ [0] VM::parseJsonUint("<stringified JSON>", ".timestamp") [staticcall]
│ │ └─ ← [Return] 1714918324 [1.714e9]
│ ├─ [0] console::log("Processing: ", "/home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/DeployBasicNft.s.sol/31337/run-latest.json") [staticcall]
│ │ └─ ← [Stop]
│ ├─ [0] VM::parseJson("<JSON file>", "$.transactions") [staticcall]
│ │ └─ ← [Return] <encoded JSON value>
│ ├─ [0] VM::keyExists("<JSON file>", "$.transactions[0].rpc") [staticcall]
│ │ └─ ← [Return] false
│ └─ ← [Revert] EvmError: Revert
└─ ← [Revert] EvmError: Revert
== Logs ==
Processing: /home/parallels/LightTechZen/Patrick/foundry-nft-f24/broadcast/DeployBasicNft.s.sol/31337/run-latest.json
Error:
script failed: <empty revert data> This is my foundry.toml file: [profile.default]
src = "src"
out = "out"
libs = ["lib"]
ffi = true # DevOpsTools need ffi set to true
fs_permissions = [
{ access = "read", path = "./images/" },
{ access = "read", path = "./broadcast" },
]
remappings = ['@openzeppelin/contracts=lib/openzeppelin-contracts/contracts']
# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options
|
Beta Was this translation helpful? Give feedback.
Answered by
lightrao
May 6, 2024
Replies: 2 comments 11 replies
-
Hello @lightrao, So i tried running my script too and I ran into the same issue. Maybe something is wrong the loyalty@Loyaltys-MacBook-Pro ERC721 % make mint
forge script script/Interactions/MintBasicNFT.s.sol:MintBasicNFT --rpc-url http://localhost:8545 --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 --broadcast
[⠊] Compiling...
[⠃] Compiling 33 files with Solc 0.8.23
[⠒] Solc 0.8.23 finished in 4.90s
Compiler run successful!
EIP-3855 is not supported in one or more of the RPCs used.
Unsupported Chain IDs: 31337.
Contracts deployed with a Solidity version equal or higher than 0.8.20 might not work properly.
For more information, please see https://eips.ethereum.org/EIPS/eip-3855
Traces:
[1131599] → new DevOpsTools@0x5FbDB2315678afecb367f032d93F642f64180aa3
└─ ← [Return] 5652 bytes of code
[390929] → new MintBasicNFT@0x5b73C5498c1E3b4dbA84de0F1833c4a029d90519
└─ ← [Return] 1842 bytes of code
[2564692] MintBasicNFT::run()
├─ [2557279] DevOpsTools::get_most_recent_deployment("BasicNFT", 31337 [3.133e4]) [delegatecall]
│ ├─ [0] VM::readDir("./broadcast", 3) [staticcall]
│ │ └─ ← [Return] [("", "/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/DeployBasicNFT.s.sol", 1, true, false), ("", "/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/DeployBasicNFT.s.sol/11155111", 2, true, false), ("", "/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/DeployBasicNFT.s.sol/11155111/run-1709737069.json", 3, false, false), ("", "/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/DeployBasicNFT.s.sol/11155111/run-1709737082.json", 3, false, false), ("", "/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/DeployBasicNFT.s.sol/11155111/run-1709737103.json", 3, false, false), ("", "/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/DeployBasicNFT.s.sol/11155111/run-1714030010.json", 3, false, false), ("", "/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/DeployBasicNFT.s.sol/11155111/run-latest.json", 3, false, false), ("", "/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/DeployBasicNFT.s.sol/31337", 2, true, false), ("", "/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/DeployBasicNFT.s.sol/31337/run-1709736169.json", 3, false, false), ("", "/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/DeployBasicNFT.s.sol/31337/run-latest.json", 3, false, false), ("", "/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/DeployMoodNFT.s.sol", 1, true, false), ("", "/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/DeployMoodNFT.s.sol/31337", 2, true, false), ("", "/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/DeployMoodNFT.s.sol/31337/run-1709807101.json", 3, false, false), ("", "/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/DeployMoodNFT.s.sol/31337/run-1709807102.json", 3, false, false), ("", "/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/DeployMoodNFT.s.sol/31337/run-latest.json", 3, false, false), ("", "/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/MintBasicNFT.s.sol", 1, true, false), ("", "/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/MintBasicNFT.s.sol/11155111", 2, true, false), ("", "/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/MintBasicNFT.s.sol/11155111/run-1709737448.json", 3, false, false), ("", "/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/MintBasicNFT.s.sol/11155111/run-1709737456.json", 3, false, false), ("", "/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/MintBasicNFT.s.sol/11155111/run-1709742543.json", 3, false, false), ("", "/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/MintBasicNFT.s.sol/11155111/run-1709742557.json", 3, false, false), ("", "/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/MintBasicNFT.s.sol/11155111/run-1709742860.json", 3, false, false), ("", "/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/MintBasicNFT.s.sol/11155111/run-1709742867.json", 3, false, false), ("", "/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/MintBasicNFT.s.sol/11155111/run-1711401445.json", 3, false, false), ("", "/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/MintBasicNFT.s.sol/11155111/run-latest.json", 3, false, false), ("", "/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/MintBasicNFT.s.sol/31337", 2, true, false), ("", "/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/MintBasicNFT.s.sol/31337/run-1709736622.json", 3, false, false), ("", "/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/MintBasicNFT.s.sol/31337/run-latest.json", 3, false, false)]
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::readFile("/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/DeployBasicNFT.s.sol/31337/run-latest.json") [staticcall]
│ │ └─ ← [Return] <file>
│ ├─ [0] VM::parseJsonUint("<stringified JSON>", ".timestamp") [staticcall]
│ │ └─ ← [Return] 1709736169 [1.709e9]
│ ├─ [0] console::log("Processing: ", "/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/DeployBasicNFT.s.sol/31337/run-latest.json") [staticcall]
│ │ └─ ← [Stop]
│ ├─ [0] VM::parseJson("<JSON file>", "$.transactions") [staticcall]
│ │ └─ ← [Return] <encoded JSON value>
│ ├─ [0] VM::keyExists("<JSON file>", "$.transactions[0].rpc") [staticcall]
│ │ └─ ← [Return] false
│ ├─ [0] console::log("Inspecting %s transactions", 1) [staticcall]
│ │ └─ ← [Stop]
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::readFile("/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/DeployMoodNFT.s.sol/31337/run-latest.json") [staticcall]
│ │ └─ ← [Return] <file>
│ ├─ [0] VM::parseJsonUint("<stringified JSON>", ".timestamp") [staticcall]
│ │ └─ ← [Return] 1709807102 [1.709e9]
│ ├─ [0] console::log("Processing: ", "/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/DeployMoodNFT.s.sol/31337/run-latest.json") [staticcall]
│ │ └─ ← [Stop]
│ ├─ [0] VM::parseJson("<JSON file>", "$.transactions") [staticcall]
│ │ └─ ← [Return] <encoded JSON value>
│ ├─ [0] VM::keyExists("<JSON file>", "$.transactions[0].rpc") [staticcall]
│ │ └─ ← [Return] false
│ ├─ [0] console::log("Inspecting %s transactions", 1) [staticcall]
│ │ └─ ← [Stop]
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← [Return] "31337"
│ ├─ [0] VM::readFile("/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/MintBasicNFT.s.sol/31337/run-latest.json") [staticcall]
│ │ └─ ← [Return] <file>
│ ├─ [0] VM::parseJsonUint("<stringified JSON>", ".timestamp") [staticcall]
│ │ └─ ← [Return] 1709736622 [1.709e9]
│ ├─ [0] console::log("Processing: ", "/Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/MintBasicNFT.s.sol/31337/run-latest.json") [staticcall]
│ │ └─ ← [Stop]
│ ├─ [0] VM::parseJson("<JSON file>", "$.transactions") [staticcall]
│ │ └─ ← [Return] <encoded JSON value>
│ ├─ [0] VM::keyExists("<JSON file>", "$.transactions[0].rpc") [staticcall]
│ │ └─ ← [Return] false
│ ├─ [0] console::log("Inspecting %s transactions", 2) [staticcall]
│ │ └─ ← [Stop]
│ └─ ← [Return] DevOpsTools: [0x5FbDB2315678afecb367f032d93F642f64180aa3]
├─ [0] console::log("The returned address is: ", DevOpsTools: [0x5FbDB2315678afecb367f032d93F642f64180aa3]) [staticcall]
│ └─ ← [Stop]
├─ [0] VM::startBroadcast()
│ └─ ← [Return]
├─ [0] console::log("Minting of the BasicNFT is about to commence on chain: ", 31337 [3.133e4]) [staticcall]
│ └─ ← [Stop]
├─ [0] console::log("The passed in tokenURI is: ", "https://ipfs.io/ipfs/QmfNN5LKRtjy4p9eaQbAZMiFzWhn6dtS3u8tf2WVNJX996?filename=BasicNFTMetadata.json") [staticcall]
│ └─ ← [Stop]
├─ [154] DevOpsTools::mintNFT("https://ipfs.io/ipfs/QmfNN5LKRtjy4p9eaQbAZMiFzWhn6dtS3u8tf2WVNJX996?filename=BasicNFTMetadata.json")
│ └─ ← [Revert] EvmError: Revert
└─ ← [Revert] EvmError: Revert
== Logs ==
Processing: /Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/DeployBasicNFT.s.sol/31337/run-latest.json
Inspecting 1 transactions
Processing: /Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/DeployMoodNFT.s.sol/31337/run-latest.json
Inspecting 1 transactions
Processing: /Users/loyalty/Desktop/CyfrinGig/ADVANCEDFOUNDRY/ERC721/broadcast/MintBasicNFT.s.sol/31337/run-latest.json
Inspecting 2 transactions
The returned address is: 0x5FbDB2315678afecb367f032d93F642f64180aa3
Minting of the BasicNFT is about to commence on chain: 31337
The passed in tokenURI is: https://ipfs.io/ipfs/QmfNN5LKRtjy4p9eaQbAZMiFzWhn6dtS3u8tf2WVNJX996?filename=BasicNFTMetadata.json
Error:
script failed: <empty revert data>
make: *** [mint] Error 1
loyalty@Loyaltys-MacBook-Pro ERC721 % |
Beta Was this translation helpful? Give feedback.
3 replies
-
I create a custom funciton as alternative to DevOpsTools.get_most_recent_deployment: function getDeployedContractAddress() private view returns (address) {
string memory path = string.concat(
vm.projectRoot(),
"/broadcast/DeployYourContract.s.sol/",
Strings.toString(block.chainid),
"/run-latest.json"
);
string memory json = vm.readFile(path);
bytes memory contractAddress = stdJson.parseRaw(
json,
".transactions[0].contractAddress"
);
return (bytesToAddress(contractAddress));
}
function bytesToAddress(
bytes memory bys
) private pure returns (address addr) {
assembly {
addr := mload(add(bys, 32))
}
} |
Beta Was this translation helpful? Give feedback.
8 replies
Answer selected by
lightrao
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I create a custom funciton as alternative to DevOpsTools.get_most_recent_deployment: