Skip to content

Commit

Permalink
Add contractmeta to the crowdfund contract (#109)
Browse files Browse the repository at this point in the history
* Add contractmeta to the crowdfund contract

* update rust deps
  • Loading branch information
paulbellamy committed Jun 2, 2023
1 parent 7615fd0 commit 804366a
Showing 1 changed file with 7 additions and 1 deletion.
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

0 comments on commit 804366a

Please sign in to comment.