-
Notifications
You must be signed in to change notification settings - Fork 307
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b1614a8
commit 6e86e03
Showing
48 changed files
with
1,372 additions
and
860 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
[ | ||
{ "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ "indexed": false, "internalType": "bytes32", "name": "id", "type": "bytes32" }, | ||
{ "indexed": false, "internalType": "address", "name": "claimer", "type": "address" }, | ||
{ "indexed": false, "internalType": "uint256", "name": "claimed_value", "type": "uint256" }, | ||
{ "indexed": false, "internalType": "address", "name": "token_address", "type": "address" } | ||
], | ||
"name": "ClaimSuccess", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ "indexed": false, "internalType": "uint256", "name": "total", "type": "uint256" }, | ||
{ "indexed": false, "internalType": "bytes32", "name": "id", "type": "bytes32" }, | ||
{ "indexed": false, "internalType": "address", "name": "creator", "type": "address" }, | ||
{ "indexed": false, "internalType": "uint256", "name": "creation_time", "type": "uint256" }, | ||
{ "indexed": false, "internalType": "address", "name": "token_address", "type": "address" } | ||
], | ||
"name": "CreationSuccess", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ "indexed": false, "internalType": "bytes32", "name": "id", "type": "bytes32" }, | ||
{ "indexed": false, "internalType": "address", "name": "token_address", "type": "address" }, | ||
{ "indexed": false, "internalType": "uint256", "name": "remaining_balance", "type": "uint256" } | ||
], | ||
"name": "RefundSuccess", | ||
"type": "event" | ||
}, | ||
{ | ||
"inputs": [{ "internalType": "bytes32", "name": "id", "type": "bytes32" }], | ||
"name": "check_availability", | ||
"outputs": [ | ||
{ "internalType": "address", "name": "token_address", "type": "address" }, | ||
{ "internalType": "uint256", "name": "balance", "type": "uint256" }, | ||
{ "internalType": "uint256", "name": "total", "type": "uint256" }, | ||
{ "internalType": "uint256", "name": "claimed", "type": "uint256" }, | ||
{ "internalType": "bool", "name": "expired", "type": "bool" }, | ||
{ "internalType": "bool", "name": "ifclaimed", "type": "bool" } | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [{ "internalType": "bytes32", "name": "id", "type": "bytes32" }], | ||
"name": "check_claimed_list", | ||
"outputs": [{ "internalType": "address[]", "name": "claimer_addrs", "type": "address[]" }], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ "internalType": "bytes32", "name": "id", "type": "bytes32" }, | ||
{ "internalType": "string", "name": "password", "type": "string" }, | ||
{ "internalType": "address", "name": "_recipient", "type": "address" }, | ||
{ "internalType": "bytes32", "name": "validation", "type": "bytes32" } | ||
], | ||
"name": "claim", | ||
"outputs": [{ "internalType": "uint256", "name": "claimed", "type": "uint256" }], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "contract_creator", | ||
"outputs": [{ "internalType": "address", "name": "", "type": "address" }], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ "internalType": "bytes32", "name": "_hash", "type": "bytes32" }, | ||
{ "internalType": "uint8", "name": "_number", "type": "uint8" }, | ||
{ "internalType": "bool", "name": "_ifrandom", "type": "bool" }, | ||
{ "internalType": "uint256", "name": "_duration", "type": "uint256" }, | ||
{ "internalType": "bytes32", "name": "_seed", "type": "bytes32" }, | ||
{ "internalType": "string", "name": "_message", "type": "string" }, | ||
{ "internalType": "string", "name": "_name", "type": "string" }, | ||
{ "internalType": "uint256", "name": "_token_type", "type": "uint256" }, | ||
{ "internalType": "address", "name": "_token_addr", "type": "address" }, | ||
{ "internalType": "uint256", "name": "_total_tokens", "type": "uint256" } | ||
], | ||
"name": "create_red_packet", | ||
"outputs": [], | ||
"stateMutability": "payable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [{ "internalType": "bytes32", "name": "id", "type": "bytes32" }], | ||
"name": "refund", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [{ "internalType": "address", "name": "a", "type": "address" }], | ||
"name": "toBytes", | ||
"outputs": [{ "internalType": "bytes", "name": "b", "type": "bytes" }], | ||
"stateMutability": "pure", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ "internalType": "uint256", "name": "token_type", "type": "uint256" }, | ||
{ "internalType": "address", "name": "token_address", "type": "address" }, | ||
{ "internalType": "address", "name": "sender_address", "type": "address" }, | ||
{ "internalType": "address", "name": "recipient_address", "type": "address" }, | ||
{ "internalType": "uint256", "name": "amount", "type": "uint256" } | ||
], | ||
"name": "transfer_token", | ||
"outputs": [], | ||
"stateMutability": "payable", | ||
"type": "function" | ||
} | ||
] |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
/* Autogenerated file. Do not edit manually. */ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
|
||
import BN from 'bn.js' | ||
import { Contract, ContractOptions } from 'web3-eth-contract' | ||
import { EventLog } from 'web3-core' | ||
import { EventEmitter } from 'events' | ||
import { ContractEvent, Callback, TransactionObject, BlockType } from './types' | ||
|
||
interface EventOptions { | ||
filter?: object | ||
fromBlock?: BlockType | ||
topics?: string[] | ||
} | ||
|
||
export class HappyRedPacketV1 extends Contract { | ||
constructor(jsonInterface: any[], address?: string, options?: ContractOptions) | ||
clone(): HappyRedPacketV1 | ||
methods: { | ||
check_availability(id: string | number[]): TransactionObject<{ | ||
token_address: string | ||
balance: string | ||
total: string | ||
claimed: string | ||
expired: boolean | ||
ifclaimed: boolean | ||
0: string | ||
1: string | ||
2: string | ||
3: string | ||
4: boolean | ||
5: boolean | ||
}> | ||
|
||
check_claimed_list(id: string | number[]): TransactionObject<string[]> | ||
|
||
claim( | ||
id: string | number[], | ||
password: string, | ||
_recipient: string, | ||
validation: string | number[], | ||
): TransactionObject<string> | ||
|
||
contract_creator(): TransactionObject<string> | ||
|
||
create_red_packet( | ||
_hash: string | number[], | ||
_number: number | string, | ||
_ifrandom: boolean, | ||
_duration: number | string, | ||
_seed: string | number[], | ||
_message: string, | ||
_name: string, | ||
_token_type: number | string, | ||
_token_addr: string, | ||
_total_tokens: number | string, | ||
): TransactionObject<void> | ||
|
||
refund(id: string | number[]): TransactionObject<void> | ||
|
||
toBytes(a: string): TransactionObject<string> | ||
|
||
transfer_token( | ||
token_type: number | string, | ||
token_address: string, | ||
sender_address: string, | ||
recipient_address: string, | ||
amount: number | string, | ||
): TransactionObject<void> | ||
} | ||
events: { | ||
ClaimSuccess: ContractEvent<{ | ||
id: string | ||
claimer: string | ||
claimed_value: string | ||
token_address: string | ||
0: string | ||
1: string | ||
2: string | ||
3: string | ||
}> | ||
CreationSuccess: ContractEvent<{ | ||
total: string | ||
id: string | ||
creator: string | ||
creation_time: string | ||
token_address: string | ||
0: string | ||
1: string | ||
2: string | ||
3: string | ||
4: string | ||
}> | ||
RefundSuccess: ContractEvent<{ | ||
id: string | ||
token_address: string | ||
remaining_balance: string | ||
0: string | ||
1: string | ||
2: string | ||
}> | ||
allEvents: (options?: EventOptions, cb?: Callback<EventLog>) => EventEmitter | ||
} | ||
} |
Oops, something went wrong.