@grumble-studios/rug-or-rumble 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +69 -0
- package/package.json +34 -0
- package/src/RugOrRumble.d.ts +777 -0
- package/src/RugOrRumble.js +775 -0
- package/src/index.d.ts +7 -0
- package/src/index.js +7 -0
package/README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Rug or Rumble Contract ABIs
|
|
2
|
+
|
|
3
|
+
This package contains the ABIs and TypeScript types for the Rug or Rumble smart contracts.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @rug-or-rumble/contracts
|
|
9
|
+
# or
|
|
10
|
+
yarn add @rug-or-rumble/contracts
|
|
11
|
+
# or
|
|
12
|
+
pnpm add @rug-or-rumble/contracts
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
### Import all ABIs
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { ABIs } from '@rug-or-rumble/contracts';
|
|
21
|
+
|
|
22
|
+
console.log(ABIs.RugOrRumble); // Access the RugOrRumble ABI
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Import specific contract ABI
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
import { RugOrRumbleABI } from '@rug-or-rumble/contracts';
|
|
29
|
+
// or
|
|
30
|
+
import RugOrRumble from '@rug-or-rumble/contracts/RugOrRumble';
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Use with ethers.js
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
import { ethers } from 'ethers';
|
|
37
|
+
import { RugOrRumbleABI } from '@rug-or-rumble/contracts';
|
|
38
|
+
|
|
39
|
+
const contract = new ethers.Contract(
|
|
40
|
+
contractAddress,
|
|
41
|
+
RugOrRumbleABI,
|
|
42
|
+
signerOrProvider
|
|
43
|
+
);
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Use with viem
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
import { getContract } from 'viem';
|
|
50
|
+
import { RugOrRumbleABI } from '@rug-or-rumble/contracts';
|
|
51
|
+
|
|
52
|
+
const contract = getContract({
|
|
53
|
+
address: contractAddress,
|
|
54
|
+
abi: RugOrRumbleABI,
|
|
55
|
+
client: publicClient,
|
|
56
|
+
});
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Available Contracts
|
|
60
|
+
|
|
61
|
+
- RugOrRumble
|
|
62
|
+
|
|
63
|
+
## TypeScript Support
|
|
64
|
+
|
|
65
|
+
This package includes TypeScript type definitions for all ABIs.
|
|
66
|
+
|
|
67
|
+
## License
|
|
68
|
+
|
|
69
|
+
ISC
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@grumble-studios/rug-or-rumble",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Smart contract ABIs and TypeScript types for Rug or Rumble game",
|
|
5
|
+
"main": "./src/index.js",
|
|
6
|
+
"module": "./src/index.js",
|
|
7
|
+
"types": "./src/index.d.ts",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./src/index.d.ts",
|
|
12
|
+
"import": "./src/index.js",
|
|
13
|
+
"require": "./src/index.js"
|
|
14
|
+
},
|
|
15
|
+
"./RugOrRumble": {
|
|
16
|
+
"types": "./src/RugOrRumble.d.ts",
|
|
17
|
+
"import": "./src/RugOrRumble.js",
|
|
18
|
+
"require": "./src/RugOrRumble.js"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"src/**/*",
|
|
23
|
+
"README.md"
|
|
24
|
+
],
|
|
25
|
+
"keywords": [
|
|
26
|
+
"grumble-studios",
|
|
27
|
+
"rug-or-rumble",
|
|
28
|
+
"smart-contract",
|
|
29
|
+
"abi",
|
|
30
|
+
"monad",
|
|
31
|
+
"blockchain",
|
|
32
|
+
"solidity"
|
|
33
|
+
]
|
|
34
|
+
}
|