Files
core/script/svg/FollowSVGGen.s.sol
donosonaumczuk 93bdfcb5a0 misc: SVG generators became scripts instead of tests
Co-authored-by: Victor Naumik <vicnaum@gmail.com>
2023-11-14 15:12:08 -03:00

27 lines
738 B
Solidity

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
import 'forge-std/Script.sol';
import {FollowSVG} from 'contracts/libraries/svgs/Follow/FollowSVG.sol';
contract FollowNFT {
function tryWithTokenId(uint256 tokenId) external pure returns (string memory) {
return FollowSVG.getFollowSVG(tokenId);
}
}
contract FollowSVGGen is Script {
FollowNFT followNFT;
string constant dir = 'svgs/';
function setUp() public {
followNFT = new FollowNFT();
}
function run() external {
vm.writeFile(string.concat(dir, 'follows/follow_1_gold.svg'), followNFT.tryWithTokenId(1));
vm.writeFile(string.concat(dir, 'follows/follow_11_normal.svg'), followNFT.tryWithTokenId(11));
}
}