Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
contract_backend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Odysseus
contract_backend
Commits
f7c93036
Commit
f7c93036
authored
Jan 08, 2025
by
贾浩@五瓣科技
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
53370b76
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
contract.go
dao/contract.go
+2
-0
dao.go
dao/dao.go
+3
-1
No files found.
dao/contract.go
View file @
f7c93036
...
@@ -15,6 +15,8 @@ import (
...
@@ -15,6 +15,8 @@ import (
)
)
func
(
d
*
Dao
)
LoginByServer
(
byteKey
[]
byte
,
userAddress
,
userId
string
)
(
txHash
common
.
Hash
,
err
error
)
{
func
(
d
*
Dao
)
LoginByServer
(
byteKey
[]
byte
,
userAddress
,
userId
string
)
(
txHash
common
.
Hash
,
err
error
)
{
d
.
executorLock
.
Lock
()
defer
d
.
executorLock
.
Unlock
()
instance
,
err
:=
aon_user
.
NewAonUser
(
common
.
HexToAddress
(
d
.
c
.
Chain
.
UserContract
),
d
.
ethClient
)
instance
,
err
:=
aon_user
.
NewAonUser
(
common
.
HexToAddress
(
d
.
c
.
Chain
.
UserContract
),
d
.
ethClient
)
if
err
!=
nil
{
if
err
!=
nil
{
return
common
.
Hash
{},
err
return
common
.
Hash
{},
err
...
...
dao/dao.go
View file @
f7c93036
...
@@ -11,6 +11,7 @@ import (
...
@@ -11,6 +11,7 @@ import (
"github.com/ethereum/go-ethereum/ethclient"
"github.com/ethereum/go-ethereum/ethclient"
"github.com/ethereum/go-ethereum/rpc"
"github.com/ethereum/go-ethereum/rpc"
log
"github.com/sirupsen/logrus"
"gorm.io/driver/postgres"
"gorm.io/driver/postgres"
"gorm.io/gorm"
"gorm.io/gorm"
"gorm.io/gorm/logger"
"gorm.io/gorm/logger"
...
@@ -25,6 +26,7 @@ type Dao struct {
...
@@ -25,6 +26,7 @@ type Dao struct {
ethRPC
*
rpc
.
Client
ethRPC
*
rpc
.
Client
gasSenderNonce
uint64
gasSenderNonce
uint64
gasSenderLock
sync
.
Mutex
gasSenderLock
sync
.
Mutex
executorLock
sync
.
Mutex
gasPrice
*
big
.
Int
gasPrice
*
big
.
Int
}
}
...
@@ -48,7 +50,7 @@ func New(_c *config.Config) (dao *Dao, err error) {
...
@@ -48,7 +50,7 @@ func New(_c *config.Config) (dao *Dao, err error) {
if
err
!=
nil
{
if
err
!=
nil
{
return
return
}
}
log
.
Infoln
(
"chainId:"
,
chainId
)
dao
.
chainId
=
chainId
dao
.
chainId
=
chainId
if
_c
.
PGSQL
.
CertFile
!=
""
{
if
_c
.
PGSQL
.
CertFile
!=
""
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment