Skip to content

Commit

Permalink
Merge pull request #205 from FindoraNetwork/fix/prism-bridge-abi
Browse files Browse the repository at this point in the history
fix: prism bridge abi
  • Loading branch information
GiambiHuang committed Sep 13, 2023
2 parents e579a61 + c08d723 commit 5501cb6
Show file tree
Hide file tree
Showing 9 changed files with 846 additions and 1,251 deletions.
394 changes: 108 additions & 286 deletions dist/api/evm/abis/SimBridge.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion dist/api/evm/evm.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { IWebLinkedInfo } from './web3';
export declare const fraAddressToHashAddress: (address: string) => string;
export declare const hashAddressTofraAddressOld: (addresss: string) => Promise<string>;
export declare const hashAddressTofraAddress: (addresss: string, bridgeAddress: string, web3WalletInfo: IWebLinkedInfo) => Promise<string>;
export declare const hashAddressTofraAddressByNFT: (addresss: string, tokenId: string) => Promise<string>;
export declare const hashAddressTofraAddressByNFT: (address: string, tokenId: string, bridgeAddress: string, web3WalletInfo: IWebLinkedInfo) => Promise<string>;
export declare const hashAddressTofraAddressBy1155: (address: string, tokenId: string, bridgeAddress: string, web3WalletInfo: IWebLinkedInfo) => Promise<string>;
export declare const fraToBar: (bridgeAddress: string, recipientAddress: string, amount: string, web3WalletInfo: IWebLinkedInfo) => Promise<TransactionReceipt | any>;
export declare const approveToken: (tokenAddress: string, deckAddress: string, price: string, web3WalletInfo: IWebLinkedInfo) => Promise<import("web3-eth").TransactionReceipt>;
export declare const frc20ToBar: (bridgeAddress: string, recipientAddress: string, tokenAddress: string, tokenAmount: string, web3WalletInfo: IWebLinkedInfo) => Promise<TransactionReceipt | any>;
Expand Down
34 changes: 28 additions & 6 deletions dist/api/evm/evm.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/api/evm/evm.js.map

Large diffs are not rendered by default.

