From 1083ff4eb3665306066462c66a1414557effbfcc Mon Sep 17 00:00:00 2001
From: clabby
Date: Sun, 18 Feb 2024 10:35:43 -0500
Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Extend=20license=20(#26)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
LICENSE.md | 4 ++--
README.md | 1 -
crates/preimage/src/traits.rs | 14 +++++++++++++-
3 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/LICENSE.md b/LICENSE.md
index 62d29a734..6a24f8692 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,7 +1,7 @@
-The MIT License (MIT)
-=====================
+# The MIT License (MIT)
Copyright © `2023` `kona contributors`
+Copyright © `2024` `Optimism`
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
diff --git a/README.md b/README.md
index 5f1c34071..fd286cce3 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,6 @@
-
diff --git a/crates/preimage/src/traits.rs b/crates/preimage/src/traits.rs
index a65a95973..e7676c3d6 100644
--- a/crates/preimage/src/traits.rs
+++ b/crates/preimage/src/traits.rs
@@ -6,9 +6,17 @@ use anyhow::Result;
pub trait PreimageOracleClient {
/// Get the data corresponding to the currently set key from the host. Return the data in a new heap allocated
/// `Vec`
+ ///
+ /// # Returns
+ /// - `Ok(Vec)` if the data was successfully fetched from the host.
+ /// - `Err(_)` if the data could not be fetched from the host.
fn get(&mut self, key: PreimageKey) -> Result>;
- /// Get the data corresponding to the currently set key from the host. Write the data into the provided buffer
+ /// Get the data corresponding to the currently set key from the host. Writes the data into the provided buffer.
+ ///
+ /// # Returns
+ /// - `Ok(())` if the data was successfully written into the buffer.
+ /// - `Err(_)` if the data could not be written into the buffer.
fn get_exact(&mut self, key: PreimageKey, buf: &mut [u8]) -> Result<()>;
}
@@ -16,5 +24,9 @@ pub trait PreimageOracleClient {
pub trait HintWriterClient {
/// Write a hint to the host. This will overwrite any existing hint in the pipe, and block until all data has been
/// written.
+ ///
+ /// # Returns
+ /// - `Ok(())` if the hint was successfully written to the host.
+ /// - `Err(_)` if the hint could not be written to the host.
fn write(&self, hint: &str) -> Result<()>;
}