Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add contractmeta to the crowdfund contract #109

Merged
merged 5 commits into from
Jun 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion contracts/crowdfund/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![no_std]
use soroban_sdk::{contractimpl, contracttype, token, Address, Env, IntoVal, RawVal};
use soroban_sdk::{contractimpl, contractmeta, contracttype, token, Address, Env, IntoVal, RawVal};

mod events;
mod test;
Expand Down Expand Up @@ -128,6 +128,12 @@ fn transfer(e: &Env, to: &Address, amount: &i128) {
client.transfer(&e.current_contract_address(), to, amount);
}

// Metadata that is added on to the WASM custom section
contractmeta!(
key = "Description",
val = "Crowdfunding contract that allows users to deposit tokens and withdraw them if the target is not met"
);

struct Crowdfund;

/*
Expand Down