127 changes: 42 additions & 85 deletions dist/api/evm/types/SimBridge.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,14 @@ export interface MethodConstantReturnContext<TCallReturn> {
export interface MethodReturnContext extends MethodPayableReturnContext {
}
export type ContractContext = Web3ContractContext<SimBridge, SimBridgeMethodNames, SimBridgeEventsContext, SimBridgeEvents>;
export type SimBridgeEvents = 'DepositFRA' | 'DepositFRC1155' | 'DepositFRC20' | 'DepositFRC721' | 'OwnershipTransferred' | 'WithdrawFRA' | 'WithdrawFRC1155' | 'WithdrawFRC20' | 'WithdrawFRC721';
export type SimBridgeEvents = 'DepositAsset' | 'DepositFRA' | 'DepositFRC1155' | 'DepositFRC20' | 'DepositFRC721' | 'Initialized' | 'OwnershipTransferred' | 'WithdrawFRA' | 'WithdrawFRC1155' | 'WithdrawFRC20' | 'WithdrawFRC721';
export interface SimBridgeEventsContext {
DepositAsset(parameters: {
filter?: {};
fromBlock?: number;
toBlock?: 'latest' | number;
topics?: string[];
}, callback?: (error: Error, event: EventData) => void): EventResponse;
DepositFRA(parameters: {
filter?: {};
fromBlock?: number;
Expand All @@ -59,6 +65,12 @@ export interface SimBridgeEventsContext {
toBlock?: 'latest' | number;
topics?: string[];
}, callback?: (error: Error, event: EventData) => void): EventResponse;
Initialized(parameters: {
filter?: {};
fromBlock?: number;
toBlock?: 'latest' | number;
topics?: string[];
}, callback?: (error: Error, event: EventData) => void): EventResponse;
OwnershipTransferred(parameters: {
filter?: {
previousOwner?: string | string[];
Expand Down Expand Up @@ -93,7 +105,14 @@ export interface SimBridgeEventsContext {
topics?: string[];
}, callback?: (error: Error, event: EventData) => void): EventResponse;
}
export type SimBridgeMethodNames = 'new' | '__self' | '_consumeMint' | '_withdrawAsset' | '_withdrawFRA' | 'adminSetAsset' | 'adminSetLedger' | 'asset_contract' | 'computeERC20AssetType' | 'computeNFTAssetType' | 'consumeMint' | 'depositFRA' | 'depositFRC1155' | 'depositFRC20' | 'depositFRC721' | 'ledger_contract' | 'ops' | 'owner' | 'proxy_contract' | 'renounceOwnership' | 'transferOwnership' | 'withdrawAsset' | 'withdrawFRA';
export type SimBridgeMethodNames = 'adminSetAsset' | 'adminSetLedger' | 'asset_contract' | 'computeERC1155AssetType' | 'computeERC20AssetType' | 'computeERC721AssetType' | 'depositFRA' | 'depositFRC1155' | 'depositFRC20' | 'depositFRC721' | 'initialize' | 'ledger_contract' | 'owner' | 'renounceOwnership' | 'transferOwnership' | 'withdrawAsset' | 'withdrawFRA';
export interface DepositAssetEventEmittedResponse {
asset: string | number[];
receiver: string | number[];
amount: string;
decimal: string | number;
max_supply: string;
}
export interface DepositFRAEventEmittedResponse {
_from: string;
_to: string | number[];
Expand All @@ -118,6 +137,9 @@ export interface DepositFRC721EventEmittedResponse {
_to: string | number[];
_id: string;
}
export interface InitializedEventEmittedResponse {
version: string | number;
}
export interface OwnershipTransferredEventEmittedResponse {
previousOwner: string;
newOwner: string;
Expand Down Expand Up @@ -146,65 +168,7 @@ export interface WithdrawFRC721EventEmittedResponse {
_to: string;
_id: string;
}
export interface MintopResponse {
asset: string;
receiver: string;
amount: string;
decimal: string;
max_supply: string;
}
export interface OpsResponse {
asset: string;
receiver: string;
amount: string;
decimal: string;
max_supply: string;
}
export interface SimBridge {
/**
* Payable: false
* Constant: false
* StateMutability: nonpayable
* Type: constructor
* @param _proxy_contract Type: address, Indexed: false
*/
'new'(_proxy_contract: string): MethodReturnContext;
/**
* Payable: false
* Constant: true
* StateMutability: view
* Type: function
*/
__self(): MethodConstantReturnContext<string>;
/**
* Payable: false
* Constant: false
* StateMutability: nonpayable
* Type: function
*/
_consumeMint(): MethodReturnContext;
/**
* Payable: false
* Constant: false
* StateMutability: nonpayable
* Type: function
* @param _asset Type: bytes32, Indexed: false
* @param _from Type: bytes, Indexed: false
* @param _to Type: address, Indexed: false
* @param _value Type: uint256, Indexed: false
* @param _data Type: bytes, Indexed: false
*/
_withdrawAsset(_asset: string | number[], _from: string | number[], _to: string, _value: string, _data: string | number[]): MethodReturnContext;
/**
* Payable: false
* Constant: false
* StateMutability: nonpayable
* Type: function
* @param _to Type: address, Indexed: false
* @param _value Type: uint256, Indexed: false
* @param _data Type: bytes, Indexed: false
*/
_withdrawFRA(_to: string, _value: string, _data: string | number[]): MethodReturnContext;
/**
* Payable: false
* Constant: false
Expand All @@ -231,27 +195,29 @@ export interface SimBridge {
/**
* Payable: false
* Constant: true
* StateMutability: pure
* StateMutability: view
* Type: function
* @param addr Type: address, Indexed: false
* @param tokenId Type: uint256, Indexed: false
*/
computeERC20AssetType(addr: string): MethodConstantReturnContext<string>;
computeERC1155AssetType(addr: string, tokenId: string): MethodConstantReturnContext<string>;
/**
* Payable: false
* Constant: true
* StateMutability: pure
* StateMutability: view
* Type: function
* @param addr Type: address, Indexed: false
* @param tokenId Type: uint256, Indexed: false
*/
computeNFTAssetType(addr: string, tokenId: string): MethodConstantReturnContext<string>;
computeERC20AssetType(addr: string): MethodConstantReturnContext<string>;
/**
* Payable: false
* Constant: false
* StateMutability: nonpayable
* Constant: true
* StateMutability: view
* Type: function
* @param addr Type: address, Indexed: false
* @param tokenId Type: uint256, Indexed: false
*/
consumeMint(): MethodReturnContext;
computeERC721AssetType(addr: string, tokenId: string): MethodConstantReturnContext<string>;
/**
* Payable: true
* Constant: false
Expand Down Expand Up @@ -293,33 +259,25 @@ export interface SimBridge {
depositFRC721(_addr: string, _to: string | number[], _id: string): MethodReturnContext;
/**
* Payable: false
* Constant: true
* StateMutability: view
* Constant: false
* StateMutability: nonpayable
* Type: function
*/
ledger_contract(): MethodConstantReturnContext<string>;
initialize(): MethodReturnContext;
/**
* Payable: false
* Constant: true
* StateMutability: view
* Type: function
* @param parameter0 Type: uint256, Indexed: false
*/
ops(parameter0: string): MethodConstantReturnContext<OpsResponse>;
ledger_contract(): MethodConstantReturnContext<string>;
/**
* Payable: false
* Constant: true
* StateMutability: view
* Type: function
*/
owner(): MethodConstantReturnContext<string>;
/**
* Payable: false
* Constant: true
* StateMutability: view
* Type: function
*/
proxy_contract(): MethodConstantReturnContext<string>;
/**
* Payable: false
* Constant: false
Expand Down Expand Up @@ -352,10 +310,9 @@ export interface SimBridge {
* Constant: false
* StateMutability: nonpayable
* Type: function
* @param _from Type: bytes, Indexed: false
* @param _to Type: address, Indexed: false
* @param _value Type: uint256, Indexed: false
* @param _data Type: bytes, Indexed: false
* @param to Type: address, Indexed: false
* @param value Type: uint256, Indexed: false
* @param data Type: bytes, Indexed: false
*/
withdrawFRA(_from: string | number[], _to: string, _value: string, _data: string | number[]): MethodReturnContext;
withdrawFRA(to: string, value: string, data: string | number[]): MethodReturnContext;
}
2 changes: 1 addition & 1 deletion dist/run.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 5501cb6

Please sign in to comment.