-
Notifications
You must be signed in to change notification settings - Fork 30
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
ddeff0d
commit 207b483
Showing
16 changed files
with
3,339 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package virtualfun | ||
|
||
import ( | ||
"bytes" | ||
|
||
"github.com/ethereum/go-ethereum/accounts/abi" | ||
) | ||
|
||
var ( | ||
erc20ABI abi.ABI | ||
pairABI abi.ABI | ||
factoryABI abi.ABI | ||
bondingABI abi.ABI | ||
) | ||
|
||
func init() { | ||
builder := []struct { | ||
ABI *abi.ABI | ||
data []byte | ||
}{ | ||
{ | ||
&erc20ABI, erc20ABIJson, | ||
}, | ||
{ | ||
&pairABI, pairABIJson, | ||
}, | ||
{ | ||
&factoryABI, factoryABIJson, | ||
}, | ||
{ | ||
&bondingABI, bodingABIJson, | ||
}, | ||
} | ||
|
||
for _, b := range builder { | ||
var err error | ||
*b.ABI, err = abi.JSON(bytes.NewReader(b.data)) | ||
if err != nil { | ||
panic(err) | ||
} | ||
} | ||
} |
Oops, something went wrong.