Skip to content

Commit 7524758

Browse files
author
Michael Spengler
committed
first commit
0 parents  commit 7524758

File tree

5 files changed

+62
-0
lines changed

5 files changed

+62
-0
lines changed

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 michael spengler
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Web3
2+
3+
4+
This project is in draft mode.
5+
6+
This repo shall be moved to https://github.com/ethereum.
7+
8+
9+
## Usage Examples
10+
See [test.ts](https://github.com/michael-spengler/web3/blob/master/test.ts) file.
11+
12+
13+
## Trigger Test Execution
14+
```ts
15+
16+
deno test https://deno.land/x/web3/test.ts
17+
18+
```

mod.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './web3-eth.ts'

test.ts

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { fail, assertEquals } from "https://deno.land/std/testing/asserts.ts";
2+
import { Web3Eth } from "./web3-eth.ts";
3+
4+
5+
Deno.test("get balance", async (): Promise<void> => {
6+
7+
try {
8+
const exampleAddress = '0x....'
9+
Web3Eth.getBalance(exampleAddress)
10+
fail('An error was expected as implementation has not begun yet.')
11+
} catch(error){
12+
assertEquals('Method needs to be implemented', error.message)
13+
}
14+
15+
});

web3-eth.ts

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export class Web3Eth {
2+
3+
public static getBalance(address: string): number {
4+
throw new Error('Method needs to be implemented')
5+
}
6+
7+
}

0 commit comments

Comments
 (0)