Last active
April 23, 2024 18:33
-
-
Save stackup-dev/9b751c2d5cf62dd5eb70aaa54a56ba24 to your computer and use it in GitHub Desktop.
lib.rs
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
// Copyright (c) Zefchain Labs, Inc. | |
// SPDX-License-Identifier: Apache-2.0 | |
use async_graphql::{InputObject, Request, Response}; | |
use linera_sdk::base::{Amount, ChainId, ContractAbi, Owner, ServiceAbi}; | |
use linera_sdk::graphql::GraphQLMutationRoot; | |
use serde::{Deserialize, Serialize}; | |
pub struct FungibleAbi; | |
impl ContractAbi for FungibleAbi { | |
type Parameters = (); | |
type InitializationArgument = Amount; | |
type Operation = Operation; | |
type Response = (); | |
} | |
impl ServiceAbi for FungibleAbi { | |
type Parameters = (); | |
type Query = Request; | |
type QueryResponse = Response; | |
} | |
// INSERT OPERATION CODE HERE | |
// INSERT MESSAGE CODE HERE | |
#[derive( | |
Clone, Copy, Debug, Deserialize, Eq, Ord, PartialEq, PartialOrd, Serialize, InputObject, | |
)] | |
pub struct Account { | |
pub chain_id: ChainId, | |
pub owner: Owner, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment