Skip to content

Commit

Permalink
feat: rakki first pass (#847)
Browse files Browse the repository at this point in the history
Signed-off-by: Norman Meier <[email protected]>
Co-authored-by: WaDadidou <[email protected]>
  • Loading branch information
n0izn0iz and WaDadidou authored Dec 1, 2024
1 parent da58577 commit b9a393a
Show file tree
Hide file tree
Showing 36 changed files with 3,981 additions and 30 deletions.
92 changes: 92 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

150 changes: 150 additions & 0 deletions assets/logos/rakki-ticket.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions go/pkg/networks/features.gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const (
FeatureTypeLaunchpadERC20 = FeatureType("LaunchpadERC20")
FeatureTypeNFTMarketplaceLeaderboard = FeatureType("NFTMarketplaceLeaderboard")
FeatureTypeCosmWasmNFTsBurner = FeatureType("CosmWasmNFTsBurner")
FeatureTypeCosmWasmRakki = FeatureType("CosmWasmRakki")
)

type FeatureCosmWasmPremiumFeed struct {
Expand Down Expand Up @@ -146,6 +147,26 @@ func (nb *NetworkBase) GetFeatureNFTMarketplace() (*FeatureNFTMarketplace, error
return feature.(*FeatureNFTMarketplace), nil
}

type FeatureCosmWasmRakki struct {
*FeatureBase
CodeId float64 `json:"codeId"`
ContractAddress string `json:"contractAddress"`
}

var _ Feature = &FeatureCosmWasmRakki{}

func (f FeatureCosmWasmRakki) Type() FeatureType {
return FeatureTypeCosmWasmRakki
}

func (nb *NetworkBase) GetFeatureCosmWasmRakki() (*FeatureCosmWasmRakki, error) {
feature, err := nb.GetFeature(FeatureTypeCosmWasmRakki)
if err != nil {
return nil, err
}
return feature.(*FeatureCosmWasmRakki), nil
}

func UnmarshalFeature(b []byte) (Feature, error) {
var base FeatureBase
if err := json.Unmarshal(b, &base); err != nil {
Expand Down Expand Up @@ -188,6 +209,12 @@ func UnmarshalFeature(b []byte) (Feature, error) {
return nil, errors.Wrap(err, "failed to unmarshal feature NFTMarketplace")
}
return &f, nil
case FeatureTypeCosmWasmRakki:
var f FeatureCosmWasmRakki
if err := json.Unmarshal(b, &f); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal feature CosmWasmRakki")
}
return &f, nil
}
return nil, errors.Errorf("unknown feature type %s", base.Type)
}
8 changes: 7 additions & 1 deletion networks.json
Original file line number Diff line number Diff line change
Expand Up @@ -11605,7 +11605,8 @@
"CosmWasmNFTLaunchpad",
"CosmWasmPremiumFeed",
"NFTMarketplaceLeaderboard",
"CosmWasmNFTsBurner"
"CosmWasmNFTsBurner",
"CosmWasmRakki"
],
"featureObjects": [
{
Expand All @@ -11629,6 +11630,11 @@
"nftTr721CodeId": 60,
"codeId": 71,
"defaultMintDenom": "utori"
},
{
"type": "CosmWasmRakki",
"codeId": 79,
"contractAddress": "tori1smdl4c0mc4kqsrg42rhrx5czqwxtp2gml0v8yrzhclesf5n47wzqds7dx3"
}
],
"currencies": [
Expand Down
9 changes: 9 additions & 0 deletions packages/components/gradientText/GradientText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import {
gradientColorPurple,
gradientColorSalmon,
gradientColorTurquoise,
rakkiYellow,
rakkiYellowLight,
} from "../../utils/style/colors";
import { BrandText } from "../BrandText";

Expand All @@ -34,6 +36,7 @@ export type GradientType =
| "pink"
| "gray"
| "grayLight"
| "yellow"
| "feed-map-normal-post"
| "feed-map-article-post"
| "feed-map-video-post"
Expand Down Expand Up @@ -110,6 +113,12 @@ const gradient = (type: GradientType): LinearGradientProps => {
start,
end,
};
case "yellow":
return {
colors: [rakkiYellow, rakkiYellowLight],
start,
end,
};
case getMapPostTextGradientType(PostCategory.Normal):
return getMapPostTextGradient(PostCategory.Normal);
case getMapPostTextGradientType(PostCategory.Article):
Expand Down
4 changes: 4 additions & 0 deletions packages/components/gradientText/GradientText.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import {
gradientColorPurple,
gradientColorSalmon,
gradientColorTurquoise,
rakkiYellow,
rakkiYellowLight,
} from "../../utils/style/colors";
import { exoFontFamilyFromFontWeight } from "../../utils/style/fonts";

Expand All @@ -40,6 +42,8 @@ const gradient = (type: GradientType) => {
return `90deg, ${gradientColorGray} 0%, ${gradientColorLightGray} 100%`;
case "grayLight":
return `90deg, ${gradientColorLighterGray} 0%, ${gradientColorLightLavender} 100%`;
case "yellow":
return `267deg, ${rakkiYellow} 0%, ${rakkiYellowLight} 100%`;
case getMapPostTextGradientType(PostCategory.Normal):
return getMapPostTextGradientString(PostCategory.Normal);
case getMapPostTextGradientType(PostCategory.Article):
Expand Down
28 changes: 17 additions & 11 deletions packages/components/loaders/LoaderFullScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,23 @@ export const LoaderFullScreen: React.FC<{ visible: boolean }> = ({
}) => {
return (
<Modal visible={visible} transparent>
<View
style={{
width: "100%",
height: "100%",
backgroundColor: "rgba(0,0,0,.8)",
position: "absolute",
zIndex: 10,
}}
>
<AnimatedLoader testID="loader-full-screen" />
</View>
<LoaderFullSize />
</Modal>
);
};

export const LoaderFullSize: React.FC = () => {
return (
<View
style={{
width: "100%",
height: "100%",
flex: 1,
backgroundColor: "rgba(0,0,0,.8)",
position: "absolute",
}}
>
<AnimatedLoader />
</View>
);
};
6 changes: 6 additions & 0 deletions packages/components/navigation/getNormalModeScreens.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import { ProjectsMakeRequestScreen } from "@/screens/Projects/ProjectsMakeReques
import { ProjectsManagerScreen } from "@/screens/Projects/ProjectsManagerScreen";
import { ProjectsPaymentScreen } from "@/screens/Projects/ProjectsPaymentScreen";
import { ProjectsScreen } from "@/screens/Projects/ProjectsScreen";
import { RakkiScreen } from "@/screens/Rakki/RakkiScreen";
import { RiotGameBreedingScreen } from "@/screens/RiotGame/RiotGameBreedingScreen";
import { RiotGameEnrollScreen } from "@/screens/RiotGame/RiotGameEnrollScreen";
import { RiotGameFightScreen } from "@/screens/RiotGame/RiotGameFightScreen";
Expand Down Expand Up @@ -536,6 +537,11 @@ export const getNormalModeScreens = ({ appMode }: { appMode: AppMode }) => {
component={BurnCapitalScreen}
options={{ header: () => null, title: screenTitle("Burn Capital") }}
/>
<Nav.Screen
name="Rakki"
component={RakkiScreen}
options={{ header: () => null, title: screenTitle("Rakki") }}
/>
{platformScreens}
</>
);
Expand Down
Loading

0 comments on commit b9a393a

Please sign in to comment.