B
A
C
AC
B
A
B
ABCD
AC
ACD
ACD
BCD
ABD
A
B
AbstraxionProvider
const [showAbstraxion, setShowAbstraxion] = useModal();
setShowAbstraxion(true);
const [isOpen, setIsOpen] = useState(false);
const now = new Date();
setExecuteResult(claimRes);
Quiz 1
b
c
acd
bcd
b
AC
b
a
a
B
B
B
B
C
C
B
B
A
D
Quiz 1
B
B
B
D
B
C
C
D
A
B
A
B
B
C
Quiz 1
1B
2C
3C
B
B
B
#[cfg(not(feature = "library"))]
use cosmwasm_std::entry_point;
Uint128, Uint64
use cw2::set_contract_version;
use cw20::{Cw20Contract, Cw20ExecuteMsg, Cw20ReceiveMsg};
pub fn instantiate( deps: DepsMut, _env: Env, info: MessageInfo, msg: InstantiateMsg ) -> Result<Response, ContractError> {}
#[cfg_attr(not(feature = "library"), entry_point)]
set_contract_version(deps.storage, CONTRACT_NAME, CONTRACT_VERSION)?;
以下答案一题俩个
let owner = msg.admin
.unwrap_or(info.sender);
以上答案一题俩个
let config = Config {};
owner: owner.clone(),
CONFIG.save(deps.storage, &config)?;
POT_SEQ.save(deps.storage, &0u64);
.add_attribute("owner", owner)
.add_attribute("cw20_addr", msg.cw20_addr)
pub fn execute( deps: DepsMut, _env: Env, info: MessageInfo, msg: ExecuteMsg ) -> Result<Response, ContractError> {}
#[cfg_attr(not(feature = "library"), entry_point)]
match msg {}
ExecuteMsg::Receive(msg) => execute_receive(deps, info, msg)
pub fn execute_create_pot( deps: DepsMut, info: MessageInfo, target_addr: String, threshold: Uint128 ) -> Result<Response, ContractError> {}
let config = CONFIG.load(deps.storage);
if config.owner != info.sender {}
return Err(ContractError::Unauthorized {});
let pot = Pot {};
collected: Uint128::zero()
save_pot(deps, &pot);
.add_attribute("target_addr", target_addr)
let config = CONFIG.load(deps.storage);
let msg: ReceiveMsg = from_json(&wrapped.msg);
receive_send(deps, id, wrapped.amount, info.sender)
pot_id: Uint64,
cw20_addr: Addr
let mut pot = POTS.load(deps.storage, pot_id.u64());
pot.collected += amount;
if pot.collected >= pot.threshold {}
let cw20 = Cw20Contract(cw20_addr);
let msg = cw20.call
res = res.add_message(msg);
to_json_binary(&query_pot(deps, id))
利用 Treasury Contracts 创建无 Gas 体验
C
D
D
D
B
D
C
const [isOpen, setIsOpen] = useState(false);
Quiz 1
D
D
D
