mirror of
https://github.com/vacp2p/staking-reward-streamer.git
synced 2026-01-08 20:48:00 -05:00
chore(KarmaNFT): update deploy scripts with proper svg strings
This commit is contained in:
@@ -32,13 +32,13 @@
|
||||
+=====================================================================================================================+
|
||||
| Deployment Cost | Deployment Size | | | | |
|
||||
|-----------------------------------------------------------+-----------------+---------+---------+---------+---------|
|
||||
| 4469681 | 21713 | | | | |
|
||||
| 4547651 | 22072 | | | | |
|
||||
|-----------------------------------------------------------+-----------------+---------+---------+---------+---------|
|
||||
| | | | | | |
|
||||
|-----------------------------------------------------------+-----------------+---------+---------+---------+---------|
|
||||
| Function Name | Min | Avg | Median | Max | # Calls |
|
||||
|-----------------------------------------------------------+-----------------+---------+---------+---------+---------|
|
||||
| runForTest | 3621745 | 3621745 | 3621745 | 3621745 | 10 |
|
||||
| runForTest | 3778602 | 3778602 | 3778602 | 3778602 | 10 |
|
||||
╰-----------------------------------------------------------+-----------------+---------+---------+---------+---------╯
|
||||
|
||||
╭-----------------------------------------------------------------------------+-----------------+---------+---------+---------+---------╮
|
||||
@@ -332,7 +332,7 @@
|
||||
+===============================================================================================================================================+
|
||||
| Deployment Cost | Deployment Size | | | | |
|
||||
|------------------------------------------------------------------------------------------+-----------------+-------+--------+-------+---------|
|
||||
| 1204853 | 6015 | | | | |
|
||||
| 1204853 | 6207 | | | | |
|
||||
|------------------------------------------------------------------------------------------+-----------------+-------+--------+-------+---------|
|
||||
| | | | | | |
|
||||
|------------------------------------------------------------------------------------------+-----------------+-------+--------+-------+---------|
|
||||
|
||||
@@ -27,7 +27,11 @@ contract DeployKarmaNFTScript is BaseScript {
|
||||
vm.startBroadcast(deployer);
|
||||
|
||||
// Deploy NFT metadata generator
|
||||
NFTMetadataGeneratorSVG metadataGenerator = new NFTMetadataGeneratorSVG("<svg>", "</svg>");
|
||||
string memory svgPrefix =
|
||||
// solhint-disable-next-line
|
||||
"<svg width=\"200\" height=\"200\" viewBox=\"0 0 200 200\"><rect x=\"0\" y=\"0\" width=\"100%\" height=\"100%\" stroke=\"black\" stroke-width=\"3px\" fill=\"white\"/><text x=\"50%\" y=\"50%\" dominant-baseline=\"middle\" text-anchor=\"middle\">";
|
||||
string memory svgSuffix = "</text></svg>";
|
||||
NFTMetadataGeneratorSVG metadataGenerator = new NFTMetadataGeneratorSVG(svgPrefix, svgSuffix);
|
||||
|
||||
// Deploy KarmaNFT
|
||||
KarmaNFT karmaNFT = new KarmaNFT(karmaAddress, address(metadataGenerator));
|
||||
|
||||
@@ -13,7 +13,11 @@ contract DeployMetadataGenerator is BaseScript {
|
||||
(address deployer,,) = deploymentConfig.activeNetworkConfig();
|
||||
|
||||
vm.startBroadcast(deployer);
|
||||
NFTMetadataGeneratorSVG metadataGenerator = new NFTMetadataGeneratorSVG("<svg>", "</svg>");
|
||||
string memory svgPrefix =
|
||||
// solhint-disable-next-line
|
||||
"<svg width=\"200\" height=\"200\" viewBox=\"0 0 200 200\"><rect x=\"0\" y=\"0\" width=\"100%\" height=\"100%\" stroke=\"black\" stroke-width=\"3px\" fill=\"white\"/><text x=\"50%\" y=\"50%\" dominant-baseline=\"middle\" text-anchor=\"middle\">";
|
||||
string memory svgSuffix = "</text></svg>";
|
||||
NFTMetadataGeneratorSVG metadataGenerator = new NFTMetadataGeneratorSVG(svgPrefix, svgSuffix);
|
||||
vm.stopBroadcast();
|
||||
|
||||
return (INFTMetadataGenerator(metadataGenerator), deploymentConfig);
|
||||
|
||||
@@ -3,7 +3,6 @@ pragma solidity ^0.8.26;
|
||||
|
||||
import { Test } from "forge-std/Test.sol";
|
||||
import { Base64 } from "@openzeppelin/contracts/utils/Base64.sol";
|
||||
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
|
||||
import { MockToken } from "../mocks/MockToken.sol";
|
||||
import { NFTMetadataGeneratorSVG } from "../../src/nft-metadata-generators/NFTMetadataGeneratorSVG.sol";
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ pragma solidity ^0.8.26;
|
||||
|
||||
import { Test } from "forge-std/Test.sol";
|
||||
import { Base64 } from "@openzeppelin/contracts/utils/Base64.sol";
|
||||
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
|
||||
import { MockToken } from "../mocks/MockToken.sol";
|
||||
import { NFTMetadataGeneratorURL } from "../../src/nft-metadata-generators/NFTMetadataGeneratorURL.sol";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user